< Dice | FunctionContext
Difference between revisions of "Dice/FunctionContext/Arguments"
From DiceRoller Documentation
(Created page with "{{APIdoc|FunctionContext.Arguments Property}} Gets the arguments to the function call. {{ns}} == Syntax == <syntaxhighlight lang="C#"> public IReadOnlyList<DiceAST> Argument...") |
(→Syntax) |
||
Line 6: | Line 6: | ||
== Syntax == | == Syntax == | ||
<syntaxhighlight lang="C#"> | <syntaxhighlight lang="C#"> | ||
− | public IReadOnlyList<DiceAST> Arguments { get; } | + | public IReadOnlyList<DiceAST> Arguments { get; private set; } |
</syntaxhighlight> | </syntaxhighlight> | ||
Latest revision as of 22:13, 25 April 2017
Gets the arguments to the function call.
- Namespace: Dice
- Assembly: DiceRoller (in DiceRoller.dll)
Syntax
public IReadOnlyList<DiceAST> Arguments { get; private set; }
Property Value
Type: System.Collections.Generic.IReadOnlyList<Dice.AST.DiceAST>
The list of arguments that was passed to the function, may be an empty list (Arguments.Count == 0) but is never null
.
Remarks
For the majority of functions, inspecting the Value, Values, and ValueType of each argument is generally sufficient to implement function logic, which does not require any casting.
All arguments are already evaluated at the time of the function call, so it is not necessary to evaluate them again. In other words, their Value, ValueType, and Values will be defined.