Share via


DocumentsExtensibility.InitializeDocumentAsync Method

Definition

Ensures that an uninitialized document snapshot is initialized and gets the most recent snapshot.

public System.Threading.Tasks.Task<Microsoft.VisualStudio.RpcContracts.Documents.DocumentSnapshot?> InitializeDocumentAsync (Microsoft.VisualStudio.RpcContracts.Documents.DocumentSnapshot documentSnapshot, System.Threading.CancellationToken token);
member this.InitializeDocumentAsync : Microsoft.VisualStudio.RpcContracts.Documents.DocumentSnapshot * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.VisualStudio.RpcContracts.Documents.DocumentSnapshot>
Public Function InitializeDocumentAsync (documentSnapshot As DocumentSnapshot, token As CancellationToken) As Task(Of DocumentSnapshot)

Parameters

documentSnapshot
DocumentSnapshot

Document snapshot to initialize that was retrieved from one of the Open methods.

token
CancellationToken

The cancellation token.

Returns

Most recent initialized snapshot for the document moniker in the snapshot. May return null if document is no longer opened in IDE.

Applies to