Class LocalMarketDataDrive
Файловое хранилище маркет-данных.
Inherited Members
Namespace: StockSharp.Algo.Storages
Assembly: StockSharp.Algo.dll
Syntax
public class LocalMarketDataDrive : BaseMarketDataDrive, IMarketDataDrive, IPersistable, IDisposable
Constructors
LocalMarketDataDrive()
Создать LocalMarketDataDrive.
Declaration
public LocalMarketDataDrive()
LocalMarketDataDrive(String)
Создать LocalMarketDataDrive.
Declaration
public LocalMarketDataDrive(string path)
Parameters
Type | Name | Description |
---|---|---|
String | path | Путь к директории с данными. |
Properties
AvailableSecurities
Получить все доступные инструменты.
Declaration
public override IEnumerable<SecurityId> AvailableSecurities { get; }
Property Value
Type | Description |
---|---|
IEnumerable<SecurityId> |
Overrides
Path
Путь к данными.
Declaration
public override string Path { get; set; }
Property Value
Type | Description |
---|---|
String |
Overrides
Methods
GetAvailableDataTypes(SecurityId, StorageFormats)
Получить все доступные типы данных.
Declaration
public override IEnumerable<DataType> GetAvailableDataTypes(SecurityId securityId, StorageFormats format)
Parameters
Type | Name | Description |
---|---|---|
SecurityId | securityId | Идентификатор инструмента. |
StorageFormats | format | Тип формата. |
Returns
Type | Description |
---|---|
IEnumerable<DataType> | Data types. |
Overrides
GetAvailableSecurities(String)
Получить все доступные инструменты.
Declaration
public static IEnumerable<SecurityId> GetAvailableSecurities(string path)
Parameters
Type | Name | Description |
---|---|---|
String | path | Путь к директории с данными. |
Returns
Type | Description |
---|---|
IEnumerable<SecurityId> | Все доступные инструменты. |
GetDataType(String)
Получить тип данных и параметр из переданного имени файла.
Declaration
public static DataType GetDataType(string fileName)
Parameters
Type | Name | Description |
---|---|---|
String | fileName | Название файла. |
Returns
Type | Description |
---|---|
DataType | Тип данных и параметр, ассоциированный с типом. Например, Arg. |
GetDate(String)
Преобразовать имя директории в дату.
Declaration
public static DateTime GetDate(string dirName)
Parameters
Type | Name | Description |
---|---|---|
String | dirName | Название директории. |
Returns
Type | Description |
---|---|
DateTime | Дата. |
GetDirName(DateTime)
Преобразовать дату в имя директории.
Declaration
public static string GetDirName(DateTime date)
Parameters
Type | Name | Description |
---|---|---|
DateTime | date | Дата. |
Returns
Type | Description |
---|---|
String | Название директории. |
GetExtension(StorageFormats)
Получить расширение файла для формата.
Declaration
public static string GetExtension(StorageFormats format)
Parameters
Type | Name | Description |
---|---|---|
StorageFormats | format | Format. |
Returns
Type | Description |
---|---|
String | Расширение. |
GetFileName(DataType, Nullable<StorageFormats>, Boolean)
Получить название файла по типу данных.
Declaration
public static string GetFileName(DataType dataType, Nullable<StorageFormats> format = null, bool throwIfUnknown = true)
Parameters
Type | Name | Description |
---|---|---|
DataType | dataType | Тип данных. |
Nullable<StorageFormats> | format | Формат хранилища. Если установлено, то к имени файла будет добавлено расширение. |
Boolean | throwIfUnknown | Throw exception if the specified type is unknown. |
Returns
Type | Description |
---|---|
String | Название файла. |
GetFileName(Type, Object, Nullable<StorageFormats>)
Получить название файла по типу данных.
Declaration
public static string GetFileName(Type dataType, object arg, Nullable<StorageFormats> format = null)
Parameters
Type | Name | Description |
---|---|---|
Type | dataType | Data type. |
Object | arg | Параметр, ассоциированный с типом |
Nullable<StorageFormats> | format | Формат хранилища. Если установлено, то к имени файла будет добавлено расширение. |
Returns
Type | Description |
---|---|
String | Название файла. |
GetSecurityPath(SecurityId)
Получить путь к папке с маркет-данными для инструмента.
Declaration
public string GetSecurityPath(SecurityId securityId)
Parameters
Type | Name | Description |
---|---|---|
SecurityId | securityId | Security ID. |
Returns
Type | Description |
---|---|
String | Путь к папке с маркет-данными. |
GetStorageDrive(SecurityId, DataType, StorageFormats)
Получить хранилище для IMarketDataStorage.
Declaration
public override IMarketDataStorageDrive GetStorageDrive(SecurityId securityId, DataType dataType, StorageFormats format)
Parameters
Type | Name | Description |
---|---|---|
SecurityId | securityId | Security ID. |
DataType | dataType | Тип данных. |
StorageFormats | format | Тип формата. |
Returns
Type | Description |
---|---|
IMarketDataStorageDrive | Хранилище для IMarketDataStorage. |
Overrides
LookupSecurities(SecurityLookupMessage, ISecurityProvider, Action<SecurityMessage>, Func<Boolean>, Action<Int32, Int32>)
Скачать инструменты по указанному критерию.
Declaration
public override void LookupSecurities(SecurityLookupMessage criteria, ISecurityProvider securityProvider, Action<SecurityMessage> newSecurity, Func<bool> isCancelled, Action<int, int> updateProgress)
Parameters
Type | Name | Description |
---|---|---|
SecurityLookupMessage | criteria | Сообщение поиска инструментов по заданному критерию. |
ISecurityProvider | securityProvider | Поставщик информации об инструментах. |
Action<SecurityMessage> | newSecurity | Обработчик, через который будет передан новый инструмент. |
Func<Boolean> | isCancelled | Обработчик, возвращающий признак отмены поиска. |
Action<Int32, Int32> | updateProgress | Обработчик, куда будет передаваться прогресс работы. |
Overrides
Verify()
Проверить настройки.
Declaration
public override void Verify()