|
| 1 | +// Licensed to the .NET Foundation under one or more agreements. |
| 2 | +// The .NET Foundation licenses this file to you under the MIT license. |
| 3 | +// See the LICENSE file in the project root for more information. |
| 4 | + |
| 5 | +#if NET |
| 6 | + |
| 7 | +using System; |
| 8 | +using System.IO; |
| 9 | + |
| 10 | +namespace Microsoft.Data.SqlTypes |
| 11 | +{ |
| 12 | + /// <include file='../../../../../../doc/snippets/Microsoft.Data.SqlTypes/SqlFileStream.xml' path='docs/members[@name="SqlFileStream"]/SqlFileStream/*' /> |
| 13 | + public sealed class SqlFileStream : Stream |
| 14 | + { |
| 15 | + /// <include file='../../../../../../doc/snippets/Microsoft.Data.SqlTypes/SqlFileStream.xml' path='docs/members[@name="SqlFileStream"]/ctor1/*' /> |
| 16 | + public SqlFileStream(string path, byte[] transactionContext, FileAccess access) |
| 17 | + { |
| 18 | + throw new PlatformNotSupportedException(Strings.SqlFileStream_NotSupported); |
| 19 | + } |
| 20 | + |
| 21 | + /// <include file='../../../../../../doc/snippets/Microsoft.Data.SqlTypes/SqlFileStream.xml' path='docs/members[@name="SqlFileStream"]/ctor2/*' /> |
| 22 | + public SqlFileStream(string path, byte[] transactionContext, FileAccess access, FileOptions options, Int64 allocationSize) |
| 23 | + { |
| 24 | + throw new PlatformNotSupportedException(Strings.SqlFileStream_NotSupported); |
| 25 | + } |
| 26 | + |
| 27 | + /// <include file='../../../../../../doc/snippets/Microsoft.Data.SqlTypes/SqlFileStream.xml' path='docs/members[@name="SqlFileStream"]/Name/*' /> |
| 28 | + public string Name |
| 29 | + { |
| 30 | + get => throw new PlatformNotSupportedException(Strings.SqlFileStream_NotSupported); |
| 31 | + } |
| 32 | + |
| 33 | + /// <include file='../../../../../../doc/snippets/Microsoft.Data.SqlTypes/SqlFileStream.xml' path='docs/members[@name="SqlFileStream"]/TransactionContext/*' /> |
| 34 | + public byte[] TransactionContext |
| 35 | + { |
| 36 | + get => throw new PlatformNotSupportedException(Strings.SqlFileStream_NotSupported); |
| 37 | + } |
| 38 | + |
| 39 | + /// <include file='../../../../../../doc/snippets/Microsoft.Data.SqlTypes/SqlFileStream.xml' path='docs/members[@name="SqlFileStream"]/CanRead/*' /> |
| 40 | + public override bool CanRead |
| 41 | + { |
| 42 | + get => throw new PlatformNotSupportedException(Strings.SqlFileStream_NotSupported); |
| 43 | + } |
| 44 | + |
| 45 | + /// <include file='../../../../../../doc/snippets/Microsoft.Data.SqlTypes/SqlFileStream.xml' path='docs/members[@name="SqlFileStream"]/CanSeek/*' /> |
| 46 | + public override bool CanSeek |
| 47 | + { |
| 48 | + get => throw new PlatformNotSupportedException(Strings.SqlFileStream_NotSupported); |
| 49 | + } |
| 50 | + |
| 51 | + /// <include file='../../../../../../doc/snippets/Microsoft.Data.SqlTypes/SqlFileStream.xml' path='docs/members[@name="SqlFileStream"]/CanWrite/*' /> |
| 52 | + public override bool CanWrite |
| 53 | + { |
| 54 | + get => throw new PlatformNotSupportedException(Strings.SqlFileStream_NotSupported); |
| 55 | + } |
| 56 | + |
| 57 | + /// <include file='../../../../../../doc/snippets/Microsoft.Data.SqlTypes/SqlFileStream.xml' path='docs/members[@name="SqlFileStream"]/Length/*' /> |
| 58 | + public override long Length |
| 59 | + { |
| 60 | + get => throw new PlatformNotSupportedException(Strings.SqlFileStream_NotSupported); |
| 61 | + } |
| 62 | + |
| 63 | + /// <include file='../../../../../../doc/snippets/Microsoft.Data.SqlTypes/SqlFileStream.xml' path='docs/members[@name="SqlFileStream"]/Position/*' /> |
| 64 | + public override long Position |
| 65 | + { |
| 66 | + get => throw new PlatformNotSupportedException(Strings.SqlFileStream_NotSupported); |
| 67 | + set => throw new PlatformNotSupportedException(Strings.SqlFileStream_NotSupported); |
| 68 | + } |
| 69 | + |
| 70 | + /// <include file='../../../../../../doc/snippets/Microsoft.Data.SqlTypes/SqlFileStream.xml' path='docs/members[@name="SqlFileStream"]/Flush/*' /> |
| 71 | + public override void Flush() => |
| 72 | + throw new PlatformNotSupportedException(Strings.SqlFileStream_NotSupported); |
| 73 | + |
| 74 | + /// <include file='../../../../../../doc/snippets/Microsoft.Data.SqlTypes/SqlFileStream.xml' path='docs/members[@name="SqlFileStream"]/Read/*' /> |
| 75 | + public override int Read(byte[] buffer, int offset, int count) => |
| 76 | + throw new PlatformNotSupportedException(Strings.SqlFileStream_NotSupported); |
| 77 | + |
| 78 | + /// <include file='../../../../../../doc/snippets/Microsoft.Data.SqlTypes/SqlFileStream.xml' path='docs/members[@name="SqlFileStream"]/Seek/*' /> |
| 79 | + public override long Seek(long offset, System.IO.SeekOrigin origin) => |
| 80 | + throw new PlatformNotSupportedException(Strings.SqlFileStream_NotSupported); |
| 81 | + |
| 82 | + /// <include file='../../../../../../doc/snippets/Microsoft.Data.SqlTypes/SqlFileStream.xml' path='docs/members[@name="SqlFileStream"]/SetLength/*' /> |
| 83 | + public override void SetLength(long value) => |
| 84 | + throw new PlatformNotSupportedException(Strings.SqlFileStream_NotSupported); |
| 85 | + |
| 86 | + /// <include file='../../../../../../doc/snippets/Microsoft.Data.SqlTypes/SqlFileStream.xml' path='docs/members[@name="SqlFileStream"]/Write/*' /> |
| 87 | + public override void Write(byte[] buffer, int offset, int count) => |
| 88 | + throw new PlatformNotSupportedException(Strings.SqlFileStream_NotSupported); |
| 89 | + } |
| 90 | +} |
| 91 | + |
| 92 | +#endif |
0 commit comments