EqExpression class

Represents common expression object.

public abstract class Korzh.EasyQuery.EqExpression

Package: Korzh.EasyQuery (targets: netstandard2.0)

Assembly: Korzh.EasyQuery.dll


Name Type Description
EqExpression(DataModel model) void Initializes a new instance of the Korzh.EasyQuery.EqExpression class.


Name Type Description
_text string This field contains expression's text


Name Type Description
Attribute EntityAttr Gets or sets the attribute.
CustomFunc string Gets the custom func for expression if defined
DataType DataType Gets or sets the data type.
Hint string Gets or sets the expression hint.
IsAggregate bool Gets a value indicating whether this expression is aggregate.
Kind DataKind Gets the expression kind.
Model DataModel Gets the model.
SystemType Type Gets the system type for this expreesion (it's used in LINQ query builder)
Tag int Get the expression's tag - a special identifier that is used to distinguish the type of the expression .
Text string Gets or sets the expression text used for visual representation.
Value string Gets or sets the value of expression.


Name Type Description
ContentChange EventHandler This event is raised after expression was changed


Name Type Description
AssignExpr(EqExpression expr) void Assigns some expression to this one. This method just does nothing in the base class but can perform some actions in Expression descendants.
Clone() EqExpression
CloneAsync() Task<EqExpression>
ContentChanged() void Invoke ContentChange event
LoadFromXmlReader(XmlReader reader) void Loads expression from XML.
OnContentChange(EventArgs e) void Raises the ContentChange event.
ReadOnePropFromJsonAsync(JsonReader reader, string propName) Task Reads one expression property from JSON (asynchronous way).
SaveToJsonStringAsync() Task<string>
SaveToXmlWriter(XmlWriter writer, string xmlTagName) void Saves expression to XML writer.
SaveToXmlWriter(XmlWriter writer) void Saves expression to XML writer.
SetContent(string val, string txt) void Sets the content of the expression (both its value and text).
SetContentSilent(string val, string txt) void Sets the content of the expression silently (without calling ContentChanged event).
TagToOldClassName(int tag) string Converts the expression's tag value to the name of old expression class (like "CONST" or "ENTATTR").
WritePropertiesToJsonAsync(JsonWriter writer) Task Writes all experssion properties to JSON (asynchronous way). This method must be overriden in the descendant classes
WriteToJsonAsync(JsonWriter writer) Task Write the content of the expression to JSON (asynchronous way).
WriteXmlTagStart(XmlWriter writer) void Writes the expression XML tag start.
WriteXmlTagStart(XmlWriter writer, string tagName) void Writes the expression XML tag start.

Static Properties

Name Type Description
XmlTagName string Gets the name of the XML tag used for representation of Expression (an all its descendants) object in XML files.

Static Methods

Name Type Description
Create(DataModel model, int tag) EqExpression Creates the expression instance of specified type.
CreateByClassName(DataModel model, string className) EqExpression Creates the expression instance of specified class (type) name.
ReadFromJsonAsync(DataModel model, JsonReader reader) Task<EqExpression> Reads one expression from JSON.(asynchronous way). This static function recognizes the expression type and creates an instance of appropriate class.
RegisterCreator(IExpressionCreator creator) bool Registers new type of expression.