ITextViewOpenClosedListener.TextViewOpenedAsync Method

Definition

Called when an ITextViewSnapshot with matching document type is opened.

public System.Threading.Tasks.Task TextViewOpenedAsync (Microsoft.VisualStudio.Extensibility.Editor.ITextViewSnapshot textView, System.Threading.CancellationToken cancellationToken);
abstract member TextViewOpenedAsync : Microsoft.VisualStudio.Extensibility.Editor.ITextViewSnapshot * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Function TextViewOpenedAsync (textView As ITextViewSnapshot, cancellationToken As CancellationToken) As Task

Parameters

textView
ITextViewSnapshot

The ITextViewSnapshot that was opened.

cancellationToken
CancellationToken

Cancellation token to monitor.

Returns

A Task representing the asynchronous operation.

Remarks

Special scenarios: - Document type changes from an unmatching document type to a matching, such as when the user changes the file extension, are considered 'text view creations' for the purposes of this API. - This API will be called for all already open text views when an extension is hot loaded in the middle of an existing session.

Applies to