Exemplo n.º 1
0
 internal override bool Evaluate(IInternalCandidate candidate)
 {
     if (!candidate.FieldIsAvailable())
     {
         VisitOnNull(candidate.GetRoot());
     }
     return(true);
 }
Exemplo n.º 2
0
		internal override bool Evaluate(IInternalCandidate candidate)
		{
			if (!candidate.FieldIsAvailable())
			{
				VisitOnNull(candidate.GetRoot());
			}
			return true;
		}
Exemplo n.º 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);
 }
Exemplo n.º 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);
        }
Exemplo n.º 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());
            }
        }
Exemplo n.º 6
0
        public virtual void Visit(object obj)
        {
            IInternalCandidate candidate = (IInternalCandidate)obj;

            Visit1(candidate.GetRoot(), this, Evaluate(candidate));
        }
Exemplo n.º 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;
		}