< Dice
FunctionScope Enumeration
From DiceRoller Documentation
When registering a function, this indicates what scopes the function should be registered to. When a FunctionCallback is called, this will indicate the scope from which the function was called from.
- Namespace: Dice
- Assembly: DiceRoller (in DiceRoller.dll)
Syntax
public enum FunctionScope
Members
Member name | Description |
---|---|
Global | The function is a global function (not attached to a die roll). |
Roll | The function is attached to normal, fudge, or grouped rolls, useful when registering functions that work on multiple roll types. |
Basic | The function is attached to a normal or fudge die roll. |
Group | The function is attached to a grouped roll. |
All | The function can be executed globally as well as attached to any sort of roll. Useful when registering functions that work everywhere. |
Remarks
When registering a function into the FunctionRegistry, any of the enum values may be used. When a scope is passed as part of a FunctionContext, it will be one of Global, Basic, or Group (Roll and All are not used in FunctionContexts).