TaskModules<TState>.OnSubmit Method

Definition

Overloads

OnSubmit(MultipleRouteSelector, SubmitHandlerAsync<TState>)

Registers a handler to process the submission of a task module.

OnSubmit(RouteSelectorAsync, SubmitHandlerAsync<TState>)

Registers a handler to process the submission of a task module.

OnSubmit(String, SubmitHandlerAsync<TState>)

Registers a handler to process the submission of a task module.

OnSubmit(Regex, SubmitHandlerAsync<TState>)

Registers a handler to process the submission of a task module.

OnSubmit(MultipleRouteSelector, SubmitHandlerAsync<TState>)

Registers a handler to process the submission of a task module.

public Microsoft.Teams.AI.Application<TState> OnSubmit(Microsoft.Teams.AI.MultipleRouteSelector routeSelectors, Microsoft.Teams.AI.SubmitHandlerAsync<TState> handler);
member this.OnSubmit : Microsoft.Teams.AI.MultipleRouteSelector * Microsoft.Teams.AI.SubmitHandlerAsync<'State (requires 'State :> Microsoft.Teams.AI.State.TurnState and 'State : (new : unit -> 'State))> -> Microsoft.Teams.AI.Application<'State (requires 'State :> Microsoft.Teams.AI.State.TurnState and 'State : (new : unit -> 'State))>
Public Function OnSubmit (routeSelectors As MultipleRouteSelector, handler As SubmitHandlerAsync(Of TState)) As Application(Of TState)

Parameters

routeSelectors
MultipleRouteSelector

Combination of String, Regex, and RouteSelectorAsync verb(s) to register the handler for.

handler
SubmitHandlerAsync<TState>

Function to call when the route is triggered.

Returns

The application instance for chaining purposes.

Applies to

OnSubmit(RouteSelectorAsync, SubmitHandlerAsync<TState>)

Registers a handler to process the submission of a task module.

public Microsoft.Teams.AI.Application<TState> OnSubmit(Microsoft.Teams.AI.RouteSelectorAsync routeSelector, Microsoft.Teams.AI.SubmitHandlerAsync<TState> handler);
member this.OnSubmit : Microsoft.Teams.AI.RouteSelectorAsync * Microsoft.Teams.AI.SubmitHandlerAsync<'State (requires 'State :> Microsoft.Teams.AI.State.TurnState and 'State : (new : unit -> 'State))> -> Microsoft.Teams.AI.Application<'State (requires 'State :> Microsoft.Teams.AI.State.TurnState and 'State : (new : unit -> 'State))>
Public Function OnSubmit (routeSelector As RouteSelectorAsync, handler As SubmitHandlerAsync(Of TState)) As Application(Of TState)

Parameters

routeSelector
RouteSelectorAsync

Function that's used to select a route. The function returning true triggers the route.

handler
SubmitHandlerAsync<TState>

Function to call when the route is triggered.

Returns

The application instance for chaining purposes.

Applies to

OnSubmit(String, SubmitHandlerAsync<TState>)

Registers a handler to process the submission of a task module.

public Microsoft.Teams.AI.Application<TState> OnSubmit(string verb, Microsoft.Teams.AI.SubmitHandlerAsync<TState> handler);
member this.OnSubmit : string * Microsoft.Teams.AI.SubmitHandlerAsync<'State (requires 'State :> Microsoft.Teams.AI.State.TurnState and 'State : (new : unit -> 'State))> -> Microsoft.Teams.AI.Application<'State (requires 'State :> Microsoft.Teams.AI.State.TurnState and 'State : (new : unit -> 'State))>
Public Function OnSubmit (verb As String, handler As SubmitHandlerAsync(Of TState)) As Application(Of TState)

Parameters

verb
String

Name of the verb to register the handler for.

handler
SubmitHandlerAsync<TState>

Function to call when the route is triggered.

Returns

The application instance for chaining purposes.

Applies to

OnSubmit(Regex, SubmitHandlerAsync<TState>)

Registers a handler to process the submission of a task module.

public Microsoft.Teams.AI.Application<TState> OnSubmit(System.Text.RegularExpressions.Regex verbPattern, Microsoft.Teams.AI.SubmitHandlerAsync<TState> handler);
member this.OnSubmit : System.Text.RegularExpressions.Regex * Microsoft.Teams.AI.SubmitHandlerAsync<'State (requires 'State :> Microsoft.Teams.AI.State.TurnState and 'State : (new : unit -> 'State))> -> Microsoft.Teams.AI.Application<'State (requires 'State :> Microsoft.Teams.AI.State.TurnState and 'State : (new : unit -> 'State))>
Public Function OnSubmit (verbPattern As Regex, handler As SubmitHandlerAsync(Of TState)) As Application(Of TState)

Parameters

verbPattern
Regex

Regular expression to match against the verbs to register the handler for

handler
SubmitHandlerAsync<TState>

Function to call when the route is triggered.

Returns

The application instance for chaining purposes.

Applies to