Language

IChannelAdapterRegistry Interface

Definition

Registry of IChannelAdapter instances keyed by channelId. Lets SDK features and developers resolve the correct adapter for a given channel — for example to send proactive messages or continue a conversation — without needing to know adapter types.

public interface IChannelAdapterRegistry
type IChannelAdapterRegistry = interface
Public Interface IChannelAdapterRegistry

Remarks

The interface lives in the Builder layer so it can be surfaced through ChannelAdapterRegistry. The default implementation also lives in the Builder layer and is populated from adapters annotated with the [ChannelAdapter("channelId")] attribute and adapters registered explicitly through DI.

Shared-endpoint (Tier 2) HTTP dispatch also consults the registry, casting resolved adapters to the host's HTTP adapter contract. It is only consulted when HasChannelSpecificAdapters is true — preserving current performance for the common single-adapter case.

Properties

Name Description
HasChannelSpecificAdapters

Gets a value indicating whether any channel-specific adapters are registered beyond the default. When false, the Tier 2 channelId peek in MapAgentApplicationEndpoints is skipped entirely — preserving current performance.

Methods

Name Description
GetAdapter(String)

Gets the adapter registered for the specified channelId.

GetAll()

Gets all registered adapters (default plus channel-specific).

GetDefault()

Gets the configured default adapter. Used as fallback when no channel-specific adapter is registered.

TryGetAdapter(String, IChannelAdapter)

Tries to get the adapter for the specified channelId.

Applies to