Class CsvImporter
- Namespace
- StockSharp.Algo.Import
- Assembly
- StockSharp.Algo.dll
Messages importer from text file in CSV format into storage.
public class CsvImporter : CsvParser, IPersistable, ILogReceiver, ILogSource, IDisposable
- Inheritance
-
CsvImporter
- Implements
-
IPersistable
- Inherited Members
- Extension Methods
Constructors
CsvImporter(DataType, IEnumerable<FieldMapping>, ISecurityStorage, IExchangeInfoProvider, IMarketDataDrive, StorageFormats)
Initializes a new instance of the CsvImporter.
public CsvImporter(DataType dataType, IEnumerable<FieldMapping> fields, ISecurityStorage securityStorage, IExchangeInfoProvider exchangeInfoProvider, IMarketDataDrive drive, StorageFormats storageFormat)
Parameters
dataType
DataTypeData type info.
fields
IEnumerable<FieldMapping>Importing fields.
securityStorage
ISecurityStorageSecurities meta info storage.
exchangeInfoProvider
IExchangeInfoProviderExchanges and trading boards provider.
drive
IMarketDataDriveThe storage. If a value is null, DefaultDrive will be used.
storageFormat
StorageFormatsThe format type. By default Binary is passed.
Properties
UpdateDuplicateSecurities
Update duplicate securities if they already exists.
public bool UpdateDuplicateSecurities { get; set; }
Property Value
Methods
Import(string, Action<int>, Func<bool>)
Import from CSV file.
public (int, DateTimeOffset?) Import(string fileName, Action<int> updateProgress, Func<bool> isCancelled)
Parameters
fileName
stringFile name.
updateProgress
Action<int>Progress notification.
isCancelled
Func<bool>The processor, returning process interruption sign.
Returns
- (int, DateTimeOffset?)
Count and last time.
Events
SecurityUpdated
Security updated event.
public event Action<Security, bool> SecurityUpdated