Skip to content

SetFunction Method ​

Definition ​

  • Namespace: JASE.Expressions
  • Assembly: JASE.Expressions.dll

void SetFunction(string name, Func<object[], object> function) ​

csharp
void SetFunction(string name, Func<object[], object> function)

Registers or replaces a global function that can be called from an expression using its name (for example, MyFunc(1, 2)).

Parameters ​

NameDescription
functionA delegate that will be invoked with the evaluated argument list. The return value becomes the expression result.
nameThe function name as it will appear in expressions. Implementations may treat this name as case-sensitive or case-insensitive depending on configuration.