InvokeExtensions.OnInvoke(TeamsBotApplication, InvokeHandler) 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.
Registers a catch-all handler for all invoke activities. Cannot be combined with specific invoke handlers such as OnAdaptiveCardAction(TeamsBotApplication, AdaptiveCardActionHandler), OnTaskFetch(TeamsBotApplication, TaskModuleHandler), etc.
public static Microsoft.Teams.Apps.TeamsBotApplication OnInvoke(this Microsoft.Teams.Apps.TeamsBotApplication app, Microsoft.Teams.Apps.InvokeHandler handler);
static member OnInvoke : Microsoft.Teams.Apps.TeamsBotApplication * Microsoft.Teams.Apps.InvokeHandler -> Microsoft.Teams.Apps.TeamsBotApplication
<Extension()>
Public Function OnInvoke (app As TeamsBotApplication, handler As InvokeHandler) As TeamsBotApplication
Parameters
The Teams bot application.
- handler
- InvokeHandler
The invoke handler to register.
Returns
The updated Teams bot application.
Remarks
Breaking change: previously a catch-all invoke handler could be registered alongside specific invoke handlers. This combination now throws at registration time.