ExtensionMethods.GetActiveTextViewAsync 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.
Gets the active text view on the IDE at the time context was created.
public static System.Threading.Tasks.Task<Microsoft.VisualStudio.Extensibility.Editor.ITextViewSnapshot?> GetActiveTextViewAsync (this Microsoft.VisualStudio.Extensibility.IClientContext clientContext, System.Threading.CancellationToken cancellationToken);
static member GetActiveTextViewAsync : Microsoft.VisualStudio.Extensibility.IClientContext * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.VisualStudio.Extensibility.Editor.ITextViewSnapshot>
<Extension()>
Public Function GetActiveTextViewAsync (clientContext As IClientContext, cancellationToken As CancellationToken) As Task(Of ITextViewSnapshot)
Parameters
- clientContext
- IClientContext
Client context to utilize.
- cancellationToken
- CancellationToken
Cancellation token to monitor.
Returns
an instance of ITextViewSnapshot if there is an active text view, otherwise null.