Difference between revisions of "Dice/DiceFunctionAttribute/DiceFunctionAttribute"

From DiceRoller Documentation
(Created page with "{{APIdoc|DiceFunctionAttribute Constructor (String)}} Constructs a new instance of DiceFunctionAttribute. {{ns}} == Syntax == <syntaxhighlight lang="C#"> public DiceFunction...")
 
 
Line 14: Line 14:
 
; ''name''
 
; ''name''
 
: Type: System.String
 
: Type: System.String
: The name of the dice function, case insensitive.
+
: The name of the dice function, case insensitive. The [[../Name|Name]] property is set to this value.
  
 
== Exceptions ==
 
== Exceptions ==

Latest revision as of 20:07, 12 April 2017

Constructs a new instance of DiceFunctionAttribute.

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

Syntax

public DiceFunctionAttribute(
    string name
)

Parameters

name
Type: System.String
The name of the dice function, case insensitive. The Name property is set to this value.

Exceptions

Exception Condition
ArgumentNullException name is null.

Remarks

Dice function names are case insensitive and must be unique for a given Scope. It is an error to define a dice function with the same name as a built-in function. Duplicate name errors are not caught as part of this constructor; rather, they are caught when registering the function.