AgentApplication Class
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.
Application class for routing and processing incoming requests.
public class AgentApplication : Microsoft.Agents.Builder.IAgent
type AgentApplication = class
interface IAgent
Public Class AgentApplication
Implements IAgent
- Inheritance
-
AgentApplication
- Derived
- Implements
Constructors
| AgentApplication(AgentApplicationOptions) |
Creates a new AgentApplication instance. |
Properties
| AdaptiveCards |
Fluent interface for accessing Adaptive Card specific features. |
| Options |
The application's configured options. |
| RegisteredExtensions | |
| UserAuthorization |
Accessing user authorization features. |
Methods
| AddRoute(RouteSelector, RouteHandler, Boolean, UInt16, String[]) |
Adds a new route to the application. Developers won't typically need to call this method directly as it's used internally by all of the fluent interfaces to register routes for their specific activity types. Routes will be matched in the order they're added to the application. The first selector to
return Invoke-based activities receive special treatment and are matched separately as they typically have shorter execution timeouts. |
| OnActivity(MultipleRouteSelector, RouteHandler, UInt16, String[]) |
Handles incoming activities of a given type. |
| OnActivity(Regex, RouteHandler, UInt16, String[]) |
Handles incoming activities of a given type. |
| OnActivity(RouteSelector, RouteHandler, UInt16, String[]) |
Handles incoming activities of a given type. |
| OnActivity(String, RouteHandler, UInt16, String[]) |
Handles incoming activities of a given type. |
| OnAfterTurn(TurnEventHandler) |
Add a handler that will execute after the turn's activity handler logic is processed.
|
| OnBeforeTurn(TurnEventHandler) |
Add a handler that will execute before the turn's activity handler logic is processed.
|
| OnConversationUpdate(RouteSelector, RouteHandler, UInt16, String[]) |
Handles conversation update events using a custom selector. |
| OnConversationUpdate(String, RouteHandler, UInt16, String[]) |
Handles conversation update events. |
| OnConversationUpdate(String[], RouteHandler, UInt16, String[]) |
Handles conversation update events. |
| OnEvent(Regex, RouteHandler, UInt16, String[]) |
Handles incoming Events matching a Name pattern. |
| OnEvent(RouteSelector, RouteHandler, UInt16, String[]) |
Handles incoming Events. |
| OnEvent(String, RouteHandler, UInt16, String[]) |
Handles incoming Event with a specific Name. |
| OnHandoff(HandoffHandler, UInt16, String[]) |
Handles handoff activities. |
| OnMessage(MultipleRouteSelector, RouteHandler, UInt16, String[]) |
Handles incoming messages with a given keyword.
|
| OnMessage(Regex, RouteHandler, UInt16, String[]) |
Handles incoming messages with a given keyword.
|
| OnMessage(RouteSelector, RouteHandler, UInt16, String[]) |
Handles incoming messages with a given keyword.
|
| OnMessage(String, RouteHandler, UInt16, String[]) |
Handles incoming messages with a given keyword.
|
| OnMessageReactionsAdded(RouteHandler, UInt16, String[]) |
Handles message reactions added events. |
| OnMessageReactionsRemoved(RouteHandler, UInt16, String[]) |
Handles message reactions removed events. |
| OnTurnAsync(ITurnContext, CancellationToken) |
Called by the adapter (for example, a CloudAdapter) at runtime in order to process an inbound Activity. |
| OnTurnError(AgentApplicationTurnError) |
Allows the AgentApplication to provide error handling without having to change the Adapter.OnTurnError. This is beneficial since the application has more context. |
| RegisterExtension<TExtension>(TExtension, Action<TExtension>) |
Registers extension with application, providing callback to specify extension features. |
| StartTypingTimer(ITurnContext) |
Manually start a timer to periodically send "typing" activities. |
| StopTypingTimer() |
Manually stop the typing timer. |