< Dice
MacroRegistry Class
From DiceRoller Documentation
Stores a mapping of all macros to their appropriate callbacks.
- Namespace: Dice
- Assembly: DiceRoller (in DiceRoller.dll)
Inheritance Hierarchy
System.Object
- Dice.MacroRegistry
Syntax
public class MacroRegistry
Methods
Name | Description | |
---|---|---|
Contains(String) | Checks if the given macro has already been registered. | |
Get(String) | Retrieves the registration information for the given registered macro. | |
RegisterMacro(String, MacroCallback) | Registers the specified callback to the given name. | |
RegisterGlobalMacro(MacroCallback) | Registers a callback to the global macro registry. The same callback may be registered more than once. | |
Remove(String) | Removes the macro with the given name. | |
RemoveGlobal(MacroCallback) | Removes all instances of the callback from the global macro registry. | |
RegisterType(Type) | Registers all public static methods marked with DiceMacroAttribute on the type. | |
RegisterType<T>(T) | Registers all public static and instance methods marked with DiceMacroAttribute on the type, using the passed-in object when calling instance methods. |
Fields
Name | Description | |
---|---|---|
Callbacks | Contains a mapping of all registered macros to their callback and other registration information. | |
GlobalCallbacks | Callbacks which should be executed on every macro run. |
Remarks
A MacroRegistry can contain global callbacks as well as macros registered to a particular name. Global callbacks are executed on every macro (after any name-specific callback is invoked).