Show / Hide Table of Contents

Class DataStreamReader

Default class for DataStream readers.

Inheritance
System.Object
DataStreamReader
Implements
IDataStreamReader
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
[ProcessingPriority(Priority.Low)]
public class DataStreamReader : IDataStreamReader

Constructors

| Improve this Doc View Source

DataStreamReader(ICompositionContext, ISerializationService, IMediaTypeProvider)

Initializes a new instance of the DataStreamReader class.

Declaration
public DataStreamReader(ICompositionContext compositionContext, ISerializationService serializationService, IMediaTypeProvider mediaTypeProvider)
Parameters
Type Name Description
ICompositionContext compositionContext

Context for the composition.

ISerializationService serializationService

The serialization service.

IMediaTypeProvider mediaTypeProvider

The media type provider.

Methods

| Improve this Doc View Source

CanRead(DataStream)

Determines whether this instance can read the specified DataStream.

Declaration
public virtual bool CanRead(DataStream dataStream)
Parameters
Type Name Description
DataStream dataStream

The DataStream.

Returns
Type Description
System.Boolean

true if this instance can read the specified DataStream, otherwise false.

| Improve this Doc View Source

CreateEncodedStreamReader(DataStream)

Creates the encoded stream reader.

Declaration
protected virtual StreamReader CreateEncodedStreamReader(DataStream dataStream)
Parameters
Type Name Description
DataStream dataStream

The data source.

Returns
Type Description
System.IO.StreamReader

The encoded stream reader.

| Improve this Doc View Source

GetMediaType(DataStream)

Gets the media type for the DataStream.

Declaration
protected virtual Type GetMediaType(DataStream dataStream)
Parameters
Type Name Description
DataStream dataStream

The DataStream.

Returns
Type Description
System.Type

The media type.

| Improve this Doc View Source

ReadAsync(DataStream, IDataIOContext, CancellationToken)

Reads the data source and converts it to an enumeration of client entities.

Declaration
public virtual 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.

System.Threading.CancellationToken cancellationToken

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task<System.Object>

A promise of the deserialized entities.

Implements

IDataStreamReader

Extension Methods

DynamicObjectExtensions.SetPropertyValue(Object, String, Object)
DynamicObjectExtensions.TrySetPropertyValue(Object, String, Object)
DynamicObjectExtensions.GetPropertyValue(Object, String)
DynamicObjectExtensions.TryGetPropertyValue(Object, String, out Object)
DynamicObjectExtensions.GetRuntimeTypeInfo(Object)
DynamicObjectExtensions.ToDynamic(Object)
DynamicObjectExtensions.ToExpando(Object)
BehaviorValue.ToBehaviorValue<TValue>(TValue)
CollectionExtensions.AddRange<T, TItem>(T, IEnumerable<TItem>)
LoggingExtensions.GetLogger(Object, IContext)
TypeExtensions.GetAbstractType(Object)
TypeExtensions.GetAbstractTypeInfo(Object)
ReflectionHelper.GetTypeInfo(Object)
EntityEntryExtensions.TryGetAttachedEntityEntry(Object)
  • Improve this Doc
  • View Source
Back to top Generated by DocFX