Sprog

HandlerDescriptor.FromMethodInfo(MethodInfo, Object) Method

Definition

Creates a descriptor based on the specified method.

public static System.CommandLine.NamingConventionBinder.HandlerDescriptor FromMethodInfo(System.Reflection.MethodInfo methodInfo, object? target = default);
static member FromMethodInfo : System.Reflection.MethodInfo * obj -> System.CommandLine.NamingConventionBinder.HandlerDescriptor
Public Shared Function FromMethodInfo (methodInfo As MethodInfo, Optional target As Object = Nothing) As HandlerDescriptor

Parameters

methodInfo
MethodInfo

The method for which to create a handler descriptor.

target
Object

An instance for the descriptor to target. In the case of static methods, null should be passed.

Returns

A handler descriptor for the method and instance.

Applies to