KeyedCollection2<TKey, TItem>
Namespace: UAssetAPI.UnrealTypes
A concrete implementation of the abstract KeyedCollection class using lambdas for the implementation.
public class KeyedCollection2<TKey, TItem> : , , , , System.Collections.IEnumerable, System.Collections.IList, System.Collections.ICollection, ,
Type Parameters
TKey
TItem
Inheritance Object → Collection<TItem> → KeyedCollection<TKey, TItem> → KeyedCollection2<TKey, TItem>
Implements IList<TItem>, ICollection<TItem>, IEnumerable<TItem>, IEnumerable, IList, ICollection, IReadOnlyList<TItem>, IReadOnlyCollection<TItem>
Attributes DefaultMemberAttribute, DebuggerTypeProxyAttribute, DebuggerDisplayAttribute, DebuggerTypeProxyAttribute, DebuggerDisplayAttribute
Properties
Comparer
public IEqualityComparer<TKey> Comparer { get; }
Property Value
IEqualityComparer<TKey>
Item
public TItem Item { get; }
Property Value
TItem
Dictionary
protected IDictionary<TKey, TItem> Dictionary { get; }
Property Value
IDictionary<TKey, TItem>
Count
public int Count { get; }
Property Value
Items
protected IList<TItem> Items { get; }
Property Value
IList<TItem>
Item
public TItem Item { get; set; }
Property Value
TItem
Constructors
KeyedCollection2(Func<TItem, TKey>)
public KeyedCollection2(Func<TItem, TKey> getKeyForItemFunction)
Parameters
getKeyForItemFunction Func<TItem, TKey>
KeyedCollection2(Func<TItem, TKey>, IEqualityComparer<TKey>)
public KeyedCollection2(Func<TItem, TKey> getKeyForItemDelegate, IEqualityComparer<TKey> comparer)
Parameters
getKeyForItemDelegate Func<TItem, TKey>
comparer IEqualityComparer<TKey>
Methods
GetKeyForItem(TItem)
protected TKey GetKeyForItem(TItem item)
Parameters
item TItem
Returns
TKey
SortByKeys()
public void SortByKeys()
SortByKeys(IComparer<TKey>)
public void SortByKeys(IComparer<TKey> keyComparer)
Parameters
keyComparer IComparer<TKey>
SortByKeys(Comparison<TKey>)
public void SortByKeys(Comparison<TKey> keyComparison)
Parameters
keyComparison Comparison<TKey>
Sort()
public void Sort()
Sort(Comparison<TItem>)
public void Sort(Comparison<TItem> comparison)
Parameters
comparison Comparison<TItem>
Sort(IComparer<TItem>)
public void Sort(IComparer<TItem> comparer)
Parameters
comparer IComparer<TItem>