Source.Open Method

Marks the Source object as being open.

Namespace:  Microsoft.VisualStudio.Package
Assemblies:   Microsoft.VisualStudio.Package.LanguageService.9.0 (in Microsoft.VisualStudio.Package.LanguageService.9.0.dll)
  Microsoft.VisualStudio.Package.LanguageService (in Microsoft.VisualStudio.Package.LanguageService.dll)
  Microsoft.VisualStudio.Package.LanguageService.10.0 (in Microsoft.VisualStudio.Package.LanguageService.10.0.dll)

Syntax

'Declaration
Public Sub Open
public void Open()
public:
void Open()
member Open : unit -> unit 
public function 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

See Also

Reference

Source Class

Microsoft.VisualStudio.Package Namespace