Share via


PromptOptionsWithCancel<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. A "Cancel" choice is automatically added.

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

Type Parameters

TResult

The type of the result values.

Inheritance
PromptOptionsWithCancel<TResult>
Implements

Constructors

PromptOptionsWithCancel<TResult>(PromptOptions<TResult>, TResult)

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

PromptOptionsWithCancel<TResult>(PromptOptionsWithCancel<TResult>)

Properties

Choices

Gets the mappings from result value to option.

(Inherited from PromptOptions<TResult>)
DefaultChoiceIndex

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

(Inherited from PromptOptions<TResult>)
DismissedReturns

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

(Inherited from PromptOptions<TResult>)
EqualityContract

Methods

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

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

(Inherited from PromptOptions<TResult>)
WithCancelAsDefault()

Returns an instance of PromptOptionsWithCancel<TResult> with the DefaultChoiceIndex set to the index of the automatically added "Cancel" choice.

Operators

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

Applies to