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
DataTypeData type info.
fields
IEnumerable<FieldMapping>Importing fields.
Properties
ColumnSeparator
Column separator. Tabulation is denoted by TAB.
public string ColumnSeparator { get; set; }
Property Value
DataType
Data type info.
public DataType DataType { get; }
Property Value
ExtendedInfoStorageItem
Extended info storage.
public IExtendedInfoStorageItem ExtendedInfoStorageItem { get; set; }
Property Value
Fields
Importing fields.
public IEnumerable<FieldMapping> Fields { get; }
Property Value
IgnoreNonIdSecurities
Ignore securities without identifiers.
public bool IgnoreNonIdSecurities { get; set; }
Property Value
LineSeparator
Line separator.
public string LineSeparator { get; set; }
Property Value
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
TimeZone
Time zone.
public TimeZoneInfo TimeZone { get; set; }
Property Value
Methods
Parse(string, Func<bool>)
Parse CSV file.
public IEnumerable<Message> Parse(string fileName, Func<bool> isCancelled = null)
Parameters
fileName
stringFile name.
isCancelled
Func<bool>The processor, returning process interruption sign.
Returns
- IEnumerable<Message>
Parsed instances.