次の方法で共有


IVsEditorAdaptersFactoryService.GetDocumentBuffer(IVsTextBuffer) Method

Definition

Get the DocumentBuffer of an IVsTextBuffer adapter (this is the bottom buffer of the data model buffer graph). This buffer will be the same as the DataBuffer except in BufferCoordinator scenarios.

public:
 Microsoft::VisualStudio::Text::ITextBuffer ^ GetDocumentBuffer(Microsoft::VisualStudio::TextManager::Interop::IVsTextBuffer ^ bufferAdapter);
public:
 Microsoft::VisualStudio::Text::ITextBuffer ^ GetDocumentBuffer(Microsoft::VisualStudio::TextManager::Interop::IVsTextBuffer ^ bufferAdapter);
Microsoft::VisualStudio::Text::ITextBuffer GetDocumentBuffer(Microsoft::VisualStudio::TextManager::Interop::IVsTextBuffer const & bufferAdapter);
public Microsoft.VisualStudio.Text.ITextBuffer GetDocumentBuffer (Microsoft.VisualStudio.TextManager.Interop.IVsTextBuffer bufferAdapter);
public Microsoft.VisualStudio.Text.ITextBuffer? GetDocumentBuffer (Microsoft.VisualStudio.TextManager.Interop.IVsTextBuffer bufferAdapter);
abstract member GetDocumentBuffer : Microsoft.VisualStudio.TextManager.Interop.IVsTextBuffer -> Microsoft.VisualStudio.Text.ITextBuffer
Public Function GetDocumentBuffer (bufferAdapter As IVsTextBuffer) As ITextBuffer

Parameters

bufferAdapter
IVsTextBuffer

The text buffer adapter of interest.

Returns

Null if this method is called before content has been established for the adapter, otherwise the DocumentBuffer that is presented to the view model.

Exceptions

bufferAdapter is null.

bufferAdapter does not contain VsTextDocData.

Remarks

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

Applies to