IVsaEngine.SaveSourceState Method
Directs the script engine to persist its source state to the specified IVsaPersistSite object.
public: void SaveSourceState(
IVsaPersistSite* site
);
public void SaveSourceState(
IVsaPersistSite site
);
MustOverride Public Sub SaveSourceState( _
ByVal Site As IVsaPersistSite _
)
Parameters
- site
The site established by the IVsaPersistSite interface to which source state is saved.
Remarks
The SaveSourceState method calls back to the host-implemented site established by the IVsaPersistSite interface using a call to the IVsaPersistSite.SaveElement method to save the properties and items that comprise the state of the script engine. The script engine calls the IVsaPersistSite.SaveElement method with a null reference to the name parameter to save meta-information for the script engine such as a project file for mapping names to project items.
The following table shows the exceptions that the SaveSourceState method can throw.
Exception Type |
Condition |
---|---|
EngineBusy |
The engine is currently executing code for another thread. |
EngineClosed |
The IVsaEngine.Close method has been called and the engine is closed. |
EngineNotInitialized |
The engine has not been initialized. |
EngineRunning |
The engine is already running. |
SaveElementFailed |
A callback to the IVsaPersistSite.SaveElement method failed. |