< Dice | RollResult
Difference between revisions of "Dice/RollResult/RollResult (RollerConfig, DiceAST, Int32)"
From DiceRoller Documentation
(Created page with "{{APIdoc|RollResult Constructor (ResultType, decimal, IReadOnlyList<DieResult>, DiceAST)}} Constructs a new instance of RollResult. {{ns}} == Syntax == <syntaxhighlight lang...") |
|||
(4 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | {{APIdoc|RollResult Constructor ( | + | {{APIdoc|RollResult Constructor (RollerConfig, DiceAST, Int32)}} |
Constructs a new instance of RollResult. | Constructs a new instance of RollResult. | ||
Line 7: | Line 7: | ||
<syntaxhighlight lang="C#"> | <syntaxhighlight lang="C#"> | ||
internal RollResult( | internal RollResult( | ||
− | + | RollerConfig conf, | |
− | + | DiceAST rollRoot, | |
− | + | int numRolls | |
− | |||
) | ) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
=== Parameters === | === Parameters === | ||
− | ; '' | + | ; ''conf'' |
− | : Type: [[Dice/ | + | : Type: [[Dice/RollerConfig|Dice.RollerConfig]] |
− | : The | + | : The configuration used to generate the AST. |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
; ''rollRoot'' | ; ''rollRoot'' | ||
: Type: [[Dice/AST/DiceAST|Dice.AST.DiceAST]] | : Type: [[Dice/AST/DiceAST|Dice.AST.DiceAST]] | ||
: The root of the dice expression's AST. | : The root of the dice expression's AST. | ||
+ | |||
+ | ; ''numRolls'' | ||
+ | : Type: System.Int32 | ||
+ | : The number of dice rolls that were needed to fully evaluate this expression. | ||
== Exceptions == | == Exceptions == | ||
Line 35: | Line 30: | ||
! Exception !! Condition | ! Exception !! Condition | ||
|- | |- | ||
− | | ArgumentNullException || '' | + | | ArgumentNullException || ''config'' or ''rollRoot'' is {{cs|null}}. |
|} | |} | ||
+ | |||
+ | == Remarks == | ||
+ | The RollResult's [[../Value|Value]], [[../Values|Values]], [[../ResultType|ResultType]], and [[../Expression|Expression]] are initialized from the corresponding properties on RollRoot, whereas [[../NumRolls|NumRolls]] is initialized via ''numRolls''. |
Latest revision as of 18:56, 18 April 2017
Constructs a new instance of RollResult.
- Namespace: Dice
- Assembly: DiceRoller (in DiceRoller.dll)
Syntax
internal RollResult(
RollerConfig conf,
DiceAST rollRoot,
int numRolls
)
Parameters
- conf
- Type: Dice.RollerConfig
- The configuration used to generate the AST.
- rollRoot
- Type: Dice.AST.DiceAST
- The root of the dice expression's AST.
- numRolls
- Type: System.Int32
- The number of dice rolls that were needed to fully evaluate this expression.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | config or rollRoot is null .
|
Remarks
The RollResult's Value, Values, ResultType, and Expression are initialized from the corresponding properties on RollRoot, whereas NumRolls is initialized via numRolls.