Class ExpressionHelper
- Namespace
- Dynamicweb.Indexing.Querying.Expressions
- Assembly
- Dynamicweb.Core.dll
The Class ExpressionHelper helps to work with expressions
public sealed class ExpressionHelper
- Inheritance
-
ExpressionHelper
- Inherited Members
Methods
CreateFieldExpression(string, string, object, OperatorType)
Creates expression based on field source with given value and operator
public static Expression CreateFieldExpression(string fieldName, string fieldSystemName, object fieldValue, OperatorType operatorType)
Parameters
fieldName
stringThe name of field in the index.
fieldSystemName
stringThe system name of field in the index.
fieldValue
objectThe value for expression.
operatorType
OperatorTypethe operator.
Returns
DeserializeFromXml(XElement)
Deserialize xml element into expression
public static Expression DeserializeFromXml(XElement element)
Parameters
element
XElementXml element
Returns
- Expression
Expression instance
GetOperatorTypeSymbol(OperatorType)
Gets operator symbol
public static string GetOperatorTypeSymbol(OperatorType operatorType)
Parameters
operatorType
OperatorTypeThe operator
Returns
- string
String representation of the operator
SerializeToXml(XElement, Expression)
Serializes an expression into xml element
public static void SerializeToXml(XElement element, Expression expression)
Parameters
element
XElementXml element to be serialized into
expression
ExpressionThe expression to be serialized