Files
27Aug2021-Cpp2IL-Dump/mscorlib/System/Collections/ObjectModel/KeyedCollection.cs
T
niko c12fbe3fc6 m
2026-04-12 16:51:38 +02:00

187 lines
9.0 KiB
C#

using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Runtime.InteropServices;
using Cpp2IlInjected;
namespace System.Collections.ObjectModel
{
/// <summary>Provides the abstract base class for a collection whose keys are embedded in the values.</summary>
/// <typeparam name="TKey">The type of keys in the collection.</typeparam>
/// <typeparam name="TItem">The type of items in the collection.</typeparam>
// Token: 0x020005F2 RID: 1522
[Token(Token = "0x20005F2")]
[DebuggerTypeProxy(typeof(Mscorlib_KeyedCollectionDebugView<, >))]
[ComVisible(false)]
[DebuggerDisplay("Count = {Count}")]
[Serializable]
public abstract class KeyedCollection<TKey, TItem> : Collection<TItem>
{
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.ObjectModel.KeyedCollection`2" /> class that uses the default equality comparer.</summary>
// Token: 0x06002F7C RID: 12156 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x6002F7C")]
[Address(RVA = "0x3051D70", Offset = "0x3050D70", VA = "0x183051D70")]
protected KeyedCollection()
{
}
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.ObjectModel.KeyedCollection`2" /> class that uses the specified equality comparer.</summary>
/// <param name="comparer">The implementation of the <see cref="T:System.Collections.Generic.IEqualityComparer`1" /> generic interface to use when comparing keys, or <see langword="null" /> to use the default equality comparer for the type of the key, obtained from <see cref="P:System.Collections.Generic.EqualityComparer`1.Default" />.</param>
// Token: 0x06002F7D RID: 12157 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x6002F7D")]
[Address(RVA = "0x2F027C0", Offset = "0x2F017C0", VA = "0x182F027C0")]
protected KeyedCollection(IEqualityComparer<TKey> comparer)
{
}
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.ObjectModel.KeyedCollection`2" /> class that uses the specified equality comparer and creates a lookup dictionary when the specified threshold is exceeded.</summary>
/// <param name="comparer">The implementation of the <see cref="T:System.Collections.Generic.IEqualityComparer`1" /> generic interface to use when comparing keys, or <see langword="null" /> to use the default equality comparer for the type of the key, obtained from <see cref="P:System.Collections.Generic.EqualityComparer`1.Default" />.</param>
/// <param name="dictionaryCreationThreshold">The number of elements the collection can hold without creating a lookup dictionary (0 creates the lookup dictionary when the first item is added), or -1 to specify that a lookup dictionary is never created.</param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="dictionaryCreationThreshold" /> is less than -1.</exception>
// Token: 0x06002F7E RID: 12158 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x6002F7E")]
[Address(RVA = "0x35C4170", Offset = "0x35C3170", VA = "0x1835C4170")]
protected KeyedCollection(IEqualityComparer<TKey> comparer, int dictionaryCreationThreshold)
{
}
/// <summary>Gets the element with the specified key.</summary>
/// <param name="key">The key of the element to get.</param>
/// <returns>The element with the specified key. If an element with the specified key is not found, an exception is thrown.</returns>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="key" /> is <see langword="null" />.</exception>
/// <exception cref="T:System.Collections.Generic.KeyNotFoundException">An element with the specified key does not exist in the collection.</exception>
// Token: 0x17000774 RID: 1908
[Token(Token = "0x17000774")]
public TItem this[TKey key]
{
[Token(Token = "0x6002F7F")]
[Address(RVA = "0x35C4210", Offset = "0x35C3210", VA = "0x1835C4210")]
get
{
return null;
}
}
/// <summary>Determines whether the collection contains an element with the specified key.</summary>
/// <param name="key">The key to locate in the <see cref="T:System.Collections.ObjectModel.KeyedCollection`2" />.</param>
/// <returns>
/// <see langword="true" /> if the <see cref="T:System.Collections.ObjectModel.KeyedCollection`2" /> contains an element with the specified key; otherwise, <see langword="false" />.</returns>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="key" /> is <see langword="null" />.</exception>
// Token: 0x06002F80 RID: 12160 RVA: 0x0001A010 File Offset: 0x00018210
[Token(Token = "0x6002F80")]
[Address(RVA = "0x35C3920", Offset = "0x35C2920", VA = "0x1835C3920")]
public bool Contains(TKey key)
{
return default(bool);
}
/// <summary>Gets the lookup dictionary of the <see cref="T:System.Collections.ObjectModel.KeyedCollection`2" />.</summary>
/// <returns>The lookup dictionary of the <see cref="T:System.Collections.ObjectModel.KeyedCollection`2" />, if it exists; otherwise, <see langword="null" />.</returns>
// Token: 0x17000775 RID: 1909
// (get) Token: 0x06002F81 RID: 12161 RVA: 0x00002082 File Offset: 0x00000282
[Token(Token = "0x17000775")]
protected IDictionary<TKey, TItem> Dictionary
{
[Token(Token = "0x6002F81")]
[Address(RVA = "0x4157D0", Offset = "0x4147D0", VA = "0x1804157D0")]
get
{
return null;
}
}
/// <summary>Removes all elements from the <see cref="T:System.Collections.ObjectModel.KeyedCollection`2" />.</summary>
// Token: 0x06002F82 RID: 12162 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x6002F82")]
[Address(RVA = "0x35C38C0", Offset = "0x35C28C0", VA = "0x1835C38C0", Slot = "35")]
protected override void ClearItems()
{
}
/// <summary>When implemented in a derived class, extracts the key from the specified element.</summary>
/// <param name="item">The element from which to extract the key.</param>
/// <returns>The key for the specified element.</returns>
// Token: 0x06002F83 RID: 12163
[Token(Token = "0x6002F83")]
[Address(Slot = "39")]
protected abstract TKey GetKeyForItem(TItem item);
/// <summary>Inserts an element into the <see cref="T:System.Collections.ObjectModel.KeyedCollection`2" /> at the specified index.</summary>
/// <param name="index">The zero-based index at which <paramref name="item" /> should be inserted.</param>
/// <param name="item">The object to insert.</param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="index" /> is less than 0.
/// -or-
/// <paramref name="index" /> is greater than <see cref="P:System.Collections.ObjectModel.Collection`1.Count" />.</exception>
// Token: 0x06002F84 RID: 12164 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x6002F84")]
[Address(RVA = "0x35C3DE0", Offset = "0x35C2DE0", VA = "0x1835C3DE0", Slot = "36")]
protected override void InsertItem(int index, TItem item)
{
}
/// <summary>Removes the element at the specified index of the <see cref="T:System.Collections.ObjectModel.KeyedCollection`2" />.</summary>
/// <param name="index">The index of the element to remove.</param>
// Token: 0x06002F85 RID: 12165 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x6002F85")]
[Address(RVA = "0x35C3E80", Offset = "0x35C2E80", VA = "0x1835C3E80", Slot = "37")]
protected override void RemoveItem(int index)
{
}
/// <summary>Replaces the item at the specified index with the specified item.</summary>
/// <param name="index">The zero-based index of the item to be replaced.</param>
/// <param name="item">The new item.</param>
// Token: 0x06002F86 RID: 12166 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x6002F86")]
[Address(RVA = "0x35C3FB0", Offset = "0x35C2FB0", VA = "0x1835C3FB0", Slot = "38")]
protected override void SetItem(int index, TItem item)
{
}
// Token: 0x06002F87 RID: 12167 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x6002F87")]
[Address(RVA = "0x35C3800", Offset = "0x35C2800", VA = "0x1835C3800")]
private void AddKey(TKey key, TItem item)
{
}
// Token: 0x06002F88 RID: 12168 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x6002F88")]
[Address(RVA = "0x35C3B90", Offset = "0x35C2B90", VA = "0x1835C3B90")]
private void CreateDictionary()
{
}
// Token: 0x06002F89 RID: 12169 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x6002F89")]
[Address(RVA = "0x35C3F80", Offset = "0x35C2F80", VA = "0x1835C3F80")]
private void RemoveKey(TKey key)
{
}
// Token: 0x04001AA4 RID: 6820
[global::Cpp2IlInjected.FieldOffset(Offset = "0x0")]
[Token(Token = "0x4001AA4")]
private IEqualityComparer<TKey> comparer;
// Token: 0x04001AA5 RID: 6821
[global::Cpp2IlInjected.FieldOffset(Offset = "0x0")]
[Token(Token = "0x4001AA5")]
private Dictionary<TKey, TItem> dict;
// Token: 0x04001AA6 RID: 6822
[global::Cpp2IlInjected.FieldOffset(Offset = "0x0")]
[Token(Token = "0x4001AA6")]
private int keyCount;
// Token: 0x04001AA7 RID: 6823
[global::Cpp2IlInjected.FieldOffset(Offset = "0x0")]
[Token(Token = "0x4001AA7")]
private int threshold;
}
}