EvaluatorBase Class

Assembly: CodeEffects.Rule.Engine.dll
Namespace: CodeEffects.Rule.Engine

Summary

Provides the abstract base class of the Evaluator and Evaluator<TSource> classes. You never create or derive from this class directly. It is documented here because the members it declares are inherited by both evaluator classes.

Syntax

public abstract class EvaluatorBase

Inheritance

Properties

  • Log

    Type: System.IO.TextWriter

    Gets or sets an output stream for logging expression trees. The default value is null, which means nothing is logged. When it is set, every rule that an evaluator compiles writes its expression tree and the debug view of that tree into the stream. Set it only while debugging.

    Remarks

    This is a static property, so it applies to all evaluators in the process. Set it before creating an evaluator, because rules are compiled when the evaluator is instantiated.

    Example

      EvaluatorBase.Log = Console.Out;
    
      var evaluator = new Evaluator<Patient>(rulesetXml);
    
      EvaluatorBase.Log = null;
    

Protected Members

The class also declares the protected fields sourceType, ruleSet, parameters and dataProvider, and the protected methods LogExpression(..), CompileRule(..) and GetRule(..). They exist for the two evaluator classes of this namespace. Because the constructors of EvaluatorBase are not public, you cannot derive your own evaluator from it and these members are not available to your code.

Ask on Stack Overflow - Yes, it's still active
Ask in GitHub Discussions

p102

l097 --

l102

p101

×