Click or drag to resize

CSScript Properties

The CSScript type exposes the following members.

Properties
  NameDescription
Public propertyStatic memberCode exampleEvaluator
Global instance of the generic IEvaluator. This object is to be used for dynamic loading of the C# code by "compiler as service" based on the Engine value.

Generic IEvaluator interface provides a convenient way of accessing compilers without 'committing' to a specific compiler technology (e.g. Mono, Roslyn, CodeDOM). This may be required during troubleshooting or performance tuning.

Switching between compilers can be done via global CSScript.Engine.

Remarks
By default CSScript.Evaluator always returns a new instance of IEvaluator. If this behavior is undesired change the evaluator access policy by setting EvaluatorConfig.Access value.
Public propertyStatic memberEvaluatorConfig
Gets the CSScript.EvaluatorConfig, which controls the way code evaluation is conducted at runtime.
Public propertyStatic memberRoslynEvaluator
Global instance of RoslynEvaluator. This object is to be used for dynamic loading of the C# code by using Roslyn "compiler as service".

If you need to use multiple instances of th evaluator then you will need to call IEvaluator.Clone().

Top
See Also