Share via


CloudAdapter Class

Definition

An adapter that implements the Bot Framework Protocol and can be hosted in different cloud environmens both public and private.

public class CloudAdapter : Microsoft.Bot.Builder.CloudAdapterBase, Microsoft.Bot.Builder.Integration.AspNet.Core.IBotFrameworkHttpAdapter
type CloudAdapter = class
    inherit CloudAdapterBase
    interface IBotFrameworkHttpAdapter
Public Class CloudAdapter
Inherits CloudAdapterBase
Implements IBotFrameworkHttpAdapter
Inheritance
Implements

Constructors

CloudAdapter()

Initializes a new instance of the CloudAdapter class. (Public cloud. No auth. For testing.)

CloudAdapter(BotFrameworkAuthentication, ILogger)

Initializes a new instance of the CloudAdapter class.

CloudAdapter(IConfiguration, IHttpClientFactory, ILogger)

Initializes a new instance of the CloudAdapter class.

Fields

BotIdentityKey

The string value for the bot identity key.

(Inherited from BotAdapter)
InvokeResponseKey

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

(Inherited from BotAdapter)
OAuthScopeKey

The string value for the OAuth scope key.

(Inherited from BotAdapter)

Properties

BotFrameworkAuthentication

Gets the BotFrameworkAuthentication instance for this adapter.

(Inherited from CloudAdapterBase)
Logger

Gets a ILogger to use within this adapter and its subclasses.

(Inherited from CloudAdapterBase)
MiddlewareSet

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

(Inherited from BotAdapter)
OnTurnError

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

(Inherited from BotAdapter)

Methods

ConnectNamedPipeAsync(String, IBot, String, String, String)

Used to connect the adapter to a named pipe.

ContinueConversationAsync(ClaimsIdentity, Activity, BotCallbackHandler, CancellationToken)

Sends a proactive message to a conversation.

(Inherited from CloudAdapterBase)
ContinueConversationAsync(ClaimsIdentity, Activity, String, BotCallbackHandler, CancellationToken)

Sends a proactive message to a conversation.

(Inherited from CloudAdapterBase)
ContinueConversationAsync(ClaimsIdentity, ConversationReference, BotCallbackHandler, CancellationToken)

Sends a proactive message from the bot to a conversation.

(Inherited from CloudAdapterBase)
ContinueConversationAsync(ClaimsIdentity, ConversationReference, String, BotCallbackHandler, CancellationToken)

Sends a proactive message from the bot to a conversation.

(Inherited from CloudAdapterBase)
ContinueConversationAsync(String, Activity, BotCallbackHandler, CancellationToken)

Sends a proactive message to a conversation.

(Inherited from CloudAdapterBase)
ContinueConversationAsync(String, ConversationReference, BotCallbackHandler, CancellationToken)

Sends a proactive message from the bot to a conversation.

(Inherited from CloudAdapterBase)
CreateClaimsIdentity(String)

This is a helper to create the ClaimsIdentity structure from an appId that will be added to the TurnContext. It is intended for use in proactive and named-pipe scenarios.

(Inherited from CloudAdapterBase)
CreateConversationAsync(String, String, String, String, ConversationParameters, BotCallbackHandler, CancellationToken)

Creates a conversation on the specified channel.

(Inherited from CloudAdapterBase)
CreateWebSocketConnection(WebSocket, ILogger)

Creates a StreamingConnection that uses web sockets.

DeleteActivityAsync(ITurnContext, ConversationReference, CancellationToken)

When overridden in a derived class, deletes an existing activity in the conversation.

(Inherited from CloudAdapterBase)
GetStreamingConnectorFactory(Activity)

Gets the correct streaming connector factory that is processing the given activity.

ProcessActivityAsync(AuthenticateRequestResult, Activity, BotCallbackHandler, CancellationToken)

The implementation for processing an Activity sent to this bot.

(Inherited from CloudAdapterBase)
ProcessActivityAsync(ClaimsIdentity, Activity, BotCallbackHandler, CancellationToken)

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

(Inherited from BotAdapter)
ProcessActivityAsync(String, Activity, BotCallbackHandler, CancellationToken)

The implementation for processing an Activity sent to this bot.

(Inherited from CloudAdapterBase)
ProcessAsync(HttpRequest, HttpResponse, IBot, CancellationToken)

Process the inbound HTTP request with the bot resulting in the outbound http response, this method can be called directly from a Controller. If the HTTP method is a POST the body will contain the Activity to process.

ProcessProactiveAsync(ClaimsIdentity, Activity, String, BotCallbackHandler, CancellationToken)

The implementation for continue conversation.

(Inherited from CloudAdapterBase)
RunPipelineAsync(ITurnContext, BotCallbackHandler, CancellationToken)

Starts activity processing for the current bot turn.

(Inherited from BotAdapter)
SendActivitiesAsync(ITurnContext, Activity[], CancellationToken)

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

(Inherited from CloudAdapterBase)
UpdateActivityAsync(ITurnContext, Activity, CancellationToken)

When overridden in a derived class, replaces an existing activity in the conversation.

(Inherited from CloudAdapterBase)
Use(IMiddleware)

Adds middleware to the adapter's pipeline.

(Inherited from BotAdapter)

Extension Methods

UseBotState(BotAdapter, BotState[])

Adds middleware to the adapter to register one or more BotState objects on the turn context. The middleware registers the state objects on the turn context at the start of each turn.

UseState(BotAdapter, UserState, ConversationState, Boolean)
Obsolete.

Registers user and conversation state objects with the adapter. These objects will be available via the turn context's TurnState.Get<T>() method.

UseStorage(BotAdapter, IStorage)

Adds middleware to the adapter to register an IStorage object on the turn context. The middleware registers the state objects on the turn context at the start of each turn.

Applies to