VsaEngine 类

定义

警告

此 API 现已过时。

实现 IJSVsaEngine 接口。Implements IJSVsaEngine interface.

public ref class VsaEngine sealed : Microsoft::JScript::Vsa::BaseVsaEngine, Microsoft::JScript::IEngine2, Microsoft::JScript::IRedirectOutput
[System.Runtime.InteropServices.ComVisible(true)]
[System.Runtime.InteropServices.Guid("B71E484D-93ED-4b56-BFB9-CEED5134822B")]
public sealed class VsaEngine : Microsoft.JScript.Vsa.BaseVsaEngine, Microsoft.JScript.IEngine2, Microsoft.JScript.IRedirectOutput
[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("B71E484D-93ED-4b56-BFB9-CEED5134822B")]
public sealed class VsaEngine : Microsoft.JScript.Vsa.BaseVsaEngine, Microsoft.JScript.IEngine2, Microsoft.JScript.IRedirectOutput
type VsaEngine = class
    inherit BaseVsaEngine
    interface IEngine2
    interface IRedirectOutput
Public NotInheritable Class VsaEngine
Inherits BaseVsaEngine
Implements IEngine2, IRedirectOutput
继承
VsaEngine
继承
VsaEngine
属性
实现

构造函数

VsaEngine()

初始化 VsaEngine 类的新实例。Initializes a new instance of the VsaEngine class.

VsaEngine(Boolean)

初始化 VsaEngine 类的新实例,并可以选择性地设置快速模式。Initializes a new instance of the VsaEngine class and optionally sets fast mode.

字段

applicationPath

指定应用程序路径。Specifies the application path.

(继承自 BaseVsaEngine)
assemblyVersion

指定程序集版本。Specifies the assembly version.

(继承自 BaseVsaEngine)
compiledRootNamespace

指定已编译的根命名空间。Specifies the compiled root namespace.

(继承自 BaseVsaEngine)
engineMoniker

指定引擎名字对象。Specifies the engine moniker.

(继承自 BaseVsaEngine)
engineName

指定引擎名称。Specifies the engine name.

(继承自 BaseVsaEngine)
engineSite

指定引擎站点。Specifies the engine site.

(继承自 BaseVsaEngine)
errorLocale

指定错误区域设置。Specifies the error locale.

(继承自 BaseVsaEngine)
executionEvidence

指定执行证据。Specifies the execution evidence.

(继承自 BaseVsaEngine)
failedCompilation

指示编译是否失败。Indicates whether the compilation failed.

(继承自 BaseVsaEngine)
genDebugInfo

指示是否生成调试信息。Indicates whether debug information is generated.

(继承自 BaseVsaEngine)
haveCompiledState

指示是否具有已编译的状态。Indicates whether there is a compiled state.

(继承自 BaseVsaEngine)
isClosed

指示是否关闭引擎。Indicates whether the engine is closed.

(继承自 BaseVsaEngine)
isDebugInfoSupported

指定是否支持调试信息。Specifies whether debug information is supported.

(继承自 BaseVsaEngine)
isEngineCompiled

指示是否编译引擎。Indicates whether the engine is compiled.

(继承自 BaseVsaEngine)
isEngineDirty

指示该项的当前内存中表示形式是否与保留的表示形式不同。Indicates whether the current in-memory representation of the item differs from the persisted representation.

(继承自 BaseVsaEngine)
isEngineInitialized

指示是否初始化引擎。Indicates whether the engine is initialized.

(继承自 BaseVsaEngine)
isEngineRunning

指示引擎是否正在运行。Indicates whether the engine is running.

(继承自 BaseVsaEngine)
loadedAssembly

指定已加载的程序集。Specifies the loaded assembly.

(继承自 BaseVsaEngine)
rootNamespace

获取或设置根命名空间。Gets or sets the root namespace.

(继承自 BaseVsaEngine)
scriptLanguage

指定脚本语言。Specifies the script language.

(继承自 BaseVsaEngine)
startupClass

指定启动类。Specifies the startup class.

(继承自 BaseVsaEngine)
startupInstance

指定启动实例。Specifies the startup instance.

(继承自 BaseVsaEngine)
vsaItems

指定 IVsaItem 对象的集合。Specifies the collection of IVsaItem objects.

(继承自 BaseVsaEngine)

属性

AppDomain

获取或设置要应用程序域。Gets or sets the application domain.

(继承自 BaseVsaEngine)
ApplicationBase

获取或设置应用程基。Gets or sets the application base.

(继承自 BaseVsaEngine)
Assembly

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

(继承自 BaseVsaEngine)
Evidence

获取或设置用于验证当前对象的标识的证据。Gets or sets the evidence for the purpose of validating the current object's identity.

(继承自 BaseVsaEngine)
GenerateDebugInfo

获取或设置一个值,该值指示在调用 Compile 方法时脚本引擎是否会生成调试信息。Gets or sets a value that indicates whether the script engine produces debug information when the Compile method is called.

(继承自 BaseVsaEngine)
IsCompiled

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

(继承自 BaseVsaEngine)
IsDirty

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

(继承自 BaseVsaEngine)
IsRunning

获取一个值,该值指示引擎当前是否处于运行模式。Gets a value that indicates whether the engine is currently in run mode.

(继承自 BaseVsaEngine)
Items

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

(继承自 BaseVsaEngine)
Language

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

(继承自 BaseVsaEngine)
LCID

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

(继承自 BaseVsaEngine)
LenientGlobalObject

获取宽松全局对象。Gets the lenient global object.

Name

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

(继承自 BaseVsaEngine)
RootMoniker

获取或设置引擎使用的根名字对象。Gets or sets the root moniker used by the engine.

(继承自 BaseVsaEngine)
RootNamespace

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

(继承自 BaseVsaEngine)
Site

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

(继承自 BaseVsaEngine)
Version

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

(继承自 BaseVsaEngine)

方法

Clone(AppDomain)

新建一个在新的应用程序域中运行的相同引擎,该引擎具有相同的编译状态和命名项。Creates a new identical engine that runs in a new application domain, with the same compiled state and named items.

Close()

关闭该引擎。Closes the engine.

(继承自 BaseVsaEngine)
Compile()

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

(继承自 BaseVsaEngine)
CompileEmpty()

触发引擎中当前所有状态的编译。Triggers compilation of all the state currently in the engine. 所有引用、代码项、宿主项和资源都通过编译器运行。All references, code items, host items, and resources are run through the compiler.

ConnectEvents()

通知引擎可以将具有事件的任何已注册事件源连接到任何全局事件处理程序。Communicates to the engine that it can connect any registered event sources that have events to any global event handlers. 此方法未在此类中实现。This method is not implemented in this class.

CreateEngine()

创建引擎。Creates the engine.

CreateEngineAndGetGlobalScope(Boolean, String[])

创建引擎,并返回全局范围。Creates the engine and returns the global scope.

CreateEngineAndGetGlobalScopeWithType(Boolean, String[], RuntimeTypeHandle)

创建引擎,并返回具有调用类型句柄的全局范围。Creates the engine and returns the global scope with the calling type handle.

CreateEngineAndGetGlobalScopeWithTypeAndRootNamespace(Boolean, String[], RuntimeTypeHandle, String)

创建引擎,并返回具有调用类型句柄和根命名空间的全局范围。Creates the engine and returns the global scope with the calling type handle and root namespace.

CreateEngineWithType(RuntimeTypeHandle)

使用指定的类型创建引擎。Creates the engine using the specified type.

DisconnectEvents()

指示引擎从事件处理程序中断开与事件源的连接。Directs the engine to unhook event sources from event handlers. 未实现此方法。This method is not implemented.

DoClose()

关闭该引擎。Closes the engine.

(继承自 BaseVsaEngine)
DoCompile()

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

(继承自 BaseVsaEngine)
DoLoadSourceState(IJSVsaPersistSite)

指示引擎加载源项。Directs the engine to load source items.

(继承自 BaseVsaEngine)
DoLoadSourceState(IVsaPersistSite)

指示引擎加载源项。Directs the engine to load source items.

(继承自 BaseVsaEngine)
DoSaveCompiledState(Byte[], Byte[])

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

(继承自 BaseVsaEngine)
DoSaveSourceState(IJSVsaPersistSite)

指示脚本引擎将其源状态保存到指定的对象。Directs the script engine to persist its source state to the specified object.

(继承自 BaseVsaEngine)
DoSaveSourceState(IVsaPersistSite)

指示脚本引擎将其源状态保存到指定的对象。Directs the script engine to persist its source state to the specified object.

(继承自 BaseVsaEngine)
Equals(Object)

确定指定对象是否等于当前对象。Determines whether the specified object is equal to the current object.

(继承自 Object)
Error(JSVsaError)

返回一个错误。Returns an error.

(继承自 BaseVsaEngine)
Error(VsaError)

返回一个错误。Returns an error.

(继承自 BaseVsaEngine)
GetAssembly()

获取编译步骤所生成的已编译程序集。Gets the compiled assembly that is produced by the compilation step.

GetCustomOption(String)

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

(继承自 BaseVsaEngine)
GetGlobalScope()

获取全局范围对象。Gets the global scope object.

GetHashCode()

用作默认哈希函数。Serves as the default hash function.

(继承自 Object)
GetItem(String)

从范围中获取由指定名称指定的项。Gets the item from the scope that is designated by the specified name.

GetItemAtIndex(Int32)

从范围中获取由指定索引值指定的项。Gets the item from the scope that is designated by the specified index value.

GetItemCount()

获取范围中的项数。Gets the number of items in the scope.

GetMainScope()

获取主范围。Gets the main scope.

GetModule()

获取已编译的程序集中的代码模块。Gets the code module from the compiled assembly.

GetOption(String)

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

(继承自 BaseVsaEngine)
GetOriginalArrayConstructor()

获取原始 ArrayConstructorGets the original ArrayConstructor.

GetOriginalObjectConstructor()

获取原始 ObjectConstructorGets the original ObjectConstructor.

GetOriginalRegExpConstructor()

获取原始 RegExpConstructorGets the original RegExpConstructor.

GetType()

获取当前实例的 TypeGets the Type of the current instance.

(继承自 Object)
InitNew()

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

(继承自 BaseVsaEngine)
InitVsaEngine(String, IJSVsaSite)

初始化 VsaEngineInitializes the VsaEngine.

InitVsaEngine(String, IVsaSite)

初始化 VsaEngineInitializes the VsaEngine.

Interrupt()

在正在运行脚本代码的线程上调用 Abort()Calls Abort() on the thread that is running the script code.

IsValidIdentifier(String)

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

IsValidNamespaceName(String)

检查提供的命名空间是否对引擎有效。Checks whether the supplied namespace is valid for the engine.

(继承自 BaseVsaEngine)
LoadCompiledState()

加载编译状态。Loads the compiled state.

(继承自 BaseVsaEngine)
LoadSourceState(IJSVsaPersistSite)

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

(继承自 BaseVsaEngine)
LoadSourceState(IVsaPersistSite)

指示引擎加载源项。Directs the engine to load source items.

(继承自 BaseVsaEngine)
MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(继承自 Object)
PopScriptObject()

删除并返回位于全局范围堆栈顶部的对象。Removes and returns the object at the top of the global scope stack.

Preconditions(BaseVsaEngine+Pre)

设置前置条件标志。Sets the precondition flags.

(继承自 BaseVsaEngine)
Preconditions(BaseVsaEngine+Pre)

设置前置条件标志。Sets the precondition flags.

(继承自 BaseVsaEngine)
PushScriptObject(ScriptObject)

在全局范围堆栈的顶部插入一个对象。Inserts an object at the top of the global scope stack.

RegisterEventSource(String)

指定被标记为事件源的项的名称,以便 ConnectEvents() 方法可以确定要连接的事件。Specifies the name of an item that is marked as an event source, so that the ConnectEvents() method can determine which events to connect.

Reset()

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

ResetCompiledState()

重置编译状态。Resets the compiled state.

(继承自 BaseVsaEngine)
Restart()

重启引擎。Restarts the engine.

RevokeCache()

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

(继承自 BaseVsaEngine)
Run()

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

(继承自 BaseVsaEngine)
Run(AppDomain)

将在指定的应用程序域中运行已编译的代码。Runs the compiled code in the specified application domain.

RunEmpty()

运行当前 AppDomain 中的已编译代码。Runs the compiled code in the current AppDomain.

SaveCompiledState(Byte[], Byte[])

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

(继承自 BaseVsaEngine)
SaveSourceState(IJSVsaPersistSite)

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

(继承自 BaseVsaEngine)
SaveSourceState(IVsaPersistSite)

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

(继承自 BaseVsaEngine)
ScriptObjectStackTop()

返回位于全局范围堆栈顶部的对象而不将其移除。Returns the object at the top of the global scope stack without removing it.

SetCustomOption(String, Object)

为该引擎设置特定于实现的选项。Sets implementation-specific options for the engine.

(继承自 BaseVsaEngine)
SetOption(String, Object)

为该引擎设置特定于实现的选项。Sets implementation-specific options for the engine.

(继承自 BaseVsaEngine)
SetOutputStream(IMessageReceiver)

将指定的输出流重定向到新流或数据存储。Redirects the specified output stream to a new stream or data storage.

ToString()

返回表示当前对象的字符串。Returns a string that represents the current object.

(继承自 Object)
ValidateRootMoniker(String)

验证根名字对象。Validates the root moniker.

(继承自 BaseVsaEngine)

适用于