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

From DiceRoller Documentation
m
Line 1: Line 1:
{{APIdoc|RollResult Constructor (DiceAST, Int64)}}
+
{{APIdoc|RollResult Constructor (DiceAST, Int32)}}
 
Constructs a new instance of RollResult.
 
Constructs a new instance of RollResult.
  
Line 8: Line 8:
 
internal RollResult(
 
internal RollResult(
 
     DiceAST rollRoot,
 
     DiceAST rollRoot,
     long numRolls
+
     int numRolls
 
)
 
)
 
</syntaxhighlight>
 
</syntaxhighlight>
Line 18: Line 18:
  
 
; ''numRolls''
 
; ''numRolls''
: Type: System.Int64
+
: 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.
  

Revision as of 20:02, 13 April 2017

Constructs a new instance of RollResult.

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

Syntax

internal RollResult(
    DiceAST rollRoot,
    int numRolls
)

Parameters

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 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.