Class CandleCsvSerializer<TCandleMessage>
- Namespace
- StockSharp.Algo.Storages.Csv
- Assembly
- StockSharp.Algo.dll
The candle serializer in the CSV format.
public class CandleCsvSerializer<TCandleMessage> : CsvMarketDataSerializer<TCandleMessage>, IMarketDataSerializer<TCandleMessage>, IMarketDataSerializer where TCandleMessage : CandleMessage, new()
Type Parameters
TCandleMessage
CandleMessage derived type.
- Inheritance
-
CsvMarketDataSerializer<TCandleMessage>CandleCsvSerializer<TCandleMessage>
- Implements
-
IMarketDataSerializer<TCandleMessage>
- Inherited Members
- Extension Methods
Constructors
CandleCsvSerializer(SecurityId, DataType, Encoding)
Initializes a new instance of the CandleCsvSerializer<TCandleMessage>.
public CandleCsvSerializer(SecurityId securityId, DataType dataType, Encoding encoding = null)
Parameters
securityId
SecurityIdSecurity ID.
dataType
DataTypeencoding
EncodingEncoding.
Methods
CreateMetaInfo(DateTime)
To create empty meta-information.
public override IMarketDataMetaInfo CreateMetaInfo(DateTime date)
Parameters
date
DateTimeDate.
Returns
- IMarketDataMetaInfo
Meta-information on data for one day.
Read(FastCsvReader, IMarketDataMetaInfo)
Read data from the specified reader.
protected override TCandleMessage Read(FastCsvReader reader, IMarketDataMetaInfo metaInfo)
Parameters
reader
FastCsvReaderCSV reader.
metaInfo
IMarketDataMetaInfoMeta-information on data for one day.
Returns
- TCandleMessage
Data.
Serialize(Stream, IEnumerable<TCandleMessage>, IMarketDataMetaInfo)
Save data into stream.
public override void Serialize(Stream stream, IEnumerable<TCandleMessage> data, IMarketDataMetaInfo metaInfo)
Parameters
stream
StreamData stream.
data
IEnumerable<TCandleMessage>Data.
metaInfo
IMarketDataMetaInfoMeta-information on data for one day.
Write(CsvFileWriter, TCandleMessage, IMarketDataMetaInfo)
Write data to the specified writer.
protected override void Write(CsvFileWriter writer, TCandleMessage data, IMarketDataMetaInfo metaInfo)
Parameters
writer
CsvFileWriterCSV writer.
data
TCandleMessageData.
metaInfo
IMarketDataMetaInfoMeta-information on data for one day.