< Dice | FunctionContext
FunctionContext Constructor (FunctionScope, String, IReadOnlyList<DiceAST>)
From DiceRoller Documentation
Constructs a new instance of FunctionContext.
- Namespace: Dice
- Assembly: DiceRoller (in DiceRoller.dll)
Syntax
internal FunctionContext(
FunctionScope scope,
string name,
IReadOnlyList<DiceAST> arguments
)
Parameters
- scope
- Type: Dice.FunctionScope
- Scope that the function was called in.
- name
- Type: System.String
- Name of the function that was called, cased according to how it was registered.
- arguments
- Type: System.Collections.Generic.IReadOnlyList<Dice.AST.DiceAST>
- The list of arguments that were passed to the function, may be an empty list.
Remarks
Value is initialized to Decimal.MinValue, Values is initialized to null
, and ValueType is initialized to ResultType.Total. The function's callback must modify Value to some other value, and may modify Values and ValueType if the defaults are insufficient. See the documentation for Values and ValueType for more details on how they interact if they are left at their defaults.