MacroContext.Param Property
Gets the parameter passed to the macro.
- Namespace: Dice
- Assembly: DiceRoller (in DiceRoller.dll)
Syntax
public string Param { get; private set; }
Property Value
Type: System.String
The parameter passed to the macro. If not using the recommended method of separating arguments with colons, the callback is responsible for parsing this into something useful and acting accordingly.
Remarks
All leading and trailing whitespace is trimmed from Param, so the macro [ a ]
and the macro [a]
have equivalent Params ("a"
). The full string from the macro is passed into Param, no additional parsing is performed. It is up to the macro callback to parse Param into something useful.
A recommended method is to separate macro arguments via the colon character, for example [a:b:c]
would execute a macro named "a" with "b" and "c" as the two arguments passed into it. If you use this method, these are pre-parsed for you and available in the Name and Arguments properties (so you do not need to use Param at all in that case).