Difference between revisions of "Dice/RollResult"

From DiceRoller Documentation
Line 25: Line 25:
 
! style="width: 5em" |
 
! style="width: 5em" |
 
! Name !! Description
 
! Name !! Description
 +
|-
 +
| {{public}} {{property}} || [[/NumRolls|NumRolls]] || The number of dice rolls that were needed to fully evaluate this expression.
 
|-
 
|-
 
| {{public}} {{property}} || [[/ResultType|ResultType]] || Gets whether or not Value represents the die total or the number of successes.
 
| {{public}} {{property}} || [[/ResultType|ResultType]] || Gets whether or not Value represents the die total or the number of successes.

Revision as of 19:59, 13 April 2017

Contains the result of a roll expression.

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

Inheritance Hierarchy

System.Object

Dice.RollResult

Syntax

public class RollResult

Constructors

Name Description
RollResult(DiceAST) Constructs a new instance of RollResult.

Properties

Name Description
NumRolls The number of dice rolls that were needed to fully evaluate this expression.
ResultType Gets whether or not Value represents the die total or the number of successes.
RollRoot Gets the root of the dice expression's abstract syntax tree.
Value Gets the result of the roll.
Values Gets the results of each individual die rolled.

Remarks

RollResults are returned from the Roller.Roll method, and can be used to obtain the results of the roll. This class is read-only. Typically, Value and Values are the only properties that are needed in the course of normal operations, however the full AST is exposed for advanced insight into the roll, should such be necessary.