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

From DiceRoller Documentation
(Created page with "{{APIdoc|RollResult Constructor (ResultType, decimal, IReadOnlyList<DieResult>, DiceAST)}} Constructs a new instance of RollResult. {{ns}} == Syntax == <syntaxhighlight lang...")
 
Line 1: Line 1:
{{APIdoc|RollResult Constructor (ResultType, decimal, IReadOnlyList<DieResult>, DiceAST)}}
+
{{APIdoc|RollResult Constructor (DiceAST)}}
 
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(
    ResultType resultType,
 
    decimal value,
 
    IReadOnlyList<DieResult> values,
 
 
     DiceAST rollRoot
 
     DiceAST rollRoot
 
)
 
)
Line 15: Line 12:
  
 
=== Parameters ===
 
=== Parameters ===
; ''resultType''
 
: Type: [[Dice/ResultType|Dice.ResultType]]
 
: The type of this RollResult.
 
 
; ''value''
 
: Type: System.Decimal
 
: The overall value of the roll.
 
 
; ''values''
 
: Type: System.Collections.Generic.IReadOnlyList<[[Dice/DieResult|Dice.DieResult]]>
 
: The individual results of each die rolled.
 
 
 
; ''rollRoot''
 
; ''rollRoot''
 
: Type: [[Dice/AST/DiceAST|Dice.AST.DiceAST]]
 
: Type: [[Dice/AST/DiceAST|Dice.AST.DiceAST]]
Line 35: Line 20:
 
! Exception !! Condition
 
! Exception !! Condition
 
|-
 
|-
| ArgumentNullException || ''values'' or ''rollRoot'' is {{cs|null}}.
+
| ArgumentNullException || ''rollRoot'' is {{cs|null}}.
 
|}
 
|}
 +
 +
== Remarks ==
 +
The RollResult's [[../Value|Value]], [[../Values|Values]], and [[../ResultType|ResultType]] are initialized from the corresponding properties on RollRoot.

Revision as of 17:17, 13 April 2017

Constructs a new instance of RollResult.

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

Syntax

internal RollResult(
    DiceAST rollRoot
)

Parameters

rollRoot
Type: Dice.AST.DiceAST
The root of the dice expression's AST.

Exceptions

Exception Condition
ArgumentNullException rollRoot is null.

Remarks

The RollResult's Value, Values, and ResultType are initialized from the corresponding properties on RollRoot.