Class DefaultDataStreamReadService
A default data stream reader service.
Inheritance
System.Object
DefaultDataStreamReadService
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 DefaultDataStreamReadService : IDataStreamReadService
Constructors
| Improve this Doc View SourceDefaultDataStreamReadService(ICollection<IExportFactory<IDataStreamReader, DataStreamReaderMetadata>>)
Initializes a new instance of the DefaultDataStreamReadService class.
Declaration
public DefaultDataStreamReadService(ICollection<IExportFactory<IDataStreamReader, DataStreamReaderMetadata>> readerFactories)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.ICollection<IExportFactory<IDataStreamReader, DataStreamReaderMetadata>> | readerFactories | The reader factories. |
Methods
| Improve this Doc View SourceReadAsync(DataStream, IDataIOContext, CancellationToken)
Reads the data source and converts it to an enumeration of client entities.
Declaration
public Task<object> ReadAsync(DataStream dataStream, IDataIOContext context = null, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
DataStream | dataStream | The DataStream containing the entities. |
IDataIOContext | context | The data I/O context (optional). |
System.Threading.CancellationToken | cancellationToken | The cancellation token (optional). |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Object> | A promise of the deserialized entities. |
TryGetReader(DataStream)
Tries to get an IDataStreamReader service.
Declaration
protected virtual IDataStreamReader TryGetReader(DataStream dataStream)
Parameters
Type | Name | Description |
---|---|---|
DataStream | dataStream | The DataStream containing the entities. |
Returns
Type | Description |
---|---|
IDataStreamReader | An IDataStreamReader. |