Table of Contents

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 DataType

Data type info.

fields IEnumerable<FieldMapping>

Importing fields.

securityStorage ISecurityStorage

Securities meta info storage.

exchangeInfoProvider IExchangeInfoProvider

Exchanges and trading boards provider.

drive IMarketDataDrive

The storage. If a value is null, DefaultDrive will be used.

storageFormat StorageFormats

The format type. By default Binary is passed.

Properties

UpdateDuplicateSecurities

Update duplicate securities if they already exists.

public bool UpdateDuplicateSecurities { get; set; }

Property Value

bool

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 string

File 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

Event Type

Action<Security, bool>