IDocumentService.OpenDocumentAsync 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.
Overloads
OpenDocumentAsync(Uri, CancellationToken) |
Opens the document identified by |
OpenDocumentAsync(Uri, OpenDocumentOptions, CancellationToken) |
Opens the document identified by |
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.