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
instanceobjectTarget object instance.
methodMethodInfoA method marked with LMFunctionAttribute.
Returns
Exceptions
- ArgumentNullException
Thrown if
instanceormethodisnull.- ArgumentException
Thrown if
methodis not annotated with LMFunctionAttribute or uses unsupported parameter types.