Method ImportFunctions
- Namespace
- LMKit.FunctionCalling
- Assembly
- LM-Kit.NET.dll
ImportFunctions<T>()
Registers all methods in the specified type T
that are marked with the LMFunctionAttribute.
public void ImportFunctions<T>()
Type Parameters
T
The type whose methods will be registered.
Exceptions
- ArgumentException
Thrown when:
- No methods in the specified type are marked with the LMFunctionAttribute.
- An instance of the type
T
is already registered.
ImportFunctions(object)
Registers all methods in the specified object instance that are marked with the LMFunctionAttribute.
public void ImportFunctions(object instance)
Parameters
instance
objectThe object instance whose methods will be registered.
Exceptions
- ArgumentNullException
Thrown when the provided instance is null.
- ArgumentException
Thrown when:
- No methods in the provided instance are marked with the LMFunctionAttribute.
- The instance or its type is already registered.
- An LM-Kit function with the same name already exists.