MessageExtension.OnFetchTask 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
| OnFetchTask(Regex, FetchTaskHandlerAsync) |
Registers a handler to process the initial fetch task for an Action based message extension. |
| OnFetchTask(String, FetchTaskHandlerAsync) |
Registers a handler to process the initial fetch task for an Action based message extension. |
| OnFetchTask(RouteSelector, FetchTaskHandlerAsync) |
Registers a handler to process the initial fetch task for an Action based message extension. |
| OnFetchTask(MultipleRouteSelector, FetchTaskHandlerAsync) |
Registers a handler to process the initial fetch task for an Action based message extension. |
OnFetchTask(Regex, FetchTaskHandlerAsync)
Registers a handler to process the initial fetch task for an Action based message extension.
public Microsoft.Agents.Builder.App.AgentApplication OnFetchTask(System.Text.RegularExpressions.Regex commandIdPattern, Microsoft.Agents.Extensions.Teams.App.MessageExtensions.FetchTaskHandlerAsync handler);
member this.OnFetchTask : System.Text.RegularExpressions.Regex * Microsoft.Agents.Extensions.Teams.App.MessageExtensions.FetchTaskHandlerAsync -> Microsoft.Agents.Builder.App.AgentApplication
Public Function OnFetchTask (commandIdPattern As Regex, handler As FetchTaskHandlerAsync) As AgentApplication
Parameters
- commandIdPattern
- Regex
Regular expression to match against the ID of the commands to register the handler for.
- handler
- FetchTaskHandlerAsync
Function to call when the command is received.
Returns
The application instance for chaining purposes.
Applies to
OnFetchTask(String, FetchTaskHandlerAsync)
Registers a handler to process the initial fetch task for an Action based message extension.
public Microsoft.Agents.Builder.App.AgentApplication OnFetchTask(string commandId, Microsoft.Agents.Extensions.Teams.App.MessageExtensions.FetchTaskHandlerAsync handler);
member this.OnFetchTask : string * Microsoft.Agents.Extensions.Teams.App.MessageExtensions.FetchTaskHandlerAsync -> Microsoft.Agents.Builder.App.AgentApplication
Public Function OnFetchTask (commandId As String, handler As FetchTaskHandlerAsync) As AgentApplication
Parameters
- commandId
- String
ID of the commands to register the handler for.
- handler
- FetchTaskHandlerAsync
Function to call when the command is received.
Returns
The application instance for chaining purposes.
Applies to
OnFetchTask(RouteSelector, FetchTaskHandlerAsync)
Registers a handler to process the initial fetch task for an Action based message extension.
public Microsoft.Agents.Builder.App.AgentApplication OnFetchTask(Microsoft.Agents.Builder.App.RouteSelector routeSelector, Microsoft.Agents.Extensions.Teams.App.MessageExtensions.FetchTaskHandlerAsync handler);
member this.OnFetchTask : Microsoft.Agents.Builder.App.RouteSelector * Microsoft.Agents.Extensions.Teams.App.MessageExtensions.FetchTaskHandlerAsync -> Microsoft.Agents.Builder.App.AgentApplication
Public Function OnFetchTask (routeSelector As RouteSelector, handler As FetchTaskHandlerAsync) As AgentApplication
Parameters
- routeSelector
- RouteSelector
Function that's used to select a route. The function returning true triggers the route.
- handler
- FetchTaskHandlerAsync
Function to call when the route is triggered.
Returns
The application instance for chaining purposes.
Applies to
OnFetchTask(MultipleRouteSelector, FetchTaskHandlerAsync)
Registers a handler to process the initial fetch task for an Action based message extension.
public Microsoft.Agents.Builder.App.AgentApplication OnFetchTask(Microsoft.Agents.Builder.App.MultipleRouteSelector routeSelectors, Microsoft.Agents.Extensions.Teams.App.MessageExtensions.FetchTaskHandlerAsync handler);
member this.OnFetchTask : Microsoft.Agents.Builder.App.MultipleRouteSelector * Microsoft.Agents.Extensions.Teams.App.MessageExtensions.FetchTaskHandlerAsync -> Microsoft.Agents.Builder.App.AgentApplication
Public Function OnFetchTask (routeSelectors As MultipleRouteSelector, handler As FetchTaskHandlerAsync) As AgentApplication
Parameters
- routeSelectors
- MultipleRouteSelector
Combination of String, Regex, and RouteSelectorAsync selectors.
- handler
- FetchTaskHandlerAsync
Function to call when the route is triggered.
Returns
The application instance for chaining purposes.