ChoiceResultCollection<TResult> Class
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.
A specialized collection that maps ChoiceDescription to result types, ordered by index. Equality for this collection is defined as sequence equality.
public sealed class ChoiceResultCollection<TResult> : IEquatable<Microsoft.VisualStudio.Extensibility.Shell.ChoiceResultCollection<TResult>>, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<Microsoft.VisualStudio.Extensibility.Shell.ChoiceDescription,TResult>>, System.Collections.Generic.IReadOnlyCollection<System.Collections.Generic.KeyValuePair<Microsoft.VisualStudio.Extensibility.Shell.ChoiceDescription,TResult>>, System.Collections.Generic.IReadOnlyList<System.Collections.Generic.KeyValuePair<Microsoft.VisualStudio.Extensibility.Shell.ChoiceDescription,TResult>> where TResult : struct
type ChoiceResultCollection<'Result (requires 'Result : struct)> = class
interface IReadOnlyList<KeyValuePair<ChoiceDescription, 'Result>>
interface IReadOnlyCollection<KeyValuePair<ChoiceDescription, 'Result>>
interface seq<KeyValuePair<ChoiceDescription, 'Result>>
interface IEnumerable
interface IEquatable<ChoiceResultCollection<'Result>>
Public NotInheritable Class ChoiceResultCollection(Of TResult)
Implements IEnumerable(Of KeyValuePair(Of ChoiceDescription, TResult)), IEquatable(Of ChoiceResultCollection(Of TResult)), IReadOnlyCollection(Of KeyValuePair(Of ChoiceDescription, TResult)), IReadOnlyList(Of KeyValuePair(Of ChoiceDescription, TResult))
Type Parameters
- TResult
The type of the result values.
- Inheritance
-
ChoiceResultCollection<TResult>
- Implements
-
IEnumerable<KeyValuePair<ChoiceDescription,TResult>> IEnumerable<T> IReadOnlyCollection<KeyValuePair<ChoiceDescription,TResult>> IReadOnlyCollection<T> IReadOnlyList<KeyValuePair<ChoiceDescription,TResult>> IEnumerable IEquatable<ChoiceResultCollection<TResult>>
Constructors
ChoiceResultCollection<TResult>() |
Initializes a new instance of the ChoiceResultCollection<TResult> class. |
ChoiceResultCollection<TResult>(IEnumerable<KeyValuePair<ChoiceDescription,TResult>>) |
Initializes a new instance of the ChoiceResultCollection<TResult> class. |
Properties
Count | Gets the number of elements in the collection. |
Item[Int32] | Gets the element at the specified index in the read-only list. |
Methods
Add(ChoiceDescription, TResult) |
Adds a mapping from result value to choice. |
Equals(ChoiceResultCollection<TResult>) | Indicates whether the current object is equal to another object of the same type. |
Equals(Object) | |
GetEnumerator() | Returns an enumerator that iterates through the collection. |
GetHashCode() | Serves as the default hash function. |
Explicit Interface Implementations
IEnumerable.GetEnumerator() | Returns an enumerator that iterates through a collection. |
Extension Methods
EmptyIfNull<T>(IEnumerable<T>) |
Return this enumeration in case it is not null. In case it is null return empty enumeration. |