/// <summary>Create from XML.</summary> public override void ReadXml(XmlReader reader) { // get the data source table and field string[] ds = reader.GetAttribute("field").Split(new char[] { '.' }, 2, StringSplitOptions.RemoveEmptyEntries); // set the operand this._operand = reader.GetAttribute("operand"); // set the operator string op = reader.GetAttribute("operator"); FilterOperatorType type = (FilterOperatorType)Enum.Parse(typeof(FilterOperatorType), op); this._op = FilterOperator.GetOperator(type); // create a new attribute & parent element entity QueryEngine.Attribute attr = new QueryEngine.Attribute(ds[1], ds[1]); QueryEngine.Entity parent = new QueryEngine.Entity(ds[0], ds[0]); attr.Parent = parent; this._attr = attr; }
/// <summary>Constructor</summary> public FilterExpression(Attribute a, FilterOperatorType type, string rhs) : this(a, FilterOperator.GetOperator(type), rhs) { }