Interface IDataStreamWriter
Writer for DataStreams.
Namespace: Kephas.Data.IO.DataStreams
Assembly: Kephas.Data.IO.dll
Syntax
[SingletonAppServiceContract(AllowMultiple = true, MetadataAttributes = new Type[]{typeof(SupportedMediaTypesAttribute)})]
public interface IDataStreamWriter
Methods
| Improve this Doc View SourceCanWrite(DataStream)
Determines whether this instance can write to the specified data source.
Declaration
bool CanWrite(DataStream dataStream)
Parameters
| Type | Name | Description |
|---|---|---|
| DataStream | dataStream | The DataStream. |
Returns
| Type | Description |
|---|---|
| System.Boolean |
|
WriteAsync(Object, DataStream, IDataIOContext, CancellationToken)
Writes the entities to the data source.
Declaration
Task WriteAsync(object data, DataStream dataStream, IDataIOContext context = null, CancellationToken cancellationToken = default(CancellationToken))
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object | data | The entity or entities to be written. |
| DataStream | dataStream | The DataStream where the entities should be written. |
| IDataIOContext | context | The data I/O context (optional). |
| System.Threading.CancellationToken | cancellationToken | The cancellation token (optional). |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task | A task to await. |