Click or drag to resize

CSScript Class

Class which is implements CS-Script class library interface.
Inheritance Hierarchy
SystemObject
  CSScriptLibCSScript

Namespace:  CSScriptLib
Assembly:  CSScriptLib (in CSScriptLib.dll) Version: 1.3.2.0
Syntax
C#
public class CSScript

The CSScript type exposes the following members.

Constructors
  NameDescription
Public methodCSScript
Initializes a new instance of the CSScript class
Top
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
Methods
  NameDescription
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodStatic memberGetScriptTempDir
Returns the name of the temporary folder in the CSSCRIPT subfolder of Path.GetTempPath().

Under certain circumstances it may be desirable to the use the alternative location for the CS-Script temporary files. In such cases use SetScriptTempDir() to set the alternative location.

Public methodStatic memberGetScriptTempFile
Returns the name of the temporary file in the CSSCRIPT subfolder of Path.GetTempPath().
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Fields
  NameDescription
Public fieldStatic memberGlobalSettings
Settings object containing runtime settings, which controls script compilation/execution. This is Settings class essentially is a deserialized content of the CS-Script configuration file (css_config.xml).
Top
See Also