< Dice | RollResult
Difference between revisions of "Dice/RollResult/RollResult (RollerConfig, DiceAST, Int32)"
From DiceRoller Documentation
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | {{APIdoc|RollResult Constructor (DiceAST, | + | {{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, | DiceAST rollRoot, | ||
− | + | int numRolls | |
) | ) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
=== Parameters === | === Parameters === | ||
+ | ; ''conf'' | ||
+ | : Type: [[Dice/RollerConfig|Dice.RollerConfig]] | ||
+ | : The configuration used to generate the AST. | ||
+ | |||
; ''rollRoot'' | ; ''rollRoot'' | ||
: Type: [[Dice/AST/DiceAST|Dice.AST.DiceAST]] | : Type: [[Dice/AST/DiceAST|Dice.AST.DiceAST]] | ||
Line 18: | Line 23: | ||
; ''numRolls'' | ; ''numRolls'' | ||
− | : Type: System. | + | : Type: System.Int32 |
: The number of dice rolls that were needed to fully evaluate this expression. | : The number of dice rolls that were needed to fully evaluate this expression. | ||
Line 25: | Line 30: | ||
! Exception !! Condition | ! Exception !! Condition | ||
|- | |- | ||
− | | ArgumentNullException || ''rollRoot'' is {{cs|null}}. | + | | ArgumentNullException || ''config'' or ''rollRoot'' is {{cs|null}}. |
|} | |} | ||
== Remarks == | == Remarks == | ||
− | The RollResult's [[../Value|Value]], [[../Values|Values]], | + | 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.