Difference between revisions of "Dice/RollResult/RollResult (RollerConfig, DiceAST, Int32)"

From DiceRoller Documentation
Line 1: Line 1:
{{APIdoc|RollResult Constructor (DiceAST)}}
+
{{APIdoc|RollResult Constructor (DiceAST, Int64)}}
 
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(
     DiceAST rollRoot
+
     DiceAST rollRoot,
 +
    long numRolls
 
)
 
)
 
</syntaxhighlight>
 
</syntaxhighlight>
Line 15: Line 16:
 
: 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.Int64
 +
: The number of dice rolls that were needed to fully evaluate this expression.
  
 
== Exceptions ==
 
== Exceptions ==
Line 24: Line 29:
  
 
== Remarks ==
 
== Remarks ==
The RollResult's [[../Value|Value]], [[../Values|Values]], and [[../ResultType|ResultType]] are initialized from the corresponding properties on RollRoot.
+
The RollResult's [[../Value|Value]], [[../Values|Values]], and [[../ResultType|ResultType]] are initialized from the corresponding properties on RollRoot, whereas [[../NumRolls|NumRolls]] is initialized via ''numRolls''.

Revision as of 20:00, 13 April 2017

Constructs a new instance of RollResult.

  • Namespace: Dice
  • Assembly: DiceRoller (in DiceRoller.dll)

Syntax

internal RollResult(
    DiceAST rollRoot,
    long numRolls
)

Parameters

rollRoot
Type: Dice.AST.DiceAST
The root of the dice expression's AST.
numRolls
Type: System.Int64
The number of dice rolls that were needed to fully evaluate this expression.

Exceptions

Exception Condition
ArgumentNullException rollRoot is null.

Remarks

The RollResult's Value, Values, and ResultType are initialized from the corresponding properties on RollRoot, whereas NumRolls is initialized via numRolls.