Skip to content

EqExpression class

Represents common expression object.

public abstract class Korzh.EasyQuery.EqExpression
TypeNameDescription
String_textThis field contains expression’s text
TypeNameDescription
EntityAttrAttributeGets or sets the attribute.
StringCustomFuncGets the custom func for expression if defined
DataTypeDataTypeGets or sets the data type.
StringHintGets or sets the expression hint.
BooleanIsAggregateGets a value indicating whether this expression is aggregate.
DataKindKindGets the expression kind.
DataModelModelGets the model.
TypeSystemTypeGets the system type for this expreesion (it’s used in LINQ query builder)
Int32TagGet the expression’s tag - a special identifier that is used to distinguish the type of the expression .
StringTextGets or sets the expression text used for visual representation.
StringValueGets or sets the value of expression.
TypeNameDescription
EventHandlerContentChangeThis event is raised after expression was changed
TypeNameDescription
voidAssignExpr(EqExpression expr)Assigns some expression to this one. This method just does nothing in the base class but can perform some actions in Expression descendants.
voidContentChanged()Invoke ContentChange event
voidLoadFromXmlReader(XmlReader reader)Loads expression from XML.
voidOnContentChange(EventArgs e)Raises the ContentChange event.
voidReadOnePropFromJson(JsonReader reader, String propName)Reads one expression property from JSON.
TaskReadOnePropFromJsonAsync(JsonReader reader, String propName)Reads one expression property from JSON (asynchronous way).
voidSaveToXmlWriter(XmlWriter writer, String xmlTagName)Saves expression to XML writer.
voidSaveToXmlWriter(XmlWriter writer)Saves expression to XML writer.
voidSetContent(String val, String txt)Sets the content of the expression (both its value and text).
voidSetContentSilent(String val, String txt)Sets the content of the expression silently (without calling ContentChanged event).
StringTagToOldClassName(Int32 tag)Converts the expression’s tag value to the name of old expression class (like “CONST” or “ENTATTR”).
voidWritePropertiesToJson(JsonWriter writer)Writes all experssion properties to JSON. This method must be overriden in the descendant classes
TaskWritePropertiesToJsonAsync(JsonWriter writer)Writes all experssion properties to JSON (asynchronous way). This method must be overriden in the descendant classes
voidWriteToJson(JsonWriter writer)Write the content of the expression to JSON
TaskWriteToJsonAsync(JsonWriter writer)Write the content of the expression to JSON (asynchronous way).
voidWriteXmlTagStart(XmlWriter writer)Writes the expression XML tag start.
voidWriteXmlTagStart(XmlWriter writer, String tagName)Writes the expression XML tag start.
TypeNameDescription
IList<IExpressionCreator>Creators
TypeNameDescription
StringXmlTagNameGets the name of the XML tag used for representation of Expression (an all its descendants) object in XML files.
TypeNameDescription
StringApplyCustomFunc(String func, String expr)Applies the custom function.
EqExpressionCreate(DataModel model, Int32 tag)Creates the expression instance of specified type.
EqExpressionCreateByClassName(DataModel model, String className)Creates the expression instance of specified class (type) name.
EqExpressionReadFromJson(DataModel model, JsonReader reader)Reads one expression from JSON. This static function recognizes the expression type and creates an instance of appropriate class.
Task<EqExpression>ReadFromJsonAsync(DataModel model, JsonReader reader)Reads one expression from JSON.(asynchronous way). This static function recognizes the expression type and creates an instance of appropriate class.
BooleanRegisterCreator(IExpressionCreator creator)Registers new type of expression.