Skip to main content

ClearScript

Namespace: Wisej.Ext.ClearScript

Assembly: Wisej.Ext.ClearScript

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.

info

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

Static memberCreate(type, name, v8constraints, v8flags, windowsflags)

Creates a new instance of the specified type .

ParameterTypeDescription
typeEngineTypeThe EngineType to create.
nameStringA name to associate with the instance. Currently this name is used only as a label in presentation contexts such as debugger user interfaces.
v8constraintsV8RuntimeConstraintsAn optional instance of V8RuntimeConstraints used to initialize the V8 script engine.
v8flagsV8ScriptEngineFlagsAn optional combination of V8ScriptEngineFlags flags used to initialize the V8 script engine.
windowsflagsWindowsScriptEngineFlagsAn optional combination of WindowsScriptEngineFlags flags used to initialize the JScript or VBScript engines.

Returns: ScriptEngine. The requested ScriptEngine implementation.