ChannelServiceAdapterBase(IChannelServiceClientFactory, ILogger) Constructor

Definition

An adapter that implements the Activity Protocol and can be hosted in different cloud environments both public and private.

protected ChannelServiceAdapterBase(Microsoft.Agents.Builder.IChannelServiceClientFactory channelServiceClientFactory, Microsoft.Extensions.Logging.ILogger logger = default);
new Microsoft.Agents.Builder.ChannelServiceAdapterBase : Microsoft.Agents.Builder.IChannelServiceClientFactory * Microsoft.Extensions.Logging.ILogger -> Microsoft.Agents.Builder.ChannelServiceAdapterBase
Protected Sub New (channelServiceClientFactory As IChannelServiceClientFactory, Optional logger As ILogger = Nothing)

Parameters

channelServiceClientFactory
IChannelServiceClientFactory

The IChannelServiceClientFactory to use for creating IConnectorClient and IUserTokenClient instances.

logger
ILogger

The ILogger implementation this adapter should use.

Remarks

ChannelServiceAdapterBase is designed for interacting with a "channel service" that uses an IConnectorClient by way of the IChannelServiceClientFactory to send and receive activities. This is the case for Azure Bot Service, and other SDK Agents. If your adapter needs to interact with a channel service like this, you can inherit from ChannelServiceAdapterBase and get a lot of functionality for free, including handling incoming activities, sending outgoing activities, and creating conversations. Otherwise, subclass the ChannelAdapter for more control over how activities are sent and received.

Applies to