Class ExpressionBuilder
A static instance of ExpressionEngine that performs expression parsing and processing. It also provides helper methods for adding custom Expression Functions as well as for building the expression editor UI. NOTE: Do not use in concurrency scenarios.
Inheritance
Inherited Members
Namespace: Neodynamic.SDK.Printing
Assembly: cs.temp.dll.dll
Syntax
public static class ExpressionBuilder
Properties
SupportedExpressions
Gets the list of supported Expressions in the the form of 5-tuple where the first component represents the Expression Category, the second component represents the Expression Name, the third component represents the Expression Syntax, the fourth component represents the Expression Description, and the last component represents Expression Example.
Declaration
public static List<Tuple<string, string, string, string, string>> SupportedExpressions { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.List<System.Tuple<System.String, System.String, System.String, System.String, System.String>> |
Methods
AddTypeReference(Type)
Add a Type reference for Expressions.
Declaration
public static void AddTypeReference(Type type)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The Type to be referenced. |
SetCustomFunction(String, Delegate)
Sets a custom Expression function.
Declaration
public static void SetCustomFunction(string name, Delegate funcDelegate)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name of the custom function. |
System.Delegate | funcDelegate | The custom function delegate. |
Remarks
If the specified custom function name matches any of the built-in supported functions, then the new custom function delegate will be used.
SetCustomVariable(String, Object)
Sets a custom Expression variable.
Declaration
public static void SetCustomVariable(string name, object varValue)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name of the custom variable. |
System.Object | varValue | The custom variable value. |
SetCustomVariable(String, Object, Type)
Sets a custom Expression typed variable.
Declaration
public static void SetCustomVariable(string name, object varValue, Type varType)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name of the custom variable. |
System.Object | varValue | The custom variable value. |
System.Type | varType | The custom variable type. |