Source.Close Method
Determines whether the source file can be closed.
Namespace: Microsoft.VisualStudio.Package
Assemblies: Microsoft.VisualStudio.Package.LanguageService.12.0 (in Microsoft.VisualStudio.Package.LanguageService.12.0.dll)
Microsoft.VisualStudio.Package.LanguageService.10.0 (in Microsoft.VisualStudio.Package.LanguageService.10.0.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)
Microsoft.VisualStudio.Package.LanguageService (in Microsoft.VisualStudio.Package.LanguageService.dll)
Syntax
'Declaration
Public Function Close As Boolean
public bool Close()
public:
bool Close()
member Close : unit -> bool
public function Close() : boolean
Return Value
Type: Boolean
true if the source file can be closed; otherwise, returns false.
Remarks
The Source class maintains an internal counter that is incremented for each call to the Open method and decremented for each call to Close method. When the internal counter reaches 0, Close returns true. This method is called from the RemoveAdornments method when a view has been closed.
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 (which is done 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.