Class DataWriterDataSink
A IDataSink for Windows.Storage.Streams.DataWriter.
Inheritance
System.Object
DataWriterDataSink
Implements
Namespace: PSPDFKitFoundation.Data
Assembly: PSPDFKitFoundation.dll
Syntax
public sealed class DataWriterDataSink : IDataSink
Constructors
DataWriterDataSink(DataWriter, DataSinkOption)
Constructs a DataWriterDataSink for a Windows.Storage.Streams.DataWriter.
Declaration
public DataWriterDataSink(DataWriter dataWriter, DataSinkOption option)
Parameters
Type | Name | Description |
---|---|---|
Windows.Storage.Streams.DataWriter | dataWriter | |
DataSinkOption | option | Whether data should be appended to or replaced. |
Properties
DataSinkOption
The DataSinkOption the data sink was constructed with.
Declaration
public DataSinkOption DataSinkOption { get; }
Property Value
Type | Description |
---|---|
DataSinkOption |
Finished
Set to true if Finish() is called.
Declaration
public bool Finished { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Methods
Finish()
All writing operations are complete. This can be useful for situations such as encrypting the output.
Declaration
public bool Finish()
Returns
Type | Description |
---|---|
System.Boolean | True if successful. |
WriteDataAsync(IBuffer)
Data to be written or appended to the data sink.
Declaration
public IAsyncOperation<bool> WriteDataAsync(IBuffer data)
Parameters
Type | Name | Description |
---|---|---|
Windows.Storage.Streams.IBuffer | data | The Windows.Storage.Streams.IBuffer of data to be written. |
Returns
Type | Description |
---|---|
Windows.Foundation.IAsyncOperation<System.Boolean> | True if successful. |