LocalMarketDataDrive

StockSharp.Algo.Storages

市场数据的文件存储.

继承自: BaseMarketDataDrive

构造函数

LocalMarketDataDrive
public LocalMarketDataDrive(IFileSystem fileSystem, string path)
localMarketDataDrive = LocalMarketDataDrive(fileSystem, path)

初始化了 & ##LocalMarketDataDrive+#的新实例.

fileSystem
文件系统抽象化.
path
带数据的目录路径 。
LocalMarketDataDrive
public LocalMarketDataDrive(string path)
localMarketDataDrive = LocalMarketDataDrive(path)

初始化了 & ##LocalMarketDataDrive+#的新实例.

path
带数据的目录路径 。
LocalMarketDataDrive
public LocalMarketDataDrive()
localMarketDataDrive = LocalMarketDataDrive()

初始化了 & ##LocalMarketDataDrive+#的新实例.

属性

AvailableDataTypesCachePeriod
public TimeSpan AvailableDataTypesCachePeriod { get; set; }
value = localMarketDataDrive.AvailableDataTypesCachePeriod
localMarketDataDrive.AvailableDataTypesCachePeriod = value

How long the answer to "what does this whole drive hold" is reused before the folders are walked again. Zero, the default, walks them on every question.

AvailableSecurities
public IEnumerable<SecurityId> AvailableSecurities { get; }
value = localMarketDataDrive.AvailableSecurities

现有金融工具。

Path
public override string Path { get; set; }
value = localMarketDataDrive.Path
localMarketDataDrive.Path = value

市场数据路径.

方法

BuildIndexAsync
public Task BuildIndexAsync(ILogReceiver logs, Action<int, int> updateProgress, CancellationToken cancellationToken)
result = localMarketDataDrive.BuildIndexAsync(logs, updateProgress, cancellationToken)

构建一个索引,用于从存储中获取可用数据类型的快速性能.

logs
日志,有可能是的,也许
updateProgress
进度处理器.
cancellationToken
CancellationToken

返回值: 任务

ChangeCachedDataType
private void ChangeCachedDataType(StorageFormats format, DataType dataType, bool remove)
localMarketDataDrive.ChangeCachedDataType(format, dataType, remove)

A day written for a data type proves the drive holds it, and the held answer can be told so without walking the folders again. A day removed may have been the last of its type, and only a fresh walk can tell, so the answer is given up instead. The read time is kept as it was: a type added here says nothing new about the rest of the drive.

GetAvailableDataTypesAsync
public override IAsyncEnumerable<DataType> GetAvailableDataTypesAsync(SecurityId securityId, StorageFormats format)
result = localMarketDataDrive.GetAvailableDataTypesAsync(securityId, format)

获取所有可用的数据类型 。

securityId
仪器识别符.
format
格式类型。

返回值: 数据类型.

GetAvailableSecuritiesAsync
public override IAsyncEnumerable<SecurityId> GetAvailableSecuritiesAsync()
result = localMarketDataDrive.GetAvailableSecuritiesAsync()

取出一切可用乐器.

返回值: 现有仪器。

GetDataType
public static DataType GetDataType(string fileName)
result = LocalMarketDataDrive.GetDataType(fileName)

获取指定文件名的数据类型和参数。

fileName
档案名.

返回值: 与类型相关的数据类型和参数。例如:蜡烛参数。

GetDate
public static DateTime GetDate(string dirName)
result = LocalMarketDataDrive.GetDate(dirName)

将目录名称转换为日期 。

dirName
目录名.

返回值: 日期 时间

GetDirName
public static string GetDirName(DateTime date)
result = LocalMarketDataDrive.GetDirName(date)

将日期转换为目录名称 。

date
日期 时间

返回值: 目录名.

GetExtension
public static string GetExtension(StorageFormats format)
result = LocalMarketDataDrive.GetExtension(format)

要获取格式的文件扩展名 。

format
格式化 , 格式化 , 格式化 。

返回值: 延后之会.

GetFileName
public static string GetFileName(DataType dataType, StorageFormats? format, bool throwIfUnknown)
result = LocalMarketDataDrive.GetFileName(dataType, format, throwIfUnknown)

要按数据类型获取文件名 。

dataType
数据类型信息.
format
存储格式。 如果设置扩展名, 将会添加到文件名中 。
throwIfUnknown
如果指定类型未知, 则丢出例外 。

返回值: 档案名.

GetSecurityPath
public string GetSecurityPath(SecurityId securityId)
result = localMarketDataDrive.GetSecurityPath(securityId)

获取带有该仪器市场数据的文件夹路径 。

securityId
金融工具标识。

返回值: 带有市场数据的文件夹路径 。

GetStorageDrive
public override IMarketDataStorageDrive GetStorageDrive(SecurityId securityId, DataType dataType, StorageFormats format)
result = localMarketDataDrive.GetStorageDrive(securityId, dataType, format)

来得到IMarketDataStorage的存储.

securityId
金融工具标识。
dataType
数据类型信息.
format
格式类型。

返回值: Storage for IMarketDataStorage.

LoadAsync
public override Task LoadAsync(SettingsStorage storage, CancellationToken cancellationToken)
result = localMarketDataDrive.LoadAsync(storage, cancellationToken)

Load settings.

storage
Settings storage.
cancellationToken
CancellationToken

返回值: Task

LookupSecuritiesAsync
public override IAsyncEnumerable<SecurityMessage> LookupSecuritiesAsync(SecurityLookupMessage criteria, ISecurityProvider securityProvider)
result = localMarketDataDrive.LookupSecuritiesAsync(criteria, securityProvider)

以规定标准下载金融工具.

criteria
信件金融工具查找指定标准 。
securityProvider
提供各种文书的信息。

返回值: 所出出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出所出

SaveAsync
public override Task SaveAsync(SettingsStorage storage, CancellationToken cancellationToken)
result = localMarketDataDrive.SaveAsync(storage, cancellationToken)

Save settings.

storage
Settings storage.
cancellationToken
CancellationToken

返回值: Task

TrySaveIndex
public TimeSpan? TrySaveIndex(TimeSpan diff)
result = localMarketDataDrive.TrySaveIndex(diff)

尝试保存已有索引 。

diff
时间 diff 从预览索引变化。

返回值: 建设过程花费了时间,意味着没有建造发生.

VerifyAsync
public override ValueTask VerifyAsync(CancellationToken cancellationToken)
result = localMarketDataDrive.VerifyAsync(cancellationToken)

校验设置 。

cancellationToken
CancellationToken

返回值: ValueTask