< Dice‎ | Roller

Difference between revisions of "Dice/Roller/Roll (DiceAST, RollerConfig)"

From DiceRoller Documentation
(Created page with "{{APIdoc|Roller.Roll Method (DiceAST, RollerConfig)}} Evaluates the root of the tree, returning the RollResult. {{ns}} == Syntax == <syntaxhighlight lang="C#"> internal stat...")
 
 
Line 29: Line 29:
 
{| class="wikitable"
 
{| class="wikitable"
 
! Exception !! Condition
 
! Exception !! Condition
 +
|-
 
| [[Dice/DiceException|DiceException]] || An error was detected with ''root''.
 
| [[Dice/DiceException|DiceException]] || An error was detected with ''root''.
 
|}
 
|}

Latest revision as of 17:49, 21 April 2017

Evaluates the root of the tree, returning the RollResult.

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

Syntax

internal static RollResult Roll(
    DiceAST root,
    RollerConfig config
)

Parameters

root
Type: Dice.AST.DiceAST
Root of the AST to evaluate.
config
Type: Dice.RollerConfig
Configuration to use for this roll.

Return Value

Type: Dice.RollResult

The result of evaluating root.

Exceptions

Exception Condition
DiceException An error was detected with root.

When a DiceException is thrown, the exception will contain an ErrorCode property which describes the error in more detail.

See Also