ClearScript Library
ClearScript Library
ClearScript Library Reference
Microsoft.ClearScript
IScriptEngine Interface
IScriptEngine Properties
IScriptEngine Methods

# IScriptEngine Interface

Represents a script engine.
Namespace: Microsoft.ClearScript
Assembly: ClearScript.Core (in ClearScript.Core.dll) Version: 7.5.0
Syntax
C#
VB
C++
F#
Copy

    public interface IScriptEngine : IDisposable

    Public Interface IScriptEngine
    	Inherits IDisposable

    public interface class IScriptEngine : IDisposable

    type IScriptEngine =
        interface
            interface IDisposable
        end

The IScriptEngine type exposes the following members.

Properties

| Name | Description
--- | --- | ---
| AccessContext | Allows script code to access non-host resources.
| AllowReflection | Controls whether script code is permitted to use reflection.
| ContinuationCallback | Gets or sets a callback that can be used to halt script execution.
| CustomAttributeLoader | Gets or sets the script engine's custom attribute loader.
| DefaultAccess | Gets or sets the default script access setting for all members of exposed objects.
| DisableDynamicBinding | Enables or disables dynamic method binding.
| DisableExtensionMethods | Enables or disables extension method support.
| DisableFloatNarrowing | Enables or disables floating point narrowing.
| DisableListIndexTypeRestriction | Enables or disables type restriction for array and list elements retrieved by index.
| DisableTypeRestriction | Enables or disables type restriction for field, property, and method return values.
| DocumentSettings | Gets or sets the script engine's document settings.
| EnableAutoHostVariables | Enables or disables automatic host variable tunneling for by-reference arguments to script functions and delegates.
| EnableNullResultWrapping | Enables or disables null wrapping for field, property, and method return values.
| EnforceAnonymousTypeAccess | Enables or disables access restrictions for anonymous types.
| ExposeHostObjectStaticMembers | Controls whether host objects provide access to the static members of their exposed types to script code.
| FileNameExtension | Gets the script engine's recommended file name extension for script files.
| FormatCode | Enables or disables script code formatting.
| Global | Allows the host to access script resources.
| HostData | Allows the host to attach arbitrary data to the script engine.
| Name | Gets the name associated with the script engine instance.
| NullExportValue | Gets or sets the script engine's null export value.
| NullImportValue | Gets or sets the script engine's null import value.
| Script | Allows the host to access script resources dynamically.
| UndefinedImportValue | Gets or sets the script engine's undefined import value.
| UseReflectionBindFallback | Enables or disables the use of reflection-based method binding as a fallback.
| VoidResultValue | Gets or sets the script engine's void result export value.

Top
Methods

| Name | Description
--- | --- | ---
| AddCOMObject(String, Guid) | Creates a COM/ActiveX object and exposes it to script code. The registered class is specified by class identifier (CLSID).
| AddCOMObject(String, String) | Creates a COM/ActiveX object and exposes it to script code. The registered class is specified by programmatic identifier (ProgID).
| AddCOMObject(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).
| AddCOMObject(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).
| AddCOMObject(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).
| AddCOMObject(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).
| AddCOMObject(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).
| AddCOMObject(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).
| AddCOMType(String, Guid) | Imports a COM/ActiveX type and exposes it to script code. The registered class is specified by class identifier (CLSID).
| AddCOMType(String, String) | Imports a COM/ActiveX type and exposes it to script code. The registered class is specified by programmatic identifier (ProgID).
| AddCOMType(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).
| AddCOMType(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).
| AddCOMType(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).
| AddCOMType(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).
| AddCOMType(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).
| AddCOMType(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).
| AddHostObject(String, Object) | Exposes a host object to script code.
| AddHostObject(String, HostItemFlags, Object) | Exposes a host object to script code with the specified options.
| AddHostType(Type) | Exposes a host type to script code with a default name.
| AddHostType(HostItemFlags, Type) | Exposes a host type to script code with a default name and the specified options.
| AddHostType(String, Type) | Exposes a host type to script code.
| AddHostType(String, HostItemFlags, Type) | Exposes a host type to script code with the specified options.
| AddHostType(String, String, Type) | Exposes a host type to script code. The type is specified by name.
| AddHostType(String, HostItemFlags, String, Type) | Exposes a host type to script code with the specified options. The type is specified by name.
| AddHostType(String, String, String, Type) | Exposes a host type to script code. The type is specified by type name and assembly name.
| AddHostType(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.
| AddHostTypes | Exposes host types to script code.
| AddRestrictedHostObjectT(String, T) | Exposes a host object to script code with the specified type restriction.
| AddRestrictedHostObjectT(String, HostItemFlags, T) | Exposes a host object to script code with the specified type restriction and options.
| CollectGarbage | Performs garbage collection.
| Dispose | Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. (Inherited from IDisposable)
| Evaluate(String) | Evaluates script code.
| Evaluate(DocumentInfo, String) | Evaluates script code with the specified document meta-information.
| Evaluate(String, String) | Evaluates script code with an associated document name.
| Evaluate(String, Boolean, String) | Evaluates script code with an associated document name, optionally discarding the document after execution.
| EvaluateDocument(String) | Loads and evaluates a script document.
| EvaluateDocument(String, DocumentCategory) | Loads and evaluates a document with the specified category.
| EvaluateDocument(String, DocumentCategory, DocumentContextCallback) | Loads and evaluates a document with the specified category and context callback.
| Execute(String) | Executes script code.
| Execute(DocumentInfo, String) | Executes script code with the specified document meta-information.
| Execute(String, String) | Executes script code with an associated document name.
| Execute(String, Boolean, String) | Executes script code with an associated document name, optionally discarding the document after execution.
| ExecuteCommand | Executes script code as a command.
| ExecuteDocument(String) | Loads and executes a script document.
| ExecuteDocument(String, DocumentCategory) | Loads and executes a document with the specified category.
| ExecuteDocument(String, DocumentCategory, DocumentContextCallback) | Loads and executes a document with the specified category and context callback.
| GetStackTrace | Gets a string representation of the script call stack.
| Interrupt | Interrupts script execution and causes the script engine to throw an exception.
| Invoke | Invokes a global function or procedure.

Top
See Also

#### Reference

Microsoft.ClearScript Namespace

Copyright © Microsoft Corporation. All rights reserved.

Send comments on this topic to Microsoft