MacroContext.Name Property

From DiceRoller Documentation

Gets the name of the macro, if using the recommended method of separating arguments with colons.

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

Syntax

public string Name { get; private set; }

Property Value

Type: System.String

The name of the macro, in the casing that the user specified.

Remarks

All leading and trailing whitespace is trimmed from the name, so the macro [ a : b : c ] and the macro [a:b:c] have equivalent Names ("a"). If internal whitespace is important, you will need to parse the Param property yourself in order to preserve the spaces. The casing of Name is equivalent to what the user specified, so if you are doing a switch on Name, you may wish to force it all to lowercase.