Beispiel #1
0
 internal override bool Evaluate(QConObject a_constraint, QCandidate a_candidate,
                                 object a_value)
 {
     if (i_objectID == 0)
     {
         i_objectID = a_constraint.GetObjectID();
     }
     return(a_candidate._key == i_objectID);
 }
        public virtual void Visit(object a_tree)
        {
            QCandidate candidate = (QCandidate)a_tree;

            if (candidate.Include())
            {
                AddKeyCheckDuplicates(candidate._key);
            }
        }
Beispiel #3
0
 internal override bool Evaluate(QConObject a_constraint, QCandidate a_candidate,
     object a_value)
 {
     if (i_objectID == 0)
     {
         i_objectID = a_constraint.GetObjectID();
     }
     return a_candidate._key == i_objectID;
 }
Beispiel #4
0
        internal virtual QCandidate ToQCandidate(QCandidates candidates)
        {
            var qc = new QCandidate(candidates, null, _key);

            qc._preceding = ToQCandidate((TreeInt)_preceding
                                         , candidates);
            qc._subsequent = ToQCandidate((TreeInt)_subsequent, candidates);
            qc._size       = _size;
            return(qc);
        }
Beispiel #5
0
        internal virtual QCandidate ToQCandidate(QCandidates candidates)
        {
            QCandidate qc = new QCandidate(candidates, null, _key);

            qc._preceding = ToQCandidate((Db4objects.Db4o.Internal.TreeInt)((Tree)_preceding)
                                         , candidates);
            qc._subsequent = ToQCandidate((Db4objects.Db4o.Internal.TreeInt)((Tree)_subsequent
                                                                             ), candidates);
            qc._size = _size;
            return(qc);
        }
Beispiel #6
0
 internal override bool Evaluate(QConObject constraint, QCandidate candidate, object
     obj)
 {
     if (obj == null)
     {
         return false;
     }
     var preparedComparison = constraint.PrepareComparison(candidate);
     if (preparedComparison is PreparedArrayContainsComparison)
     {
         return ((PreparedArrayContainsComparison) preparedComparison).IsGreaterThan(obj);
     }
     return preparedComparison.CompareTo(obj) > 0;
 }
Beispiel #7
0
        internal override bool Evaluate(QConObject constraint, QCandidate candidate, object
                                        obj)
        {
            if (obj == null)
            {
                return(false);
            }
            var preparedComparison = constraint.PrepareComparison(candidate);

            if (preparedComparison is PreparedArrayContainsComparison)
            {
                return(((PreparedArrayContainsComparison)preparedComparison).IsSmallerThan(obj));
            }
            return(preparedComparison.CompareTo(obj) < 0);
        }
Beispiel #8
0
 internal override bool Evaluate(QConObject constraint, QCandidate candidate, object
                                 obj)
 {
     if (obj != null)
     {
         if (obj is ByteArrayBuffer)
         {
             obj = candidate.ReadString((ByteArrayBuffer)obj);
         }
         var candidateStringValue = obj.ToString();
         var stringConstraint     = constraint.GetObject().ToString();
         if (!caseSensitive)
         {
             candidateStringValue = candidateStringValue.ToLower();
             stringConstraint     = stringConstraint.ToLower();
         }
         return(CompareStrings(candidateStringValue, stringConstraint));
     }
     return(constraint.GetObject() == null);
 }
Beispiel #9
0
 internal override bool Evaluate(QConObject constraint, QCandidate candidate, object
     obj)
 {
     if (obj != null)
     {
         if (obj is ByteArrayBuffer)
         {
             obj = candidate.ReadString((ByteArrayBuffer) obj);
         }
         var candidateStringValue = obj.ToString();
         var stringConstraint = constraint.GetObject().ToString();
         if (!caseSensitive)
         {
             candidateStringValue = candidateStringValue.ToLower();
             stringConstraint = stringConstraint.ToLower();
         }
         return CompareStrings(candidateStringValue, stringConstraint);
     }
     return constraint.GetObject() == null;
 }
Beispiel #10
0
 internal override bool Evaluate(QCandidate a_candidate)
 {
     return(_value);
 }
Beispiel #11
0
 internal override bool Evaluate(QCandidate a_candidate)
 {
     return _value;
 }
Beispiel #12
0
 internal override bool Evaluate(QConObject a_constraint, QCandidate a_candidate,
                                 object a_value)
 {
     return(!i_evaluator.Evaluate(a_constraint, a_candidate, a_value));
 }
Beispiel #13
0
 internal override bool Evaluate(QConObject a_constraint, QCandidate a_candidate,
     object a_value)
 {
     return !i_evaluator.Evaluate(a_constraint, a_candidate, a_value);
 }