次の方法で共有


LanguageService.GetSource Method (IVsTextLines)

Returns an existing Source object that contains the specified buffer of source.

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

Syntax

'宣言
Public Function GetSource ( _
    buffer As IVsTextLines _
) As Source
'使用
Dim instance As LanguageService
Dim buffer As IVsTextLines
Dim returnValue As Source

returnValue = instance.GetSource(buffer)
public Source GetSource(
    IVsTextLines buffer
)
public:
Source^ GetSource(
    IVsTextLines^ buffer
)
member GetSource : 
        buffer:IVsTextLines -> Source 
public function GetSource(
    buffer : IVsTextLines
) : Source

Parameters

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 that set of source lines).

Remarks

The language service maintains an internal list of all Source objects created. It is this list that is searched for a Source object that contains the specified IVsTextLines object.

.NET Framework Security

See Also

Reference

LanguageService Class

LanguageService Members

GetSource Overload

Microsoft.VisualStudio.Package Namespace