RouteAttributeHelper.InvokeGenericWithHandler 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.
Infers the generic type parameter from the method's third parameter, creates a delegate of
openHandlerType<T>, then finds and invokes the generic WithHandler<T>
method on builder.
public static void InvokeGenericWithHandler(Microsoft.Agents.Builder.App.AgentApplication app, System.Reflection.MethodInfo method, Type openHandlerType, int paramIndex, object builder);
static member InvokeGenericWithHandler : Microsoft.Agents.Builder.App.AgentApplication * System.Reflection.MethodInfo * Type * int * obj -> unit
Public Shared Sub InvokeGenericWithHandler (app As AgentApplication, method As MethodInfo, openHandlerType As Type, paramIndex As Integer, builder As Object)
Parameters
- app
- AgentApplication
The agent application to bind the delegate to for instance methods.
- method
- MethodInfo
The method to wrap as a delegate.
- openHandlerType
- Type
The open generic delegate type, e.g. typeof(FetchHandler<>).
- paramIndex
- Int32
The index of the parameter to use for inferring the generic type.
- builder
- Object
The route builder on which to invoke WithHandler<T>.