Class ExampleDataProvider

An implementation of IDataProvider that wraps a Windows.Storage.Streams.IRandomAccessStream.

Inheritance
System.Object
ExampleDataProvider
Implements
Namespace: Catalog.Helpers
Assembly: Catalog.dll
Syntax
public sealed class ExampleDataProvider : IDataProvider

Constructors

ExampleDataProvider(IRandomAccessStream)

Constructs a ExampleDataProvider from an Windows.Storage.Streams.IRandomAccessStream.

Declaration
public ExampleDataProvider(IRandomAccessStream stream)
Parameters
Type Name Description
Windows.Storage.Streams.IRandomAccessStream stream

The Windows.Storage.Streams.IRandomAccessStream that provides the data.

Properties

Size

Declaration
public ulong Size { get; }
Property Value
Type Description
System.UInt64

SupportsWriting

Declaration
public bool SupportsWriting { get; }
Property Value
Type Description
System.Boolean

Uid

Declaration
public string Uid { get; }
Property Value
Type Description
System.String

Methods

CreateDataSink(DataSinkOption)

Declaration
public IDataSink CreateDataSink(DataSinkOption option)
Parameters
Type Name Description
DataSinkOption option
Returns
Type Description
IDataSink

ReadAsync(UInt32, UInt32)

Declaration
public IAsyncOperation<IBuffer> ReadAsync(uint size, uint offset)
Parameters
Type Name Description
System.UInt32 size
System.UInt32 offset
Returns
Type Description
Windows.Foundation.IAsyncOperation<Windows.Storage.Streams.IBuffer>

ReplaceWithDataSinkAsync(IDataSink)

Declaration
public IAsyncOperation<bool> ReplaceWithDataSinkAsync(IDataSink dataSink)
Parameters
Type Name Description
IDataSink dataSink
Returns
Type Description
Windows.Foundation.IAsyncOperation<System.Boolean>

Implements

IDataProvider