TaskModule.OnFetch 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
| OnFetch(MultipleRouteSelector, FetchHandlerAsync) |
Registers a handler to process the initial fetch of the task module. |
| OnFetch(RouteSelector, FetchHandlerAsync) |
Registers a handler to process the initial fetch of the task module. |
| OnFetch(String, FetchHandlerAsync) |
Registers a handler to process the initial fetch of the task module. |
| OnFetch(Regex, FetchHandlerAsync) |
Registers a handler to process the initial fetch of the task module. |
OnFetch(MultipleRouteSelector, FetchHandlerAsync)
Registers a handler to process the initial fetch of the task module.
public Microsoft.Agents.Builder.App.AgentApplication OnFetch(Microsoft.Agents.Builder.App.MultipleRouteSelector routeSelectors, Microsoft.Agents.Extensions.Teams.App.TaskModules.FetchHandlerAsync handler);
member this.OnFetch : Microsoft.Agents.Builder.App.MultipleRouteSelector * Microsoft.Agents.Extensions.Teams.App.TaskModules.FetchHandlerAsync -> Microsoft.Agents.Builder.App.AgentApplication
Public Function OnFetch (routeSelectors As MultipleRouteSelector, handler As FetchHandlerAsync) As AgentApplication
Parameters
- routeSelectors
- MultipleRouteSelector
Combination of String, Regex, and RouteSelectorAsync selectors.
- handler
- FetchHandlerAsync
Function to call when the route is triggered.
Returns
The application instance for chaining purposes.
Applies to
OnFetch(RouteSelector, FetchHandlerAsync)
Registers a handler to process the initial fetch of the task module.
public Microsoft.Agents.Builder.App.AgentApplication OnFetch(Microsoft.Agents.Builder.App.RouteSelector routeSelector, Microsoft.Agents.Extensions.Teams.App.TaskModules.FetchHandlerAsync handler);
member this.OnFetch : Microsoft.Agents.Builder.App.RouteSelector * Microsoft.Agents.Extensions.Teams.App.TaskModules.FetchHandlerAsync -> Microsoft.Agents.Builder.App.AgentApplication
Public Function OnFetch (routeSelector As RouteSelector, handler As FetchHandlerAsync) As AgentApplication
Parameters
- routeSelector
- RouteSelector
Function that's used to select a route. The function returning true triggers the route.
- handler
- FetchHandlerAsync
Function to call when the route is triggered.
Returns
The application instance for chaining purposes.
Applies to
OnFetch(String, FetchHandlerAsync)
Registers a handler to process the initial fetch of the task module.
public Microsoft.Agents.Builder.App.AgentApplication OnFetch(string verb, Microsoft.Agents.Extensions.Teams.App.TaskModules.FetchHandlerAsync handler);
member this.OnFetch : string * Microsoft.Agents.Extensions.Teams.App.TaskModules.FetchHandlerAsync -> Microsoft.Agents.Builder.App.AgentApplication
Public Function OnFetch (verb As String, handler As FetchHandlerAsync) As AgentApplication
Parameters
- verb
- String
Name of the verb to register the handler for.
- handler
- FetchHandlerAsync
Function to call when the route is triggered.
Returns
The application instance for chaining purposes.
Applies to
OnFetch(Regex, FetchHandlerAsync)
Registers a handler to process the initial fetch of the task module.
public Microsoft.Agents.Builder.App.AgentApplication OnFetch(System.Text.RegularExpressions.Regex verbPattern, Microsoft.Agents.Extensions.Teams.App.TaskModules.FetchHandlerAsync handler);
member this.OnFetch : System.Text.RegularExpressions.Regex * Microsoft.Agents.Extensions.Teams.App.TaskModules.FetchHandlerAsync -> Microsoft.Agents.Builder.App.AgentApplication
Public Function OnFetch (verbPattern As Regex, handler As FetchHandlerAsync) As AgentApplication
Parameters
- verbPattern
- Regex
Regular expression to match against the verbs to register the handler for.
- handler
- FetchHandlerAsync
Function to call when the route is triggered.
Returns
The application instance for chaining purposes.