| | 1 | | // Copyright (c) Microsoft Corporation. All rights reserved. |
| | 2 | | // Licensed under the MIT License. |
| | 3 | |
|
| | 4 | | using System.IO; |
| | 5 | | using Azure.Storage.Internal.Avro; |
| | 6 | |
|
| | 7 | | namespace Azure.Storage.Blobs.ChangeFeed |
| | 8 | | { |
| | 9 | | /// <summary> |
| | 10 | | /// Creates AvroReaders. Allows us to inject mock AvroReaders in |
| | 11 | | /// the Chunk unit tests. |
| | 12 | | /// </summary> |
| | 13 | | internal class AvroReaderFactory |
| | 14 | | { |
| | 15 | | public virtual AvroReader BuildAvroReader(Stream dataStream) |
| 168 | 16 | | => new AvroReader(dataStream); |
| | 17 | |
|
| | 18 | | public virtual AvroReader BuildAvroReader( |
| | 19 | | Stream dataStream, |
| | 20 | | Stream headStream, |
| | 21 | | long blockOffset, |
| | 22 | | long eventIndex) |
| 48 | 23 | | => new AvroReader( |
| 48 | 24 | | dataStream, |
| 48 | 25 | | headStream, |
| 48 | 26 | | blockOffset, |
| 48 | 27 | | eventIndex); |
| | 28 | | } |
| | 29 | | } |