Share via


IUserPromptService.ShowUserPromptAsync Method

Definition

Prompts the user to select from a set of options.

public System.Threading.Tasks.ValueTask<Microsoft.VisualStudio.RpcContracts.Notifications.UserPromptResult> ShowUserPromptAsync (string prompt, System.Collections.Generic.IReadOnlyList<Microsoft.VisualStudio.RpcContracts.Notifications.UserPromptOption> options, uint defaultOptionIndex, System.Threading.CancellationToken ct);
abstract member ShowUserPromptAsync : string * System.Collections.Generic.IReadOnlyList<Microsoft.VisualStudio.RpcContracts.Notifications.UserPromptOption> * uint32 * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask<Microsoft.VisualStudio.RpcContracts.Notifications.UserPromptResult>
Public Function ShowUserPromptAsync (prompt As String, options As IReadOnlyList(Of UserPromptOption), defaultOptionIndex As UInteger, ct As CancellationToken) As ValueTask(Of UserPromptResult)

Parameters

prompt
String

The message to display.

options
IReadOnlyList<UserPromptOption>

The options to present to the user.

defaultOptionIndex
UInt32

The index of the option to use as the default.

ct
CancellationToken

A cancellation token.

Returns

UserPromptResult indicating the user's response.

Applies to