Click or drag to resize

JScriptEngine Class

Represents an instance of the JScript engine.
Inheritance Hierarchy

Namespace:  Microsoft.ClearScript.Windows.Core
Assembly:  ClearScript.Windows.Core (in ClearScript.Windows.Core.dll) Version: 7.2.5
Syntax
public class JScriptEngine : WindowsScriptEngine

The JScriptEngine type exposes the following members.

Constructors
  NameDescription
Public methodJScriptEngine(ISyncInvoker)
Initializes a new JScript engine instance.
Public methodJScriptEngine(String, ISyncInvoker)
Initializes a new JScript engine instance with the specified name.
Public methodJScriptEngine(WindowsScriptEngineFlags, ISyncInvoker)
Initializes a new JScript engine instance with the specified options.
Public methodJScriptEngine(String, WindowsScriptEngineFlags, ISyncInvoker)
Initializes a new JScript engine instance with the specified name, options, and synchronous invoker.
Protected methodJScriptEngine(String, String, String, WindowsScriptEngineFlags, ISyncInvoker)
Initializes a new JScript engine instance with the specified programmatic identifier, name, list of supported file name extensions, options, and synchronous invoker.
Top
Properties
  NameDescription
Public propertyAccessContext
Allows script code to access non-public host resources.
(Inherited from ScriptEngine.)
Public propertyAllowReflection
Controls whether script code is permitted to use reflection.
(Inherited from ScriptEngine.)
Public propertyContinuationCallback
Gets or sets a callback that can be used to halt script execution.
(Inherited from ScriptEngine.)
Public propertyDefaultAccess
Gets or sets the default script access setting for all members of exposed objects.
(Inherited from ScriptEngine.)
Public propertyDisableExtensionMethods
Enables or disables extension method support.
(Inherited from ScriptEngine.)
Public propertyDisableFloatNarrowing
Enables or disables floating point narrowing.
(Inherited from ScriptEngine.)
Public propertyDisableListIndexTypeRestriction
Enables or disables type restriction for array and list elements retrieved by index.
(Inherited from ScriptEngine.)
Public propertyDisableTypeRestriction
Enables or disables type restriction for field, property, and method return values.
(Inherited from ScriptEngine.)
Public propertyDocumentSettings
Gets or sets the script engine's document settings.
(Inherited from ScriptEngine.)
Public propertyEnableAutoHostVariables
Enables or disables automatic host variable tunneling for by-reference arguments to script functions and delegates.
(Inherited from ScriptEngine.)
Public propertyEnableNullResultWrapping
Enables or disables null wrapping for field, property, and method return values.
(Inherited from ScriptEngine.)
Public propertyEnforceAnonymousTypeAccess
Enables or disables access restrictions for anonymous types.
(Inherited from ScriptEngine.)
Public propertyExposeHostObjectStaticMembers
Controls whether host objects provide access to the static members of their exposed types to script code.
(Inherited from ScriptEngine.)
Public propertyFileNameExtension
Gets the script engine's recommended file name extension for script files.
(Overrides ScriptEngineFileNameExtension.)
Public propertyFormatCode
Enables or disables script code formatting.
(Inherited from ScriptEngine.)
Public propertyGlobal
Allows the host to access script resources.
(Inherited from WindowsScriptEngine.)
Public propertyHostWindow
Gets or sets an interface that supports the display of dialogs on behalf of script code.
(Inherited from WindowsScriptEngine.)
Public propertyName
Gets the name associated with the script engine instance.
(Inherited from ScriptEngine.)
Public propertyScript
Allows the host to access script resources dynamically.
(Inherited from WindowsScriptEngine.)
Public propertySyncInvoker
Gets the ISyncInvoker implementation associated with the current script engine.
(Inherited from WindowsScriptEngine.)
Public propertyUndefinedImportValue
Gets or sets the engine's undefined import value.
(Inherited from ScriptEngine.)
Public propertyUseReflectionBindFallback
Enables or disables the use of reflection-based method binding as a fallback.
(Inherited from ScriptEngine.)
Public propertyVoidResultValue
Gets or sets the engine's void result export value.
(Inherited from ScriptEngine.)
Top
Methods
  NameDescription
Public methodAddCOMObject(String, Guid)
Creates a COM/ActiveX object and exposes it to script code. The registered class is specified by class identifier (CLSID).
(Inherited from ScriptEngine.)
Public methodAddCOMObject(String, String)
Creates a COM/ActiveX object and exposes it to script code. The registered class is specified by programmatic identifier (ProgID).
(Inherited from ScriptEngine.)
Public methodAddCOMObject(String, HostItemFlags, Guid)
Creates a COM/ActiveX object and exposes it to script code with the specified options. The registered class is specified by class identifier (CLSID).
(Inherited from ScriptEngine.)
Public methodAddCOMObject(String, HostItemFlags, String)
Creates a COM/ActiveX object and exposes it to script code with the specified options. The registered class is specified by programmatic identifier (ProgID).
(Inherited from ScriptEngine.)
Public methodAddCOMObject(String, Guid, String)
Creates a COM/ActiveX object on the specified server and exposes it to script code. The registered class is specified by class identifier (CLSID).
(Inherited from ScriptEngine.)
Public methodAddCOMObject(String, String, String)
Creates a COM/ActiveX object on the specified server and exposes it to script code. The registered class is specified by programmatic identifier (ProgID).
(Inherited from ScriptEngine.)
Public methodAddCOMObject(String, HostItemFlags, Guid, String)
Creates a COM/ActiveX object on the specified server and exposes it to script code with the specified options. The registered class is specified by class identifier (CLSID).
(Inherited from ScriptEngine.)
Public methodAddCOMObject(String, HostItemFlags, String, String)
Creates a COM/ActiveX object on the specified server and exposes it to script code with the specified options. The registered class is specified by programmatic identifier (ProgID).
(Inherited from ScriptEngine.)
Public methodAddCOMType(String, Guid)
Imports a COM/ActiveX type and exposes it to script code. The registered class is specified by class identifier (CLSID).
(Inherited from ScriptEngine.)
Public methodAddCOMType(String, String)
Imports a COM/ActiveX type and exposes it to script code. The registered class is specified by programmatic identifier (ProgID).
(Inherited from ScriptEngine.)
Public methodAddCOMType(String, HostItemFlags, Guid)
Imports a COM/ActiveX type and exposes it to script code with the specified options. The registered class is specified by class identifier (CLSID).
(Inherited from ScriptEngine.)
Public methodAddCOMType(String, HostItemFlags, String)
Imports a COM/ActiveX type and exposes it to script code with the specified options. The registered class is specified by programmatic identifier (ProgID).
(Inherited from ScriptEngine.)
Public methodAddCOMType(String, Guid, String)
Imports a COM/ActiveX type from the specified server and exposes it to script code. The registered class is specified by class identifier (CLSID).
(Inherited from ScriptEngine.)
Public methodAddCOMType(String, String, String)
Imports a COM/ActiveX type from the specified server and exposes it to script code. The registered class is specified by programmatic identifier (ProgID).
(Inherited from ScriptEngine.)
Public methodAddCOMType(String, HostItemFlags, Guid, String)
Imports a COM/ActiveX type from the specified server and exposes it to script code with the specified options. The registered class is specified by class identifier (CLSID).
(Inherited from ScriptEngine.)
Public methodAddCOMType(String, HostItemFlags, String, String)
Imports a COM/ActiveX type from the specified server and exposes it to script code with the specified options. The registered class is specified by programmatic identifier (ProgID).
(Inherited from ScriptEngine.)
Public methodAddHostObject(String, Object)
Exposes a host object to script code.
(Inherited from ScriptEngine.)
Public methodAddHostObject(String, HostItemFlags, Object)
Exposes a host object to script code with the specified options.
(Inherited from ScriptEngine.)
Public methodAddHostType(Type)
Exposes a host type to script code with a default name.
(Inherited from ScriptEngine.)
Public methodAddHostType(HostItemFlags, Type)
Exposes a host type to script code with a default name and the specified options.
(Inherited from ScriptEngine.)
Public methodAddHostType(String, Type)
Exposes a host type to script code.
(Inherited from ScriptEngine.)
Public methodAddHostType(String, HostItemFlags, Type)
Exposes a host type to script code with the specified options.
(Inherited from ScriptEngine.)
Public methodAddHostType(String, String, Type)
Exposes a host type to script code. The type is specified by name.
(Inherited from ScriptEngine.)
Public methodAddHostType(String, HostItemFlags, String, Type)
Exposes a host type to script code with the specified options. The type is specified by name.
(Inherited from ScriptEngine.)
Public methodAddHostType(String, String, String, Type)
Exposes a host type to script code. The type is specified by type name and assembly name.
(Inherited from ScriptEngine.)
Public methodAddHostType(String, HostItemFlags, String, String, Type)
Exposes a host type to script code with the specified options. The type is specified by type name and assembly name.
(Inherited from ScriptEngine.)
Public methodAddHostTypes
Exposes host types to script code.
(Inherited from ScriptEngine.)
Public methodAddRestrictedHostObjectT(String, T)
Exposes a host object to script code with the specified type restriction.
(Inherited from ScriptEngine.)
Public methodAddRestrictedHostObjectT(String, HostItemFlags, T)
Exposes a host object to script code with the specified type restriction and options.
(Inherited from ScriptEngine.)
Public methodCheckAccess
Determines whether the calling thread has access to the current script engine.
(Inherited from WindowsScriptEngine.)
Public methodCollectGarbage
Performs garbage collection.
(Inherited from WindowsScriptEngine.)
Public methodDispose
Releases all resources used by the script engine.
(Inherited from ScriptEngine.)
Protected methodDispose(Boolean)
Releases the unmanaged resources used by the script engine and optionally releases the managed resources.
(Inherited from WindowsScriptEngine.)
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodEvaluate(String)
Evaluates script code.
(Inherited from ScriptEngine.)
Public methodEvaluate(DocumentInfo, String)
Evaluates script code with the specified document meta-information.
(Inherited from ScriptEngine.)
Public methodEvaluate(String, String)
Evaluates script code with an associated document name.
(Inherited from ScriptEngine.)
Public methodEvaluate(String, Boolean, String)
Evaluates script code with an associated document name, optionally discarding the document after execution.
(Inherited from ScriptEngine.)
Public methodEvaluateDocument(String)
Loads and evaluates a script document.
(Inherited from ScriptEngine.)
Public methodEvaluateDocument(String, DocumentCategory)
Loads and evaluates a document with the specified category.
(Inherited from ScriptEngine.)
Public methodEvaluateDocument(String, DocumentCategory, DocumentContextCallback)
Loads and evaluates a document with the specified category and context callback.
(Inherited from ScriptEngine.)
Public methodExecute(String)
Executes script code.
(Inherited from ScriptEngine.)
Public methodExecute(DocumentInfo, String)
Executes script code with the specified document meta-information.
(Inherited from ScriptEngine.)
Public methodExecute(String, String)
Executes script code with an associated document name.
(Inherited from ScriptEngine.)
Public methodExecute(String, Boolean, String)
Executes script code with an associated document name, optionally discarding the document after execution.
(Inherited from ScriptEngine.)
Public methodExecuteCommand
Executes script code as a command.
(Overrides ScriptEngineExecuteCommand(String).)
Public methodExecuteDocument(String)
Loads and executes a script document.
(Inherited from ScriptEngine.)
Public methodExecuteDocument(String, DocumentCategory)
Loads and executes a document with the specified category.
(Inherited from ScriptEngine.)
Public methodExecuteDocument(String, DocumentCategory, DocumentContextCallback)
Loads and executes a document with the specified category and context callback.
(Inherited from ScriptEngine.)
Protected methodFinalize
Releases unmanaged resources and performs other cleanup operations before the script engine is reclaimed by garbage collection.
(Inherited from ScriptEngine.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetStackTrace
Gets a string representation of the script call stack.
(Inherited from WindowsScriptEngine.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodInterrupt
Interrupts script execution and causes the script engine to throw an exception.
(Inherited from WindowsScriptEngine.)
Public methodInvoke
Invokes a global function or procedure.
(Inherited from ScriptEngine.)
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.)
Public methodVerifyAccess
Enforces that the calling thread has access to the current script engine.
(Inherited from WindowsScriptEngine.)
Top
Remarks
This class can be used in non-desktop environments such as server applications. An implementation of ISyncInvoker is required to enforce thread affinity.
See Also