IUserPromptService.ShowUserPromptAsync 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.
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.
A cancellation token.
Returns
UserPromptResult indicating the user's response.