FunctionCallback Delegate
From DiceRoller Documentation
Encapsulates a method which executes function logic.
- Namespace: Dice
- Assembly: DiceRoller (in DiceRoller.dll)
Syntax
public delegate void FunctionCallback(
FunctionContext context
)
Parameters
- context
- Type: Dice.FunctionContext
- Function context, to be filled in by the delegate.
Remarks
The FunctionCallback delegate is used alongside the DiceFunctionAttribute and FunctionRegistry.RegisterType, or with FunctionRegistry.RegisterFunction. The delegate can gain insight into the context of the function call by examining the passed-in context object, and it must also modify the context object's Value and Values. If no delegate in the chain modifies the context's Value or Values, an exception is thrown.