다음을 통해 공유


ITextDocumentFactoryService.TryGetTextDocument Method

Definition

Retrieve an ITextDocument for the given buffer, if one exists.

public:
 bool TryGetTextDocument(Microsoft::VisualStudio::Text::ITextBuffer ^ textBuffer, [Runtime::InteropServices::Out] Microsoft::VisualStudio::Text::ITextDocument ^ % textDocument);
public bool TryGetTextDocument (Microsoft.VisualStudio.Text.ITextBuffer textBuffer, out Microsoft.VisualStudio.Text.ITextDocument textDocument);
abstract member TryGetTextDocument : Microsoft.VisualStudio.Text.ITextBuffer * ITextDocument -> bool
Public Function TryGetTextDocument (textBuffer As ITextBuffer, ByRef textDocument As ITextDocument) As Boolean

Parameters

textBuffer
ITextBuffer

The ITextBuffer to get a document for.

textDocument
ITextDocument

The ITextDocument for this buffer, if one exists.

Returns

true if a document exists for this buffer, false otherwise.

Exceptions

textBuffer is null.

Applies to