IEditorHostService.CreateTextDocumentAsync 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.
Creates a new ITextDocumentSnapshot from a serializable TextDocumentContract RPC contract.
public System.Threading.Tasks.Task<Microsoft.VisualStudio.Extensibility.Editor.ITextDocumentSnapshot> CreateTextDocumentAsync (Microsoft.VisualStudio.RpcContracts.Editor.TextDocumentContract textDocument, System.Threading.CancellationToken cancellationToken);
abstract member CreateTextDocumentAsync : Microsoft.VisualStudio.RpcContracts.Editor.TextDocumentContract * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.VisualStudio.Extensibility.Editor.ITextDocumentSnapshot>
Public Function CreateTextDocumentAsync (textDocument As TextDocumentContract, cancellationToken As CancellationToken) As Task(Of ITextDocumentSnapshot)
Parameters
- textDocument
- TextDocumentContract
A serializable TextDocumentContract RPC contract.
- cancellationToken
- CancellationToken
Cancels the request.
Returns
An ITextDocumentSnapshot thick object that can be used to interact with the document.