IVsaEngine Interface
Defines the methods and properties that a script engine must support and provides programmatic access to the script engine.
public: _interface IVsaEngine;
public interface IVsaEngine;
Public Interface IVsaEngine
Properties
The following table shows the properties of the IVsaEngine interface, with brief descriptions for each.
Property |
Description |
---|---|
Gets a reference to the running assembly that is generated by the IVsaEngine.Run method. |
|
Sets or retrieves evidence for the purpose of checking security permissions. |
|
Sets or gets a Boolean value that signifies whether the script engine produces debug information when the IVsaEngine.Compile method is called. |
|
Gets a Boolean value that signifies whether a script engine has successfully compiled the current source state. |
|
Gets a Boolean value that reports whether the script engine's source state has changed since the last save operation, or since the script engine was originally loaded. |
|
Gets a Boolean value that reports whether the script engine is currently in run mode. |
|
Gets the IVsaItems collection of IVsaItem objects, which represent all items added to the script engine using the IVsaItems.CreateItem method, including code items, reference items, and global items. |
|
Gets the nonlocalized name of the programming language supported by the script engine. |
|
Sets or gets the geographical locale and language in which to report exception messages. |
|
Sets or gets the display name of the script engine that is used primarily for identifying individual script engines to users in a hosted environment. |
|
Sets or gets a script engine's root moniker. |
|
Sets or gets the root namespace used by the script engine. |
|
Sets or gets the host-implemented IVsaSite object that is used by the script engine to communicate with the host. |
|
Gets the current version of the language compiler supported by the script engine, in the form Major.Minor.Revision.Build. |
Methods
The following table shows the methods of the IVsaEngine interface, with brief descriptions for each.
Method |
Description |
---|---|
Closes the script engine and releases all resources. |
|
Causes the script engine to compile the existing source state. |
|
Gets implementation-specific options for a script engine. |
|
Provides a notification that the initialization phase is complete and that the script engine is prepared for the addition of IVsaItem objects. |
|
Checks whether the supplied identifier is valid for the script engine. |
|
Directs the script engine to load source items from their point of persistence, as specified by the host-provided object that implements the IVsaPersistSite interface. |
|
Removes the script engine from the running state and disconnects automatically bound event handlers. |
|
Invalidates the cached assembly for a script engine, as specified by its root moniker. |
|
Initiates execution of compiled code in the script engine, and enables all event handlers. |
|
Saves the compiled state of the script engine; optionally, it also saves debugging information. |
|
Directs the script engine to persist its source state to the specified IVsaPersistSite object. |
|
Sets implementation-specific options for a script engine. |
Remarks
The IVsaEngine interface is the primary interface through which hosts interact with script engines. All script engines must support the properties and methods of the IVsaEngine interface.
Because code persistence is the responsibility of the host, there is no requirement that source code or binaries be persisted to disk. Under normal runtime conditions, the script engines do not write to disk; however, when you are in debug mode, or when you are persisting compiled state, the JScript .NET engine temporarily stores some files in the temporary directory (or Debug directory, if it has been set). Nevertheless, debugging and persisting compiled state are, in general, privileged operations, so they should pose no security concern. This persistence scheme helps ensure security, as it enables the condition wherein FileIOPermission is not required for the script engine.
Requirements
DLL: Microsoft.Vsa.dll