MarketDataStorageCache
StockSharp.Algo.Storages
IMarketDataStorage кэш.
Свойства
Limit
public int Limit { get; set; }
value = marketDataStorageCache.Limit
marketDataStorageCache.Limit = value
Макс Граф.
Методы
GetMessagesAsync``1
public IAsyncEnumerable<Message> GetMessagesAsync<TEnumerable>(SecurityId securityId, DataType dataType, DateTime date, Func<DateTime, TEnumerable> loadIfNeed)
result = marketDataStorageCache.GetMessagesAsync(securityId, dataType, date, loadIfNeed)
Получайте данные асинхронно.
- securityId
- SecurityId.
- dataType
- DataType.
- date
- Дата загрузки.
- loadIfNeed
- Обработчик для загрузки данных из реального хранилища.
Возвращает: Данные.
GetMessagesAsync``1
public IAsyncEnumerable<Message> GetMessagesAsync<TEnumerable>(string scope, DateTime date, Func<DateTime, TEnumerable> loadIfNeed)
result = marketDataStorageCache.GetMessagesAsync(scope, date, loadIfNeed)
Get data of a day asynchronously for data that is not one series of one security: a day of several series replayed together, named by what they are.
- scope
- What the data of the day is made of; the same day of different data is cached apart.
- date
- Date to load.
- loadIfNeed
- Handler to load data from real storage.
Возвращает: Data.
Invalidate
public void Invalidate(SecurityId securityId, DataType dataType, DateTime date)
marketDataStorageCache.Invalidate(securityId, dataType, date)
Недействительный кеш для указанного ключа.
- securityId
- SecurityId.
- dataType
- DataType.
- date
- Дата признания недействительной.