| | | 1 | | // Copyright (c) Microsoft Corporation. All rights reserved. |
| | | 2 | | // Licensed under the MIT License. |
| | | 3 | | |
| | | 4 | | using System; |
| | | 5 | | using System.IO; |
| | | 6 | | |
| | | 7 | | namespace Azure.Core.TestFramework |
| | | 8 | | { |
| | | 9 | | public class NonSeekableMemoryStream : MemoryStream |
| | | 10 | | { |
| | 24 | 11 | | public NonSeekableMemoryStream() |
| | | 12 | | { |
| | 24 | 13 | | } |
| | | 14 | | |
| | 24 | 15 | | public NonSeekableMemoryStream(byte[] buffer) : base(buffer) |
| | | 16 | | { |
| | 24 | 17 | | } |
| | | 18 | | |
| | 48 | 19 | | public override bool CanSeek => false; |
| | | 20 | | |
| | | 21 | | public override long Seek(long offset, SeekOrigin loc) |
| | | 22 | | { |
| | 0 | 23 | | throw new NotImplementedException(); |
| | | 24 | | } |
| | | 25 | | |
| | | 26 | | public override long Position |
| | | 27 | | { |
| | 0 | 28 | | get => throw new NotImplementedException(); |
| | 0 | 29 | | set => throw new NotImplementedException(); |
| | | 30 | | } |
| | | 31 | | |
| | | 32 | | public void Reset() |
| | | 33 | | { |
| | 24 | 34 | | base.Position = 0; |
| | 24 | 35 | | } |
| | | 36 | | } |
| | | 37 | | } |