Click or drag to resize

ScriptEngine Class

Provides the base implementation for all script engines.
Inheritance Hierarchy

Namespace: Microsoft.ClearScript
Assembly: ClearScript.Core (in ClearScript.Core.dll) Version: 7.3.7
Syntax
public abstract class ScriptEngine : IScriptEngine, 
	IDisposable

The ScriptEngine type exposes the following members.

Constructors
 NameDescription
Protected methodScriptEngine(String)Obsolete.
Initializes a new script engine instance.
Protected methodScriptEngine(String, String) Initializes a new script engine instance with the specified list of supported file name extensions.
Top
Properties
 NameDescription
Public propertyAccessContext Allows script code to access non-host resources.
Public propertyAllowReflection Controls whether script code is permitted to use reflection.
Public propertyContinuationCallback Gets or sets a callback that can be used to halt script execution.
Public propertyStatic memberCurrent Gets the script engine that is invoking a host member on the current thread.
Public propertyDefaultAccess Gets or sets the default script access setting for all members of exposed objects.
Public propertyDisableDynamicBinding Enables or disables dynamic method binding.
Public propertyDisableExtensionMethods Enables or disables extension method support.
Public propertyDisableFloatNarrowing Enables or disables floating point narrowing.
Public propertyDisableListIndexTypeRestriction Enables or disables type restriction for array and list elements retrieved by index.
Public propertyDisableTypeRestriction Enables or disables type restriction for field, property, and method return values.
Public propertyDocumentSettings Gets or sets the script engine's document settings.
Public propertyEnableAutoHostVariables Enables or disables automatic host variable tunneling for by-reference arguments to script functions and delegates.
Public propertyEnableNullResultWrapping Enables or disables null wrapping for field, property, and method return values.
Public propertyEnforceAnonymousTypeAccess Enables or disables access restrictions for anonymous types.
Public propertyExposeHostObjectStaticMembers Controls whether host objects provide access to the static members of their exposed types to script code.
Public propertyFileNameExtension Gets the script engine's recommended file name extension for script files.
Public propertyFormatCode Enables or disables script code formatting.
Public propertyGlobal Allows the host to access script resources.
Public propertyName Gets the name associated with the script engine instance.
Public propertyNullExportValue Gets or sets the engine's null export value.
Public propertyScript Allows the host to access script resources dynamically.
Public propertyUndefinedImportValue Gets or sets the engine's undefined import value.
Public propertyUseReflectionBindFallback Enables or disables the use of reflection-based method binding as a fallback.
Public propertyVoidResultValue Gets or sets the engine's void result export value.
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).
Public methodAddCOMObject(String, String) Creates a COM/ActiveX object and exposes it to script code. The registered class is specified by programmatic identifier (ProgID).
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).
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).
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).
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).
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).
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).
Public methodAddCOMType(String, Guid) Imports a COM/ActiveX type and exposes it to script code. The registered class is specified by class identifier (CLSID).
Public methodAddCOMType(String, String) Imports a COM/ActiveX type and exposes it to script code. The registered class is specified by programmatic identifier (ProgID).
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).
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).
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).
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).
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).
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).
Public methodAddHostObject(String, Object) Exposes a host object to script code.
Public methodAddHostObject(String, HostItemFlags, Object) Exposes a host object to script code with the specified options.
Public methodAddHostType(Type) Exposes a host type to script code with a default name.
Public methodAddHostType(HostItemFlags, Type) Exposes a host type to script code with a default name and the specified options.
Public methodAddHostType(String, Type) Exposes a host type to script code.
Public methodAddHostType(String, HostItemFlags, Type) Exposes a host type to script code with the specified options.
Public methodAddHostType(String, String, Type) Exposes a host type to script code. The type is specified by name.
Public methodAddHostType(String, HostItemFlags, String, Type) Exposes a host type to script code with the specified options. The type is specified by name.
Public methodAddHostType(String, String, String, Type) Exposes a host type to script code. The type is specified by type name and assembly name.
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.
Public methodAddHostTypes Exposes host types to script code.
Public methodAddRestrictedHostObjectT(String, T) Exposes a host object to script code with the specified type restriction.
Public methodAddRestrictedHostObjectT(String, HostItemFlags, T) Exposes a host object to script code with the specified type restriction and options.
Public methodCollectGarbage Performs garbage collection.
Public methodDisposePerforms application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Protected methodDispose(Boolean) Releases the unmanaged resources used by the script engine and optionally releases the managed resources.
Public methodEqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Public methodEvaluate(String) Evaluates script code.
Public methodEvaluate(DocumentInfo, String) Evaluates script code with the specified document meta-information.
Public methodEvaluate(String, String) Evaluates script code with an associated document name.
Public methodEvaluate(String, Boolean, String) Evaluates script code with an associated document name, optionally discarding the document after execution.
Public methodEvaluateDocument(String) Loads and evaluates a script document.
Public methodEvaluateDocument(String, DocumentCategory) Loads and evaluates a document with the specified category.
Public methodEvaluateDocument(String, DocumentCategory, DocumentContextCallback) Loads and evaluates a document with the specified category and context callback.
Public methodExecute(String) Executes script code.
Public methodExecute(DocumentInfo, String) Executes script code with the specified document meta-information.
Public methodExecute(String, String) Executes script code with an associated document name.
Public methodExecute(String, Boolean, String) Executes script code with an associated document name, optionally discarding the document after execution.
Public methodExecuteCommand Executes script code as a command.
Public methodExecuteDocument(String) Loads and executes a script document.
Public methodExecuteDocument(String, DocumentCategory) Loads and executes a document with the specified category.
Public methodExecuteDocument(String, DocumentCategory, DocumentContextCallback) Loads and executes a document with the specified category and context callback.
Protected methodFinalize Releases unmanaged resources and performs other cleanup operations before the script engine is reclaimed by garbage collection.
(Overrides ObjectFinalize)
Public methodGetHashCodeServes as the default hash function.
(Inherited from Object)
Public methodGetStackTrace Gets a string representation of the script call stack.
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Public methodInterrupt Interrupts script execution and causes the script engine to throw an exception.
Public methodInvoke Invokes a global function or procedure.
Protected methodMemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
Public methodToStringReturns a string that represents the current object.
(Inherited from Object)
Top
See Also