IVsaEngine 接口

定义

注意

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.

定义脚本引擎必须支持的方法和属性,并提供对脚本引擎的编程访问。

public interface class IVsaEngine
[System.Runtime.InteropServices.Guid("E0C0FFE1-7eea-4ee2-b7e4-0080c7eb0b74")]
[System.Runtime.InteropServices.InterfaceType(System.Runtime.InteropServices.ComInterfaceType.InterfaceIsIUnknown)]
public interface IVsaEngine
[System.Runtime.InteropServices.Guid("E0C0FFE1-7eea-4ee2-b7e4-0080c7eb0b74")]
[System.Runtime.InteropServices.InterfaceType(System.Runtime.InteropServices.ComInterfaceType.InterfaceIsIUnknown)]
[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.")]
public interface IVsaEngine
[<System.Runtime.InteropServices.Guid("E0C0FFE1-7eea-4ee2-b7e4-0080c7eb0b74")>]
[<System.Runtime.InteropServices.InterfaceType(System.Runtime.InteropServices.ComInterfaceType.InterfaceIsIUnknown)>]
type IVsaEngine = interface
[<System.Runtime.InteropServices.Guid("E0C0FFE1-7eea-4ee2-b7e4-0080c7eb0b74")>]
[<System.Runtime.InteropServices.InterfaceType(System.Runtime.InteropServices.ComInterfaceType.InterfaceIsIUnknown)>]
[<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.")>]
type IVsaEngine = interface
Public Interface IVsaEngine
派生
属性

属性

Assembly

获取由 Run() 方法生成的运行程序集的引用。

Evidence

提供用于验证当前对象的标识的证据。

GenerateDebugInfo

获取或设置指示脚本引擎是否会在调用 Compile() 方法时产生调试信息的布尔值。

IsCompiled

获取一个值,该值指示在调用 Compile() 方法时是否将脚本引擎设置为生成调试信息。

IsDirty

获取一个值,该值指示脚本引擎的源状态是否自上次保存操作或是自最初加载脚本引擎以来已更改。

IsRunning

获取一个值,该值指示脚本引擎当前是否处于运行模式。

Items

获取 IVsaItems 对象的 IVsaItem 集合,这些对象表示使用 CreateItem 方法添加到脚本引擎的所有项,包括代码项、引用项和全局项。

Language

获取脚本引擎支持的编程语言的非本地化名称。

LCID

获取或设置在报告异常消息时所使用的地理区域设置和语言。

Name

获取或设置脚本引擎的显示名称,该名称主要用于在托管环境中向用户标识各个脚本引擎。

RootMoniker

获取或设置脚本引擎的根名字对象。

RootNamespace

获取或设置脚本引擎使用的根命名空间。

Site

获取或设置由主机实现的 IVsaSite 对象,脚本引擎使用此对象与主机通信。

Version

获取由该脚本引擎支持的当前版本的语言编译器,格式为 Major.Minor.Revision.Build。

方法

Close()

关闭脚本引擎并释放所有资源。 如果脚本引擎当前正在运行,则首先调用 Reset() 方法。

Compile()

使脚本引擎编译现有的源状态。

GetOption(String)

获取脚本引擎实现特定的选项。

InitNew()

提供有关初始化阶段已完成并且已准备好脚本引擎来添加 IVsaItem 对象的通知。

IsValidIdentifier(String)

检查提供的标识符是否对脚本引擎有效。

LoadSourceState(IVsaPersistSite)

指示脚本引擎按照实现 IVsaPersistSite 接口的宿主提供对象的指定,从持久性点加载源项。

Reset()

从运行状态中移除脚本引擎,并自动断开与绑定事件处理程序的连接。

RevokeCache()

为脚本引擎将缓存程序集无效化,由其根名字对象指定。

Run()

启动脚本引擎中已编译代码的执行,并绑定所有事件处理程序。

SaveCompiledState(Byte[], Byte[])

保存脚本引擎的编译状态;它还可选择保存调试信息。

SaveSourceState(IVsaPersistSite)

指示脚本引擎将其源状态保存到指定 IVsaPersistSite 对象。

SetOption(String, Object)

设置脚本引擎特定于实现的选项。

适用于