Extensions

StockSharp.Configuration

Extension class.

Métodos

FindAdapters(string, Action<Exception>) : IEnumerable<Type>

Finds and returns adapter types in the specified directory. Scans for assemblies starting with "StockSharp." (except a known exclusion list), loads them, and collects types implementing IMessageAdapter (excluding dialects) that have a public constructor accepting IdGenerator.

dir
The directory path to scan for adapter assemblies (.dll files).
errorHandler
An action to handle exceptions that occur during assembly loading.

Retorna: An enumeration of adapter Types found in the directory.

GetAdapters(Assembly) : IEnumerable<Type>

Gets adapter types from the specified assembly. Filters types implementing IMessageAdapter (excluding dialects) that have a public constructor accepting IdGenerator.

assembly
Assembly to scan.

Retorna: An enumeration of adapter Types found in the assembly.

HasValidAdapterConstructor(Type) : bool

Checks if the type has a public constructor accepting IdGenerator.

type
Type to check.

Retorna: if the type has a valid adapter constructor.

RegisterChannels(IEnumerable<ITelegramChannel>)

Register collection of Telegram channels for subsequent access through configuration container.

channels
Collection of channels to register.
TryFindChannel(long) : ITelegramChannel

Try to find the channel by the specified identifier.

channelId
Channel id.

Retorna: Found channel or if channel not found.

TryGetChannels() : IEnumerable<ITelegramChannel>

Try to get registered Telegram channels.

Retorna: Collection of channels or if service is not registered.