StorageHelper

StockSharp.Algo.Storages

ストレージの拡張クラス。

メソッド

ClearDatesCache
public static void ClearDatesCache(IMarketDataStorageDrive drive)
StorageHelper.ClearDatesCache(drive)

CancellationToken の同期ラッパー。

drive
市場データ記憶装置ドライブ。
Delete
public static void Delete(ISecurityStorage storage, Security security)
StorageHelper.Delete(storage, security)

CancellationToken の同期ラッパー。

storage
金融商品保管
security
金融商品取引
Delete
public static void Delete(IMarketDataStorageDrive drive, DateTime date)
StorageHelper.Delete(drive, date)

CancellationToken の同期ラッパー。

drive
市場データ記憶装置ドライブ。
date
データを削除する日付。
Delete
public static void Delete(IMarketDataStorage storage, IEnumerable<Message> data)
StorageHelper.Delete(storage, data)

CancellationToken の同期ラッパー。

storage
市場データストレージ。
data
削除される市場データ。
Delete
public static void Delete(IMarketDataStorage storage, DateTime date)
StorageHelper.Delete(storage, date)

CancellationToken の同期ラッパー。

storage
市場データストレージ。
date
データを削除する日付。
Delete
public static bool Delete(IMarketDataStorage storage, DateTime? from, DateTime? to)
result = StorageHelper.Delete(storage, from, to)

指定した期間の保存から市場データを削除する。

storage
マーケットデータストレージ。
from
データの削除の開始時刻。値が指定されていない場合は、日付GetDatesAsyncから削除されます。
to
データの削除が終わるまで、終端時刻。値が指定されていない場合は、最後に@GetDatesAsync, inclusiveまでデータを削除します。

戻り値: データの削除が行われた場合、指定された期間にデータが存在しません。

DeleteAsync
public static ValueTask<bool> DeleteAsync(IMarketDataStorage storage, DateTime? from, DateTime? to, CancellationToken cancellationToken)
result = StorageHelper.DeleteAsync(storage, from, to, cancellationToken)

指定した期間の保存から市場データを削除する。

storage
マーケットデータストレージ。
from
データの削除の開始時刻。値が指定されていない場合は、日付GetDatesAsyncから削除されます。
to
データの削除が終わるまで、終端時刻。値が指定されていない場合は、最後に@GetDatesAsync, inclusiveまでデータを削除します。
cancellationToken
担当: 佐藤 宏

戻り値: データの削除が行われた場合、指定された期間にデータが存在しません。

DeleteBy
public static void DeleteBy(ISecurityStorage storage, SecurityLookupMessage criteria)
StorageHelper.DeleteBy(storage, criteria)

CancellationToken の同期ラッパー。

storage
金融商品保管
criteria
基準。
DeleteByIdAsync
public static ValueTask DeleteByIdAsync(ISecurityStorage securityStorage, string securityId, CancellationToken cancellationToken)
result = StorageHelper.DeleteByIdAsync(securityStorage, securityId, cancellationToken)

識別子で器械を削除します。

securityStorage
金融商品メタ情報ストレージ。
securityId
識別子。
cancellationToken
担当: 佐藤 宏
DeleteByIdAsync
public static ValueTask DeleteByIdAsync(ISecurityStorage securityStorage, SecurityId securityId, CancellationToken cancellationToken)
result = StorageHelper.DeleteByIdAsync(securityStorage, securityId, cancellationToken)

識別子で器械を削除します。

securityStorage
金融商品メタ情報ストレージ。
securityId
識別子。
cancellationToken
担当: 佐藤 宏
DeleteRange
public static void DeleteRange(ISecurityStorage storage, IEnumerable<Security> securities)
StorageHelper.DeleteRange(storage, securities)

CancellationToken の同期ラッパー。

storage
金融商品保管
securities
金融商品取引
Delete``1
public static void Delete<TMessage>(IMarketDataStorage<TMessage> storage, IEnumerable<TMessage> data)
StorageHelper.Delete(storage, data)

CancellationToken の同期ラッパー。

storage
市場データストレージ。
data
削除される市場データ。
FolderNameToSecurityId
public static string FolderNameToSecurityId(string folderName)
result = StorageHelper.FolderNameToSecurityId(folderName)

文字列) メソッドからの逆変換。

folderName
ディレクトリ名。

戻り値: 金融商品ID

GetAvailableDataTypes
public static IEnumerable<DataType> GetAvailableDataTypes(IMarketDataDrive drive, SecurityId securityId, StorageFormats format)
result = StorageHelper.GetAvailableDataTypes(drive, securityId, format)

利用可能なデータタイプをすべて取得します。

drive
担当: 佐藤 宏
securityId
機器識別子。
format
フォーマットタイプ。

戻り値: データ型。

GetCandleMessageBuildableStorage
public static ValueTask<IMarketDataStorage<CandleMessage>> GetCandleMessageBuildableStorage(CandleBuilderProvider provider, IStorageRegistry registry, SecurityId securityId, TimeSpan timeFrame, IMarketDataDrive drive, StorageFormats format, CancellationToken cancellationToken)
result = StorageHelper.GetCandleMessageBuildableStorage(provider, registry, securityId, timeFrame, drive, format, cancellationToken)

指定された機器のキャンドルストレージを取得する。元のタイムフレームが存在しない場合は、ストレージは小さな時間枠からキャンドルを構築します。

provider
キャンドルビルダープロバイダ。
registry
マーケットデータストレージ。
securityId
金融商品ID
timeFrame
時間枠。
drive
保存。 値が ,DefaultDrive の場合、 .
format
フォーマットタイプ。 デフォルトではバイナリが渡されます。
cancellationToken
担当: 佐藤 宏

戻り値: キャンドルの保管。

GetCandleMessageStorage
public static IMarketDataStorage<CandleMessage> GetCandleMessageStorage(IStorageRegistry registry, Subscription subscription, IMarketDataDrive drive, StorageFormats format)
result = StorageHelper.GetCandleMessageStorage(registry, subscription, drive, format)

指定された機器のキャンドルストレージを取得する。

registry
代表取締役社長 佐藤 浩
subscription
サブスクリプション。
drive
ストレージ。
format
フォーマットタイプ。

戻り値: キャンドルの保管。

GetCandleMessageStorage
public static IMarketDataStorage<CandleMessage> GetCandleMessageStorage(IStorageRegistry registry, Type candleMessageType, SecurityId securityId, object arg, IMarketDataDrive drive, StorageFormats format)
result = StorageHelper.GetCandleMessageStorage(registry, candleMessageType, securityId, arg, drive, format)

指定された機器のキャンドルストレージを取得する。

registry
担当: 佐藤 宏
candleMessageType
キャンドルメッセージの種類。
securityId
金融商品ID
arg
キャンドルアーグ。
drive
ストレージ。
format
フォーマットタイプ。

戻り値: キャンドルの保管。

GetDates
public static IEnumerable<DateTime> GetDates(IMarketDataStorage storage, DateTime? from, DateTime? to)
result = StorageHelper.GetDates(storage, from, to)

保存された市場データが指定された範囲ですべての日付を取得する。

storage
マーケットデータストレージ。
from
範囲開始時刻。値が指定されていない場合は、開始日@GetDatesAsync@からデータが読み込まれます。
to
範囲終了時刻。値が指定されていない場合は、末尾の日付@GetDatesAsyncまで、包括的なデータが読み込まれます。

戻り値: 範囲内のすべての利用可能なデータ。

GetDates
public static IEnumerable<DateTime> GetDates(IMarketDataStorageDrive drive)
result = StorageHelper.GetDates(drive)

シンクロロス・ラッパーGetDatesAsync@

drive
市場データ記憶装置ドライブ。

戻り値: 利用可能な日付。

GetDates
public static IEnumerable<DateTime> GetDates(IMarketDataStorage storage)
result = StorageHelper.GetDates(storage)

シンクロロス・ラッパーGetDatesAsync@

storage
市場データストレージ。

戻り値: 利用可能な日付。

GetDatesAsync
public static IAsyncEnumerable<DateTime> GetDatesAsync(IMarketDataStorage storage, DateTime? from, DateTime? to)
result = StorageHelper.GetDatesAsync(storage, from, to)

保存された市場データが指定された範囲ですべての日付を取得する。

storage
マーケットデータストレージ。
from
範囲開始時刻。値が指定されていない場合は、開始日@GetDatesAsync@からデータが読み込まれます。
to
範囲終了時刻。値が指定されていない場合は、末尾の日付@GetDatesAsyncまで、包括的なデータが読み込まれます。

戻り値: 範囲内のすべての利用可能なデータ。

GetExecutionMessageStorage
public static IMarketDataStorage<ExecutionMessage> GetExecutionMessageStorage(IStorageRegistry registry, SecurityId securityId, ExecutionTypes type, IMarketDataDrive drive, StorageFormats format)
result = StorageHelper.GetExecutionMessageStorage(registry, securityId, type, drive, format)

指定した機器のExecutionMessage@ストレージを取得する

registry
担当: 佐藤 宏
securityId
金融商品ID
type
データの型、ExecutionMessageに含まれている情報。
drive
ストレージ。
format
フォーマットタイプ。

戻り値: The ExecutionMessage storage.

GetFromDate
public static DateTime? GetFromDate(IMarketDataStorage storage)
result = StorageHelper.GetFromDate(storage)

市場データ開始日を取得するには、ストレージに保存されます。

storage
マーケットデータストレージ。

戻り値: 開始日。値が初期化されていない場合、ストレージは空です。

GetMetaInfo
public static IMarketDataMetaInfo GetMetaInfo(IMarketDataStorage storage, DateTime date)
result = StorageHelper.GetMetaInfo(storage, date)

CancellationToken の同期ラッパー。

storage
市場データストレージ。
date
データのメタ情報を受信する日付。

戻り値: データのメタ情報。履歴にそのような日付がない場合、返されます。

GetRange
public static IRange<DateTime> GetRange(IMarketDataStorage storage, DateTime? from, DateTime? to)
result = StorageHelper.GetRange(storage, from, to)

指定したストレージの利用可能な日付範囲を取得します。

storage
ストレージ。
from
データを取得するために必要な初期日付。
to
データの入手に必要な最終日付。

戻り値: 日 時 分 分

GetRangeAsync
public static ValueTask<IRange<DateTime>> GetRangeAsync(IMarketDataStorage storage, DateTime? from, DateTime? to, CancellationToken cancellationToken)
result = StorageHelper.GetRangeAsync(storage, from, to, cancellationToken)

指定したストレージの利用可能な日付範囲を取得します。

storage
ストレージ。
from
データを取得するために必要な初期日付。
to
データの入手に必要な最終日付。
cancellationToken
担当: 佐藤 宏

戻り値: 日 時 分 分

GetSnapshotStorage
public static ISnapshotStorage GetSnapshotStorage(ISnapshotRegistry registry, Type dataType, object arg)
result = StorageHelper.GetSnapshotStorage(registry, dataType, arg)

スナップショットのストレージを取得するには.

registry
スナップショットストレージレジストリ。
dataType
市場データ型。
arg
型に関連付けられているパラメータ。例えば、キャンドルラグ。

戻り値: スナップショットのストレージ。

GetStorage
public static IMarketDataStorage GetStorage(IStorageRegistry registry, SecurityId securityId, Type dataType, object arg, IMarketDataDrive drive, StorageFormats format)
result = StorageHelper.GetStorage(registry, securityId, dataType, arg, drive, format)

市場データストレージを取得する。

registry
担当: 佐藤 宏
securityId
金融商品ID
dataType
市場データ型。
arg
型に関連付けられているパラメータ。例えば、キャンドルラグ。
drive
ストレージ。
format
フォーマットタイプ。

戻り値: マーケットデータストレージ。

GetStorage
public static IMarketDataStorage GetStorage(IStorageRegistry registry, Security security, Type dataType, object arg, IMarketDataDrive drive, StorageFormats format)
result = StorageHelper.GetStorage(registry, security, dataType, arg, drive, format)

市場データストレージを取得する。

registry
担当: 佐藤 宏
security
金融商品取引
dataType
市場データ型。
arg
型に関連付けられているパラメータ。例えば、キャンドルラグ。
drive
保存。 値が ,DefaultDrive の場合、 .
format
フォーマットタイプ。 デフォルトではバイナリが渡されます。

戻り値: マーケットデータストレージ。

GetStorage
public static IMarketDataStorage GetStorage(IStorageRegistry registry, Security security, DataType dataType, IMarketDataDrive drive, StorageFormats format)
result = StorageHelper.GetStorage(registry, security, dataType, drive, format)

市場データストレージを取得する。

registry
マーケットデータストレージ。
security
金融商品取引
dataType
データ型情報。
drive
保存。 値が ,DefaultDrive の場合、 .
format
フォーマットタイプ。 デフォルトではバイナリが渡されます。

戻り値: マーケットデータストレージ。

GetTimeFrameCandleMessageStorage
public static IMarketDataStorage<CandleMessage> GetTimeFrameCandleMessageStorage(IStorageRegistry registry, SecurityId securityId, TimeSpan arg, IMarketDataDrive drive, StorageFormats format)
result = StorageHelper.GetTimeFrameCandleMessageStorage(registry, securityId, arg, drive, format)

指定された機器のキャンドルストレージを取得する。

registry
代表取締役社長 佐藤 浩
securityId
金融商品ID
arg
キャンドルアーグ。
drive
ストレージ。
format
フォーマットタイプ。

戻り値: キャンドルの保管。

GetToDate
public static DateTime? GetToDate(IMarketDataStorage storage)
result = StorageHelper.GetToDate(storage)

市場データが保存される最終日付を取得するには。

storage
マーケットデータストレージ。

戻り値: 終日。値が初期化されていない場合、ストレージは空です。

Init
public static void Init(ISnapshotRegistry registry)
StorageHelper.Init(registry)
Init
public static void Init(IEntityRegistry registry)
StorageHelper.Init(registry)
Init
public static void Init(IExchangeInfoProvider provider)
StorageHelper.Init(provider)
Load
public static IEnumerable<Message> Load(IMarketDataStorage storage, DateTime date)
result = StorageHelper.Load(storage, date)

DateTime の同期ラッパー。

storage
市場データストレージ。
date
データの読み込まれる日付。

戻り値: データ。データがない場合、空のセットが返されます。

LoadAsync``1
public static IAsyncEnumerable<TMessage> LoadAsync<TMessage>(IMarketDataStorage<TMessage> storage, DateTime? from, DateTime? to)
result = StorageHelper.LoadAsync(storage, from, to)

市場データの反復的なローダを時間範囲に作成します。

storage
マーケットデータストレージ。
from
データ読み込みの開始時刻。値が指定されていない場合は、開始時刻GetDatesAsyncからデータを読み込みます。
to
データの読み込みの終了時刻。値が指定されていない場合は、GetDatesAsync日付まで、包括的なデータが読み込まれます。

戻り値: 市場データの反復的な積込み機。

LoadMessages
public static ValueTuple<DateTime?, long?>? LoadMessages(StorageCoreSettings settings, CandleBuilderProvider candleBuilderProvider, MarketDataMessage subscription, Action<Message> newOutMessage)
result = StorageHelper.LoadMessages(settings, candleBuilderProvider, subscription, newOutMessage)

メッセージをロードします。

settings
ストレージ設定。
candleBuilderProvider
キャンドルビルダープロバイダ。
subscription
市場データメッセージ(発信ケースの購読/退会、受信ケースでの確認イベントとして使用します)。
newOutMessage
新規メッセージイベント

戻り値: 最終日

LoadMessagesAsync
public static IAsyncEnumerable<Message> LoadMessagesAsync(StorageCoreSettings settings, CandleBuilderProvider candleBuilderProvider, MarketDataMessage subscription, StorageLoadContext context, CancellationToken cancellationToken)
result = StorageHelper.LoadMessagesAsync(settings, candleBuilderProvider, subscription, context, cancellationToken)

ストレージから履歴メッセージを非同期ストリームとして読み込みます。

settings
ストレージ設定。
candleBuilderProvider
キャンドルビルダープロバイダ。
subscription
市場データメッセージ(発信ケースの購読/退会、受信ケースでの確認イベントとして使用します)。
context
列挙後にロード結果メタデータでポップアップするコンテキスト。
cancellationToken
キャンセルトークン。

戻り値: メッセージの非同期ストリーム。

LoadStream
public static Stream LoadStream(IMarketDataStorageDrive drive, DateTime date, bool readOnly)
result = StorageHelper.LoadStream(drive, date, readOnly)

CancellationToken の同期ラッパー。

drive
市場データ記憶装置ドライブ。
date
データの読み込まれる日付。
readOnly
読み取りモードのみでストリームを取得します。

戻り値: StockSharp ストレージの形式にデータが格納されます。データが存在しない場合、Null は返されます。

Load``1
public static IEnumerable<TMessage> Load<TMessage>(IMarketDataStorage<TMessage> storage, DateTime date)
result = StorageHelper.Load(storage, date)

DateTime の同期ラッパー。

storage
市場データストレージ。
date
データの読み込まれる日付。

戻り値: データ。データがない場合、空のセットが返されます。

Load``1
public static IEnumerable<TMessage> Load<TMessage>(IMarketDataStorage<TMessage> storage, DateTime? from, DateTime? to)
result = StorageHelper.Load(storage, from, to)

市場データの反復的なローダを時間範囲に作成します。

storage
マーケットデータストレージ。
from
データ読み込みの開始時刻。値が指定されていない場合は、開始時刻GetDatesAsyncからデータを読み込みます。
to
データの読み込みの終了時刻。値が指定されていない場合は、GetDatesAsync日付まで、包括的なデータが読み込まれます。

戻り値: 市場データの反復的な積込み機。

Save
public static int Save(IMarketDataStorage storage, IEnumerable<Message> data)
result = StorageHelper.Save(storage, data)

CancellationToken の同期ラッパー。

storage
市場データストレージ。
data
市場データ。

戻り値: 保存されたデータのカウント。

Save
public static void Save(ISecurityStorage storage, Security security, bool forced)
StorageHelper.Save(storage, security, forced)

CancellationToken の同期ラッパー。

storage
金融商品保管
security
金融商品取引
forced
強制的な更新。
SaveStream
public static void SaveStream(IMarketDataStorageDrive drive, DateTime date, Stream stream)
StorageHelper.SaveStream(drive, date, stream)

CancellationToken の同期ラッパー。

drive
市場データ記憶装置ドライブ。
date
保存するデータを保存する日付。
stream
StockSharp@ ストレージの形式にデータを格納します。
Save``1
public static int Save<TMessage>(IMarketDataStorage<TMessage> storage, IEnumerable<TMessage> data)
result = StorageHelper.Save(storage, data)

CancellationToken の同期ラッパー。

storage
市場データストレージ。
data
市場データ。

戻り値: 保存されたデータのカウント。

SecurityIdToFolderName
public static string SecurityIdToFolderName(string id)
result = StorageHelper.SecurityIdToFolderName(id)

機器識別子をフォルダー名に変換し、予約されたシンボルを置き換えます。

id
金融商品ID

戻り値: ディレクトリ名。

SetAdapter``1
public static bool SetAdapter<TKey>(IMappingMessageAdapterProvider<TKey> provider, TKey key, IMessageAdapter adapter)
result = StorageHelper.SetAdapter(provider, key, adapter)

アダプターと関連付ける

provider
メッセージ アダプターのプロバイダ インターフェイス。
key
主。
adapter
アダプター。

戻り値: 協会が正常に変更された場合、そうでなければ、。

フィールド

SecurityBackslashSeparator
public const string SecurityBackslashSeparator
value = StorageHelper.SecurityBackslashSeparator

デリミターは、$\\' を USD\EUR のような機器のパスに置き換えます。 '##BS#' と等しい。

SecurityColonSeparator
public const string SecurityColonSeparator
value = StorageHelper.SecurityColonSeparator

AA-CA:SPB@SPBEX のような機器のパスに ':' を置き換える区切り文字。 '#COLON####' と等しい。

SecurityFirstDot
public const string SecurityFirstDot
value = StorageHelper.SecurityFirstDot

.AA-CA@SPBEX のような機器のパスで、最初の '.' を置き換える区切り文字。 '#DOT##' と等しい。

SecurityQuestionSeparator
public const string SecurityQuestionSeparator
value = StorageHelper.SecurityQuestionSeparator

AA-CA##QSTN##SPB@SPBEX のような id を持つ銘柄パス内の '?' を置き換える区切り文字。'##QSTN##' と等しい。

SecuritySlashSeparator
public const string SecuritySlashSeparator
value = StorageHelper.SecuritySlashSeparator

'/' を USD/EUR のような機器のパスに置き換える区切り文字。'__' と等しい。

SecurityStarSeparator
public const string SecurityStarSeparator
value = StorageHelper.SecurityStarSeparator

区切り文字は、C.BPO-*@CANADIAN のような機器のパスに '*' を置き換えます。 '#STAR#' と等しいです。

SecurityVerticalBarSeparator
public const string SecurityVerticalBarSeparator
value = StorageHelper.SecurityVerticalBarSeparator

AA-CA|SPB@SPBEX のような機器のパスに '|' を置き換える区切り文字。'#VBAR#' と等しい。