ChannelServiceAdapterBase Class

Definition

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

public abstract class ChannelServiceAdapterBase : Microsoft.Agents.Builder.ChannelAdapter
type ChannelServiceAdapterBase = class
    inherit ChannelAdapter
Public MustInherit Class ChannelServiceAdapterBase
Inherits ChannelAdapter
Inheritance
ChannelServiceAdapterBase
Derived

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.

Constructors

Name Description
ChannelServiceAdapterBase(IChannelServiceClientFactory, ILogger)

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

Fields

Name Description
InvokeResponseKey

The key value for any InvokeResponseActivity that would be on the TurnState.

(Inherited from ChannelAdapter)

Properties

Name Description
ChannelServiceFactory

Gets the IChannelServiceClientFactory instance for this adapter.

Logger

Logger for the Adapter.

(Inherited from ChannelAdapter)
MiddlewareSet

Gets the collection of middleware in the adapter's pipeline.

(Inherited from ChannelAdapter)
OnTurnError

Gets or sets an error handler that can catch exceptions in the middleware or application.

(Inherited from ChannelAdapter)

Methods

Name Description
ContinueConversationAsync(ClaimsIdentity, ConversationReference, AgentCallbackHandler, CancellationToken)

Continues a conversation in a new Turn. This is typically used for proactive interactions.

(Inherited from ChannelAdapter)
ContinueConversationAsync(ClaimsIdentity, ConversationReference, String, AgentCallbackHandler, CancellationToken)

Continues a conversation in a new Turn. This is typically used for proactive interactions.

(Inherited from ChannelAdapter)
ContinueConversationAsync(ClaimsIdentity, IActivity, AgentCallbackHandler, CancellationToken)

Sends a proactive message to a conversation. See ProcessProactiveAsync(ClaimsIdentity, IActivity, String, AgentCallbackHandler, CancellationToken).

(Inherited from ChannelAdapter)
ContinueConversationAsync(ClaimsIdentity, IActivity, String, AgentCallbackHandler, CancellationToken)

Continues a conversation in a new Turn. This is typically used for proactive interactions.

(Inherited from ChannelAdapter)
ContinueConversationAsync(String, ConversationReference, AgentCallbackHandler, CancellationToken)
Obsolete.

Continues a conversation in a new Turn. This is typically used for proactive interactions.

(Inherited from ChannelAdapter)
ContinueConversationAsync(String, IActivity, AgentCallbackHandler, CancellationToken)
Obsolete.

Continues a conversation in a new Turn. This is typically used for proactive interactions.

(Inherited from ChannelAdapter)
CreateConversationAsync(ClaimsIdentity, String, String, String, ConversationParameters, AgentCallbackHandler, CancellationToken)

Creates a conversation on the specified channel and executes a turn with the proper context for the new conversation.

CreateConversationAsync(String, String, String, String, ConversationParameters, AgentCallbackHandler, CancellationToken)

Creates a conversation on the specified channel and executes a turn with the proper context for the new conversation.

DeleteActivityAsync(ITurnContext, ConversationReference, CancellationToken)
HostResponseAsync(IActivity, IActivity, CancellationToken)
ProcessActivityAsync(ClaimsIdentity, IActivity, AgentCallbackHandler, CancellationToken)

Creates a turn context and runs the middleware pipeline for an incoming TRUSTED activity.

ProcessProactiveAsync(ClaimsIdentity, IActivity, IAgent, CancellationToken, String)
ProcessProactiveAsync(ClaimsIdentity, IActivity, String, AgentCallbackHandler, CancellationToken)

The implementation for continue conversation.

RunPipelineAsync(ITurnContext, AgentCallbackHandler, CancellationToken)

Starts activity processing for the current Agent turn.

(Inherited from ChannelAdapter)
SendActivitiesAsync(ITurnContext, IActivity[], CancellationToken)

When overridden in a derived class, sends activities to the conversation.

UpdateActivityAsync(ITurnContext, IActivity, CancellationToken)
Use(IMiddleware)

Adds middleware to the adapter's pipeline.

(Inherited from ChannelAdapter)

Applies to