Compartilhar via


DocumentsExtensibility.OpenTextDocumentAsync Method

Definition

Overloads

OpenTextDocumentAsync(Uri, CancellationToken)

Opens a new text document in IDE for an existing file.

OpenTextDocumentAsync(Uri, OpenDocumentOptions, CancellationToken)

Opens a new text document in IDE for an existing file.

OpenTextDocumentAsync(Uri, CancellationToken)

Opens a new text document in IDE for an existing file.

public System.Threading.Tasks.Task<Microsoft.VisualStudio.Extensibility.Editor.ITextDocumentSnapshot> OpenTextDocumentAsync (Uri filePath, System.Threading.CancellationToken cancellationToken);
member this.OpenTextDocumentAsync : Uri * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.VisualStudio.Extensibility.Editor.ITextDocumentSnapshot>
Public Function OpenTextDocumentAsync (filePath As Uri, cancellationToken As CancellationToken) As Task(Of ITextDocumentSnapshot)

Parameters

filePath
Uri

The file path to open.

cancellationToken
CancellationToken

Cancellation token to monitor.

Returns

an ITextDocumentSnapshot instance representing the new file.

Applies to

OpenTextDocumentAsync(Uri, OpenDocumentOptions, CancellationToken)

Opens a new text document in IDE for an existing file.

public System.Threading.Tasks.Task<Microsoft.VisualStudio.Extensibility.Editor.ITextDocumentSnapshot> OpenTextDocumentAsync (Uri filePath, Microsoft.VisualStudio.RpcContracts.OpenDocument.OpenDocumentOptions options, System.Threading.CancellationToken cancellationToken);
member this.OpenTextDocumentAsync : Uri * Microsoft.VisualStudio.RpcContracts.OpenDocument.OpenDocumentOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.VisualStudio.Extensibility.Editor.ITextDocumentSnapshot>
Public Function OpenTextDocumentAsync (filePath As Uri, options As OpenDocumentOptions, cancellationToken As CancellationToken) As Task(Of ITextDocumentSnapshot)

Parameters

filePath
Uri

File path to open.

options
OpenDocumentOptions

Options defining how to open the document.

cancellationToken
CancellationToken

Cancellation token to monitor.

Returns

an ITextDocumentSnapshot instance representing the new file.

Applies to