Share via


IDocumentService.OpenDocumentAsync Method

Definition

Overloads

OpenDocumentAsync(Uri, CancellationToken)

Opens the document identified by moniker.

OpenDocumentAsync(Uri, OpenDocumentOptions, CancellationToken)

Opens the document identified by moniker.

OpenDocumentAsync(Uri, CancellationToken)

Opens the document identified by moniker.

public System.Threading.Tasks.Task<Microsoft.VisualStudio.RpcContracts.Documents.DocumentSnapshot> OpenDocumentAsync (Uri moniker, System.Threading.CancellationToken token);
abstract member OpenDocumentAsync : Uri * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.VisualStudio.RpcContracts.Documents.DocumentSnapshot>
Public Function OpenDocumentAsync (moniker As Uri, token As CancellationToken) As Task(Of DocumentSnapshot)

Parameters

moniker
Uri

The moniker of the document to open.

token
CancellationToken

The cancellation token.

Returns

The document.

Remarks

If the document identified by moniker is already open, its DocumentSnapshot interface is returned.

Applies to

OpenDocumentAsync(Uri, OpenDocumentOptions, CancellationToken)

Opens the document identified by moniker.

public System.Threading.Tasks.Task<Microsoft.VisualStudio.RpcContracts.Documents.DocumentSnapshot> OpenDocumentAsync (Uri moniker, Microsoft.VisualStudio.RpcContracts.OpenDocument.OpenDocumentOptions options, System.Threading.CancellationToken token);
abstract member OpenDocumentAsync : Uri * Microsoft.VisualStudio.RpcContracts.OpenDocument.OpenDocumentOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.VisualStudio.RpcContracts.Documents.DocumentSnapshot>
Public Function OpenDocumentAsync (moniker As Uri, options As OpenDocumentOptions, token As CancellationToken) As Task(Of DocumentSnapshot)

Parameters

moniker
Uri

The moniker of the document to open.

options
OpenDocumentOptions

Options defining how to open the document.

token
CancellationToken

The cancellation token.

Returns

The document.

Remarks

If the document identified by moniker is already open, its DocumentSnapshot interface is returned.

Applies to