Table of Contents

Class CsvParser

Namespace
StockSharp.Algo.Import
Assembly
StockSharp.Algo.dll

Messages parser from text file in CSV format.

public class CsvParser : BaseLogReceiver, IPersistable, ILogReceiver, ILogSource, IDisposable
Inheritance
CsvParser
Implements
IPersistable
Derived
Inherited Members
Extension Methods

Constructors

CsvParser(DataType, IEnumerable<FieldMapping>)

Initializes a new instance of the CsvParser.

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

Parameters

dataType DataType

Data type info.

fields IEnumerable<FieldMapping>

Importing fields.

Properties

ColumnSeparator

Column separator. Tabulation is denoted by TAB.

public string ColumnSeparator { get; set; }

Property Value

string

DataType

Data type info.

public DataType DataType { get; }

Property Value

DataType

ExtendedInfoStorageItem

Extended info storage.

public IExtendedInfoStorageItem ExtendedInfoStorageItem { get; set; }

Property Value

IExtendedInfoStorageItem

Fields

Importing fields.

public IEnumerable<FieldMapping> Fields { get; }

Property Value

IEnumerable<FieldMapping>

IgnoreNonIdSecurities

Ignore securities without identifiers.

public bool IgnoreNonIdSecurities { get; set; }

Property Value

bool

LineSeparator

Line separator.

public string LineSeparator { get; set; }

Property Value

string

SkipFromHeader

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

public int SkipFromHeader { get; set; }

Property Value

int

TimeZone

Time zone.

public TimeZoneInfo TimeZone { get; set; }

Property Value

TimeZoneInfo

Methods

Parse(string, Func<bool>)

Parse CSV file.

public IEnumerable<Message> Parse(string fileName, Func<bool> isCancelled = null)

Parameters

fileName string

File name.

isCancelled Func<bool>

The processor, returning process interruption sign.

Returns

IEnumerable<Message>

Parsed instances.