Defines a delegate to implement a function.
Inherits: IFunction
Description
The DelegatedFunction class allows you to define a delegate to implement a function.
Constructors
Constructs this function class with the specified parameters.
public
DelegatedFunction(string name, FunctionCalculator calculator)
- name: string - name of this function.
- calculator: FunctionCalculator - function calculator delegate.
Delegate
FunctionCalculator
Defines a delegate to implement a function
public delegate
Task<Variant> FunctionCalculator(IList<Variant> parameters, IVariantOperations variantOperations)
- variantOperations: IVariantOperations - list with function parameters
- parameters: IList<Variant> - manager for variant operations.
- returns: Task<Variant> - calculated function value.
Properties
Name
Function’s name.
public
string Name { get; }
- retuns: string - function’s name.
Instance methods
Calculate
Function’s calculation method.
public
Task<Variant> CalculateAsync(IList<Variant> parameters, IVariantOperations variantOperations)
- params: IList<Variant> - array with function parameters.
- variantOperations: IVariantOperations - variants operations manager.
- returns: Task<Variant> - returned function’s result.