ITextDocumentFactoryService.TryGetTextDocument Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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.