IJSVsaEngine 接口

定义

警告

此 API 现已过时。

定义脚本引擎必须支持的方法和属性,并提供对脚本引擎的编程访问。Defines the methods and properties that a script engine must support and provides programmatic access to the script engine.

public interface class IJSVsaEngine
[System.Obsolete("Use of this type is not recommended because it is being deprecated in Visual Studio 2005; there will be no replacement for this feature. Please see the ICodeCompiler documentation for additional help.")]
[System.Runtime.InteropServices.ComVisible(true)]
[System.Runtime.InteropServices.Guid("8FA2C97B-47E4-4A31-A7F5-FF39D1195CD9")]
[System.Runtime.InteropServices.InterfaceType(System.Runtime.InteropServices.ComInterfaceType.InterfaceIsIUnknown)]
public interface IJSVsaEngine
type IJSVsaEngine = interface
Public Interface IJSVsaEngine
派生
属性

属性

Assembly

获取由 Run 方法生成的运行程序集的引用。Gets a reference to the running assembly generated by Run method.

Evidence

提供用于验证当前对象的标识的证据。Provides evidence for the purpose of validating the current object's identity.

GenerateDebugInfo

获取或设置指示脚本引擎会不会在调用 Compile 方法时产生调试信息的布尔值。Gets or sets a Boolean value that signifies whether the script engine produces debug information when the Compile method is called.

IsCompiled

获取或设置一个值,该值指示源是否编译。Gets or sets a value that indicates whether the source is compiled.

IsDirty

获取或设置一个值,该值指示该项的当前内存中表示形式是否与保留的表示形式不同。Gets or sets a value that indicates whether the current in-memory representation of the item differs from the persisted representation.

IsRunning

获取一个布尔值,该值报告脚本引擎当前是否处于运行模式。Gets a Boolean value that reports whether the script engine is currently in run mode.

Items

获取 IJSVsaItem 对象的集合,该集合表示添加到脚本引擎的所有项。Gets the collection of IJSVsaItem objects, which represent all items added to the script engine.

Language

获取由该脚本引擎支持的编程语言名称。Gets the name of the programming language supported by the script engine.

LCID

获取或设置在报告异常消息时所使用的地理区域设置和语言。Gets or sets the geographical locale and language in which to report exception messages.

Name

获取或设置脚本引擎的显示名称。Gets or sets the display name of the script engine.

RootMoniker

获取或设置脚本引擎的根名字对象。Gets or sets a script engine's root moniker.

RootNamespace

获取或设置脚本引擎使用的根命名空间。Gets or sets the root namespace used by the script engine.

Site

获取或设置由宿主实现的 IJSVsaSite 对象,脚本引擎使用此对象与宿主通信。Gets or sets the host-implemented IJSVsaSite object that is used by the script engine to communicate with the host.

Version

获取由该脚本引擎支持的当前版本的语言编译器,格式为 Major.Minor.Revision.BuildGets the current version of the language compiler supported by the script engine, in the form Major.Minor.Revision.Build.

方法

Close()

关闭该引擎。Closes the engine.

Compile()

使引擎编译现有的源状态。Causes the engine to compile the existing source state.

GetOption(String)

获取引擎实现特定的选项。Gets implementation-specific options for the engine.

InitNew()

提供初始化阶段已完成的通知。Provides a notification that the initialization phase is complete.

IsValidIdentifier(String)

检查提供的标识符是否对引擎有效。Checks whether the supplied identifier is valid for the engine.

LoadSourceState(IJSVsaPersistSite)

如宿主提供的对象所指定的那样,指示引擎从持久性点加载源项。Directs the engine to load source items from their point of persistence, as specified by the host-provided object.

Reset()

从运行状态中移除脚本引擎,并自动断开与绑定事件处理程序的连接。Removes the script engine from the running state and disconnects automatically bound event handlers.

RevokeCache()

为引擎将缓存程序集无效化,由其根名字对象指定。Invalidates the cached assembly for the engine, as specified by its root moniker.

Run()

启动脚本引擎中已编译代码的执行,并绑定所有事件处理程序。Initiates execution of compiled code in the script engine and binds all event handlers.

SaveCompiledState(Byte[], Byte[])

保存脚本引擎的编译状态;它还可选择保存调试信息。Saves the compiled state of the script engine; optionally, it also saves debugging information.

SaveSourceState(IJSVsaPersistSite)

指示脚本引擎坚持其源状态。Directs the script engine to persist its source state.

SetOption(String, Object)

设置脚本引擎特定于实现的选项。Sets implementation-specific options for a script engine.

适用于