AgentApplication.OnActivity Method
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
| OnActivity(MultipleRouteSelector, 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. |
| OnActivity(Regex, RouteHandler, UInt16, String[]) |
Handles incoming activities of a given type. |
OnActivity(MultipleRouteSelector, RouteHandler, UInt16, String[])
Handles incoming activities of a given type.
public Microsoft.Agents.Builder.App.AgentApplication OnActivity(Microsoft.Agents.Builder.App.MultipleRouteSelector routeSelectors, Microsoft.Agents.Builder.App.RouteHandler handler, ushort rank = 32767, string[] autoSignInHandlers = default);
member this.OnActivity : Microsoft.Agents.Builder.App.MultipleRouteSelector * Microsoft.Agents.Builder.App.RouteHandler * uint16 * string[] -> Microsoft.Agents.Builder.App.AgentApplication
Public Function OnActivity (routeSelectors As MultipleRouteSelector, handler As RouteHandler, Optional rank As UShort = 32767, Optional autoSignInHandlers As String() = Nothing) As AgentApplication
Parameters
- routeSelectors
- MultipleRouteSelector
Combination of String, Regex, and RouteSelector selectors.
- handler
- RouteHandler
Function to call when the route is triggered.
- rank
- UInt16
0 - ushort.MaxValue for order of evaluation. Ranks of the same value are evaluated in order of addition.
- autoSignInHandlers
- String[]
Returns
The application instance for chaining purposes.
Applies to
OnActivity(RouteSelector, RouteHandler, UInt16, String[])
Handles incoming activities of a given type.
public Microsoft.Agents.Builder.App.AgentApplication OnActivity(Microsoft.Agents.Builder.App.RouteSelector routeSelector, Microsoft.Agents.Builder.App.RouteHandler handler, ushort rank = 32767, string[] autoSignInHandlers = default);
member this.OnActivity : Microsoft.Agents.Builder.App.RouteSelector * Microsoft.Agents.Builder.App.RouteHandler * uint16 * string[] -> Microsoft.Agents.Builder.App.AgentApplication
Public Function OnActivity (routeSelector As RouteSelector, handler As RouteHandler, Optional rank As UShort = 32767, Optional autoSignInHandlers As String() = Nothing) As AgentApplication
Parameters
- routeSelector
- RouteSelector
Function that's used to select a route. The function returning true triggers the route.
- handler
- RouteHandler
Function to call when the route is triggered.
- rank
- UInt16
0 - ushort.MaxValue for order of evaluation. Ranks of the same value are evaluated in order of addition.
- autoSignInHandlers
- String[]
Returns
The application instance for chaining purposes.
Applies to
OnActivity(String, RouteHandler, UInt16, String[])
Handles incoming activities of a given type.
public Microsoft.Agents.Builder.App.AgentApplication OnActivity(string type, Microsoft.Agents.Builder.App.RouteHandler handler, ushort rank = 32767, string[] autoSignInHandlers = default);
member this.OnActivity : string * Microsoft.Agents.Builder.App.RouteHandler * uint16 * string[] -> Microsoft.Agents.Builder.App.AgentApplication
Public Function OnActivity (type As String, handler As RouteHandler, Optional rank As UShort = 32767, Optional autoSignInHandlers As String() = Nothing) As AgentApplication
Parameters
- type
- String
Name of the activity type to match.
- handler
- RouteHandler
Function to call when the route is triggered.
- rank
- UInt16
0 - ushort.MaxValue for order of evaluation. Ranks of the same value are evaluated in order of addition.
- autoSignInHandlers
- String[]
Returns
The application instance for chaining purposes.
Applies to
OnActivity(Regex, RouteHandler, UInt16, String[])
Handles incoming activities of a given type.
public Microsoft.Agents.Builder.App.AgentApplication OnActivity(System.Text.RegularExpressions.Regex typePattern, Microsoft.Agents.Builder.App.RouteHandler handler, ushort rank = 32767, string[] autoSignInHandlers = default);
member this.OnActivity : System.Text.RegularExpressions.Regex * Microsoft.Agents.Builder.App.RouteHandler * uint16 * string[] -> Microsoft.Agents.Builder.App.AgentApplication
Public Function OnActivity (typePattern As Regex, handler As RouteHandler, Optional rank As UShort = 32767, Optional autoSignInHandlers As String() = Nothing) As AgentApplication
Parameters
- typePattern
- Regex
Regular expression to match against the incoming activity type.
- handler
- RouteHandler
Function to call when the route is triggered.
- rank
- UInt16
0 - ushort.MaxValue for order of evaluation. Ranks of the same value are evaluated in order of addition.
- autoSignInHandlers
- String[]
Returns
The application instance for chaining purposes.