Show / Hide Table of Contents

Class Grouping<TKey, TElement>

Represents a strongly typed collection of elements that share a unique key.

Inheritance
object
List<TElement>
Grouping<TKey, TElement>
Implements
IList<TElement>
ICollection<TElement>
IReadOnlyList<TElement>
IReadOnlyCollection<TElement>
IList
ICollection
IGrouping<TKey, TElement>
IEnumerable<TElement>
IEnumerable
Inherited Members
List<TElement>.Add(TElement)
List<TElement>.AddRange(IEnumerable<TElement>)
List<TElement>.AsReadOnly()
List<TElement>.BinarySearch(int, int, TElement, IComparer<TElement>)
List<TElement>.BinarySearch(TElement)
List<TElement>.BinarySearch(TElement, IComparer<TElement>)
List<TElement>.Clear()
List<TElement>.Contains(TElement)
List<TElement>.ConvertAll<TOutput>(Converter<TElement, TOutput>)
List<TElement>.CopyTo(int, TElement[], int, int)
List<TElement>.CopyTo(TElement[])
List<TElement>.CopyTo(TElement[], int)
List<TElement>.EnsureCapacity(int)
List<TElement>.Exists(Predicate<TElement>)
List<TElement>.Find(Predicate<TElement>)
List<TElement>.FindAll(Predicate<TElement>)
List<TElement>.FindIndex(int, int, Predicate<TElement>)
List<TElement>.FindIndex(int, Predicate<TElement>)
List<TElement>.FindIndex(Predicate<TElement>)
List<TElement>.FindLast(Predicate<TElement>)
List<TElement>.FindLastIndex(int, int, Predicate<TElement>)
List<TElement>.FindLastIndex(int, Predicate<TElement>)
List<TElement>.FindLastIndex(Predicate<TElement>)
List<TElement>.ForEach(Action<TElement>)
List<TElement>.GetEnumerator()
List<TElement>.GetRange(int, int)
List<TElement>.IndexOf(TElement)
List<TElement>.IndexOf(TElement, int)
List<TElement>.IndexOf(TElement, int, int)
List<TElement>.Insert(int, TElement)
List<TElement>.InsertRange(int, IEnumerable<TElement>)
List<TElement>.LastIndexOf(TElement)
List<TElement>.LastIndexOf(TElement, int)
List<TElement>.LastIndexOf(TElement, int, int)
List<TElement>.Remove(TElement)
List<TElement>.RemoveAll(Predicate<TElement>)
List<TElement>.RemoveAt(int)
List<TElement>.RemoveRange(int, int)
List<TElement>.Reverse()
List<TElement>.Reverse(int, int)
List<TElement>.Slice(int, int)
List<TElement>.Sort()
List<TElement>.Sort(IComparer<TElement>)
List<TElement>.Sort(Comparison<TElement>)
List<TElement>.Sort(int, int, IComparer<TElement>)
List<TElement>.ToArray()
List<TElement>.TrimExcess()
List<TElement>.TrueForAll(Predicate<TElement>)
List<TElement>.Capacity
List<TElement>.Count
List<TElement>.this[int]
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: TheXDS.MCART.Types
Assembly: MCART.dll
Syntax
public class Grouping<TKey, TElement> : List<TElement>, IList<TElement>, ICollection<TElement>, IReadOnlyList<TElement>, IReadOnlyCollection<TElement>, IList, ICollection, IGrouping<TKey, TElement>, IEnumerable<TElement>, IEnumerable
Type Parameters
Name Description
TKey

Type of key to use.

TElement

Type of elements in the collection.

Constructors

| Edit this page View Source

Grouping(TKey)

Initializes a new instance of the Grouping<TKey, TElement>, setting the key to use.

Declaration
public Grouping(TKey key)
Parameters
Type Name Description
TKey key

Key associated with this group of elements.

| Edit this page View Source

Grouping(TKey, IEnumerable<TElement>)

Initializes a new instance of the Grouping<TKey, TElement>, setting the key to use to identify the specified elements.

Declaration
public Grouping(TKey key, IEnumerable<TElement> collection)
Parameters
Type Name Description
TKey key

Key associated with this group of elements.

IEnumerable<TElement> collection

Collection to associate with the specified key.

| Edit this page View Source

Grouping(TKey, int)

Initializes a new instance of the Grouping<TKey, TElement>, setting the key to use and defining the capacity of the collection.

Declaration
public Grouping(TKey key, int capacity)
Parameters
Type Name Description
TKey key

Key associated with this group of elements.

int capacity

Initial capacity of the underlying collection.

Properties

| Edit this page View Source

Key

Key associated with this group of elements.

Declaration
public TKey Key { get; }
Property Value
Type Description
TKey

Operators

| Edit this page View Source

implicit operator Grouping<TKey, TElement>(KeyValuePair<TKey, IEnumerable<TElement>>)

Implicitly converts a KeyValuePair<TKey, TValue> to a Grouping<TKey, TElement>.

Declaration
public static implicit operator Grouping<TKey, TElement>(KeyValuePair<TKey, IEnumerable<TElement>> grouping)
Parameters
Type Name Description
KeyValuePair<TKey, IEnumerable<TElement>> grouping

Object to convert.

Returns
Type Description
Grouping<TKey, TElement>
| Edit this page View Source

implicit operator Grouping<TKey, TElement>((TKey Key, IEnumerable<TElement> Value))

Implicitly converts a Tuple<T1, T2> to a Grouping<TKey, TElement>.

Declaration
public static implicit operator Grouping<TKey, TElement>((TKey Key, IEnumerable<TElement> Value) grouping)
Parameters
Type Name Description
(TKey Key, IEnumerable<TElement> Value) grouping

Object to convert.

Returns
Type Description
Grouping<TKey, TElement>
| Edit this page View Source

implicit operator KeyValuePair<TKey, IEnumerable<TElement>>(Grouping<TKey, TElement>)

Implicitly converts a Grouping<TKey, TElement> to a KeyValuePair<TKey, TValue>.

Declaration
public static implicit operator KeyValuePair<TKey, IEnumerable<TElement>>(Grouping<TKey, TElement> grouping)
Parameters
Type Name Description
Grouping<TKey, TElement> grouping

Object to convert.

Returns
Type Description
KeyValuePair<TKey, IEnumerable<TElement>>
| Edit this page View Source

implicit operator (TKey, IEnumerable<TElement>)(Grouping<TKey, TElement>)

Implicitly converts a Grouping<TKey, TElement> to a Tuple<T1, T2>.

Declaration
public static implicit operator (TKey, IEnumerable<TElement>)(Grouping<TKey, TElement> grouping)
Parameters
Type Name Description
Grouping<TKey, TElement> grouping

Object to convert.

Returns
Type Description
(TKey Key, IEnumerable<TElement> Value)

Implements

IList<T>
ICollection<T>
IReadOnlyList<T>
IReadOnlyCollection<T>
IList
ICollection
IGrouping<TKey, TElement>
IEnumerable<T>
IEnumerable

Extension Methods

CollectionExtensions.AddRangeAsync<T>(ICollection<T>, IAsyncEnumerable<T>)
CollectionExtensions.AddRange<T>(ICollection<T>, IEnumerable<T>)
CollectionExtensions.PopFirst<T>(ICollection<T>)
CollectionExtensions.Pop<T>(ICollection<T>)
CollectionExtensions.Push<TItem, TCollection>(ICollection<TCollection>)
CollectionExtensions.Push<TItem, TCollection>(ICollection<TCollection>, TItem)
CollectionExtensions.RemoveAll<T>(ICollection<T>)
CollectionExtensions.RemoveAll<T>(ICollection<T>, in Action<T>)
CollectionExtensions.RemoveAll<T>(ICollection<T>, in Predicate<T>)
CollectionExtensions.RemoveAll<T>(ICollection<T>, in Predicate<T>?, in Action<T>?)
CollectionExtensions.RemoveOf<TItem, TRemove>(ICollection<TItem>)
MvvmCollectionExtensions.ToObservable<T>(ICollection<T>)
CollectionHelpers.WithIndex<T>(IEnumerable<T>)
EnumerableExtensions.AreAllEqual<T>(IEnumerable<T>)
EnumerableExtensions.AreAllEqual<T, TProp>(IEnumerable<T>, Func<T, TProp>)
EnumerableExtensions.Copy<T>(IEnumerable<T>)
EnumerableExtensions.ExceptFor<T>(IEnumerable<T>, params T[])
EnumerableExtensions.FindIndexOf<T>(IEnumerable<T>, T)
EnumerableExtensions.FirstOf<T>(IEnumerable<T>, Type)
EnumerableExtensions.IsPropertyEqual<T>(IEnumerable<T>, Func<T, object>)
EnumerableExtensions.IsQuorum<T>(IEnumerable<T>, int, out T)
EnumerableExtensions.NonDefaults<T>(IEnumerable<T?>)
EnumerableExtensions.OfType<T>(IEnumerable<T>, Type)
EnumerableExtensions.OrNull<T>(IEnumerable<T>)
EnumerableExtensions.PickAsync<T>(IEnumerable<T>)
EnumerableExtensions.Pick<T>(IEnumerable<T>)
EnumerableExtensions.Pick<T>(IEnumerable<T>, in Random)
EnumerableExtensions.Quorum<T>(IEnumerable<T>, int)
EnumerableExtensions.Range<T>(IEnumerable<T>, int, int)
EnumerableExtensions.Rotate<T>(IEnumerable<T>, int)
EnumerableExtensions.SelectAsync<TIn, TOut>(IEnumerable<TIn>, Func<TIn, Task<TOut>>)
EnumerableExtensions.Shift<T>(IEnumerable<T>, int)
EnumerableExtensions.Shuffled<T>(IEnumerable<T>)
EnumerableExtensions.Shuffled<T>(IEnumerable<T>, in int)
EnumerableExtensions.Shuffled<T>(IEnumerable<T>, in int, in int)
EnumerableExtensions.Shuffled<T>(IEnumerable<T>, in int, in int, in int, in Random)
EnumerableExtensions.ToExtendedListAsync<T>(IEnumerable<T>)
EnumerableExtensions.ToExtendedList<T>(IEnumerable<T>)
EnumerableExtensions.ToListAsync<T>(IEnumerable<T>)
EnumerableExtensions.YieldAsync<T>(IEnumerable<T>, Func<T, Task>)
ListExtensions.ApplyRotate<T>(IList<T>, in int)
ListExtensions.ApplyShift<T>(IList<T>, in int)
ListExtensions.Shuffle<T>(IList<T>)
ListExtensions.Shuffle<T>(IList<T>, int, int, in int, Random)
ListExtensions.Shuffle<T>(IList<T>, in int)
ListExtensions.Shuffle<T>(IList<T>, in int, in int)
ListExtensions.Shuffle<T>(IList<T>, in int, in int, in int)
ListExtensions.Swap<T>(IList<T>, in int, in int)
ListExtensions.Swap<T>(IList<T>, T, T)
CollectionHelpers.ToTypes(IEnumerable)
EnumerableExtensions.Contains(IEnumerable, object?)
EnumerableExtensions.ContainsAll(IEnumerable, IEnumerable)
EnumerableExtensions.ContainsAll(IEnumerable, params object?[])
EnumerableExtensions.ContainsAny(IEnumerable, IEnumerable)
EnumerableExtensions.ContainsAny(IEnumerable, params object?[])
EnumerableExtensions.Count(IEnumerable)
EnumerableExtensions.FirstOf<T>(IEnumerable)
EnumerableExtensions.GroupByType(IEnumerable)
EnumerableExtensions.IsAnyOf(IEnumerable, Type)
EnumerableExtensions.IsAnyOf<T>(IEnumerable)
EnumerableExtensions.ItemsEqual(IEnumerable, IEnumerable)
EnumerableExtensions.NotNull(IEnumerable?)
EnumerableExtensions.NullCount(IEnumerable)
EnumerableExtensions.ToGeneric(IEnumerable)
ListExtensions.Locked(IList, Action<IList>)
ListExtensions.RemoveOf<T>(IList)
Objects.ShallowCopyTo(object, object, Type)
ObjectExtensions.FieldsOf<T>(object)
ObjectExtensions.GetAttribute<T>(object)
ObjectExtensions.GetAttributes<T>(object)
ObjectExtensions.HasAttrValue<TAttribute, TValue>(object, out TValue)
ObjectExtensions.HasAttribute<T>(object)
ObjectExtensions.HasAttribute<T>(object, out T?)
ObjectExtensions.HasAttributes<T>(object, out IEnumerable<T>?)
ObjectExtensions.Is(object?, object?)
ObjectExtensions.IsEither(object, IEnumerable)
ObjectExtensions.IsEither(object, params object[])
ObjectExtensions.IsNeither(object, IEnumerable)
ObjectExtensions.IsNeither(object, params object[])
ObjectExtensions.IsNot(object?, object?)
ObjectExtensions.PropertiesOf<T>(object)
ObjectExtensions.WhichAre(object, IEnumerable<object>)
ObjectExtensions.WhichAre(object, params object[])
Common.IfNotNull<T>(T?, Action<T>)
Objects.Itself<T>(T)
Objects.ShallowCopyTo<T>(T, T)
CollectionExtensions.PushInto<TItem, TCollection>(TItem, ICollection<TCollection>)
DictionaryExtensions.PushInto<TKey, TValue>(TValue, TKey, IDictionary<TKey, TValue>)
EnumerableExtensions.Locked<T>(T, Action<T>)
EnumerableExtensions.Locked<T, TResult>(T, Func<T, TResult>)
  • Edit this page
  • View Source
In this article
Back to top Generated by DocFX