Пример #1
0
 internal override bool Evaluate(IInternalCandidate candidate)
 {
     if (!candidate.FieldIsAvailable())
     {
         VisitOnNull(candidate.GetRoot());
     }
     return(true);
 }
Пример #2
0
		internal override bool Evaluate(IInternalCandidate candidate)
		{
			if (!candidate.FieldIsAvailable())
			{
				VisitOnNull(candidate.GetRoot());
			}
			return true;
		}
Пример #3
0
 public IInternalCandidate Add(IInternalCandidate candidate)
 {
     _result.Add(candidate);
     if (((QCandidateBase)candidate)._size == 0)
     {
         // This means that the candidate was already present
         // and QCandidate does not allow duplicates.
         // In this case QCandidate#isDuplicateOf will have
         // placed the existing QCandidate in the i_root
         // variable of the new candidate. We return it here:
         return(candidate.GetRoot());
     }
     return(candidate);
 }
Пример #4
0
        public override void Visit(object obj)
        {
            IInternalCandidate qc = (IInternalCandidate)obj;
            bool res       = true;
            bool processed = false;

            if (_checkClassMetadataOnly)
            {
                ClassMetadata yc = qc.ClassMetadata();
                if (yc != null)
                {
                    res       = i_evaluator.Not(_classMetadata.GetHigherHierarchy(yc) == _classMetadata);
                    processed = true;
                }
            }
            if (!processed)
            {
                res = Evaluate(qc);
            }
            Visit1(qc.GetRoot(), this, res);
        }
Пример #5
0
        public override void Visit(object obj)
        {
            IInternalCandidate candidate = (IInternalCandidate)obj;

            // force activation outside the try block
            // so any activation errors bubble up
            ForceActivation(candidate);
            try
            {
                Platform4.EvaluationEvaluate(i_evaluation, candidate);
            }
            catch (Exception)
            {
                candidate.Include(false);
            }
            // TODO: implement Exception callback for the user coder
            // at least for test cases
            if (!candidate.Include())
            {
                DoNotInclude(candidate.GetRoot());
            }
        }
Пример #6
0
        public virtual void Visit(object obj)
        {
            IInternalCandidate candidate = (IInternalCandidate)obj;

            Visit1(candidate.GetRoot(), this, Evaluate(candidate));
        }
Пример #7
0
		public IInternalCandidate Add(IInternalCandidate candidate)
		{
			_result.Add(candidate);
			if (((QCandidateBase)candidate)._size == 0)
			{
				// This means that the candidate was already present
				// and QCandidate does not allow duplicates.
				// In this case QCandidate#isDuplicateOf will have
				// placed the existing QCandidate in the i_root
				// variable of the new candidate. We return it here: 
				return candidate.GetRoot();
			}
			return candidate;
		}