Method FromMethod
FromMethod(object, MethodInfo)
Creates a single ITool from a specific method
on the supplied instance
.
public static ITool FromMethod(object instance, MethodInfo method)
Parameters
instance
objectTarget object instance.
method
MethodInfoA method marked with LMFunctionAttribute.
Returns
Exceptions
- ArgumentNullException
Thrown if
instance
ormethod
isnull
.- ArgumentException
Thrown if
method
is not annotated with LMFunctionAttribute or uses unsupported parameter types.