IVsEditorAdaptersFactoryService.GetDocumentBuffer Method

Gets the document buffer of an IVsTextBuffer adapter. This is the bottom buffer of the data model buffer graph.

Namespace:  Microsoft.VisualStudio.Editor
Assembly:  Microsoft.VisualStudio.Editor (in Microsoft.VisualStudio.Editor.dll)

Syntax

声明
Function GetDocumentBuffer ( _
    bufferAdapter As IVsTextBuffer _
) As ITextBuffer
ITextBuffer GetDocumentBuffer(
    IVsTextBuffer bufferAdapter
)
ITextBuffer^ GetDocumentBuffer(
    IVsTextBuffer^ bufferAdapter
)
abstract GetDocumentBuffer : 
        bufferAdapter:IVsTextBuffer -> ITextBuffer 
function GetDocumentBuffer(
    bufferAdapter : IVsTextBuffer
) : ITextBuffer

Parameters

Return Value

Type: Microsoft.VisualStudio.Text.ITextBuffer
The ITextBuffer document buffer that is presented to the view model, or nulla null reference (Nothing in Visual Basic) if this method is called before content has been established for the adapter.

Exceptions

Exception Condition
ArgumentNullException

bufferAdapter is null.

ArgumentException

bufferAdapter was not produced by this factory.

Remarks

This buffer will be the same as the data buffer, except in buffer coordinator scenarios.

.NET Framework Security

See Also

Reference

IVsEditorAdaptersFactoryService Interface

Microsoft.VisualStudio.Editor Namespace