Compartilhar via


PromptOptions<TResult> Class

Definition

Describes the options for a prompt which presents choices to the user and returns the user's selection as a mapped result value.

public class PromptOptions<TResult> : Microsoft.VisualStudio.Extensibility.Shell.PromptOptions, IEquatable<Microsoft.VisualStudio.Extensibility.Shell.PromptOptions<TResult>> where TResult : struct
type PromptOptions<'Result (requires 'Result : struct)> = class
    inherit PromptOptions
    interface IEquatable<PromptOptions<'Result>>
Public Class PromptOptions(Of TResult)
Inherits PromptOptions
Implements IEquatable(Of PromptOptions(Of TResult))

Type Parameters

TResult

The type of the result values.

Inheritance
PromptOptions<TResult>
Derived
Implements

Constructors

PromptOptions<TResult>()

Describes the options for a prompt which presents choices to the user and returns the user's selection as a mapped result value.

PromptOptions<TResult>(ChoiceResultCollection<TResult>, Int32, TResult)

Initializes a new instance of the PromptOptions<TResult> class.

PromptOptions<TResult>(PromptOptions<TResult>)

Initializes a new instance of the PromptOptions<TResult> class.

Properties

Choices

Gets the mappings from result value to option.

DefaultChoiceIndex

Gets the index of the choice to present as the default selection.

DismissedReturns

Gets the result value that should be returned when the user dissmisses the prompt without a selection.

EqualityContract

Methods

<Clone>$()
Equals(Object)
Equals(PromptOptions)
Equals(PromptOptions<TResult>)
GetHashCode()
PrintMembers(StringBuilder)
ToString()
WithCancel(TResult, Boolean)

Adds a new "Cancel" choice to the existing choices.

Operators

Equality(PromptOptions<TResult>, PromptOptions<TResult>)
Inequality(PromptOptions<TResult>, PromptOptions<TResult>)

Applies to