CsvParser

StockSharp.Algo.Import

Messages parser from text file in CSV format.

Inherits: BaseLogReceiver

Constructors

CsvParser
public CsvParser(DataType dataType, IEnumerable<FieldMapping> fields)
csvParser = CsvParser(dataType, fields)

Initializes a new instance of the CsvParser.

dataType
Data type info.
fields
Importing fields.

Properties

ColumnSeparator
public string ColumnSeparator { get; set; }
value = csvParser.ColumnSeparator
csvParser.ColumnSeparator = value

Column separator. Tabulation is denoted by TAB.

DataType
public DataType DataType { get; }
value = csvParser.DataType

Data type info.

ExtendedInfoStorageItem
public IExtendedInfoStorageItem ExtendedInfoStorageItem { get; set; }
value = csvParser.ExtendedInfoStorageItem
csvParser.ExtendedInfoStorageItem = value

Extended info storage.

Fields
public IEnumerable<FieldMapping> Fields { get; }
value = csvParser.Fields

Importing fields.

IgnoreNonIdSecurities
public bool IgnoreNonIdSecurities { get; set; }
value = csvParser.IgnoreNonIdSecurities
csvParser.IgnoreNonIdSecurities = value

Ignore securities without identifiers.

LineSeparator
public string LineSeparator { get; set; }
value = csvParser.LineSeparator
csvParser.LineSeparator = value

Line separator.

SkipFromHeader
public int SkipFromHeader { get; set; }
value = csvParser.SkipFromHeader
csvParser.SkipFromHeader = value

Number of lines to be skipped from the beginning of the file (if they contain meta information).

Methods

Parse
public IAsyncEnumerable<Message> Parse(Stream stream)
result = csvParser.Parse(stream)

Parse CSV file.

stream
The file stream.

Returns: Parsed instances.