ChannelServiceAdapterBase(IChannelServiceClientFactory, ILogger) Constructor
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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.