Table of Contents

Class CsvMarketDataSerializer<TData>

Namespace
StockSharp.Algo.Storages.Csv
Assembly
StockSharp.Algo.dll

The serializer in the CSV format.

public abstract class CsvMarketDataSerializer<TData> : IMarketDataSerializer<TData>, IMarketDataSerializer

Type Parameters

TData

Data type.

Inheritance
CsvMarketDataSerializer<TData>
Implements
Derived
Inherited Members
Extension Methods

Constructors

CsvMarketDataSerializer(SecurityId, Encoding)

Initializes a new instance of the CsvMarketDataSerializer<TData>.

protected CsvMarketDataSerializer(SecurityId securityId, Encoding encoding = null)

Parameters

securityId SecurityId

Security ID.

encoding Encoding

Encoding.

CsvMarketDataSerializer(Encoding)

Initializes a new instance of the CsvMarketDataSerializer<TData>.

protected CsvMarketDataSerializer(Encoding encoding = null)

Parameters

encoding Encoding

Encoding.

Properties

Encoding

Encoding.

public Encoding Encoding { get; }

Property Value

Encoding

Format

Storage format.

public StorageFormats Format { get; }

Property Value

StorageFormats

SecurityId

Security ID.

public SecurityId SecurityId { get; }

Property Value

SecurityId

TimePrecision

Time precision.

public TimeSpan TimePrecision { get; }

Property Value

TimeSpan

Methods

CreateMetaInfo(DateTime)

To create empty meta-information.

public virtual IMarketDataMetaInfo CreateMetaInfo(DateTime date)

Parameters

date DateTime

Date.

Returns

IMarketDataMetaInfo

Meta-information on data for one day.

Deserialize(Stream, IMarketDataMetaInfo)

To load data from the stream.

public virtual IEnumerable<TData> Deserialize(Stream stream, IMarketDataMetaInfo metaInfo)

Parameters

stream Stream

The stream.

metaInfo IMarketDataMetaInfo

Meta-information on data for one day.

Returns

IEnumerable<TData>

Data.

Read(FastCsvReader, IMarketDataMetaInfo)

Read data from the specified reader.

protected abstract TData Read(FastCsvReader reader, IMarketDataMetaInfo metaInfo)

Parameters

reader FastCsvReader

CSV reader.

metaInfo IMarketDataMetaInfo

Meta-information on data for one day.

Returns

TData

Data.

Serialize(Stream, IEnumerable<TData>, IMarketDataMetaInfo)

Save data into stream.

public virtual void Serialize(Stream stream, IEnumerable<TData> data, IMarketDataMetaInfo metaInfo)

Parameters

stream Stream

Data stream.

data IEnumerable<TData>

Data.

metaInfo IMarketDataMetaInfo

Meta-information on data for one day.

Write(CsvFileWriter, TData, IMarketDataMetaInfo)

Write data to the specified writer.

protected abstract void Write(CsvFileWriter writer, TData data, IMarketDataMetaInfo metaInfo)

Parameters

writer CsvFileWriter

CSV writer.

data TData

Data.

metaInfo IMarketDataMetaInfo

Meta-information on data for one day.