< Dice | FunctionRegistry
FunctionRegistry.RegisterType Method (Type)
From DiceRoller Documentation
Registers all public static methods marked with the DiceFunctionAttribute on the type.
- Namespace: Dice
- Assembly: DiceRoller (in DiceRoller.dll)
Syntax
public void RegisterType(
Type t
)
Parameters
- t
- Type: System.Type
- Type to register methods from.
Exceptions
Exception | Condition |
---|---|
InvalidOperationException | A DiceFunctionAttribute was applied to a public method that is not a valid FunctionCallback.
- or - A function with the same name and scope has already been registered. |
Remarks
Non-public methods and instance methods are not registered, and therefore not examined. Nothing will happen if you apply this attribute to a non-public or instance method and subsequently call this function, and no exceptions will be thrown.