< Dice | FunctionRegistry
Difference between revisions of "Dice/FunctionRegistry/RegisterType"
From DiceRoller Documentation
(Created page with "{{APIdoce|FunctionRegistry.RegisterType Method Overloads}} Registers all public methods marked with DiceFunctionAttribute on the type. {{ns}}...") |
m |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
− | {{ | + | {{APIdoc|FunctionRegistry.RegisterType Method Overloads}} |
Registers all public methods marked with [[Dice/DiceFunctionAttribute|DiceFunctionAttribute]] on the type. | Registers all public methods marked with [[Dice/DiceFunctionAttribute|DiceFunctionAttribute]] on the type. | ||
Line 9: | Line 9: | ||
! Name !! Description | ! Name !! Description | ||
|- | |- | ||
− | | {{public}} {{method}} || [[/RegisterType (Type)|RegisterType(Type)]] || Registers all public static methods marked with [[Dice/DiceFunctionAttribute|DiceFunctionAttribute]] on the type. | + | | {{public}} {{method}} || [[../RegisterType (Type)|RegisterType(Type)]] || Registers all public static methods marked with [[Dice/DiceFunctionAttribute|DiceFunctionAttribute]] on the type. |
|- | |- | ||
− | | {{public}} {{method}} || [[/RegisterType (T)(T)|RegisterType<T>(T)]] || Registers all public static and instance methods marked with the [[Dice/DiceFunctionAttribute|DiceFunctionAttribute]] on the type, using the passed-in object when calling instance methods. | + | | {{public}} {{method}} || [[../RegisterType (T)(T)|RegisterType<T>(T)]] || Registers all public static and instance methods marked with the [[Dice/DiceFunctionAttribute|DiceFunctionAttribute]] on the type, using the passed-in object when calling instance methods. |
|} | |} | ||
== Remarks == | == Remarks == | ||
The first overload only looks at public static methods whereas the second overload registers both public static methods as well as public instance methods. The object passed to the second overload is used when invoking instance methods. As such, the type does not need to have any accessible constructor. | The first overload only looks at public static methods whereas the second overload registers both public static methods as well as public instance methods. The object passed to the second overload is used when invoking instance methods. As such, the type does not need to have any accessible constructor. |
Latest revision as of 18:14, 20 April 2017
Registers all public methods marked with DiceFunctionAttribute on the type.
- Namespace: Dice
- Assembly: DiceRoller (in DiceRoller.dll)
Overloads
Name | Description | |
---|---|---|
RegisterType(Type) | Registers all public static methods marked with DiceFunctionAttribute on the type. | |
RegisterType<T>(T) | Registers all public static and instance methods marked with the DiceFunctionAttribute on the type, using the passed-in object when calling instance methods. |
Remarks
The first overload only looks at public static methods whereas the second overload registers both public static methods as well as public instance methods. The object passed to the second overload is used when invoking instance methods. As such, the type does not need to have any accessible constructor.