Show / Hide Table of Contents

Class LocalMarketDataDrive

Файловое хранилище маркет-данных.

Inheritance
Object
BaseMarketDataDrive
LocalMarketDataDrive
Implements
IMarketDataDrive
Ecng.Serialization.IPersistable
IDisposable
Inherited Members
BaseMarketDataDrive.GetNewsMessageStorage(IMarketDataSerializer<NewsMessage>)
BaseMarketDataDrive.GetSecurityDrive(Security)
BaseMarketDataDrive.Load(SettingsStorage)
BaseMarketDataDrive.Save(SettingsStorage)
BaseMarketDataDrive.ToString()
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
BaseMarketDataDrive.AvailableSecurities

Path

Путь к данными.

Declaration
public override string Path { get; set; }
Property Value
Type Description
String
Overrides
BaseMarketDataDrive.Path

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
BaseMarketDataDrive.GetAvailableDataTypes(SecurityId, StorageFormats)

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

Параметр, ассоциированный с типом dataType. Например, 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
BaseMarketDataDrive.GetStorageDrive(SecurityId, DataType, StorageFormats)

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
BaseMarketDataDrive.LookupSecurities(SecurityLookupMessage, ISecurityProvider, Action<SecurityMessage>, Func<Boolean>, Action<Int32, Int32>)

Verify()

Проверить настройки.

Declaration
public override void Verify()
Overrides
BaseMarketDataDrive.Verify()

Implements

IMarketDataDrive
Ecng.Serialization.IPersistable
System.IDisposable

Extension Methods

Paths.Serialize<T>(T, String)
Paths.Serialize<T>(T)
Extensions.TryGet<TMessage, TChange>(TMessage, TChange)
Extensions.TryGetDecimal<TMessage, TChange>(TMessage, TChange)
Extensions.Add<TMessage, TChange>(TMessage, TChange, Object)
Extensions.Add<TMessage, TChange>(TMessage, TChange, Decimal)
Extensions.Add<TMessage, TChange>(TMessage, TChange, Int32)
Extensions.Add<TMessage, TChange>(TMessage, TChange, Int64)
Extensions.Add<TMessage, TChange>(TMessage, TChange, SecurityStates)
Extensions.TryAdd<TMessage, TChange>(TMessage, TChange, Nullable<SecurityStates>)
Extensions.TryAdd<TMessage, TChange>(TMessage, TChange, String)
Extensions.Add<TMessage, TChange>(TMessage, TChange, Sides)
Extensions.TryAdd<TMessage, TChange>(TMessage, TChange, Nullable<Sides>)
Extensions.Add<TMessage, TChange>(TMessage, TChange, CurrencyTypes)
Extensions.TryAdd<TMessage, TChange>(TMessage, TChange, Nullable<CurrencyTypes>)
Extensions.Add<TMessage, TChange>(TMessage, TChange, PortfolioStates)
Extensions.TryAdd<TMessage, TChange>(TMessage, TChange, Nullable<PortfolioStates>)
Extensions.Add<TMessage, TChange>(TMessage, TChange, DateTimeOffset)
Extensions.TryAdd<TMessage, TChange>(TMessage, TChange, Nullable<DateTimeOffset>)
Extensions.Add<TMessage, TChange>(TMessage, TChange, Boolean)
Extensions.TryAdd<TMessage, TChange>(TMessage, TChange, Nullable<Boolean>)
Extensions.TryAdd<TMessage, TChange>(TMessage, TChange, Decimal, Boolean)
Extensions.TryAdd<TMessage, TChange>(TMessage, TChange, Nullable<Decimal>, Boolean)
Extensions.TryAdd<TMessage, TChange>(TMessage, TChange, Int32, Boolean)
Extensions.TryAdd<TMessage, TChange>(TMessage, TChange, Nullable<Int32>, Boolean)
Extensions.TryAdd<TMessage, TChange>(TMessage, TChange, Int64, Boolean)
Extensions.TryAdd<TMessage, TChange>(TMessage, TChange, Nullable<Int64>, Boolean)
EditorExtensions.ToItemsSource(Object, Type, Nullable<Boolean>, Nullable<ListSortDirection>, Func<IItemsSourceItem, Boolean>, Func<Object, String>, Func<Object, String>)
XamlHelper.WpfCast<T>(Object)
XamlHelper.CopyToClipboard<T>(T)
XamlHelper.EnsureUIThread(Object)
☀
☾
In This Article
Back to top
Copyright © StockSharp.
☀
☾