FunctionRegistry.Remove Method (String, FunctionScope)

From DiceRoller Documentation

Removes the function with the given name and scope.

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

Syntax

public void Remove(
    string name,
    FunctionScope scope
)

Parameters

name
Type: System.String
Name of the function to remove, case-insensitive.
scope
Type: Dice.FunctionScope
Scope of the function to remove the name from.

Exceptions

Exception Condition
ArgumentNullException name is null.
ArgumentException name refers to a reserved function name -or- you passed FunctionScope.All or FunctionScope.Roll as the scope.

Remarks

Reserved function names (dropLowest, reroll, success, critical, etc.) are not actually implemented as functions, and cannot therefore be removed. Actual built-in functions (max, min, round, if, etc.) can be removed, however. If a function with a given name and scope does not exist, no error is thrown.