Source.Open Method
Marks the Source object as being open.
Namespace: Microsoft.VisualStudio.Package
Assemblies: Microsoft.VisualStudio.Package.LanguageService.10.0 (in Microsoft.VisualStudio.Package.LanguageService.10.0.dll)
Microsoft.VisualStudio.Package.LanguageService (in Microsoft.VisualStudio.Package.LanguageService.dll)
Microsoft.VisualStudio.Package.LanguageService.11.0 (in Microsoft.VisualStudio.Package.LanguageService.11.0.dll)
Microsoft.VisualStudio.Package.LanguageService.9.0 (in Microsoft.VisualStudio.Package.LanguageService.9.0.dll)
Syntax
'宣言
Public Sub Open
public void Open()
Remarks
This method increments an internal counter to indicate the object is open. This method is called from the AddAdornments method to ensure the Source object is kept open while there are views open on the source file. For every call to the Open method, there must be a corresponding call to the Close method.
Multiple views can be opened on the same Source object. When all views on a particular Source object are closed, the Source object itself can be disposed of (which is handled in the RemoveAdornments method).
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.