LanguageService::GetSource Method (IVsTextView^)

 

Returns an existing Source object that contains the source file shown in the specified text view.

Namespace:   Microsoft.VisualStudio.Package
Assembly:  Microsoft.VisualStudio.Package.LanguageService.14.0 (in Microsoft.VisualStudio.Package.LanguageService.14.0.dll)

public:
Source^ GetSource(
	IVsTextView^ view
)

Parameters

view
Type: Microsoft.VisualStudio.TextManager.Interop::IVsTextView^

[in] An IVsTextView object that displays the source file for which to get the Source object.

Return Value

Type: Microsoft.VisualStudio.Package::Source^

If successful, returns a Source object; otherwise, returns a null value (there is no Source object in this language service that controls the set of source lines shown in the specified view).

The IVsTextLines object is obtained from the IVsTextView with a call to IVsTextView::GetBuffer; it is that IVsTextLines object that is used to search for a Source object in the internal list of Source objects.

Return to top
Show: