ChannelServiceAdapterBase Constructors
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.
Overloads
| Name | Description |
|---|---|
| ChannelServiceAdapterBase(IChannelServiceClientFactory, ILogger) |
Initializes a new instance of the ChannelServiceAdapterBase class. |
| ChannelServiceAdapterBase(IChannelServiceClientFactory, ILogger, IOutboundHostValidator) |
Initializes a new instance of the ChannelServiceAdapterBase class with outbound service URL validation. |
ChannelServiceAdapterBase(IChannelServiceClientFactory, ILogger)
Initializes a new instance of the ChannelServiceAdapterBase class.
public 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
Public 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
ChannelServiceAdapterBase(IChannelServiceClientFactory, ILogger, IOutboundHostValidator)
Initializes a new instance of the ChannelServiceAdapterBase class with outbound service URL validation.
public ChannelServiceAdapterBase(Microsoft.Agents.Builder.IChannelServiceClientFactory channelServiceClientFactory, Microsoft.Extensions.Logging.ILogger logger, Microsoft.Agents.Builder.IOutboundHostValidator hostValidator);
new Microsoft.Agents.Builder.ChannelServiceAdapterBase : Microsoft.Agents.Builder.IChannelServiceClientFactory * Microsoft.Extensions.Logging.ILogger * Microsoft.Agents.Builder.IOutboundHostValidator -> Microsoft.Agents.Builder.ChannelServiceAdapterBase
Public Sub New (channelServiceClientFactory As IChannelServiceClientFactory, logger As ILogger, hostValidator As IOutboundHostValidator)
Parameters
- channelServiceClientFactory
- IChannelServiceClientFactory
The IChannelServiceClientFactory to use for creating IConnectorClient and IUserTokenClient instances.
- logger
- ILogger
The ILogger implementation this adapter should use.
- hostValidator
- IOutboundHostValidator
The validator used to restrict outbound service URLs.