Class CsvImporter
Импортер сообщений из текстового файла с CSV форматом в хранилище.
Inherited Members
Namespace: StockSharp.Algo.Import
Assembly: StockSharp.Algo.dll
Syntax
public class CsvImporter : CsvParser, IPersistable, ILogReceiver, ILogSource, IDisposable
Constructors
CsvImporter(DataType, IEnumerable<FieldMapping>, ISecurityStorage, IExchangeInfoProvider, IMarketDataDrive, StorageFormats)
Создать CsvImporter.
Declaration
public CsvImporter(DataType dataType, IEnumerable<FieldMapping> fields, ISecurityStorage securityStorage, IExchangeInfoProvider exchangeInfoProvider, IMarketDataDrive drive, StorageFormats storageFormat)
Parameters
Type | Name | Description |
---|---|---|
DataType | dataType | Тип данных. |
IEnumerable<FieldMapping> | fields | Импортируемые поля. |
ISecurityStorage | securityStorage | Хранилище информации об инструментах. |
IExchangeInfoProvider | exchangeInfoProvider | Провайдер бирж и торговых площадок. |
IMarketDataDrive | drive | Хранилище. Если значение равно null, то будет использоваться DefaultDrive. |
StorageFormats | storageFormat | Тип формата. По умолчанию передается Binary. |
Properties
UpdateDuplicateSecurities
Update duplicate securities if they already exists.
Declaration
public bool UpdateDuplicateSecurities { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
Methods
Import(String, Action<Int32>, Func<Boolean>)
Импортировать из CSV файла.
Declaration
public (int, Nullable<DateTimeOffset>) Import(string fileName, Action<int> updateProgress, Func<bool> isCancelled)
Parameters
Type | Name | Description |
---|---|---|
String | fileName | File name. |
Action<Int32> | updateProgress | Оповещение о прогрессе. |
Func<Boolean> | isCancelled | Обработчик, возвращающий признак прерывания процесса. |
Returns
Type | Description |
---|---|
(, )<Int32, Nullable<DateTimeOffset>> | Count and last time. |
Events
SecurityUpdated
Событие обновления инструмента.
Declaration
public event Action<Security, bool> SecurityUpdated
Event Type
Type | Description |
---|---|
Action<Security, Boolean> |
Implements
Ecng.Serialization.IPersistable