Show / Hide Table of Contents

Class DataStreamWriter

A data stream writer.

Inheritance
System.Object
DataStreamWriter
Implements
IDataStreamWriter
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 DataStreamWriter : IDataStreamWriter

Constructors

| Improve this Doc View Source

DataStreamWriter(ICompositionContext, ISerializationService, IMediaTypeProvider)

Initializes a new instance of the DataStreamWriter class.

Declaration
public DataStreamWriter(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

CanWrite(DataStream)

Determines whether this instance can write to the specified data source.

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

The DataStream.

Returns
Type Description
System.Boolean

true if this instance can write to the specified data source, otherwise false.

| Improve this Doc View Source

CreateEncodedStreamWriter(DataStream)

Creates the encoded stream writer.

Declaration
protected virtual StreamWriter CreateEncodedStreamWriter(DataStream dataSource)
Parameters
Type Name Description
DataStream dataSource

The data source.

Returns
Type Description
System.IO.StreamWriter

The encoded stream writer.

| 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

WriteAsync(Object, DataStream, IDataIOContext, CancellationToken)

Writes the entities to the data source.

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

Implements

IDataStreamWriter

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