Table of Contents

Class ExpressionHelper

Namespace
Dynamicweb.Indexing.Querying.Expressions
Assembly
Dynamicweb.Indexing.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 string
The name of field in the index.
fieldSystemName string
The system name of field in the index.
fieldValue object
The value for expression.
operatorType OperatorType
the operator.

Returns

Expression

DeserializeFromJson(JObject)

Deserialize json object into expression
public static Expression DeserializeFromJson(JObject element)

Parameters

element JObject
Json element

Returns

Expression
Expression instance

DeserializeFromXml(XElement)

Deserialize xml element into expression
public static Expression DeserializeFromXml(XElement element)

Parameters

element XElement
Xml element

Returns

Expression
Expression instance

GetOperatorTypeSymbol(OperatorType)

Gets operator symbol
public static string GetOperatorTypeSymbol(OperatorType operatorType)

Parameters

operatorType OperatorType
The 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 XElement
Xml element to be serialized into
expression Expression
The expression to be serialized
To top