protected override sealed void SetContext(EvaluatorContext context) { if(contexts == null) contexts = new EvaluatorContext[] { context }; else contexts[0] = context; }
protected abstract void SetContext(EvaluatorContext context);
public object Evaluate(EvaluatorContext evaluationContext, CriteriaOperator evaluatorCriteria, IComparer customComparer) { System.Diagnostics.Debug.Assert(!HasContext); try { this.customComparer = customComparer; SetContext(evaluationContext); return this.Process(evaluatorCriteria); } finally { ClearContext(); } }
public bool Fit(EvaluatorContext evaluationContext, CriteriaOperator filterCriteria) { if(ReferenceEquals(filterCriteria, null)) return true; return (bool)Evaluate(evaluationContext, filterCriteria); }
public object Evaluate(EvaluatorContext evaluationContext, CriteriaOperator evaluatorCriteria) { return Evaluate(evaluationContext, evaluatorCriteria, null); }