Class ExpressionHelper
- Namespace
- Ecng.Compilation.Expressions
- Assembly
- Ecng.Compilation.dll
Extension class for ExpressionFormula<TResult>.
[CLSCompliant(false)]
public static class ExpressionHelper- Inheritance
- 
      
      ExpressionHelper
- Inherited Members
Properties
Functions
Available functions.
public static IEnumerable<string> Functions { get; }Property Value
Methods
Compile<TResult>(ICompiler, ICompilerContext, Func<Assembly, string, Type>, string, ICompilerCache, CancellationToken)
Compile mathematical formula.
public static Task<ExpressionFormula<TResult>> Compile<TResult>(this ICompiler compiler, ICompilerContext context, Func<Assembly, string, Type> getType, string expression, ICompilerCache cache = null, CancellationToken cancellationToken = default)Parameters
- compilerICompiler
- contextICompilerContext
- getTypeFunc<Assembly, string, Type>
- Function to get type from the assembly. 
- expressionstring
- Text expression. 
- cacheICompilerCache
- cancellationTokenCancellationToken
Returns
- Task<ExpressionFormula<TResult>>
- Compiled mathematical formula. 
Type Parameters
- TResult
- Result type. 
Compile<TResult>(ICompiler, ICompilerContext, string, ICompilerCache, CancellationToken)
Compile mathematical formula.
public static Task<ExpressionFormula<TResult>> Compile<TResult>(this ICompiler compiler, ICompilerContext context, string expression, ICompilerCache cache = null, CancellationToken cancellationToken = default)Parameters
- compilerICompiler
- contextICompilerContext
- expressionstring
- Text expression. 
- cacheICompilerCache
- cancellationTokenCancellationToken
Returns
- Task<ExpressionFormula<TResult>>
Type Parameters
- TResult
GetVariables(string)
Get variables from the expression.
public static string[] GetVariables(string expression)Parameters
- expressionstring
- Text expression. 
Returns
- string[]
- Variables.