RollResult Constructor (RollerConfig, DiceAST, Int32)

From DiceRoller Documentation

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.