Click or drag to resize
VariableContainerExtensionsRegisterFormula Method
A formula is an expression that is calculated on-the-fly and its expression tree is not parse until evaluation is required.

Namespace: FlexRule
Assembly: FlexRule.Core.Library (in FlexRule.Core.Library.dll) Version: 0.0.0.0 (0.0.0.0)
Syntax
C#
public static IVariableContainer RegisterFormula(
	this IVariableContainer container,
	string formulaExpression,
	FormulaType type = FormulaType.Default,
	ISourceInfo info = null
)

Parameters

container
Type: FlexRuleIVariableContainer
formulaExpression
Type: SystemString
type (Optional)
Type: FlexRule.DynamicEvaluationFormulaType
Type of formula
info (Optional)
Type: FlexRuleISourceInfo
source information and addresses about this formula

Return Value

Type: IVariableContainer

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IVariableContainer. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
Remarks
The format of formula is formulaName = formulaExpression. A formula can be in two forms, a value or a function. If formula name has open and close parentheses, then it becomes a function formula, otherwise it becomes a value formula.
See Also