ClearScript

Wisej.Ext.ClearScript.ClearScript

Namespace: Wisej.Ext.ClearScript

Assembly: Wisej.Ext.ClearScript (3.2.0.0)

Creates and manages instances of the ClearScript scripting engines. The documentation on how to use the scripting engine is available here: R_Project_Reference.

public class ClearScript

ClearScript Windows engines (VBScript and JScript) are thread-bound. Once the engine has been created it must always run within the thread that created it. When Create is called passing VBScript or JScript, it creates the new scripting engine on a new dedicated thread and marshals all calls to the thread the engine is bound to. When Create is called passing V8 if creates the new scripting engine without a dedicated thread since the VB engine can process requests from any thread.

When using VBScript or JScript DO NOT FORGET TO DISPOSE the instance when you are done with the scripting engine to release the dedicated thread. If you don't dispose and don't keep a reference, the thread will be automatically terminated when the garbage collector kicks in.

Methods

Creates a new instance of the specified type .

ParameterTypeDescription

type

The EngineType to create.

name

A name to associate with the instance. Currently this name is used only as a label in presentation contexts such as debugger user interfaces.

v8constraints

An optional instance of V8RuntimeConstraints used to initialize the V8 script engine.

v8flags

An optional combination of V8ScriptEngineFlags flags used to initialize the V8 script engine.

windowsflags

An optional combination of WindowsScriptEngineFlags flags used to initialize the JScript or VBScript engines.

Returns: ScriptEngine. The requested ScriptEngine implementation.

Last updated