Extensions

StockSharp.Configuration

エクステンションクラス。

メソッド

FindAdapters
public static IEnumerable<Type> FindAdapters(string dir, Action<Exception> errorHandler)
result = Extensions.FindAdapters(dir, errorHandler)

指定されたディレクトリにアダプタータイプを見つけて返します。 アセンブリのスキャンは、 "StockSharp" から始まります。 (既知の除外リストを除く)、読み込み、IMessageAdapter(ダイヤルを除く) を実装するタイプを、IdGeneratorに公開コンストラクターが受け入れているタイプを収集します。

dir
アダプターアセンブリ(.dllファイル)のスキャンのディレクトリパス。
errorHandler
アセンブリのローディングの間に起こる例外を処理する行為。

戻り値: ディレクトリに見つかったアダプタータイプの列挙。

GetAdapters
public static IEnumerable<Type> GetAdapters(Assembly assembly)
result = Extensions.GetAdapters(assembly)

指定されたアセンブリからアダプタータイプを取得します。IMessageAdapter(ダイヤルフォームを除く)を実装するフィルタタイプは、パブリックコンストラクタがIdGeneratorを受け付けています。

assembly
スキャンするアセンブリ。

戻り値: アセンブリに見られるアダプタータイプの列挙。

HasValidAdapterConstructor
public static bool HasValidAdapterConstructor(Type type)
result = Extensions.HasValidAdapterConstructor(type)

公開コンストラクタがIdGenerator@に受諾しているかどうかチェックします。

type
チェックの種類

戻り値: 有効なアダプターコンストラクタがある場合。

RegisterChannels
public static void RegisterChannels(IEnumerable<ITelegramChannel> channels)
Extensions.RegisterChannels(channels)

設定コンテナを介して、その後のアクセスのために、Telegramチャンネルのコレクションを登録します。

channels
チャンネルの収集をレジスタに。
TryFindChannel
public static ITelegramChannel TryFindChannel(long channelId)
result = Extensions.TryFindChannel(channelId)

指定した識別子でチャンネルを検索してください。

channelId
チャネルID。

戻り値: チャンネルが見つからない場合、またはチャンネルが見つからない場合。

TryGetChannels
public static IEnumerable<ITelegramChannel> TryGetChannels()
result = Extensions.TryGetChannels()

ご登録のTelegramチャンネルを入手してください。

戻り値: チャネルの収集、またはサービスが登録されていない場合。

TryGetProductId
public static long? TryGetProductId()
result = Extensions.TryGetProductId()