New to Telerik Document ProcessingStart a free 30-day trial

Abstract base for all spreadsheet functions, defining evaluation logic, argument rules, and metadata for use in formula expressions.

Definition

Namespace:Telerik.Windows.Documents.Spreadsheet.Expressions.Functions

Assembly:Telerik.Windows.Documents.Spreadsheet.dll

Syntax:

C#
public abstract class FunctionBase

Inheritance: objectFunctionBase

Derived Classes: ErrorTypeFalseFunctionWithArgumentsIfFunctionIsBlankIsErrIsErrorIsLogicalIsNAIsNonTextIsNumberIsRefIsTextNAPiTodayTrueTypeFunction...

Constructors

Initializes a new function base instance, ready for evaluation in spreadsheet expressions.

C#
protected FunctionBase()

Methods

Evaluates the function using the provided evaluation context and returns the result as an expression.

C#
public RadExpression Evaluate(FunctionEvaluationContext<RadExpression> context)
Parameters:contextFunctionEvaluationContext<RadExpression>

The context.

Returns:

RadExpression

Function result as RadExpression.

Performs the function-specific evaluation logic; override in derived classes to implement custom calculation behavior.

C#
protected virtual RadExpression EvaluateOverride(FunctionEvaluationContext<RadExpression> context)
Parameters:contextFunctionEvaluationContext<RadExpression>

The context.

Returns:

RadExpression

Function result as RadExpression.

Validates that the argument count falls within the acceptable range for this function, accounting for required and optional parameters and repetition rules.

C#
public bool IsArgumentNumberValid(int argumentsCount)
Parameters:argumentsCountint

The arguments count.

Returns:

bool

Boolean indicating whether the arguments number is valid.

Properties

Specifies how arguments are converted before evaluation, with a default of standard number function conversions including boolean-to-number mapping.

C#
public virtual ArgumentConversionRules ArgumentConversionRules { get; }
Property Value:

The argument conversion rules.

Provides metadata describing the function's category, required and optional arguments, and documentation for help systems.

C#
public abstract FunctionInfo FunctionInfo { get; }
Property Value:

The function info.

Returns the unique function name used in formulas to invoke this function.

C#
public abstract string Name { get; }
Property Value:

The name.