public ThreeWayComparison(FieldValue left, IComparisonOperand right, bool swapped ) { this._left = left; this._right = right; _swapped = swapped; }
public override bool Equals(object other) { if (!base.Equals(other)) { return(false); } Db4objects.Db4o.NativeQueries.Expr.Cmp.Operand.FieldValue casted = (Db4objects.Db4o.NativeQueries.Expr.Cmp.Operand.FieldValue )other; return(_field.Equals(casted._field)); }
public ComparisonExpression(FieldValue left, IComparisonOperand right, ComparisonOperator op) { if (left == null || right == null || op == null) { throw new ArgumentNullException(); } _left = left; _right = right; _op = op; }
public virtual void Visit(FieldValue fieldValue) { var lastFieldClass = fieldValue.Field.Type; var needConversion = lastFieldClass.IsPrimitive; fieldValue.Parent().Accept(this); if (_staticRoot != null) { _methodBuilder.LoadStaticField(fieldValue.Field); _staticRoot = null; return; } _methodBuilder.LoadField(fieldValue.Field); Box(lastFieldClass, !_inArithmetic && needConversion); }
public void Visit(FieldValue operand) { operand.Parent().Accept(this); Type clazz = ((operand.Parent() is StaticFieldRoot) ? (Type)_value : _value.GetType ()); try { FieldInfo field = Reflection4.GetField(clazz, operand.FieldName()); _value = field.GetValue(_value); } catch (Exception exc) { // arg is ignored for static Sharpen.Runtime.PrintStackTrace(exc); } }
public virtual void Visit(FieldValue operand) { operand.Parent().Accept(this); }
private IEnumerator FieldNames(FieldValue fieldValue) { Collection4 coll = new Collection4(); IComparisonOperand curOp = fieldValue; while (curOp is FieldValue) { FieldValue curField = (FieldValue)curOp; coll.Prepend(curField.FieldName()); curOp = curField.Parent(); } return coll.GetEnumerator(); }
public virtual void Visit(FieldValue operand) { _clazz = operand.Field.Type; }
private IQuery Descend(FieldValue left) { IQuery subQuery = _query; IEnumerator fieldNameIterator = FieldNames(left); while (fieldNameIterator.MoveNext()) { subQuery = subQuery.Descend((string)fieldNameIterator.Current); } return subQuery; }