Class DefaultDataStreamWriteService
A default data stream reader service.
Inheritance
System.Object
DefaultDataStreamWriteService
Implements
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Kephas.Data.IO.DataStreams
Assembly: Kephas.Data.IO.dll
Syntax
[OverridePriority(Priority.Low)]
public class DefaultDataStreamWriteService : IDataStreamWriteService
Constructors
| Improve this Doc View SourceDefaultDataStreamWriteService(ICollection<IExportFactory<IDataStreamWriter, DataStreamWriterMetadata>>)
Initializes a new instance of the DefaultDataStreamWriteService class.
Declaration
public DefaultDataStreamWriteService(ICollection<IExportFactory<IDataStreamWriter, DataStreamWriterMetadata>> writerFactories)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.ICollection<IExportFactory<IDataStreamWriter, DataStreamWriterMetadata>> | writerFactories | The writer factories. |
Methods
| Improve this Doc View SourceTryGetWriter(DataStream)
Tries to get an IDataStreamWriter service.
Declaration
protected virtual IDataStreamWriter TryGetWriter(DataStream dataStream)
Parameters
Type | Name | Description |
---|---|---|
DataStream | dataStream | The DataStream containing the entities. |
Returns
Type | Description |
---|---|
IDataStreamWriter | An IDataStreamWriter. |
WriteAsync(Object, DataStream, IDataIOContext, CancellationToken)
Writes the entities to the data source.
Declaration
public 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. |