scripts
This commit is contained in:
@@ -0,0 +1,323 @@
|
||||
using System;
|
||||
using System.Text;
|
||||
|
||||
namespace System.Collections.Specialized
|
||||
{
|
||||
/// <summary>Provides a simple structure that stores Boolean values and small integers in 32 bits of memory.</summary>
|
||||
// Token: 0x02000025 RID: 37
|
||||
public struct BitVector32
|
||||
{
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.Specialized.BitVector32" /> structure containing the data represented in an existing <see cref="T:System.Collections.Specialized.BitVector32" /> structure.</summary>
|
||||
/// <param name="value">A <see cref="T:System.Collections.Specialized.BitVector32" /> structure that contains the data to copy. </param>
|
||||
// Token: 0x06000174 RID: 372 RVA: 0x0000689C File Offset: 0x00004A9C
|
||||
public BitVector32(BitVector32 source)
|
||||
{
|
||||
this.bits = source.bits;
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.Specialized.BitVector32" /> structure containing the data represented in an integer.</summary>
|
||||
/// <param name="data">An integer representing the data of the new <see cref="T:System.Collections.Specialized.BitVector32" />. </param>
|
||||
// Token: 0x06000175 RID: 373 RVA: 0x000068AC File Offset: 0x00004AAC
|
||||
public BitVector32(int init)
|
||||
{
|
||||
this.bits = init;
|
||||
}
|
||||
|
||||
/// <summary>Gets the value of the <see cref="T:System.Collections.Specialized.BitVector32" /> as an integer.</summary>
|
||||
/// <returns>The value of the <see cref="T:System.Collections.Specialized.BitVector32" /> as an integer.</returns>
|
||||
// Token: 0x17000063 RID: 99
|
||||
// (get) Token: 0x06000176 RID: 374 RVA: 0x000068B8 File Offset: 0x00004AB8
|
||||
public int Data
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.bits;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets or sets the value stored in the specified <see cref="T:System.Collections.Specialized.BitVector32.Section" />.</summary>
|
||||
/// <returns>The value stored in the specified <see cref="T:System.Collections.Specialized.BitVector32.Section" />.</returns>
|
||||
/// <param name="section">A <see cref="T:System.Collections.Specialized.BitVector32.Section" /> that contains the value to get or set. </param>
|
||||
// Token: 0x17000064 RID: 100
|
||||
public int this[BitVector32.Section section]
|
||||
{
|
||||
get
|
||||
{
|
||||
return (this.bits >> (int)section.Offset) & (int)section.Mask;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (value < 0)
|
||||
{
|
||||
throw new ArgumentException("Section can't hold negative values");
|
||||
}
|
||||
if (value > (int)section.Mask)
|
||||
{
|
||||
throw new ArgumentException("Value too large to fit in section");
|
||||
}
|
||||
this.bits &= ~((int)section.Mask << (int)section.Offset);
|
||||
this.bits |= value << (int)section.Offset;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets or sets the state of the bit flag indicated by the specified mask.</summary>
|
||||
/// <returns>true if the specified bit flag is on (1); otherwise, false.</returns>
|
||||
/// <param name="bit">A mask that indicates the bit to get or set. </param>
|
||||
// Token: 0x17000065 RID: 101
|
||||
public bool this[int mask]
|
||||
{
|
||||
get
|
||||
{
|
||||
return (this.bits & mask) == mask;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (value)
|
||||
{
|
||||
this.bits |= mask;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.bits &= ~mask;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Creates the first mask in a series of masks that can be used to retrieve individual bits in a <see cref="T:System.Collections.Specialized.BitVector32" /> that is set up as bit flags.</summary>
|
||||
/// <returns>A mask that isolates the first bit flag in the <see cref="T:System.Collections.Specialized.BitVector32" />.</returns>
|
||||
/// <PermissionSet>
|
||||
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="UnmanagedCode, ControlEvidence" />
|
||||
/// </PermissionSet>
|
||||
// Token: 0x0600017B RID: 379 RVA: 0x0000699C File Offset: 0x00004B9C
|
||||
public static int CreateMask()
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
/// <summary>Creates an additional mask following the specified mask in a series of masks that can be used to retrieve individual bits in a <see cref="T:System.Collections.Specialized.BitVector32" /> that is set up as bit flags.</summary>
|
||||
/// <returns>A mask that isolates the bit flag following the one that <paramref name="previous" /> points to in <see cref="T:System.Collections.Specialized.BitVector32" />.</returns>
|
||||
/// <param name="previous">The mask that indicates the previous bit flag. </param>
|
||||
/// <exception cref="T:System.InvalidOperationException">
|
||||
/// <paramref name="previous" /> indicates the last bit flag in the <see cref="T:System.Collections.Specialized.BitVector32" />. </exception>
|
||||
// Token: 0x0600017C RID: 380 RVA: 0x000069A0 File Offset: 0x00004BA0
|
||||
public static int CreateMask(int prev)
|
||||
{
|
||||
if (prev == 0)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
if (prev == -2147483648)
|
||||
{
|
||||
throw new InvalidOperationException("all bits set");
|
||||
}
|
||||
return prev << 1;
|
||||
}
|
||||
|
||||
/// <summary>Creates the first <see cref="T:System.Collections.Specialized.BitVector32.Section" /> in a series of sections that contain small integers.</summary>
|
||||
/// <returns>A <see cref="T:System.Collections.Specialized.BitVector32.Section" /> that can hold a number from zero to <paramref name="maxValue" />.</returns>
|
||||
/// <param name="maxValue">A 16-bit signed integer that specifies the maximum value for the new <see cref="T:System.Collections.Specialized.BitVector32.Section" />. </param>
|
||||
/// <exception cref="T:System.ArgumentException">
|
||||
/// <paramref name="maxValue" /> is less than 1. </exception>
|
||||
// Token: 0x0600017D RID: 381 RVA: 0x000069C4 File Offset: 0x00004BC4
|
||||
public static BitVector32.Section CreateSection(short maxValue)
|
||||
{
|
||||
return BitVector32.CreateSection(maxValue, new BitVector32.Section(0, 0));
|
||||
}
|
||||
|
||||
/// <summary>Creates a new <see cref="T:System.Collections.Specialized.BitVector32.Section" /> following the specified <see cref="T:System.Collections.Specialized.BitVector32.Section" /> in a series of sections that contain small integers.</summary>
|
||||
/// <returns>A <see cref="T:System.Collections.Specialized.BitVector32.Section" /> that can hold a number from zero to <paramref name="maxValue" />.</returns>
|
||||
/// <param name="maxValue">A 16-bit signed integer that specifies the maximum value for the new <see cref="T:System.Collections.Specialized.BitVector32.Section" />. </param>
|
||||
/// <param name="previous">The previous <see cref="T:System.Collections.Specialized.BitVector32.Section" /> in the <see cref="T:System.Collections.Specialized.BitVector32" />. </param>
|
||||
/// <exception cref="T:System.ArgumentException">
|
||||
/// <paramref name="maxValue" /> is less than 1. </exception>
|
||||
/// <exception cref="T:System.InvalidOperationException">
|
||||
/// <paramref name="previous" /> includes the final bit in the <see cref="T:System.Collections.Specialized.BitVector32" />.-or- <paramref name="maxValue" /> is greater than the highest value that can be represented by the number of bits after <paramref name="previous" />. </exception>
|
||||
// Token: 0x0600017E RID: 382 RVA: 0x000069D4 File Offset: 0x00004BD4
|
||||
public static BitVector32.Section CreateSection(short maxValue, BitVector32.Section previous)
|
||||
{
|
||||
if (maxValue < 1)
|
||||
{
|
||||
throw new ArgumentException("maxValue");
|
||||
}
|
||||
int num = BitVector32.HighestSetBit((int)maxValue);
|
||||
int num2 = (1 << num) - 1;
|
||||
int num3 = (int)previous.Offset + BitVector32.HighestSetBit((int)previous.Mask);
|
||||
if (num3 + num > 32)
|
||||
{
|
||||
throw new ArgumentException("Sections cannot exceed 32 bits in total");
|
||||
}
|
||||
return new BitVector32.Section((short)num2, (short)num3);
|
||||
}
|
||||
|
||||
/// <summary>Determines whether the specified object is equal to the <see cref="T:System.Collections.Specialized.BitVector32" />.</summary>
|
||||
/// <returns>true if the specified object is equal to the <see cref="T:System.Collections.Specialized.BitVector32" />; otherwise, false.</returns>
|
||||
/// <param name="o">The object to compare with the current <see cref="T:System.Collections.Specialized.BitVector32" />. </param>
|
||||
// Token: 0x0600017F RID: 383 RVA: 0x00006A38 File Offset: 0x00004C38
|
||||
public override bool Equals(object o)
|
||||
{
|
||||
return o is BitVector32 && this.bits == ((BitVector32)o).bits;
|
||||
}
|
||||
|
||||
/// <summary>Serves as a hash function for the <see cref="T:System.Collections.Specialized.BitVector32" />.</summary>
|
||||
/// <returns>A hash code for the <see cref="T:System.Collections.Specialized.BitVector32" />.</returns>
|
||||
// Token: 0x06000180 RID: 384 RVA: 0x00006A6C File Offset: 0x00004C6C
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return this.bits.GetHashCode();
|
||||
}
|
||||
|
||||
/// <summary>Returns a string that represents the current <see cref="T:System.Collections.Specialized.BitVector32" />.</summary>
|
||||
/// <returns>A string that represents the current <see cref="T:System.Collections.Specialized.BitVector32" />.</returns>
|
||||
// Token: 0x06000181 RID: 385 RVA: 0x00006A7C File Offset: 0x00004C7C
|
||||
public override string ToString()
|
||||
{
|
||||
return BitVector32.ToString(this);
|
||||
}
|
||||
|
||||
/// <summary>Returns a string that represents the specified <see cref="T:System.Collections.Specialized.BitVector32" />.</summary>
|
||||
/// <returns>A string that represents the specified <see cref="T:System.Collections.Specialized.BitVector32" />.</returns>
|
||||
/// <param name="value">The <see cref="T:System.Collections.Specialized.BitVector32" /> to represent. </param>
|
||||
// Token: 0x06000182 RID: 386 RVA: 0x00006A8C File Offset: 0x00004C8C
|
||||
public static string ToString(BitVector32 value)
|
||||
{
|
||||
StringBuilder stringBuilder = new StringBuilder();
|
||||
stringBuilder.Append("BitVector32{");
|
||||
for (long num = (long)((ulong)int.MinValue); num > 0L; num >>= 1)
|
||||
{
|
||||
stringBuilder.Append((((long)value.bits & num) != 0L) ? '1' : '0');
|
||||
}
|
||||
stringBuilder.Append('}');
|
||||
return stringBuilder.ToString();
|
||||
}
|
||||
|
||||
// Token: 0x06000183 RID: 387 RVA: 0x00006AF4 File Offset: 0x00004CF4
|
||||
private static int HighestSetBit(int i)
|
||||
{
|
||||
int num = 0;
|
||||
while (i >> num != 0)
|
||||
{
|
||||
num++;
|
||||
}
|
||||
return num;
|
||||
}
|
||||
|
||||
// Token: 0x0400007F RID: 127
|
||||
private int bits;
|
||||
|
||||
/// <summary>Represents a section of the vector that can contain an integer number.</summary>
|
||||
// Token: 0x02000026 RID: 38
|
||||
public struct Section
|
||||
{
|
||||
// Token: 0x06000184 RID: 388 RVA: 0x00006B18 File Offset: 0x00004D18
|
||||
internal Section(short mask, short offset)
|
||||
{
|
||||
this.mask = mask;
|
||||
this.offset = offset;
|
||||
}
|
||||
|
||||
/// <summary>Gets a mask that isolates this section within the <see cref="T:System.Collections.Specialized.BitVector32" />.</summary>
|
||||
/// <returns>A mask that isolates this section within the <see cref="T:System.Collections.Specialized.BitVector32" />.</returns>
|
||||
// Token: 0x17000066 RID: 102
|
||||
// (get) Token: 0x06000185 RID: 389 RVA: 0x00006B28 File Offset: 0x00004D28
|
||||
public short Mask
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.mask;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets the offset of this section from the start of the <see cref="T:System.Collections.Specialized.BitVector32" />.</summary>
|
||||
/// <returns>The offset of this section from the start of the <see cref="T:System.Collections.Specialized.BitVector32" />.</returns>
|
||||
// Token: 0x17000067 RID: 103
|
||||
// (get) Token: 0x06000186 RID: 390 RVA: 0x00006B30 File Offset: 0x00004D30
|
||||
public short Offset
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.offset;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Determines whether the specified <see cref="T:System.Collections.Specialized.BitVector32.Section" /> object is the same as the current <see cref="T:System.Collections.Specialized.BitVector32.Section" /> object.</summary>
|
||||
/// <returns>true if the <paramref name="obj" /> parameter is the same as the current <see cref="T:System.Collections.Specialized.BitVector32.Section" /> object; otherwise false.</returns>
|
||||
/// <param name="obj">The <see cref="T:System.Collections.Specialized.BitVector32.Section" /> object to compare with the current <see cref="T:System.Collections.Specialized.BitVector32.Section" /> object.</param>
|
||||
// Token: 0x06000187 RID: 391 RVA: 0x00006B38 File Offset: 0x00004D38
|
||||
public bool Equals(BitVector32.Section obj)
|
||||
{
|
||||
return this.mask == obj.mask && this.offset == obj.offset;
|
||||
}
|
||||
|
||||
/// <summary>Determines whether the specified object is the same as the current <see cref="T:System.Collections.Specialized.BitVector32.Section" /> object.</summary>
|
||||
/// <returns>true if the specified object is the same as the current <see cref="T:System.Collections.Specialized.BitVector32.Section" /> object; otherwise, false.</returns>
|
||||
/// <param name="o">The object to compare with the current <see cref="T:System.Collections.Specialized.BitVector32.Section" />.</param>
|
||||
// Token: 0x06000188 RID: 392 RVA: 0x00006B6C File Offset: 0x00004D6C
|
||||
public override bool Equals(object o)
|
||||
{
|
||||
if (!(o is BitVector32.Section))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
BitVector32.Section section = (BitVector32.Section)o;
|
||||
return this.mask == section.mask && this.offset == section.offset;
|
||||
}
|
||||
|
||||
/// <summary>Serves as a hash function for the current <see cref="T:System.Collections.Specialized.BitVector32.Section" />, suitable for hashing algorithms and data structures, such as a hash table.</summary>
|
||||
/// <returns>A hash code for the current <see cref="T:System.Collections.Specialized.BitVector32.Section" />.</returns>
|
||||
// Token: 0x06000189 RID: 393 RVA: 0x00006BB4 File Offset: 0x00004DB4
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return (int)this.mask << (int)this.offset;
|
||||
}
|
||||
|
||||
/// <summary>Returns a string that represents the current <see cref="T:System.Collections.Specialized.BitVector32.Section" />.</summary>
|
||||
/// <returns>A string that represents the current <see cref="T:System.Collections.Specialized.BitVector32.Section" />.</returns>
|
||||
// Token: 0x0600018A RID: 394 RVA: 0x00006BC8 File Offset: 0x00004DC8
|
||||
public override string ToString()
|
||||
{
|
||||
return BitVector32.Section.ToString(this);
|
||||
}
|
||||
|
||||
/// <summary>Returns a string that represents the specified <see cref="T:System.Collections.Specialized.BitVector32.Section" />.</summary>
|
||||
/// <returns>A string that represents the specified <see cref="T:System.Collections.Specialized.BitVector32.Section" />.</returns>
|
||||
/// <param name="value">The <see cref="T:System.Collections.Specialized.BitVector32.Section" /> to represent.</param>
|
||||
// Token: 0x0600018B RID: 395 RVA: 0x00006BD8 File Offset: 0x00004DD8
|
||||
public static string ToString(BitVector32.Section value)
|
||||
{
|
||||
StringBuilder stringBuilder = new StringBuilder();
|
||||
stringBuilder.Append("Section{0x");
|
||||
stringBuilder.Append(Convert.ToString(value.Mask, 16));
|
||||
stringBuilder.Append(", 0x");
|
||||
stringBuilder.Append(Convert.ToString(value.Offset, 16));
|
||||
stringBuilder.Append("}");
|
||||
return stringBuilder.ToString();
|
||||
}
|
||||
|
||||
/// <summary>Determines whether two specified <see cref="T:System.Collections.Specialized.BitVector32.Section" /> objects are equal.</summary>
|
||||
/// <returns>true if the <paramref name="a" /> and <paramref name="b" /> parameters represent the same <see cref="T:System.Collections.Specialized.BitVector32.Section" /> object, otherwise, false.</returns>
|
||||
/// <param name="a">A <see cref="T:System.Collections.Specialized.BitVector32.Section" /> object.</param>
|
||||
/// <param name="b">A <see cref="T:System.Collections.Specialized.BitVector32.Section" /> object.</param>
|
||||
// Token: 0x0600018C RID: 396 RVA: 0x00006C40 File Offset: 0x00004E40
|
||||
public static bool operator ==(BitVector32.Section v1, BitVector32.Section v2)
|
||||
{
|
||||
return v1.mask == v2.mask && v1.offset == v2.offset;
|
||||
}
|
||||
|
||||
/// <summary>Determines whether two <see cref="T:System.Collections.Specialized.BitVector32.Section" /> objects have different values.</summary>
|
||||
/// <returns>true if the <paramref name="a" /> and <paramref name="b" /> parameters represent different <see cref="T:System.Collections.Specialized.BitVector32.Section" /> objects; otherwise, false.</returns>
|
||||
/// <param name="a">A <see cref="T:System.Collections.Specialized.BitVector32.Section" /> object.</param>
|
||||
/// <param name="b">A <see cref="T:System.Collections.Specialized.BitVector32.Section" /> object.</param>
|
||||
// Token: 0x0600018D RID: 397 RVA: 0x00006C74 File Offset: 0x00004E74
|
||||
public static bool operator !=(BitVector32.Section v1, BitVector32.Section v2)
|
||||
{
|
||||
return v1.mask != v2.mask || v1.offset != v2.offset;
|
||||
}
|
||||
|
||||
// Token: 0x04000080 RID: 128
|
||||
private short mask;
|
||||
|
||||
// Token: 0x04000081 RID: 129
|
||||
private short offset;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
using System;
|
||||
|
||||
namespace System.Collections.Specialized
|
||||
{
|
||||
/// <summary>Creates collections that ignore the case in strings.</summary>
|
||||
// Token: 0x02000027 RID: 39
|
||||
internal class CollectionsUtil
|
||||
{
|
||||
/// <summary>Creates a new case-insensitive instance of the <see cref="T:System.Collections.Hashtable" /> class with the default initial capacity.</summary>
|
||||
/// <returns>A new case-insensitive instance of the <see cref="T:System.Collections.Hashtable" /> class with the default initial capacity.</returns>
|
||||
/// <PermissionSet>
|
||||
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="UnmanagedCode" />
|
||||
/// </PermissionSet>
|
||||
// Token: 0x0600018F RID: 399 RVA: 0x00006CA8 File Offset: 0x00004EA8
|
||||
public static Hashtable CreateCaseInsensitiveHashtable()
|
||||
{
|
||||
return new Hashtable(CaseInsensitiveHashCodeProvider.Default, CaseInsensitiveComparer.Default);
|
||||
}
|
||||
|
||||
/// <summary>Copies the entries from the specified dictionary to a new case-insensitive instance of the <see cref="T:System.Collections.Hashtable" /> class with the same initial capacity as the number of entries copied.</summary>
|
||||
/// <returns>A new case-insensitive instance of the <see cref="T:System.Collections.Hashtable" /> class containing the entries from the specified <see cref="T:System.Collections.IDictionary" />.</returns>
|
||||
/// <param name="d">The <see cref="T:System.Collections.IDictionary" /> to copy to a new case-insensitive <see cref="T:System.Collections.Hashtable" />. </param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="d" /> is null. </exception>
|
||||
// Token: 0x06000190 RID: 400 RVA: 0x00006CBC File Offset: 0x00004EBC
|
||||
public static Hashtable CreateCaseInsensitiveHashtable(IDictionary d)
|
||||
{
|
||||
return new Hashtable(d, CaseInsensitiveHashCodeProvider.Default, CaseInsensitiveComparer.Default);
|
||||
}
|
||||
|
||||
/// <summary>Creates a new case-insensitive instance of the <see cref="T:System.Collections.Hashtable" /> class with the specified initial capacity.</summary>
|
||||
/// <returns>A new case-insensitive instance of the <see cref="T:System.Collections.Hashtable" /> class with the specified initial capacity.</returns>
|
||||
/// <param name="capacity">The approximate number of entries that the <see cref="T:System.Collections.Hashtable" /> can initially contain. </param>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="capacity" /> is less than zero. </exception>
|
||||
// Token: 0x06000191 RID: 401 RVA: 0x00006CD0 File Offset: 0x00004ED0
|
||||
public static Hashtable CreateCaseInsensitiveHashtable(int capacity)
|
||||
{
|
||||
return new Hashtable(capacity, CaseInsensitiveHashCodeProvider.Default, CaseInsensitiveComparer.Default);
|
||||
}
|
||||
|
||||
/// <summary>Creates a new instance of the <see cref="T:System.Collections.SortedList" /> class that ignores the case of strings.</summary>
|
||||
/// <returns>A new instance of the <see cref="T:System.Collections.SortedList" /> class that ignores the case of strings.</returns>
|
||||
// Token: 0x06000192 RID: 402 RVA: 0x00006CE4 File Offset: 0x00004EE4
|
||||
public static SortedList CreateCaseInsensitiveSortedList()
|
||||
{
|
||||
return new SortedList(CaseInsensitiveComparer.Default);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,276 @@
|
||||
using System;
|
||||
|
||||
namespace System.Collections.Specialized
|
||||
{
|
||||
/// <summary>Implements IDictionary by using a <see cref="T:System.Collections.Specialized.ListDictionary" /> while the collection is small, and then switching to a <see cref="T:System.Collections.Hashtable" /> when the collection gets large.</summary>
|
||||
// Token: 0x02000028 RID: 40
|
||||
[Serializable]
|
||||
public class HybridDictionary : ICollection, IDictionary, IEnumerable
|
||||
{
|
||||
/// <summary>Creates an empty case-sensitive <see cref="T:System.Collections.Specialized.HybridDictionary" />.</summary>
|
||||
// Token: 0x06000193 RID: 403 RVA: 0x00006CF0 File Offset: 0x00004EF0
|
||||
public HybridDictionary()
|
||||
: this(0, false)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Creates an empty <see cref="T:System.Collections.Specialized.HybridDictionary" /> with the specified case sensitivity.</summary>
|
||||
/// <param name="caseInsensitive">A Boolean that denotes whether the <see cref="T:System.Collections.Specialized.HybridDictionary" /> is case-insensitive. </param>
|
||||
// Token: 0x06000194 RID: 404 RVA: 0x00006CFC File Offset: 0x00004EFC
|
||||
public HybridDictionary(bool caseInsensitive)
|
||||
: this(0, caseInsensitive)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Creates a case-sensitive <see cref="T:System.Collections.Specialized.HybridDictionary" /> with the specified initial size.</summary>
|
||||
/// <param name="initialSize">The approximate number of entries that the <see cref="T:System.Collections.Specialized.HybridDictionary" /> can initially contain. </param>
|
||||
// Token: 0x06000195 RID: 405 RVA: 0x00006D08 File Offset: 0x00004F08
|
||||
public HybridDictionary(int initialSize)
|
||||
: this(initialSize, false)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Creates a <see cref="T:System.Collections.Specialized.HybridDictionary" /> with the specified initial size and case sensitivity.</summary>
|
||||
/// <param name="initialSize">The approximate number of entries that the <see cref="T:System.Collections.Specialized.HybridDictionary" /> can initially contain. </param>
|
||||
/// <param name="caseInsensitive">A Boolean that denotes whether the <see cref="T:System.Collections.Specialized.HybridDictionary" /> is case-insensitive. </param>
|
||||
// Token: 0x06000196 RID: 406 RVA: 0x00006D14 File Offset: 0x00004F14
|
||||
public HybridDictionary(int initialSize, bool caseInsensitive)
|
||||
{
|
||||
this.caseInsensitive = caseInsensitive;
|
||||
IComparer comparer = ((!caseInsensitive) ? null : CaseInsensitiveComparer.DefaultInvariant);
|
||||
IHashCodeProvider hashCodeProvider = ((!caseInsensitive) ? null : CaseInsensitiveHashCodeProvider.DefaultInvariant);
|
||||
if (initialSize <= 10)
|
||||
{
|
||||
this.list = new ListDictionary(comparer);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.hashtable = new Hashtable(initialSize, hashCodeProvider, comparer);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Returns an <see cref="T:System.Collections.IEnumerator" /> that iterates through the <see cref="T:System.Collections.Specialized.HybridDictionary" />.</summary>
|
||||
/// <returns>An <see cref="T:System.Collections.IEnumerator" /> for the <see cref="T:System.Collections.Specialized.HybridDictionary" />.</returns>
|
||||
// Token: 0x06000197 RID: 407 RVA: 0x00006D7C File Offset: 0x00004F7C
|
||||
IEnumerator IEnumerable.GetEnumerator()
|
||||
{
|
||||
return this.GetEnumerator();
|
||||
}
|
||||
|
||||
// Token: 0x17000068 RID: 104
|
||||
// (get) Token: 0x06000198 RID: 408 RVA: 0x00006D84 File Offset: 0x00004F84
|
||||
private IDictionary inner
|
||||
{
|
||||
get
|
||||
{
|
||||
IDictionary dictionary2;
|
||||
if (this.list == null)
|
||||
{
|
||||
IDictionary dictionary = this.hashtable;
|
||||
dictionary2 = dictionary;
|
||||
}
|
||||
else
|
||||
{
|
||||
dictionary2 = this.list;
|
||||
}
|
||||
return dictionary2;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets the number of key/value pairs contained in the <see cref="T:System.Collections.Specialized.HybridDictionary" />.</summary>
|
||||
/// <returns>The number of key/value pairs contained in the <see cref="T:System.Collections.Specialized.HybridDictionary" />.Retrieving the value of this property is an O(1) operation.</returns>
|
||||
// Token: 0x17000069 RID: 105
|
||||
// (get) Token: 0x06000199 RID: 409 RVA: 0x00006DB0 File Offset: 0x00004FB0
|
||||
public int Count
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.inner.Count;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a value indicating whether the <see cref="T:System.Collections.Specialized.HybridDictionary" /> has a fixed size.</summary>
|
||||
/// <returns>This property always returns false.</returns>
|
||||
// Token: 0x1700006A RID: 106
|
||||
// (get) Token: 0x0600019A RID: 410 RVA: 0x00006DC0 File Offset: 0x00004FC0
|
||||
public bool IsFixedSize
|
||||
{
|
||||
get
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a value indicating whether the <see cref="T:System.Collections.Specialized.HybridDictionary" /> is read-only.</summary>
|
||||
/// <returns>This property always returns false.</returns>
|
||||
// Token: 0x1700006B RID: 107
|
||||
// (get) Token: 0x0600019B RID: 411 RVA: 0x00006DC4 File Offset: 0x00004FC4
|
||||
public bool IsReadOnly
|
||||
{
|
||||
get
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a value indicating whether the <see cref="T:System.Collections.Specialized.HybridDictionary" /> is synchronized (thread safe).</summary>
|
||||
/// <returns>This property always returns false.</returns>
|
||||
// Token: 0x1700006C RID: 108
|
||||
// (get) Token: 0x0600019C RID: 412 RVA: 0x00006DC8 File Offset: 0x00004FC8
|
||||
public bool IsSynchronized
|
||||
{
|
||||
get
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets or sets the value associated with the specified key.</summary>
|
||||
/// <returns>The value associated with the specified key. If the specified key is not found, attempting to get it returns null, and attempting to set it creates a new entry using the specified key.</returns>
|
||||
/// <param name="key">The key whose value to get or set. </param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="key" /> is null. </exception>
|
||||
// Token: 0x1700006D RID: 109
|
||||
public object this[object key]
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.inner[key];
|
||||
}
|
||||
set
|
||||
{
|
||||
this.inner[key] = value;
|
||||
if (this.list != null && this.Count > 10)
|
||||
{
|
||||
this.Switch();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets an <see cref="T:System.Collections.ICollection" /> containing the keys in the <see cref="T:System.Collections.Specialized.HybridDictionary" />.</summary>
|
||||
/// <returns>An <see cref="T:System.Collections.ICollection" /> containing the keys in the <see cref="T:System.Collections.Specialized.HybridDictionary" />.</returns>
|
||||
// Token: 0x1700006E RID: 110
|
||||
// (get) Token: 0x0600019F RID: 415 RVA: 0x00006E0C File Offset: 0x0000500C
|
||||
public ICollection Keys
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.inner.Keys;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets an object that can be used to synchronize access to the <see cref="T:System.Collections.Specialized.HybridDictionary" />.</summary>
|
||||
/// <returns>An object that can be used to synchronize access to the <see cref="T:System.Collections.Specialized.HybridDictionary" />.</returns>
|
||||
// Token: 0x1700006F RID: 111
|
||||
// (get) Token: 0x060001A0 RID: 416 RVA: 0x00006E1C File Offset: 0x0000501C
|
||||
public object SyncRoot
|
||||
{
|
||||
get
|
||||
{
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets an <see cref="T:System.Collections.ICollection" /> containing the values in the <see cref="T:System.Collections.Specialized.HybridDictionary" />.</summary>
|
||||
/// <returns>An <see cref="T:System.Collections.ICollection" /> containing the values in the <see cref="T:System.Collections.Specialized.HybridDictionary" />.</returns>
|
||||
// Token: 0x17000070 RID: 112
|
||||
// (get) Token: 0x060001A1 RID: 417 RVA: 0x00006E20 File Offset: 0x00005020
|
||||
public ICollection Values
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.inner.Values;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Adds an entry with the specified key and value into the <see cref="T:System.Collections.Specialized.HybridDictionary" />.</summary>
|
||||
/// <param name="key">The key of the entry to add. </param>
|
||||
/// <param name="value">The value of the entry to add. The value can be null. </param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="key" /> is null. </exception>
|
||||
/// <exception cref="T:System.ArgumentException">An entry with the same key already exists in the <see cref="T:System.Collections.Specialized.HybridDictionary" />. </exception>
|
||||
// Token: 0x060001A2 RID: 418 RVA: 0x00006E30 File Offset: 0x00005030
|
||||
public void Add(object key, object value)
|
||||
{
|
||||
this.inner.Add(key, value);
|
||||
if (this.list != null && this.Count > 10)
|
||||
{
|
||||
this.Switch();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Removes all entries from the <see cref="T:System.Collections.Specialized.HybridDictionary" />.</summary>
|
||||
// Token: 0x060001A3 RID: 419 RVA: 0x00006E60 File Offset: 0x00005060
|
||||
public void Clear()
|
||||
{
|
||||
this.inner.Clear();
|
||||
}
|
||||
|
||||
/// <summary>Determines whether the <see cref="T:System.Collections.Specialized.HybridDictionary" /> contains a specific key.</summary>
|
||||
/// <returns>true if the <see cref="T:System.Collections.Specialized.HybridDictionary" /> contains an entry with the specified key; otherwise, false.</returns>
|
||||
/// <param name="key">The key to locate in the <see cref="T:System.Collections.Specialized.HybridDictionary" />. </param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="key" /> is null. </exception>
|
||||
// Token: 0x060001A4 RID: 420 RVA: 0x00006E70 File Offset: 0x00005070
|
||||
public bool Contains(object key)
|
||||
{
|
||||
return this.inner.Contains(key);
|
||||
}
|
||||
|
||||
/// <summary>Copies the <see cref="T:System.Collections.Specialized.HybridDictionary" /> entries to a one-dimensional <see cref="T:System.Array" /> instance at the specified index.</summary>
|
||||
/// <param name="array">The one-dimensional <see cref="T:System.Array" /> that is the destination of the <see cref="T:System.Collections.DictionaryEntry" /> objects copied from <see cref="T:System.Collections.Specialized.HybridDictionary" />. The <see cref="T:System.Array" /> must have zero-based indexing. </param>
|
||||
/// <param name="index">The zero-based index in <paramref name="array" /> at which copying begins. </param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="array" /> is null. </exception>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="index" /> is less than zero. </exception>
|
||||
/// <exception cref="T:System.ArgumentException">
|
||||
/// <paramref name="array" /> is multidimensional.-or- The number of elements in the source <see cref="T:System.Collections.Specialized.HybridDictionary" /> is greater than the available space from <paramref name="index" /> to the end of the destination <paramref name="array" />. </exception>
|
||||
/// <exception cref="T:System.InvalidCastException">The type of the source <see cref="T:System.Collections.Specialized.HybridDictionary" /> cannot be cast automatically to the type of the destination <paramref name="array" />. </exception>
|
||||
// Token: 0x060001A5 RID: 421 RVA: 0x00006E80 File Offset: 0x00005080
|
||||
public void CopyTo(Array array, int index)
|
||||
{
|
||||
this.inner.CopyTo(array, index);
|
||||
}
|
||||
|
||||
/// <summary>Returns an <see cref="T:System.Collections.IDictionaryEnumerator" /> that iterates through the <see cref="T:System.Collections.Specialized.HybridDictionary" />.</summary>
|
||||
/// <returns>An <see cref="T:System.Collections.IDictionaryEnumerator" /> for the <see cref="T:System.Collections.Specialized.HybridDictionary" />.</returns>
|
||||
// Token: 0x060001A6 RID: 422 RVA: 0x00006E90 File Offset: 0x00005090
|
||||
public IDictionaryEnumerator GetEnumerator()
|
||||
{
|
||||
return this.inner.GetEnumerator();
|
||||
}
|
||||
|
||||
/// <summary>Removes the entry with the specified key from the <see cref="T:System.Collections.Specialized.HybridDictionary" />.</summary>
|
||||
/// <param name="key">The key of the entry to remove. </param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="key" /> is null. </exception>
|
||||
// Token: 0x060001A7 RID: 423 RVA: 0x00006EA0 File Offset: 0x000050A0
|
||||
public void Remove(object key)
|
||||
{
|
||||
this.inner.Remove(key);
|
||||
}
|
||||
|
||||
// Token: 0x060001A8 RID: 424 RVA: 0x00006EB0 File Offset: 0x000050B0
|
||||
private void Switch()
|
||||
{
|
||||
IComparer comparer = ((!this.caseInsensitive) ? null : CaseInsensitiveComparer.DefaultInvariant);
|
||||
IHashCodeProvider hashCodeProvider = ((!this.caseInsensitive) ? null : CaseInsensitiveHashCodeProvider.DefaultInvariant);
|
||||
this.hashtable = new Hashtable(this.list, hashCodeProvider, comparer);
|
||||
this.list.Clear();
|
||||
this.list = null;
|
||||
}
|
||||
|
||||
// Token: 0x04000082 RID: 130
|
||||
private const int switchAfter = 10;
|
||||
|
||||
// Token: 0x04000083 RID: 131
|
||||
private bool caseInsensitive;
|
||||
|
||||
// Token: 0x04000084 RID: 132
|
||||
private Hashtable hashtable;
|
||||
|
||||
// Token: 0x04000085 RID: 133
|
||||
private ListDictionary list;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
using System;
|
||||
|
||||
namespace System.Collections.Specialized
|
||||
{
|
||||
/// <summary>Represents an indexed collection of key/value pairs.</summary>
|
||||
// Token: 0x02000029 RID: 41
|
||||
public interface IOrderedDictionary : ICollection, IDictionary, IEnumerable
|
||||
{
|
||||
/// <summary>Returns an enumerator that iterates through the <see cref="T:System.Collections.Specialized.IOrderedDictionary" /> collection.</summary>
|
||||
/// <returns>An <see cref="T:System.Collections.IDictionaryEnumerator" /> for the entire <see cref="T:System.Collections.Specialized.IOrderedDictionary" /> collection.</returns>
|
||||
// Token: 0x060001A9 RID: 425
|
||||
IDictionaryEnumerator GetEnumerator();
|
||||
|
||||
/// <summary>Inserts a key/value pair into the collection at the specified index.</summary>
|
||||
/// <param name="index">The zero-based index at which the key/value pair should be inserted.</param>
|
||||
/// <param name="key">The object to use as the key of the element to add.</param>
|
||||
/// <param name="value">The object to use as the value of the element to add. The value can be null.</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.ICollection.Count" />.</exception>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="key" /> is null.</exception>
|
||||
/// <exception cref="T:System.ArgumentException">An element with the same key already exists in the <see cref="T:System.Collections.Specialized.IOrderedDictionary" /> collection.</exception>
|
||||
/// <exception cref="T:System.NotSupportedException">The <see cref="T:System.Collections.Specialized.IOrderedDictionary" /> collection is read-only.-or-The <see cref="T:System.Collections.Specialized.IOrderedDictionary" /> collection has a fixed size.</exception>
|
||||
// Token: 0x060001AA RID: 426
|
||||
void Insert(int idx, object key, object value);
|
||||
|
||||
/// <summary>Removes the element at the specified index.</summary>
|
||||
/// <param name="index">The zero-based index of the element to remove.</param>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="index" /> is less than 0.-or- <paramref name="index" /> is equal to or greater than <see cref="P:System.Collections.ICollection.Count" />. </exception>
|
||||
/// <exception cref="T:System.NotSupportedException">The <see cref="T:System.Collections.Specialized.IOrderedDictionary" /> collection is read-only.-or- The <see cref="T:System.Collections.Specialized.IOrderedDictionary" /> collection has a fixed size. </exception>
|
||||
// Token: 0x060001AB RID: 427
|
||||
void RemoveAt(int idx);
|
||||
|
||||
/// <summary>Gets or sets the element at the specified index.</summary>
|
||||
/// <returns>The element at the specified index.</returns>
|
||||
/// <param name="index">The zero-based index of the element to get or set.</param>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="index" /> is less than 0.-or- <paramref name="index" /> is equal to or greater than <see cref="P:System.Collections.ICollection.Count" />. </exception>
|
||||
// Token: 0x17000071 RID: 113
|
||||
object this[int idx] { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,602 @@
|
||||
using System;
|
||||
|
||||
namespace System.Collections.Specialized
|
||||
{
|
||||
/// <summary>Implements IDictionary using a singly linked list. Recommended for collections that typically contain 10 items or less.</summary>
|
||||
// Token: 0x0200002A RID: 42
|
||||
[Serializable]
|
||||
public class ListDictionary : ICollection, IDictionary, IEnumerable
|
||||
{
|
||||
/// <summary>Creates an empty <see cref="T:System.Collections.Specialized.ListDictionary" /> using the default comparer.</summary>
|
||||
// Token: 0x060001AE RID: 430 RVA: 0x00006F10 File Offset: 0x00005110
|
||||
public ListDictionary()
|
||||
{
|
||||
this.count = 0;
|
||||
this.version = 0;
|
||||
this.comparer = null;
|
||||
this.head = null;
|
||||
}
|
||||
|
||||
/// <summary>Creates an empty <see cref="T:System.Collections.Specialized.ListDictionary" /> using the specified comparer.</summary>
|
||||
/// <param name="comparer">The <see cref="T:System.Collections.IComparer" /> to use to determine whether two keys are equal.-or- null to use the default comparer, which is each key's implementation of <see cref="M:System.Object.Equals(System.Object)" />. </param>
|
||||
// Token: 0x060001AF RID: 431 RVA: 0x00006F40 File Offset: 0x00005140
|
||||
public ListDictionary(IComparer comparer)
|
||||
: this()
|
||||
{
|
||||
this.comparer = comparer;
|
||||
}
|
||||
|
||||
/// <summary>Returns an <see cref="T:System.Collections.IEnumerator" /> that iterates through the <see cref="T:System.Collections.Specialized.ListDictionary" />.</summary>
|
||||
/// <returns>An <see cref="T:System.Collections.IEnumerator" /> for the <see cref="T:System.Collections.Specialized.ListDictionary" />.</returns>
|
||||
// Token: 0x060001B0 RID: 432 RVA: 0x00006F50 File Offset: 0x00005150
|
||||
IEnumerator IEnumerable.GetEnumerator()
|
||||
{
|
||||
return new ListDictionary.DictionaryNodeEnumerator(this);
|
||||
}
|
||||
|
||||
// Token: 0x060001B1 RID: 433 RVA: 0x00006F58 File Offset: 0x00005158
|
||||
private ListDictionary.DictionaryNode FindEntry(object key)
|
||||
{
|
||||
if (key == null)
|
||||
{
|
||||
throw new ArgumentNullException("key", "Attempted lookup for a null key.");
|
||||
}
|
||||
ListDictionary.DictionaryNode dictionaryNode = this.head;
|
||||
if (this.comparer == null)
|
||||
{
|
||||
while (dictionaryNode != null)
|
||||
{
|
||||
if (key.Equals(dictionaryNode.key))
|
||||
{
|
||||
break;
|
||||
}
|
||||
dictionaryNode = dictionaryNode.next;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
while (dictionaryNode != null)
|
||||
{
|
||||
if (this.comparer.Compare(key, dictionaryNode.key) == 0)
|
||||
{
|
||||
break;
|
||||
}
|
||||
dictionaryNode = dictionaryNode.next;
|
||||
}
|
||||
}
|
||||
return dictionaryNode;
|
||||
}
|
||||
|
||||
// Token: 0x060001B2 RID: 434 RVA: 0x00006FEC File Offset: 0x000051EC
|
||||
private ListDictionary.DictionaryNode FindEntry(object key, out ListDictionary.DictionaryNode prev)
|
||||
{
|
||||
if (key == null)
|
||||
{
|
||||
throw new ArgumentNullException("key", "Attempted lookup for a null key.");
|
||||
}
|
||||
ListDictionary.DictionaryNode dictionaryNode = this.head;
|
||||
prev = null;
|
||||
if (this.comparer == null)
|
||||
{
|
||||
while (dictionaryNode != null)
|
||||
{
|
||||
if (key.Equals(dictionaryNode.key))
|
||||
{
|
||||
break;
|
||||
}
|
||||
prev = dictionaryNode;
|
||||
dictionaryNode = dictionaryNode.next;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
while (dictionaryNode != null)
|
||||
{
|
||||
if (this.comparer.Compare(key, dictionaryNode.key) == 0)
|
||||
{
|
||||
break;
|
||||
}
|
||||
prev = dictionaryNode;
|
||||
dictionaryNode = dictionaryNode.next;
|
||||
}
|
||||
}
|
||||
return dictionaryNode;
|
||||
}
|
||||
|
||||
// Token: 0x060001B3 RID: 435 RVA: 0x00007088 File Offset: 0x00005288
|
||||
private void AddImpl(object key, object value, ListDictionary.DictionaryNode prev)
|
||||
{
|
||||
if (prev == null)
|
||||
{
|
||||
this.head = new ListDictionary.DictionaryNode(key, value, this.head);
|
||||
}
|
||||
else
|
||||
{
|
||||
prev.next = new ListDictionary.DictionaryNode(key, value, prev.next);
|
||||
}
|
||||
this.count++;
|
||||
this.version++;
|
||||
}
|
||||
|
||||
/// <summary>Gets the number of key/value pairs contained in the <see cref="T:System.Collections.Specialized.ListDictionary" />.</summary>
|
||||
/// <returns>The number of key/value pairs contained in the <see cref="T:System.Collections.Specialized.ListDictionary" />.</returns>
|
||||
// Token: 0x17000072 RID: 114
|
||||
// (get) Token: 0x060001B4 RID: 436 RVA: 0x000070E4 File Offset: 0x000052E4
|
||||
public int Count
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.count;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a value indicating whether the <see cref="T:System.Collections.Specialized.ListDictionary" /> is synchronized (thread safe).</summary>
|
||||
/// <returns>This property always returns false.</returns>
|
||||
// Token: 0x17000073 RID: 115
|
||||
// (get) Token: 0x060001B5 RID: 437 RVA: 0x000070EC File Offset: 0x000052EC
|
||||
public bool IsSynchronized
|
||||
{
|
||||
get
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets an object that can be used to synchronize access to the <see cref="T:System.Collections.Specialized.ListDictionary" />.</summary>
|
||||
/// <returns>An object that can be used to synchronize access to the <see cref="T:System.Collections.Specialized.ListDictionary" />.</returns>
|
||||
// Token: 0x17000074 RID: 116
|
||||
// (get) Token: 0x060001B6 RID: 438 RVA: 0x000070F0 File Offset: 0x000052F0
|
||||
public object SyncRoot
|
||||
{
|
||||
get
|
||||
{
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Copies the <see cref="T:System.Collections.Specialized.ListDictionary" /> entries to a one-dimensional <see cref="T:System.Array" /> instance at the specified index.</summary>
|
||||
/// <param name="array">The one-dimensional <see cref="T:System.Array" /> that is the destination of the <see cref="T:System.Collections.DictionaryEntry" /> objects copied from <see cref="T:System.Collections.Specialized.ListDictionary" />. The <see cref="T:System.Array" /> must have zero-based indexing. </param>
|
||||
/// <param name="index">The zero-based index in <paramref name="array" /> at which copying begins. </param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="array" /> is null. </exception>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="index" /> is less than zero. </exception>
|
||||
/// <exception cref="T:System.ArgumentException">
|
||||
/// <paramref name="array" /> is multidimensional.-or- The number of elements in the source <see cref="T:System.Collections.Specialized.ListDictionary" /> is greater than the available space from <paramref name="index" /> to the end of the destination <paramref name="array" />. </exception>
|
||||
/// <exception cref="T:System.InvalidCastException">The type of the source <see cref="T:System.Collections.Specialized.ListDictionary" /> cannot be cast automatically to the type of the destination <paramref name="array" />. </exception>
|
||||
// Token: 0x060001B7 RID: 439 RVA: 0x000070F4 File Offset: 0x000052F4
|
||||
public void CopyTo(Array array, int index)
|
||||
{
|
||||
if (array == null)
|
||||
{
|
||||
throw new ArgumentNullException("array", "Array cannot be null.");
|
||||
}
|
||||
if (index < 0)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException("index", "index is less than 0");
|
||||
}
|
||||
if (index > array.Length)
|
||||
{
|
||||
throw new IndexOutOfRangeException("index is too large");
|
||||
}
|
||||
if (this.Count > array.Length - index)
|
||||
{
|
||||
throw new ArgumentException("Not enough room in the array");
|
||||
}
|
||||
foreach (object obj in this)
|
||||
{
|
||||
DictionaryEntry dictionaryEntry = (DictionaryEntry)obj;
|
||||
array.SetValue(dictionaryEntry, index++);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a value indicating whether the <see cref="T:System.Collections.Specialized.ListDictionary" /> has a fixed size.</summary>
|
||||
/// <returns>This property always returns false.</returns>
|
||||
// Token: 0x17000075 RID: 117
|
||||
// (get) Token: 0x060001B8 RID: 440 RVA: 0x000071CC File Offset: 0x000053CC
|
||||
public bool IsFixedSize
|
||||
{
|
||||
get
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a value indicating whether the <see cref="T:System.Collections.Specialized.ListDictionary" /> is read-only.</summary>
|
||||
/// <returns>This property always returns false.</returns>
|
||||
// Token: 0x17000076 RID: 118
|
||||
// (get) Token: 0x060001B9 RID: 441 RVA: 0x000071D0 File Offset: 0x000053D0
|
||||
public bool IsReadOnly
|
||||
{
|
||||
get
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets or sets the value associated with the specified key.</summary>
|
||||
/// <returns>The value associated with the specified key. If the specified key is not found, attempting to get it returns null, and attempting to set it creates a new entry using the specified key.</returns>
|
||||
/// <param name="key">The key whose value to get or set. </param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="key" /> is null. </exception>
|
||||
// Token: 0x17000077 RID: 119
|
||||
public object this[object key]
|
||||
{
|
||||
get
|
||||
{
|
||||
ListDictionary.DictionaryNode dictionaryNode = this.FindEntry(key);
|
||||
return (dictionaryNode != null) ? dictionaryNode.value : null;
|
||||
}
|
||||
set
|
||||
{
|
||||
ListDictionary.DictionaryNode dictionaryNode2;
|
||||
ListDictionary.DictionaryNode dictionaryNode = this.FindEntry(key, out dictionaryNode2);
|
||||
if (dictionaryNode != null)
|
||||
{
|
||||
dictionaryNode.value = value;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.AddImpl(key, value, dictionaryNode2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets an <see cref="T:System.Collections.ICollection" /> containing the keys in the <see cref="T:System.Collections.Specialized.ListDictionary" />.</summary>
|
||||
/// <returns>An <see cref="T:System.Collections.ICollection" /> containing the keys in the <see cref="T:System.Collections.Specialized.ListDictionary" />.</returns>
|
||||
// Token: 0x17000078 RID: 120
|
||||
// (get) Token: 0x060001BC RID: 444 RVA: 0x00007230 File Offset: 0x00005430
|
||||
public ICollection Keys
|
||||
{
|
||||
get
|
||||
{
|
||||
return new ListDictionary.DictionaryNodeCollection(this, true);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets an <see cref="T:System.Collections.ICollection" /> containing the values in the <see cref="T:System.Collections.Specialized.ListDictionary" />.</summary>
|
||||
/// <returns>An <see cref="T:System.Collections.ICollection" /> containing the values in the <see cref="T:System.Collections.Specialized.ListDictionary" />.</returns>
|
||||
// Token: 0x17000079 RID: 121
|
||||
// (get) Token: 0x060001BD RID: 445 RVA: 0x0000723C File Offset: 0x0000543C
|
||||
public ICollection Values
|
||||
{
|
||||
get
|
||||
{
|
||||
return new ListDictionary.DictionaryNodeCollection(this, false);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Adds an entry with the specified key and value into the <see cref="T:System.Collections.Specialized.ListDictionary" />.</summary>
|
||||
/// <param name="key">The key of the entry to add. </param>
|
||||
/// <param name="value">The value of the entry to add. The value can be null. </param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="key" /> is null. </exception>
|
||||
/// <exception cref="T:System.ArgumentException">An entry with the same key already exists in the <see cref="T:System.Collections.Specialized.ListDictionary" />. </exception>
|
||||
// Token: 0x060001BE RID: 446 RVA: 0x00007248 File Offset: 0x00005448
|
||||
public void Add(object key, object value)
|
||||
{
|
||||
ListDictionary.DictionaryNode dictionaryNode2;
|
||||
ListDictionary.DictionaryNode dictionaryNode = this.FindEntry(key, out dictionaryNode2);
|
||||
if (dictionaryNode != null)
|
||||
{
|
||||
throw new ArgumentException("key", "Duplicate key in add.");
|
||||
}
|
||||
this.AddImpl(key, value, dictionaryNode2);
|
||||
}
|
||||
|
||||
/// <summary>Removes all entries from the <see cref="T:System.Collections.Specialized.ListDictionary" />.</summary>
|
||||
// Token: 0x060001BF RID: 447 RVA: 0x00007280 File Offset: 0x00005480
|
||||
public void Clear()
|
||||
{
|
||||
this.head = null;
|
||||
this.count = 0;
|
||||
this.version++;
|
||||
}
|
||||
|
||||
/// <summary>Determines whether the <see cref="T:System.Collections.Specialized.ListDictionary" /> contains a specific key.</summary>
|
||||
/// <returns>true if the <see cref="T:System.Collections.Specialized.ListDictionary" /> contains an entry with the specified key; otherwise, false.</returns>
|
||||
/// <param name="key">The key to locate in the <see cref="T:System.Collections.Specialized.ListDictionary" />. </param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="key" /> is null. </exception>
|
||||
// Token: 0x060001C0 RID: 448 RVA: 0x000072A0 File Offset: 0x000054A0
|
||||
public bool Contains(object key)
|
||||
{
|
||||
return this.FindEntry(key) != null;
|
||||
}
|
||||
|
||||
/// <summary>Returns an <see cref="T:System.Collections.IDictionaryEnumerator" /> that iterates through the <see cref="T:System.Collections.Specialized.ListDictionary" />.</summary>
|
||||
/// <returns>An <see cref="T:System.Collections.IDictionaryEnumerator" /> for the <see cref="T:System.Collections.Specialized.ListDictionary" />.</returns>
|
||||
// Token: 0x060001C1 RID: 449 RVA: 0x000072B0 File Offset: 0x000054B0
|
||||
public IDictionaryEnumerator GetEnumerator()
|
||||
{
|
||||
return new ListDictionary.DictionaryNodeEnumerator(this);
|
||||
}
|
||||
|
||||
/// <summary>Removes the entry with the specified key from the <see cref="T:System.Collections.Specialized.ListDictionary" />.</summary>
|
||||
/// <param name="key">The key of the entry to remove. </param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="key" /> is null. </exception>
|
||||
// Token: 0x060001C2 RID: 450 RVA: 0x000072B8 File Offset: 0x000054B8
|
||||
public void Remove(object key)
|
||||
{
|
||||
ListDictionary.DictionaryNode dictionaryNode2;
|
||||
ListDictionary.DictionaryNode dictionaryNode = this.FindEntry(key, out dictionaryNode2);
|
||||
if (dictionaryNode == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (dictionaryNode2 == null)
|
||||
{
|
||||
this.head = dictionaryNode.next;
|
||||
}
|
||||
else
|
||||
{
|
||||
dictionaryNode2.next = dictionaryNode.next;
|
||||
}
|
||||
dictionaryNode.value = null;
|
||||
this.count--;
|
||||
this.version++;
|
||||
}
|
||||
|
||||
// Token: 0x04000086 RID: 134
|
||||
private int count;
|
||||
|
||||
// Token: 0x04000087 RID: 135
|
||||
private int version;
|
||||
|
||||
// Token: 0x04000088 RID: 136
|
||||
private ListDictionary.DictionaryNode head;
|
||||
|
||||
// Token: 0x04000089 RID: 137
|
||||
private IComparer comparer;
|
||||
|
||||
// Token: 0x0200002B RID: 43
|
||||
[Serializable]
|
||||
private class DictionaryNode
|
||||
{
|
||||
// Token: 0x060001C3 RID: 451 RVA: 0x0000731C File Offset: 0x0000551C
|
||||
public DictionaryNode(object key, object value, ListDictionary.DictionaryNode next)
|
||||
{
|
||||
this.key = key;
|
||||
this.value = value;
|
||||
this.next = next;
|
||||
}
|
||||
|
||||
// Token: 0x0400008A RID: 138
|
||||
public object key;
|
||||
|
||||
// Token: 0x0400008B RID: 139
|
||||
public object value;
|
||||
|
||||
// Token: 0x0400008C RID: 140
|
||||
public ListDictionary.DictionaryNode next;
|
||||
}
|
||||
|
||||
// Token: 0x0200002C RID: 44
|
||||
private class DictionaryNodeEnumerator : IEnumerator, IDictionaryEnumerator
|
||||
{
|
||||
// Token: 0x060001C4 RID: 452 RVA: 0x0000733C File Offset: 0x0000553C
|
||||
public DictionaryNodeEnumerator(ListDictionary dict)
|
||||
{
|
||||
this.dict = dict;
|
||||
this.version = dict.version;
|
||||
this.Reset();
|
||||
}
|
||||
|
||||
// Token: 0x060001C5 RID: 453 RVA: 0x00007360 File Offset: 0x00005560
|
||||
private void FailFast()
|
||||
{
|
||||
if (this.version != this.dict.version)
|
||||
{
|
||||
throw new InvalidOperationException("The ListDictionary's contents changed after this enumerator was instantiated.");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060001C6 RID: 454 RVA: 0x00007384 File Offset: 0x00005584
|
||||
public bool MoveNext()
|
||||
{
|
||||
this.FailFast();
|
||||
if (this.current == null && !this.isAtStart)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
this.current = ((!this.isAtStart) ? this.current.next : this.dict.head);
|
||||
this.isAtStart = false;
|
||||
return this.current != null;
|
||||
}
|
||||
|
||||
// Token: 0x060001C7 RID: 455 RVA: 0x000073F0 File Offset: 0x000055F0
|
||||
public void Reset()
|
||||
{
|
||||
this.FailFast();
|
||||
this.isAtStart = true;
|
||||
this.current = null;
|
||||
}
|
||||
|
||||
// Token: 0x1700007A RID: 122
|
||||
// (get) Token: 0x060001C8 RID: 456 RVA: 0x00007408 File Offset: 0x00005608
|
||||
public object Current
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Entry;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700007B RID: 123
|
||||
// (get) Token: 0x060001C9 RID: 457 RVA: 0x00007418 File Offset: 0x00005618
|
||||
private ListDictionary.DictionaryNode DictionaryNode
|
||||
{
|
||||
get
|
||||
{
|
||||
this.FailFast();
|
||||
if (this.current == null)
|
||||
{
|
||||
throw new InvalidOperationException("Enumerator is positioned before the collection's first element or after the last element.");
|
||||
}
|
||||
return this.current;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700007C RID: 124
|
||||
// (get) Token: 0x060001CA RID: 458 RVA: 0x00007448 File Offset: 0x00005648
|
||||
public DictionaryEntry Entry
|
||||
{
|
||||
get
|
||||
{
|
||||
object key = this.DictionaryNode.key;
|
||||
return new DictionaryEntry(key, this.current.value);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700007D RID: 125
|
||||
// (get) Token: 0x060001CB RID: 459 RVA: 0x00007474 File Offset: 0x00005674
|
||||
public object Key
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.DictionaryNode.key;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700007E RID: 126
|
||||
// (get) Token: 0x060001CC RID: 460 RVA: 0x00007484 File Offset: 0x00005684
|
||||
public object Value
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.DictionaryNode.value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0400008D RID: 141
|
||||
private ListDictionary dict;
|
||||
|
||||
// Token: 0x0400008E RID: 142
|
||||
private bool isAtStart;
|
||||
|
||||
// Token: 0x0400008F RID: 143
|
||||
private ListDictionary.DictionaryNode current;
|
||||
|
||||
// Token: 0x04000090 RID: 144
|
||||
private int version;
|
||||
}
|
||||
|
||||
// Token: 0x0200002D RID: 45
|
||||
private class DictionaryNodeCollection : ICollection, IEnumerable
|
||||
{
|
||||
// Token: 0x060001CD RID: 461 RVA: 0x00007494 File Offset: 0x00005694
|
||||
public DictionaryNodeCollection(ListDictionary dict, bool isKeyList)
|
||||
{
|
||||
this.dict = dict;
|
||||
this.isKeyList = isKeyList;
|
||||
}
|
||||
|
||||
// Token: 0x1700007F RID: 127
|
||||
// (get) Token: 0x060001CE RID: 462 RVA: 0x000074AC File Offset: 0x000056AC
|
||||
public int Count
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.dict.Count;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000080 RID: 128
|
||||
// (get) Token: 0x060001CF RID: 463 RVA: 0x000074BC File Offset: 0x000056BC
|
||||
public bool IsSynchronized
|
||||
{
|
||||
get
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000081 RID: 129
|
||||
// (get) Token: 0x060001D0 RID: 464 RVA: 0x000074C0 File Offset: 0x000056C0
|
||||
public object SyncRoot
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.dict.SyncRoot;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060001D1 RID: 465 RVA: 0x000074D0 File Offset: 0x000056D0
|
||||
public void CopyTo(Array array, int index)
|
||||
{
|
||||
if (array == null)
|
||||
{
|
||||
throw new ArgumentNullException("array", "Array cannot be null.");
|
||||
}
|
||||
if (index < 0)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException("index", "index is less than 0");
|
||||
}
|
||||
if (index > array.Length)
|
||||
{
|
||||
throw new IndexOutOfRangeException("index is too large");
|
||||
}
|
||||
if (this.Count > array.Length - index)
|
||||
{
|
||||
throw new ArgumentException("Not enough room in the array");
|
||||
}
|
||||
foreach (object obj in this)
|
||||
{
|
||||
array.SetValue(obj, index++);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060001D2 RID: 466 RVA: 0x000075A0 File Offset: 0x000057A0
|
||||
public IEnumerator GetEnumerator()
|
||||
{
|
||||
return new ListDictionary.DictionaryNodeCollection.DictionaryNodeCollectionEnumerator(this.dict.GetEnumerator(), this.isKeyList);
|
||||
}
|
||||
|
||||
// Token: 0x04000091 RID: 145
|
||||
private ListDictionary dict;
|
||||
|
||||
// Token: 0x04000092 RID: 146
|
||||
private bool isKeyList;
|
||||
|
||||
// Token: 0x0200002E RID: 46
|
||||
private class DictionaryNodeCollectionEnumerator : IEnumerator
|
||||
{
|
||||
// Token: 0x060001D3 RID: 467 RVA: 0x000075B8 File Offset: 0x000057B8
|
||||
public DictionaryNodeCollectionEnumerator(IDictionaryEnumerator inner, bool isKeyList)
|
||||
{
|
||||
this.inner = inner;
|
||||
this.isKeyList = isKeyList;
|
||||
}
|
||||
|
||||
// Token: 0x17000082 RID: 130
|
||||
// (get) Token: 0x060001D4 RID: 468 RVA: 0x000075D0 File Offset: 0x000057D0
|
||||
public object Current
|
||||
{
|
||||
get
|
||||
{
|
||||
return (!this.isKeyList) ? this.inner.Value : this.inner.Key;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060001D5 RID: 469 RVA: 0x00007604 File Offset: 0x00005804
|
||||
public bool MoveNext()
|
||||
{
|
||||
return this.inner.MoveNext();
|
||||
}
|
||||
|
||||
// Token: 0x060001D6 RID: 470 RVA: 0x00007614 File Offset: 0x00005814
|
||||
public void Reset()
|
||||
{
|
||||
this.inner.Reset();
|
||||
}
|
||||
|
||||
// Token: 0x04000093 RID: 147
|
||||
private IDictionaryEnumerator inner;
|
||||
|
||||
// Token: 0x04000094 RID: 148
|
||||
private bool isKeyList;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,822 @@
|
||||
using System;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
namespace System.Collections.Specialized
|
||||
{
|
||||
/// <summary>Provides the abstract base class for a collection of associated <see cref="T:System.String" /> keys and <see cref="T:System.Object" /> values that can be accessed either with the key or with the index.</summary>
|
||||
// Token: 0x0200002F RID: 47
|
||||
[Serializable]
|
||||
public abstract class NameObjectCollectionBase : ICollection, IDeserializationCallback, IEnumerable, ISerializable
|
||||
{
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.Specialized.NameObjectCollectionBase" /> class that is empty.</summary>
|
||||
// Token: 0x060001D7 RID: 471 RVA: 0x00007624 File Offset: 0x00005824
|
||||
protected NameObjectCollectionBase()
|
||||
{
|
||||
this.m_readonly = false;
|
||||
this.m_hashprovider = CaseInsensitiveHashCodeProvider.DefaultInvariant;
|
||||
this.m_comparer = CaseInsensitiveComparer.DefaultInvariant;
|
||||
this.m_defCapacity = 0;
|
||||
this.Init();
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.Specialized.NameObjectCollectionBase" /> class that is empty, has the specified initial capacity, and uses the default hash code provider and the default comparer.</summary>
|
||||
/// <param name="capacity">The approximate number of entries that the <see cref="T:System.Collections.Specialized.NameObjectCollectionBase" /> instance can initially contain.</param>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="capacity" /> is less than zero. </exception>
|
||||
// Token: 0x060001D8 RID: 472 RVA: 0x00007664 File Offset: 0x00005864
|
||||
protected NameObjectCollectionBase(int capacity)
|
||||
{
|
||||
this.m_readonly = false;
|
||||
this.m_hashprovider = CaseInsensitiveHashCodeProvider.DefaultInvariant;
|
||||
this.m_comparer = CaseInsensitiveComparer.DefaultInvariant;
|
||||
this.m_defCapacity = capacity;
|
||||
this.Init();
|
||||
}
|
||||
|
||||
// Token: 0x060001D9 RID: 473 RVA: 0x000076A4 File Offset: 0x000058A4
|
||||
internal NameObjectCollectionBase(IEqualityComparer equalityComparer, IComparer comparer, IHashCodeProvider hcp)
|
||||
{
|
||||
this.equality_comparer = equalityComparer;
|
||||
this.m_comparer = comparer;
|
||||
this.m_hashprovider = hcp;
|
||||
this.m_readonly = false;
|
||||
this.m_defCapacity = 0;
|
||||
this.Init();
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.Specialized.NameObjectCollectionBase" /> class that is empty, has the default initial capacity, and uses the specified <see cref="T:System.Collections.IEqualityComparer" /> object.</summary>
|
||||
/// <param name="equalityComparer">The <see cref="T:System.Collections.IEqualityComparer" /> object to use to determine whether two keys are equal and to generate hash codes for the keys in the collection.</param>
|
||||
// Token: 0x060001DA RID: 474 RVA: 0x000076D8 File Offset: 0x000058D8
|
||||
protected NameObjectCollectionBase(IEqualityComparer equalityComparer)
|
||||
{
|
||||
IEqualityComparer equalityComparer2;
|
||||
if (equalityComparer == null)
|
||||
{
|
||||
IEqualityComparer invariantCultureIgnoreCase = StringComparer.InvariantCultureIgnoreCase;
|
||||
equalityComparer2 = invariantCultureIgnoreCase;
|
||||
}
|
||||
else
|
||||
{
|
||||
equalityComparer2 = equalityComparer;
|
||||
}
|
||||
this..ctor(equalityComparer2, null, null);
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.Specialized.NameObjectCollectionBase" /> class that is empty, has the default initial capacity, and uses the specified hash code provider and the specified comparer.</summary>
|
||||
/// <param name="hashProvider">The <see cref="T:System.Collections.IHashCodeProvider" /> that will supply the hash codes for all keys in the <see cref="T:System.Collections.Specialized.NameObjectCollectionBase" /> instance.</param>
|
||||
/// <param name="comparer">The <see cref="T:System.Collections.IComparer" /> to use to determine whether two keys are equal.</param>
|
||||
// Token: 0x060001DB RID: 475 RVA: 0x00007700 File Offset: 0x00005900
|
||||
[Obsolete("Use NameObjectCollectionBase(IEqualityComparer)")]
|
||||
protected NameObjectCollectionBase(IHashCodeProvider hashProvider, IComparer comparer)
|
||||
{
|
||||
this.m_comparer = comparer;
|
||||
this.m_hashprovider = hashProvider;
|
||||
this.m_readonly = false;
|
||||
this.m_defCapacity = 0;
|
||||
this.Init();
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.Specialized.NameObjectCollectionBase" /> class that is serializable and uses the specified <see cref="T:System.Runtime.Serialization.SerializationInfo" /> and <see cref="T:System.Runtime.Serialization.StreamingContext" />.</summary>
|
||||
/// <param name="info">A <see cref="T:System.Runtime.Serialization.SerializationInfo" /> object that contains the information required to serialize the new <see cref="T:System.Collections.Specialized.NameObjectCollectionBase" /> instance.</param>
|
||||
/// <param name="context">A <see cref="T:System.Runtime.Serialization.StreamingContext" /> object that contains the source and destination of the serialized stream associated with the new <see cref="T:System.Collections.Specialized.NameObjectCollectionBase" /> instance.</param>
|
||||
// Token: 0x060001DC RID: 476 RVA: 0x00007738 File Offset: 0x00005938
|
||||
protected NameObjectCollectionBase(SerializationInfo info, StreamingContext context)
|
||||
{
|
||||
this.infoCopy = info;
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.Specialized.NameObjectCollectionBase" /> class that is empty, has the specified initial capacity, and uses the specified <see cref="T:System.Collections.IEqualityComparer" /> object.</summary>
|
||||
/// <param name="capacity">The approximate number of entries that the <see cref="T:System.Collections.Specialized.NameObjectCollectionBase" /> object can initially contain.</param>
|
||||
/// <param name="equalityComparer">The <see cref="T:System.Collections.IEqualityComparer" /> object to use to determine whether two keys are equal and to generate hash codes for the keys in the collection.</param>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="capacity" /> is less than zero.</exception>
|
||||
// Token: 0x060001DD RID: 477 RVA: 0x00007748 File Offset: 0x00005948
|
||||
protected NameObjectCollectionBase(int capacity, IEqualityComparer equalityComparer)
|
||||
{
|
||||
this.m_readonly = false;
|
||||
IEqualityComparer equalityComparer2;
|
||||
if (equalityComparer == null)
|
||||
{
|
||||
IEqualityComparer invariantCultureIgnoreCase = StringComparer.InvariantCultureIgnoreCase;
|
||||
equalityComparer2 = invariantCultureIgnoreCase;
|
||||
}
|
||||
else
|
||||
{
|
||||
equalityComparer2 = equalityComparer;
|
||||
}
|
||||
this.equality_comparer = equalityComparer2;
|
||||
this.m_defCapacity = capacity;
|
||||
this.Init();
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.Specialized.NameObjectCollectionBase" /> class that is empty, has the specified initial capacity and uses the specified hash code provider and the specified comparer.</summary>
|
||||
/// <param name="capacity">The approximate number of entries that the <see cref="T:System.Collections.Specialized.NameObjectCollectionBase" /> instance can initially contain.</param>
|
||||
/// <param name="hashProvider">The <see cref="T:System.Collections.IHashCodeProvider" /> that will supply the hash codes for all keys in the <see cref="T:System.Collections.Specialized.NameObjectCollectionBase" /> instance.</param>
|
||||
/// <param name="comparer">The <see cref="T:System.Collections.IComparer" /> to use to determine whether two keys are equal.</param>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="capacity" /> is less than zero.</exception>
|
||||
// Token: 0x060001DE RID: 478 RVA: 0x00007788 File Offset: 0x00005988
|
||||
[Obsolete("Use NameObjectCollectionBase(int,IEqualityComparer)")]
|
||||
protected NameObjectCollectionBase(int capacity, IHashCodeProvider hashProvider, IComparer comparer)
|
||||
{
|
||||
this.m_readonly = false;
|
||||
this.m_hashprovider = hashProvider;
|
||||
this.m_comparer = comparer;
|
||||
this.m_defCapacity = capacity;
|
||||
this.Init();
|
||||
}
|
||||
|
||||
/// <summary>Gets a value indicating whether access to the <see cref="T:System.Collections.Specialized.NameObjectCollectionBase" /> object is synchronized (thread safe).</summary>
|
||||
/// <returns>true if access to the <see cref="T:System.Collections.Specialized.NameObjectCollectionBase" /> object is synchronized (thread safe); otherwise, false. The default is false.</returns>
|
||||
// Token: 0x17000083 RID: 131
|
||||
// (get) Token: 0x060001DF RID: 479 RVA: 0x000077C0 File Offset: 0x000059C0
|
||||
bool ICollection.IsSynchronized
|
||||
{
|
||||
get
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets an object that can be used to synchronize access to the <see cref="T:System.Collections.Specialized.NameObjectCollectionBase" /> object.</summary>
|
||||
/// <returns>An object that can be used to synchronize access to the <see cref="T:System.Collections.Specialized.NameObjectCollectionBase" /> object.</returns>
|
||||
// Token: 0x17000084 RID: 132
|
||||
// (get) Token: 0x060001E0 RID: 480 RVA: 0x000077C4 File Offset: 0x000059C4
|
||||
object ICollection.SyncRoot
|
||||
{
|
||||
get
|
||||
{
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Copies the entire <see cref="T:System.Collections.Specialized.NameObjectCollectionBase" /> to a compatible one-dimensional <see cref="T:System.Array" />, starting at the specified index of the target array.</summary>
|
||||
/// <param name="array">The one-dimensional <see cref="T:System.Array" /> that is the destination of the elements copied from <see cref="T:System.Collections.Specialized.NameObjectCollectionBase" />. The <see cref="T:System.Array" /> must have zero-based indexing.</param>
|
||||
/// <param name="index">The zero-based index in <paramref name="array" /> at which copying begins.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="array" /> is null.</exception>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="index" /> is less than zero.</exception>
|
||||
/// <exception cref="T:System.ArgumentException">
|
||||
/// <paramref name="array" /> is multidimensional.-or-The number of elements in the source <see cref="T:System.Collections.Specialized.NameObjectCollectionBase" /> is greater than the available space from <paramref name="index" /> to the end of the destination <paramref name="array" />.</exception>
|
||||
/// <exception cref="T:System.InvalidCastException">The type of the source <see cref="T:System.Collections.Specialized.NameObjectCollectionBase" /> cannot be cast automatically to the type of the destination <paramref name="array" />.</exception>
|
||||
// Token: 0x060001E1 RID: 481 RVA: 0x000077C8 File Offset: 0x000059C8
|
||||
void ICollection.CopyTo(Array array, int index)
|
||||
{
|
||||
((ICollection)this.Keys).CopyTo(array, index);
|
||||
}
|
||||
|
||||
// Token: 0x17000085 RID: 133
|
||||
// (get) Token: 0x060001E2 RID: 482 RVA: 0x000077D8 File Offset: 0x000059D8
|
||||
internal IEqualityComparer EqualityComparer
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.equality_comparer;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000086 RID: 134
|
||||
// (get) Token: 0x060001E3 RID: 483 RVA: 0x000077E0 File Offset: 0x000059E0
|
||||
internal IComparer Comparer
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.m_comparer;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000087 RID: 135
|
||||
// (get) Token: 0x060001E4 RID: 484 RVA: 0x000077E8 File Offset: 0x000059E8
|
||||
internal IHashCodeProvider HashCodeProvider
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.m_hashprovider;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060001E5 RID: 485 RVA: 0x000077F0 File Offset: 0x000059F0
|
||||
private void Init()
|
||||
{
|
||||
if (this.equality_comparer != null)
|
||||
{
|
||||
this.m_ItemsContainer = new Hashtable(this.m_defCapacity, this.equality_comparer);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.m_ItemsContainer = new Hashtable(this.m_defCapacity, this.m_hashprovider, this.m_comparer);
|
||||
}
|
||||
this.m_ItemsArray = new ArrayList();
|
||||
this.m_NullKeyItem = null;
|
||||
}
|
||||
|
||||
/// <summary>Gets a <see cref="T:System.Collections.Specialized.NameObjectCollectionBase.KeysCollection" /> instance that contains all the keys in the <see cref="T:System.Collections.Specialized.NameObjectCollectionBase" /> instance.</summary>
|
||||
/// <returns>A <see cref="T:System.Collections.Specialized.NameObjectCollectionBase.KeysCollection" /> instance that contains all the keys in the <see cref="T:System.Collections.Specialized.NameObjectCollectionBase" /> instance.</returns>
|
||||
// Token: 0x17000088 RID: 136
|
||||
// (get) Token: 0x060001E6 RID: 486 RVA: 0x00007854 File Offset: 0x00005A54
|
||||
public virtual NameObjectCollectionBase.KeysCollection Keys
|
||||
{
|
||||
get
|
||||
{
|
||||
if (this.keyscoll == null)
|
||||
{
|
||||
this.keyscoll = new NameObjectCollectionBase.KeysCollection(this);
|
||||
}
|
||||
return this.keyscoll;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Returns an enumerator that iterates through the <see cref="T:System.Collections.Specialized.NameObjectCollectionBase" />.</summary>
|
||||
/// <returns>An <see cref="T:System.Collections.IEnumerator" /> for the <see cref="T:System.Collections.Specialized.NameObjectCollectionBase" /> instance.</returns>
|
||||
// Token: 0x060001E7 RID: 487 RVA: 0x00007874 File Offset: 0x00005A74
|
||||
public virtual IEnumerator GetEnumerator()
|
||||
{
|
||||
return new NameObjectCollectionBase._KeysEnumerator(this);
|
||||
}
|
||||
|
||||
/// <summary>Implements the <see cref="T:System.Runtime.Serialization.ISerializable" /> interface and returns the data needed to serialize the <see cref="T:System.Collections.Specialized.NameObjectCollectionBase" /> instance.</summary>
|
||||
/// <param name="info">A <see cref="T:System.Runtime.Serialization.SerializationInfo" /> object that contains the information required to serialize the <see cref="T:System.Collections.Specialized.NameObjectCollectionBase" /> instance.</param>
|
||||
/// <param name="context">A <see cref="T:System.Runtime.Serialization.StreamingContext" /> object that contains the source and destination of the serialized stream associated with the <see cref="T:System.Collections.Specialized.NameObjectCollectionBase" /> instance.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="info" /> is null.</exception>
|
||||
// Token: 0x060001E8 RID: 488 RVA: 0x0000787C File Offset: 0x00005A7C
|
||||
public virtual void GetObjectData(SerializationInfo info, StreamingContext context)
|
||||
{
|
||||
if (info == null)
|
||||
{
|
||||
throw new ArgumentNullException("info");
|
||||
}
|
||||
int count = this.Count;
|
||||
string[] array = new string[count];
|
||||
object[] array2 = new object[count];
|
||||
int num = 0;
|
||||
foreach (object obj in this.m_ItemsArray)
|
||||
{
|
||||
NameObjectCollectionBase._Item item = (NameObjectCollectionBase._Item)obj;
|
||||
array[num] = item.key;
|
||||
array2[num] = item.value;
|
||||
num++;
|
||||
}
|
||||
if (this.equality_comparer != null)
|
||||
{
|
||||
info.AddValue("KeyComparer", this.equality_comparer, typeof(IEqualityComparer));
|
||||
info.AddValue("Version", 4, typeof(int));
|
||||
}
|
||||
else
|
||||
{
|
||||
info.AddValue("HashProvider", this.m_hashprovider, typeof(IHashCodeProvider));
|
||||
info.AddValue("Comparer", this.m_comparer, typeof(IComparer));
|
||||
info.AddValue("Version", 2, typeof(int));
|
||||
}
|
||||
info.AddValue("ReadOnly", this.m_readonly);
|
||||
info.AddValue("Count", count);
|
||||
info.AddValue("Keys", array, typeof(string[]));
|
||||
info.AddValue("Values", array2, typeof(object[]));
|
||||
}
|
||||
|
||||
/// <summary>Gets the number of key/value pairs contained in the <see cref="T:System.Collections.Specialized.NameObjectCollectionBase" /> instance.</summary>
|
||||
/// <returns>The number of key/value pairs contained in the <see cref="T:System.Collections.Specialized.NameObjectCollectionBase" /> instance.</returns>
|
||||
// Token: 0x17000089 RID: 137
|
||||
// (get) Token: 0x060001E9 RID: 489 RVA: 0x00007A0C File Offset: 0x00005C0C
|
||||
public virtual int Count
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.m_ItemsArray.Count;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Implements the <see cref="T:System.Runtime.Serialization.ISerializable" /> interface and raises the deserialization event when the deserialization is complete.</summary>
|
||||
/// <param name="sender">The source of the deserialization event.</param>
|
||||
/// <exception cref="T:System.Runtime.Serialization.SerializationException">The <see cref="T:System.Runtime.Serialization.SerializationInfo" /> object associated with the current <see cref="T:System.Collections.Specialized.NameObjectCollectionBase" /> instance is invalid.</exception>
|
||||
// Token: 0x060001EA RID: 490 RVA: 0x00007A1C File Offset: 0x00005C1C
|
||||
public virtual void OnDeserialization(object sender)
|
||||
{
|
||||
SerializationInfo serializationInfo = this.infoCopy;
|
||||
if (serializationInfo == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
this.infoCopy = null;
|
||||
this.m_hashprovider = (IHashCodeProvider)serializationInfo.GetValue("HashProvider", typeof(IHashCodeProvider));
|
||||
if (this.m_hashprovider == null)
|
||||
{
|
||||
this.equality_comparer = (IEqualityComparer)serializationInfo.GetValue("KeyComparer", typeof(IEqualityComparer));
|
||||
}
|
||||
else
|
||||
{
|
||||
this.m_comparer = (IComparer)serializationInfo.GetValue("Comparer", typeof(IComparer));
|
||||
if (this.m_comparer == null)
|
||||
{
|
||||
throw new SerializationException("The comparer is null");
|
||||
}
|
||||
}
|
||||
this.m_readonly = serializationInfo.GetBoolean("ReadOnly");
|
||||
string[] array = (string[])serializationInfo.GetValue("Keys", typeof(string[]));
|
||||
if (array == null)
|
||||
{
|
||||
throw new SerializationException("keys is null");
|
||||
}
|
||||
object[] array2 = (object[])serializationInfo.GetValue("Values", typeof(object[]));
|
||||
if (array2 == null)
|
||||
{
|
||||
throw new SerializationException("values is null");
|
||||
}
|
||||
this.Init();
|
||||
int num = array.Length;
|
||||
for (int i = 0; i < num; i++)
|
||||
{
|
||||
this.BaseAdd(array[i], array2[i]);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets or sets a value indicating whether the <see cref="T:System.Collections.Specialized.NameObjectCollectionBase" /> instance is read-only.</summary>
|
||||
/// <returns>true if the <see cref="T:System.Collections.Specialized.NameObjectCollectionBase" /> instance is read-only; otherwise, false.</returns>
|
||||
// Token: 0x1700008A RID: 138
|
||||
// (get) Token: 0x060001EB RID: 491 RVA: 0x00007B5C File Offset: 0x00005D5C
|
||||
// (set) Token: 0x060001EC RID: 492 RVA: 0x00007B64 File Offset: 0x00005D64
|
||||
protected bool IsReadOnly
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.m_readonly;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.m_readonly = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Adds an entry with the specified key and value into the <see cref="T:System.Collections.Specialized.NameObjectCollectionBase" /> instance.</summary>
|
||||
/// <param name="name">The <see cref="T:System.String" /> key of the entry to add. The key can be null.</param>
|
||||
/// <param name="value">The <see cref="T:System.Object" /> value of the entry to add. The value can be null.</param>
|
||||
/// <exception cref="T:System.NotSupportedException">The collection is read-only. </exception>
|
||||
// Token: 0x060001ED RID: 493 RVA: 0x00007B70 File Offset: 0x00005D70
|
||||
protected void BaseAdd(string name, object value)
|
||||
{
|
||||
if (this.IsReadOnly)
|
||||
{
|
||||
throw new NotSupportedException("Collection is read-only");
|
||||
}
|
||||
NameObjectCollectionBase._Item item = new NameObjectCollectionBase._Item(name, value);
|
||||
if (name == null)
|
||||
{
|
||||
if (this.m_NullKeyItem == null)
|
||||
{
|
||||
this.m_NullKeyItem = item;
|
||||
}
|
||||
}
|
||||
else if (this.m_ItemsContainer[name] == null)
|
||||
{
|
||||
this.m_ItemsContainer.Add(name, item);
|
||||
}
|
||||
this.m_ItemsArray.Add(item);
|
||||
}
|
||||
|
||||
/// <summary>Removes all entries from the <see cref="T:System.Collections.Specialized.NameObjectCollectionBase" /> instance.</summary>
|
||||
/// <exception cref="T:System.NotSupportedException">The collection is read-only.</exception>
|
||||
// Token: 0x060001EE RID: 494 RVA: 0x00007BE4 File Offset: 0x00005DE4
|
||||
protected void BaseClear()
|
||||
{
|
||||
if (this.IsReadOnly)
|
||||
{
|
||||
throw new NotSupportedException("Collection is read-only");
|
||||
}
|
||||
this.Init();
|
||||
}
|
||||
|
||||
/// <summary>Gets the value of the entry at the specified index of the <see cref="T:System.Collections.Specialized.NameObjectCollectionBase" /> instance.</summary>
|
||||
/// <returns>An <see cref="T:System.Object" /> that represents the value of the entry at the specified index.</returns>
|
||||
/// <param name="index">The zero-based index of the value to get.</param>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="index" /> is outside the valid range of indexes for the collection. </exception>
|
||||
// Token: 0x060001EF RID: 495 RVA: 0x00007C04 File Offset: 0x00005E04
|
||||
protected object BaseGet(int index)
|
||||
{
|
||||
return ((NameObjectCollectionBase._Item)this.m_ItemsArray[index]).value;
|
||||
}
|
||||
|
||||
/// <summary>Gets the value of the first entry with the specified key from the <see cref="T:System.Collections.Specialized.NameObjectCollectionBase" /> instance.</summary>
|
||||
/// <returns>An <see cref="T:System.Object" /> that represents the value of the first entry with the specified key, if found; otherwise, null.</returns>
|
||||
/// <param name="name">The <see cref="T:System.String" /> key of the entry to get. The key can be null.</param>
|
||||
// Token: 0x060001F0 RID: 496 RVA: 0x00007C1C File Offset: 0x00005E1C
|
||||
protected object BaseGet(string name)
|
||||
{
|
||||
NameObjectCollectionBase._Item item = this.FindFirstMatchedItem(name);
|
||||
if (item == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
return item.value;
|
||||
}
|
||||
|
||||
/// <summary>Returns a <see cref="T:System.String" /> array that contains all the keys in the <see cref="T:System.Collections.Specialized.NameObjectCollectionBase" /> instance.</summary>
|
||||
/// <returns>A <see cref="T:System.String" /> array that contains all the keys in the <see cref="T:System.Collections.Specialized.NameObjectCollectionBase" /> instance.</returns>
|
||||
// Token: 0x060001F1 RID: 497 RVA: 0x00007C40 File Offset: 0x00005E40
|
||||
protected string[] BaseGetAllKeys()
|
||||
{
|
||||
int count = this.m_ItemsArray.Count;
|
||||
string[] array = new string[count];
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
array[i] = this.BaseGetKey(i);
|
||||
}
|
||||
return array;
|
||||
}
|
||||
|
||||
/// <summary>Returns an <see cref="T:System.Object" /> array that contains all the values in the <see cref="T:System.Collections.Specialized.NameObjectCollectionBase" /> instance.</summary>
|
||||
/// <returns>An <see cref="T:System.Object" /> array that contains all the values in the <see cref="T:System.Collections.Specialized.NameObjectCollectionBase" /> instance.</returns>
|
||||
// Token: 0x060001F2 RID: 498 RVA: 0x00007C80 File Offset: 0x00005E80
|
||||
protected object[] BaseGetAllValues()
|
||||
{
|
||||
int count = this.m_ItemsArray.Count;
|
||||
object[] array = new object[count];
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
array[i] = this.BaseGet(i);
|
||||
}
|
||||
return array;
|
||||
}
|
||||
|
||||
/// <summary>Returns an array of the specified type that contains all the values in the <see cref="T:System.Collections.Specialized.NameObjectCollectionBase" /> instance.</summary>
|
||||
/// <returns>An array of the specified type that contains all the values in the <see cref="T:System.Collections.Specialized.NameObjectCollectionBase" /> instance.</returns>
|
||||
/// <param name="type">A <see cref="T:System.Type" /> that represents the type of array to return.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="type" /> is null. </exception>
|
||||
/// <exception cref="T:System.ArgumentException">
|
||||
/// <paramref name="type" /> is not a valid <see cref="T:System.Type" />. </exception>
|
||||
// Token: 0x060001F3 RID: 499 RVA: 0x00007CC0 File Offset: 0x00005EC0
|
||||
protected object[] BaseGetAllValues(Type type)
|
||||
{
|
||||
if (type == null)
|
||||
{
|
||||
throw new ArgumentNullException("'type' argument can't be null");
|
||||
}
|
||||
int count = this.m_ItemsArray.Count;
|
||||
object[] array = (object[])Array.CreateInstance(type, count);
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
array[i] = this.BaseGet(i);
|
||||
}
|
||||
return array;
|
||||
}
|
||||
|
||||
/// <summary>Gets the key of the entry at the specified index of the <see cref="T:System.Collections.Specialized.NameObjectCollectionBase" /> instance.</summary>
|
||||
/// <returns>A <see cref="T:System.String" /> that represents the key of the entry at the specified index.</returns>
|
||||
/// <param name="index">The zero-based index of the key to get.</param>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="index" /> is outside the valid range of indexes for the collection. </exception>
|
||||
// Token: 0x060001F4 RID: 500 RVA: 0x00007D14 File Offset: 0x00005F14
|
||||
protected string BaseGetKey(int index)
|
||||
{
|
||||
return ((NameObjectCollectionBase._Item)this.m_ItemsArray[index]).key;
|
||||
}
|
||||
|
||||
/// <summary>Gets a value indicating whether the <see cref="T:System.Collections.Specialized.NameObjectCollectionBase" /> instance contains entries whose keys are not null.</summary>
|
||||
/// <returns>true if the <see cref="T:System.Collections.Specialized.NameObjectCollectionBase" /> instance contains entries whose keys are not null; otherwise, false.</returns>
|
||||
// Token: 0x060001F5 RID: 501 RVA: 0x00007D2C File Offset: 0x00005F2C
|
||||
protected bool BaseHasKeys()
|
||||
{
|
||||
return this.m_ItemsContainer.Count > 0;
|
||||
}
|
||||
|
||||
/// <summary>Removes the entries with the specified key from the <see cref="T:System.Collections.Specialized.NameObjectCollectionBase" /> instance.</summary>
|
||||
/// <param name="name">The <see cref="T:System.String" /> key of the entries to remove. The key can be null.</param>
|
||||
/// <exception cref="T:System.NotSupportedException">The collection is read-only. </exception>
|
||||
// Token: 0x060001F6 RID: 502 RVA: 0x00007D3C File Offset: 0x00005F3C
|
||||
protected void BaseRemove(string name)
|
||||
{
|
||||
if (this.IsReadOnly)
|
||||
{
|
||||
throw new NotSupportedException("Collection is read-only");
|
||||
}
|
||||
if (name != null)
|
||||
{
|
||||
this.m_ItemsContainer.Remove(name);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.m_NullKeyItem = null;
|
||||
}
|
||||
int num = this.m_ItemsArray.Count;
|
||||
int i = 0;
|
||||
while (i < num)
|
||||
{
|
||||
string text = this.BaseGetKey(i);
|
||||
if (this.Equals(text, name))
|
||||
{
|
||||
this.m_ItemsArray.RemoveAt(i);
|
||||
num--;
|
||||
}
|
||||
else
|
||||
{
|
||||
i++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Removes the entry at the specified index of the <see cref="T:System.Collections.Specialized.NameObjectCollectionBase" /> instance.</summary>
|
||||
/// <param name="index">The zero-based index of the entry to remove.</param>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="index" /> is outside the valid range of indexes for the collection.</exception>
|
||||
/// <exception cref="T:System.NotSupportedException">The collection is read-only.</exception>
|
||||
// Token: 0x060001F7 RID: 503 RVA: 0x00007DC8 File Offset: 0x00005FC8
|
||||
protected void BaseRemoveAt(int index)
|
||||
{
|
||||
if (this.IsReadOnly)
|
||||
{
|
||||
throw new NotSupportedException("Collection is read-only");
|
||||
}
|
||||
string text = this.BaseGetKey(index);
|
||||
if (text != null)
|
||||
{
|
||||
this.m_ItemsContainer.Remove(text);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.m_NullKeyItem = null;
|
||||
}
|
||||
this.m_ItemsArray.RemoveAt(index);
|
||||
}
|
||||
|
||||
/// <summary>Sets the value of the entry at the specified index of the <see cref="T:System.Collections.Specialized.NameObjectCollectionBase" /> instance.</summary>
|
||||
/// <param name="index">The zero-based index of the entry to set.</param>
|
||||
/// <param name="value">The <see cref="T:System.Object" /> that represents the new value of the entry to set. The value can be null.</param>
|
||||
/// <exception cref="T:System.NotSupportedException">The collection is read-only.</exception>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="index" /> is outside the valid range of indexes for the collection.</exception>
|
||||
// Token: 0x060001F8 RID: 504 RVA: 0x00007E20 File Offset: 0x00006020
|
||||
protected void BaseSet(int index, object value)
|
||||
{
|
||||
if (this.IsReadOnly)
|
||||
{
|
||||
throw new NotSupportedException("Collection is read-only");
|
||||
}
|
||||
NameObjectCollectionBase._Item item = (NameObjectCollectionBase._Item)this.m_ItemsArray[index];
|
||||
item.value = value;
|
||||
}
|
||||
|
||||
/// <summary>Sets the value of the first entry with the specified key in the <see cref="T:System.Collections.Specialized.NameObjectCollectionBase" /> instance, if found; otherwise, adds an entry with the specified key and value into the <see cref="T:System.Collections.Specialized.NameObjectCollectionBase" /> instance.</summary>
|
||||
/// <param name="name">The <see cref="T:System.String" /> key of the entry to set. The key can be null.</param>
|
||||
/// <param name="value">The <see cref="T:System.Object" /> that represents the new value of the entry to set. The value can be null.</param>
|
||||
/// <exception cref="T:System.NotSupportedException">The collection is read-only. </exception>
|
||||
// Token: 0x060001F9 RID: 505 RVA: 0x00007E5C File Offset: 0x0000605C
|
||||
protected void BaseSet(string name, object value)
|
||||
{
|
||||
if (this.IsReadOnly)
|
||||
{
|
||||
throw new NotSupportedException("Collection is read-only");
|
||||
}
|
||||
NameObjectCollectionBase._Item item = this.FindFirstMatchedItem(name);
|
||||
if (item != null)
|
||||
{
|
||||
item.value = value;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.BaseAdd(name, value);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060001FA RID: 506 RVA: 0x00007EA4 File Offset: 0x000060A4
|
||||
[global::System.MonoTODO]
|
||||
private NameObjectCollectionBase._Item FindFirstMatchedItem(string name)
|
||||
{
|
||||
if (name != null)
|
||||
{
|
||||
return (NameObjectCollectionBase._Item)this.m_ItemsContainer[name];
|
||||
}
|
||||
return this.m_NullKeyItem;
|
||||
}
|
||||
|
||||
// Token: 0x060001FB RID: 507 RVA: 0x00007EC4 File Offset: 0x000060C4
|
||||
internal bool Equals(string s1, string s2)
|
||||
{
|
||||
if (this.m_comparer != null)
|
||||
{
|
||||
return this.m_comparer.Compare(s1, s2) == 0;
|
||||
}
|
||||
return this.equality_comparer.Equals(s1, s2);
|
||||
}
|
||||
|
||||
// Token: 0x04000095 RID: 149
|
||||
private Hashtable m_ItemsContainer;
|
||||
|
||||
// Token: 0x04000096 RID: 150
|
||||
private NameObjectCollectionBase._Item m_NullKeyItem;
|
||||
|
||||
// Token: 0x04000097 RID: 151
|
||||
private ArrayList m_ItemsArray;
|
||||
|
||||
// Token: 0x04000098 RID: 152
|
||||
private IHashCodeProvider m_hashprovider;
|
||||
|
||||
// Token: 0x04000099 RID: 153
|
||||
private IComparer m_comparer;
|
||||
|
||||
// Token: 0x0400009A RID: 154
|
||||
private int m_defCapacity;
|
||||
|
||||
// Token: 0x0400009B RID: 155
|
||||
private bool m_readonly;
|
||||
|
||||
// Token: 0x0400009C RID: 156
|
||||
private SerializationInfo infoCopy;
|
||||
|
||||
// Token: 0x0400009D RID: 157
|
||||
private NameObjectCollectionBase.KeysCollection keyscoll;
|
||||
|
||||
// Token: 0x0400009E RID: 158
|
||||
private IEqualityComparer equality_comparer;
|
||||
|
||||
// Token: 0x02000030 RID: 48
|
||||
internal class _Item
|
||||
{
|
||||
// Token: 0x060001FC RID: 508 RVA: 0x00007EF0 File Offset: 0x000060F0
|
||||
public _Item(string key, object value)
|
||||
{
|
||||
this.key = key;
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
// Token: 0x0400009F RID: 159
|
||||
public string key;
|
||||
|
||||
// Token: 0x040000A0 RID: 160
|
||||
public object value;
|
||||
}
|
||||
|
||||
// Token: 0x02000031 RID: 49
|
||||
[Serializable]
|
||||
internal class _KeysEnumerator : IEnumerator
|
||||
{
|
||||
// Token: 0x060001FD RID: 509 RVA: 0x00007F08 File Offset: 0x00006108
|
||||
internal _KeysEnumerator(NameObjectCollectionBase collection)
|
||||
{
|
||||
this.m_collection = collection;
|
||||
this.Reset();
|
||||
}
|
||||
|
||||
// Token: 0x1700008B RID: 139
|
||||
// (get) Token: 0x060001FE RID: 510 RVA: 0x00007F20 File Offset: 0x00006120
|
||||
public object Current
|
||||
{
|
||||
get
|
||||
{
|
||||
if (this.m_position < this.m_collection.Count || this.m_position < 0)
|
||||
{
|
||||
return this.m_collection.BaseGetKey(this.m_position);
|
||||
}
|
||||
throw new InvalidOperationException();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060001FF RID: 511 RVA: 0x00007F5C File Offset: 0x0000615C
|
||||
public bool MoveNext()
|
||||
{
|
||||
return ++this.m_position < this.m_collection.Count;
|
||||
}
|
||||
|
||||
// Token: 0x06000200 RID: 512 RVA: 0x00007F88 File Offset: 0x00006188
|
||||
public void Reset()
|
||||
{
|
||||
this.m_position = -1;
|
||||
}
|
||||
|
||||
// Token: 0x040000A1 RID: 161
|
||||
private NameObjectCollectionBase m_collection;
|
||||
|
||||
// Token: 0x040000A2 RID: 162
|
||||
private int m_position;
|
||||
}
|
||||
|
||||
/// <summary>Represents a collection of the <see cref="T:System.String" /> keys of a collection. </summary>
|
||||
// Token: 0x02000032 RID: 50
|
||||
[Serializable]
|
||||
public class KeysCollection : ICollection, IEnumerable
|
||||
{
|
||||
// Token: 0x06000201 RID: 513 RVA: 0x00007F94 File Offset: 0x00006194
|
||||
internal KeysCollection(NameObjectCollectionBase collection)
|
||||
{
|
||||
this.m_collection = collection;
|
||||
}
|
||||
|
||||
/// <summary>Copies the entire <see cref="T:System.Collections.Specialized.NameObjectCollectionBase.KeysCollection" /> to a compatible one-dimensional <see cref="T:System.Array" />, starting at the specified index of the target array.</summary>
|
||||
/// <param name="array">The one-dimensional <see cref="T:System.Array" /> that is the destination of the elements copied from <see cref="T:System.Collections.Specialized.NameObjectCollectionBase.KeysCollection" />. The <see cref="T:System.Array" /> must have zero-based indexing. </param>
|
||||
/// <param name="index">The zero-based index in <paramref name="array" /> at which copying begins. </param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="array" /> is null. </exception>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="index" /> is less than zero. </exception>
|
||||
/// <exception cref="T:System.ArgumentException">
|
||||
/// <paramref name="array" /> is multidimensional.-or- The number of elements in the source <see cref="T:System.Collections.Specialized.NameObjectCollectionBase.KeysCollection" /> is greater than the available space from <paramref name="index" /> to the end of the destination <paramref name="array" />. </exception>
|
||||
/// <exception cref="T:System.InvalidCastException">The type of the source <see cref="T:System.Collections.Specialized.NameObjectCollectionBase.KeysCollection" /> cannot be cast automatically to the type of the destination <paramref name="array" />. </exception>
|
||||
// Token: 0x06000202 RID: 514 RVA: 0x00007FA4 File Offset: 0x000061A4
|
||||
void ICollection.CopyTo(Array array, int arrayIndex)
|
||||
{
|
||||
ArrayList itemsArray = this.m_collection.m_ItemsArray;
|
||||
if (array == null)
|
||||
{
|
||||
throw new ArgumentNullException("array");
|
||||
}
|
||||
if (arrayIndex < 0)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException("arrayIndex");
|
||||
}
|
||||
if (array.Length > 0 && arrayIndex >= array.Length)
|
||||
{
|
||||
throw new ArgumentException("arrayIndex is equal to or greater than array.Length");
|
||||
}
|
||||
if (arrayIndex + itemsArray.Count > array.Length)
|
||||
{
|
||||
throw new ArgumentException("Not enough room from arrayIndex to end of array for this KeysCollection");
|
||||
}
|
||||
if (array != null && array.Rank > 1)
|
||||
{
|
||||
throw new ArgumentException("array is multidimensional");
|
||||
}
|
||||
object[] array2 = (object[])array;
|
||||
int i = 0;
|
||||
while (i < itemsArray.Count)
|
||||
{
|
||||
array2[arrayIndex] = ((NameObjectCollectionBase._Item)itemsArray[i]).key;
|
||||
i++;
|
||||
arrayIndex++;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a value indicating whether access to the <see cref="T:System.Collections.Specialized.NameObjectCollectionBase.KeysCollection" /> is synchronized (thread safe).</summary>
|
||||
/// <returns>true if access to the <see cref="T:System.Collections.Specialized.NameObjectCollectionBase.KeysCollection" /> is synchronized (thread safe); otherwise, false. The default is false.</returns>
|
||||
// Token: 0x1700008C RID: 140
|
||||
// (get) Token: 0x06000203 RID: 515 RVA: 0x00008078 File Offset: 0x00006278
|
||||
bool ICollection.IsSynchronized
|
||||
{
|
||||
get
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets an object that can be used to synchronize access to the <see cref="T:System.Collections.Specialized.NameObjectCollectionBase.KeysCollection" />.</summary>
|
||||
/// <returns>An object that can be used to synchronize access to the <see cref="T:System.Collections.Specialized.NameObjectCollectionBase.KeysCollection" />.</returns>
|
||||
// Token: 0x1700008D RID: 141
|
||||
// (get) Token: 0x06000204 RID: 516 RVA: 0x0000807C File Offset: 0x0000627C
|
||||
object ICollection.SyncRoot
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.m_collection;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets the key at the specified index of the collection.</summary>
|
||||
/// <returns>A <see cref="T:System.String" /> that contains the key at the specified index of the collection.</returns>
|
||||
/// <param name="index">The zero-based index of the key to get from the collection. </param>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="index" /> is outside the valid range of indexes for the collection. </exception>
|
||||
// Token: 0x06000205 RID: 517 RVA: 0x00008084 File Offset: 0x00006284
|
||||
public virtual string Get(int index)
|
||||
{
|
||||
return this.m_collection.BaseGetKey(index);
|
||||
}
|
||||
|
||||
/// <summary>Gets the number of keys in the <see cref="T:System.Collections.Specialized.NameObjectCollectionBase.KeysCollection" />.</summary>
|
||||
/// <returns>The number of keys in the <see cref="T:System.Collections.Specialized.NameObjectCollectionBase.KeysCollection" />.</returns>
|
||||
// Token: 0x1700008E RID: 142
|
||||
// (get) Token: 0x06000206 RID: 518 RVA: 0x00008094 File Offset: 0x00006294
|
||||
public int Count
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.m_collection.Count;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets the entry at the specified index of the collection.</summary>
|
||||
/// <returns>The <see cref="T:System.String" /> key of the entry at the specified index of the collection.</returns>
|
||||
/// <param name="index">The zero-based index of the entry to locate in the collection. </param>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="index" /> is outside the valid range of indexes for the collection. </exception>
|
||||
// Token: 0x1700008F RID: 143
|
||||
public string this[int index]
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Get(index);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Returns an enumerator that iterates through the <see cref="T:System.Collections.Specialized.NameObjectCollectionBase.KeysCollection" />.</summary>
|
||||
/// <returns>An <see cref="T:System.Collections.IEnumerator" /> for the <see cref="T:System.Collections.Specialized.NameObjectCollectionBase.KeysCollection" />.</returns>
|
||||
// Token: 0x06000208 RID: 520 RVA: 0x000080B0 File Offset: 0x000062B0
|
||||
public IEnumerator GetEnumerator()
|
||||
{
|
||||
return new NameObjectCollectionBase._KeysEnumerator(this.m_collection);
|
||||
}
|
||||
|
||||
// Token: 0x040000A3 RID: 163
|
||||
private NameObjectCollectionBase m_collection;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,501 @@
|
||||
using System;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
|
||||
namespace System.Collections.Specialized
|
||||
{
|
||||
/// <summary>Represents a collection of associated <see cref="T:System.String" /> keys and <see cref="T:System.String" /> values that can be accessed either with the key or with the index. </summary>
|
||||
// Token: 0x02000033 RID: 51
|
||||
[Serializable]
|
||||
public class NameValueCollection : NameObjectCollectionBase
|
||||
{
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.Specialized.NameValueCollection" /> class that is empty, has the default initial capacity and uses the default case-insensitive hash code provider and the default case-insensitive comparer.</summary>
|
||||
// Token: 0x06000209 RID: 521 RVA: 0x000080C0 File Offset: 0x000062C0
|
||||
public NameValueCollection()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.Specialized.NameValueCollection" /> class that is empty, has the specified initial capacity and uses the default case-insensitive hash code provider and the default case-insensitive comparer.</summary>
|
||||
/// <param name="capacity">The initial number of entries that the <see cref="T:System.Collections.Specialized.NameValueCollection" /> can contain.</param>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="capacity" /> is less than zero.</exception>
|
||||
// Token: 0x0600020A RID: 522 RVA: 0x000080C8 File Offset: 0x000062C8
|
||||
public NameValueCollection(int capacity)
|
||||
: base(capacity)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Copies the entries from the specified <see cref="T:System.Collections.Specialized.NameValueCollection" /> to a new <see cref="T:System.Collections.Specialized.NameValueCollection" /> with the same initial capacity as the number of entries copied and using the same hash code provider and the same comparer as the source collection.</summary>
|
||||
/// <param name="col">The <see cref="T:System.Collections.Specialized.NameValueCollection" /> to copy to the new <see cref="T:System.Collections.Specialized.NameValueCollection" /> instance.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="col" /> is null.</exception>
|
||||
// Token: 0x0600020B RID: 523 RVA: 0x000080D4 File Offset: 0x000062D4
|
||||
public NameValueCollection(NameValueCollection col)
|
||||
{
|
||||
IEqualityComparer equalityComparer2;
|
||||
if (col == null)
|
||||
{
|
||||
IEqualityComparer equalityComparer = null;
|
||||
equalityComparer2 = equalityComparer;
|
||||
}
|
||||
else
|
||||
{
|
||||
equalityComparer2 = col.EqualityComparer;
|
||||
}
|
||||
IComparer comparer2;
|
||||
if (col == null)
|
||||
{
|
||||
IComparer comparer = null;
|
||||
comparer2 = comparer;
|
||||
}
|
||||
else
|
||||
{
|
||||
comparer2 = col.Comparer;
|
||||
}
|
||||
IHashCodeProvider hashCodeProvider2;
|
||||
if (col == null)
|
||||
{
|
||||
IHashCodeProvider hashCodeProvider = null;
|
||||
hashCodeProvider2 = hashCodeProvider;
|
||||
}
|
||||
else
|
||||
{
|
||||
hashCodeProvider2 = col.HashCodeProvider;
|
||||
}
|
||||
base..ctor(equalityComparer2, comparer2, hashCodeProvider2);
|
||||
if (col == null)
|
||||
{
|
||||
throw new ArgumentNullException("col");
|
||||
}
|
||||
this.Add(col);
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.Specialized.NameValueCollection" /> class that is empty, has the default initial capacity and uses the specified hash code provider and the specified comparer.</summary>
|
||||
/// <param name="hashProvider">The <see cref="T:System.Collections.IHashCodeProvider" /> that will supply the hash codes for all keys in the <see cref="T:System.Collections.Specialized.NameValueCollection" />.</param>
|
||||
/// <param name="comparer">The <see cref="T:System.Collections.IComparer" /> to use to determine whether two keys are equal.</param>
|
||||
// Token: 0x0600020C RID: 524 RVA: 0x0000813C File Offset: 0x0000633C
|
||||
[Obsolete("Use NameValueCollection (IEqualityComparer)")]
|
||||
public NameValueCollection(IHashCodeProvider hashProvider, IComparer comparer)
|
||||
: base(hashProvider, comparer)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Copies the entries from the specified <see cref="T:System.Collections.Specialized.NameValueCollection" /> to a new <see cref="T:System.Collections.Specialized.NameValueCollection" /> with the specified initial capacity or the same initial capacity as the number of entries copied, whichever is greater, and using the default case-insensitive hash code provider and the default case-insensitive comparer.</summary>
|
||||
/// <param name="capacity">The initial number of entries that the <see cref="T:System.Collections.Specialized.NameValueCollection" /> can contain.</param>
|
||||
/// <param name="col">The <see cref="T:System.Collections.Specialized.NameValueCollection" /> to copy to the new <see cref="T:System.Collections.Specialized.NameValueCollection" /> instance.</param>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="capacity" /> is less than zero.</exception>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="col" /> is null.</exception>
|
||||
// Token: 0x0600020D RID: 525 RVA: 0x00008148 File Offset: 0x00006348
|
||||
public NameValueCollection(int capacity, NameValueCollection col)
|
||||
{
|
||||
IHashCodeProvider hashCodeProvider2;
|
||||
if (col == null)
|
||||
{
|
||||
IHashCodeProvider hashCodeProvider = null;
|
||||
hashCodeProvider2 = hashCodeProvider;
|
||||
}
|
||||
else
|
||||
{
|
||||
hashCodeProvider2 = col.HashCodeProvider;
|
||||
}
|
||||
IComparer comparer2;
|
||||
if (col == null)
|
||||
{
|
||||
IComparer comparer = null;
|
||||
comparer2 = comparer;
|
||||
}
|
||||
else
|
||||
{
|
||||
comparer2 = col.Comparer;
|
||||
}
|
||||
base..ctor(capacity, hashCodeProvider2, comparer2);
|
||||
this.Add(col);
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.Specialized.NameValueCollection" /> class that is serializable and uses the specified <see cref="T:System.Runtime.Serialization.SerializationInfo" /> and <see cref="T:System.Runtime.Serialization.StreamingContext" />.</summary>
|
||||
/// <param name="info">A <see cref="T:System.Runtime.Serialization.SerializationInfo" /> object that contains the information required to serialize the new <see cref="T:System.Collections.Specialized.NameValueCollection" /> instance.</param>
|
||||
/// <param name="context">A <see cref="T:System.Runtime.Serialization.StreamingContext" /> object that contains the source and destination of the serialized stream associated with the new <see cref="T:System.Collections.Specialized.NameValueCollection" /> instance.</param>
|
||||
// Token: 0x0600020E RID: 526 RVA: 0x0000818C File Offset: 0x0000638C
|
||||
protected NameValueCollection(SerializationInfo info, StreamingContext context)
|
||||
: base(info, context)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.Specialized.NameValueCollection" /> class that is empty, has the specified initial capacity and uses the specified hash code provider and the specified comparer.</summary>
|
||||
/// <param name="capacity">The initial number of entries that the <see cref="T:System.Collections.Specialized.NameValueCollection" /> can contain.</param>
|
||||
/// <param name="hashProvider">The <see cref="T:System.Collections.IHashCodeProvider" /> that will supply the hash codes for all keys in the <see cref="T:System.Collections.Specialized.NameValueCollection" />.</param>
|
||||
/// <param name="comparer">The <see cref="T:System.Collections.IComparer" /> to use to determine whether two keys are equal.</param>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="capacity" /> is less than zero.</exception>
|
||||
// Token: 0x0600020F RID: 527 RVA: 0x00008198 File Offset: 0x00006398
|
||||
[Obsolete("Use NameValueCollection (IEqualityComparer)")]
|
||||
public NameValueCollection(int capacity, IHashCodeProvider hashProvider, IComparer comparer)
|
||||
: base(capacity, hashProvider, comparer)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.Specialized.NameValueCollection" /> class that is empty, has the default initial capacity, and uses the specified <see cref="T:System.Collections.IEqualityComparer" /> object.</summary>
|
||||
/// <param name="equalityComparer">The <see cref="T:System.Collections.IEqualityComparer" /> object to use to determine whether two keys are equal and to generate hash codes for the keys in the collection.</param>
|
||||
// Token: 0x06000210 RID: 528 RVA: 0x000081A4 File Offset: 0x000063A4
|
||||
public NameValueCollection(IEqualityComparer equalityComparer)
|
||||
: base(equalityComparer)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.Specialized.NameValueCollection" /> class that is empty, has the specified initial capacity, and uses the specified <see cref="T:System.Collections.IEqualityComparer" /> object.</summary>
|
||||
/// <param name="capacity">The initial number of entries that the <see cref="T:System.Collections.Specialized.NameValueCollection" /> object can contain.</param>
|
||||
/// <param name="equalityComparer">The <see cref="T:System.Collections.IEqualityComparer" /> object to use to determine whether two keys are equal and to generate hash codes for the keys in the collection.</param>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="capacity" /> is less than zero.</exception>
|
||||
// Token: 0x06000211 RID: 529 RVA: 0x000081B0 File Offset: 0x000063B0
|
||||
public NameValueCollection(int capacity, IEqualityComparer equalityComparer)
|
||||
: base(capacity, equalityComparer)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Gets all the keys in the <see cref="T:System.Collections.Specialized.NameValueCollection" />.</summary>
|
||||
/// <returns>A <see cref="T:System.String" /> array that contains all the keys of the <see cref="T:System.Collections.Specialized.NameValueCollection" />.</returns>
|
||||
// Token: 0x17000090 RID: 144
|
||||
// (get) Token: 0x06000212 RID: 530 RVA: 0x000081BC File Offset: 0x000063BC
|
||||
public virtual string[] AllKeys
|
||||
{
|
||||
get
|
||||
{
|
||||
if (this.cachedAllKeys == null)
|
||||
{
|
||||
this.cachedAllKeys = base.BaseGetAllKeys();
|
||||
}
|
||||
return this.cachedAllKeys;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets the entry at the specified index of the <see cref="T:System.Collections.Specialized.NameValueCollection" />.</summary>
|
||||
/// <returns>A <see cref="T:System.String" /> that contains the comma-separated list of values at the specified index of the collection.</returns>
|
||||
/// <param name="index">The zero-based index of the entry to locate in the collection.</param>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="index" /> is outside the valid range of indexes for the collection.</exception>
|
||||
// Token: 0x17000091 RID: 145
|
||||
public string this[int index]
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Get(index);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets or sets the entry with the specified key in the <see cref="T:System.Collections.Specialized.NameValueCollection" />.</summary>
|
||||
/// <returns>A <see cref="T:System.String" /> that contains the comma-separated list of values associated with the specified key, if found; otherwise, null.</returns>
|
||||
/// <param name="name">The <see cref="T:System.String" /> key of the entry to locate. The key can be null.</param>
|
||||
/// <exception cref="T:System.NotSupportedException">The collection is read-only and the operation attempts to modify the collection. </exception>
|
||||
// Token: 0x17000092 RID: 146
|
||||
public string this[string name]
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Get(name);
|
||||
}
|
||||
set
|
||||
{
|
||||
this.Set(name, value);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Copies the entries in the specified <see cref="T:System.Collections.Specialized.NameValueCollection" /> to the current <see cref="T:System.Collections.Specialized.NameValueCollection" />.</summary>
|
||||
/// <param name="c">The <see cref="T:System.Collections.Specialized.NameValueCollection" /> to copy to the current <see cref="T:System.Collections.Specialized.NameValueCollection" />.</param>
|
||||
/// <exception cref="T:System.NotSupportedException">The collection is read-only.</exception>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="c" /> is null.</exception>
|
||||
// Token: 0x06000216 RID: 534 RVA: 0x00008200 File Offset: 0x00006400
|
||||
public void Add(NameValueCollection c)
|
||||
{
|
||||
if (base.IsReadOnly)
|
||||
{
|
||||
throw new NotSupportedException("Collection is read-only");
|
||||
}
|
||||
if (c == null)
|
||||
{
|
||||
throw new ArgumentNullException("c");
|
||||
}
|
||||
this.InvalidateCachedArrays();
|
||||
int count = c.Count;
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
string key = c.GetKey(i);
|
||||
ArrayList arrayList = (ArrayList)c.BaseGet(i);
|
||||
ArrayList arrayList2 = (ArrayList)base.BaseGet(key);
|
||||
if (arrayList2 != null && arrayList != null)
|
||||
{
|
||||
arrayList2.AddRange(arrayList);
|
||||
}
|
||||
else if (arrayList != null)
|
||||
{
|
||||
arrayList2 = new ArrayList(arrayList);
|
||||
}
|
||||
base.BaseSet(key, arrayList2);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Adds an entry with the specified name and value to the <see cref="T:System.Collections.Specialized.NameValueCollection" />.</summary>
|
||||
/// <param name="name">The <see cref="T:System.String" /> key of the entry to add. The key can be null.</param>
|
||||
/// <param name="value">The <see cref="T:System.String" /> value of the entry to add. The value can be null.</param>
|
||||
/// <exception cref="T:System.NotSupportedException">The collection is read-only. </exception>
|
||||
// Token: 0x06000217 RID: 535 RVA: 0x000082A8 File Offset: 0x000064A8
|
||||
public virtual void Add(string name, string val)
|
||||
{
|
||||
if (base.IsReadOnly)
|
||||
{
|
||||
throw new NotSupportedException("Collection is read-only");
|
||||
}
|
||||
this.InvalidateCachedArrays();
|
||||
ArrayList arrayList = (ArrayList)base.BaseGet(name);
|
||||
if (arrayList == null)
|
||||
{
|
||||
arrayList = new ArrayList();
|
||||
if (val != null)
|
||||
{
|
||||
arrayList.Add(val);
|
||||
}
|
||||
base.BaseAdd(name, arrayList);
|
||||
}
|
||||
else if (val != null)
|
||||
{
|
||||
arrayList.Add(val);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Invalidates the cached arrays and removes all entries from the <see cref="T:System.Collections.Specialized.NameValueCollection" />.</summary>
|
||||
/// <exception cref="T:System.NotSupportedException">The collection is read-only.</exception>
|
||||
/// <PermissionSet>
|
||||
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="UnmanagedCode, ControlEvidence" />
|
||||
/// </PermissionSet>
|
||||
// Token: 0x06000218 RID: 536 RVA: 0x00008314 File Offset: 0x00006514
|
||||
public virtual void Clear()
|
||||
{
|
||||
if (base.IsReadOnly)
|
||||
{
|
||||
throw new NotSupportedException("Collection is read-only");
|
||||
}
|
||||
this.InvalidateCachedArrays();
|
||||
base.BaseClear();
|
||||
}
|
||||
|
||||
/// <summary>Copies the entire <see cref="T:System.Collections.Specialized.NameValueCollection" /> to a compatible one-dimensional <see cref="T:System.Array" />, starting at the specified index of the target array.</summary>
|
||||
/// <param name="dest">The one-dimensional <see cref="T:System.Array" /> that is the destination of the elements copied from <see cref="T:System.Collections.Specialized.NameValueCollection" />. The <see cref="T:System.Array" /> must have zero-based indexing.</param>
|
||||
/// <param name="index">The zero-based index in <paramref name="dest" /> at which copying begins.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="dest" /> is null.</exception>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="index" /> is less than zero.</exception>
|
||||
/// <exception cref="T:System.ArgumentException">
|
||||
/// <paramref name="dest" /> is multidimensional.-or- The number of elements in the source <see cref="T:System.Collections.Specialized.NameValueCollection" /> is greater than the available space from <paramref name="index" /> to the end of the destination <paramref name="dest" />.</exception>
|
||||
/// <exception cref="T:System.InvalidCastException">The type of the source <see cref="T:System.Collections.Specialized.NameValueCollection" /> cannot be cast automatically to the type of the destination <paramref name="dest" />.</exception>
|
||||
// Token: 0x06000219 RID: 537 RVA: 0x00008344 File Offset: 0x00006544
|
||||
public void CopyTo(Array dest, int index)
|
||||
{
|
||||
if (dest == null)
|
||||
{
|
||||
throw new ArgumentNullException("dest", "Null argument - dest");
|
||||
}
|
||||
if (index < 0)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException("index", "index is less than 0");
|
||||
}
|
||||
if (dest.Rank > 1)
|
||||
{
|
||||
throw new ArgumentException("dest", "multidim");
|
||||
}
|
||||
if (this.cachedAll == null)
|
||||
{
|
||||
this.RefreshCachedAll();
|
||||
}
|
||||
try
|
||||
{
|
||||
this.cachedAll.CopyTo(dest, index);
|
||||
}
|
||||
catch (ArrayTypeMismatchException)
|
||||
{
|
||||
throw new InvalidCastException();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600021A RID: 538 RVA: 0x000083E8 File Offset: 0x000065E8
|
||||
private void RefreshCachedAll()
|
||||
{
|
||||
this.cachedAll = null;
|
||||
int count = this.Count;
|
||||
this.cachedAll = new string[count];
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
this.cachedAll[i] = this.Get(i);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets the values at the specified index of the <see cref="T:System.Collections.Specialized.NameValueCollection" /> combined into one comma-separated list.</summary>
|
||||
/// <returns>A <see cref="T:System.String" /> that contains a comma-separated list of the values at the specified index of the <see cref="T:System.Collections.Specialized.NameValueCollection" />, if found; otherwise, null.</returns>
|
||||
/// <param name="index">The zero-based index of the entry that contains the values to get from the collection.</param>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="index" /> is outside the valid range of indexes for the collection.</exception>
|
||||
// Token: 0x0600021B RID: 539 RVA: 0x00008430 File Offset: 0x00006630
|
||||
public virtual string Get(int index)
|
||||
{
|
||||
ArrayList arrayList = (ArrayList)base.BaseGet(index);
|
||||
return NameValueCollection.AsSingleString(arrayList);
|
||||
}
|
||||
|
||||
/// <summary>Gets the values associated with the specified key from the <see cref="T:System.Collections.Specialized.NameValueCollection" /> combined into one comma-separated list.</summary>
|
||||
/// <returns>A <see cref="T:System.String" /> that contains a comma-separated list of the values associated with the specified key from the <see cref="T:System.Collections.Specialized.NameValueCollection" />, if found; otherwise, null.</returns>
|
||||
/// <param name="name">The <see cref="T:System.String" /> key of the entry that contains the values to get. The key can be null.</param>
|
||||
// Token: 0x0600021C RID: 540 RVA: 0x00008450 File Offset: 0x00006650
|
||||
public virtual string Get(string name)
|
||||
{
|
||||
ArrayList arrayList = (ArrayList)base.BaseGet(name);
|
||||
return NameValueCollection.AsSingleString(arrayList);
|
||||
}
|
||||
|
||||
// Token: 0x0600021D RID: 541 RVA: 0x00008470 File Offset: 0x00006670
|
||||
private static string AsSingleString(ArrayList values)
|
||||
{
|
||||
if (values == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
int count = values.Count;
|
||||
switch (count)
|
||||
{
|
||||
case 0:
|
||||
return null;
|
||||
case 1:
|
||||
return (string)values[0];
|
||||
case 2:
|
||||
return (string)values[0] + ',' + (string)values[1];
|
||||
default:
|
||||
{
|
||||
int num = count;
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
num += ((string)values[i]).Length;
|
||||
}
|
||||
StringBuilder stringBuilder = new StringBuilder((string)values[0], num);
|
||||
for (int j = 1; j < count; j++)
|
||||
{
|
||||
stringBuilder.Append(',');
|
||||
stringBuilder.Append(values[j]);
|
||||
}
|
||||
return stringBuilder.ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets the key at the specified index of the <see cref="T:System.Collections.Specialized.NameValueCollection" />.</summary>
|
||||
/// <returns>A <see cref="T:System.String" /> that contains the key at the specified index of the <see cref="T:System.Collections.Specialized.NameValueCollection" />, if found; otherwise, null.</returns>
|
||||
/// <param name="index">The zero-based index of the key to get from the collection.</param>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="index" /> is outside the valid range of indexes for the collection. </exception>
|
||||
// Token: 0x0600021E RID: 542 RVA: 0x00008550 File Offset: 0x00006750
|
||||
public virtual string GetKey(int index)
|
||||
{
|
||||
return base.BaseGetKey(index);
|
||||
}
|
||||
|
||||
/// <summary>Gets the values at the specified index of the <see cref="T:System.Collections.Specialized.NameValueCollection" />.</summary>
|
||||
/// <returns>A <see cref="T:System.String" /> array that contains the values at the specified index of the <see cref="T:System.Collections.Specialized.NameValueCollection" />, if found; otherwise, null.</returns>
|
||||
/// <param name="index">The zero-based index of the entry that contains the values to get from the collection.</param>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="index" /> is outside the valid range of indexes for the collection. </exception>
|
||||
// Token: 0x0600021F RID: 543 RVA: 0x0000855C File Offset: 0x0000675C
|
||||
public virtual string[] GetValues(int index)
|
||||
{
|
||||
ArrayList arrayList = (ArrayList)base.BaseGet(index);
|
||||
return NameValueCollection.AsStringArray(arrayList);
|
||||
}
|
||||
|
||||
/// <summary>Gets the values associated with the specified key from the <see cref="T:System.Collections.Specialized.NameValueCollection" />.</summary>
|
||||
/// <returns>A <see cref="T:System.String" /> array that contains the values associated with the specified key from the <see cref="T:System.Collections.Specialized.NameValueCollection" />, if found; otherwise, null.</returns>
|
||||
/// <param name="name">The <see cref="T:System.String" /> key of the entry that contains the values to get. The key can be null.</param>
|
||||
// Token: 0x06000220 RID: 544 RVA: 0x0000857C File Offset: 0x0000677C
|
||||
public virtual string[] GetValues(string name)
|
||||
{
|
||||
ArrayList arrayList = (ArrayList)base.BaseGet(name);
|
||||
return NameValueCollection.AsStringArray(arrayList);
|
||||
}
|
||||
|
||||
// Token: 0x06000221 RID: 545 RVA: 0x0000859C File Offset: 0x0000679C
|
||||
private static string[] AsStringArray(ArrayList values)
|
||||
{
|
||||
if (values == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
int count = values.Count;
|
||||
if (count == 0)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
string[] array = new string[count];
|
||||
values.CopyTo(array);
|
||||
return array;
|
||||
}
|
||||
|
||||
/// <summary>Gets a value indicating whether the <see cref="T:System.Collections.Specialized.NameValueCollection" /> contains keys that are not null.</summary>
|
||||
/// <returns>true if the <see cref="T:System.Collections.Specialized.NameValueCollection" /> contains keys that are not null; otherwise, false.</returns>
|
||||
// Token: 0x06000222 RID: 546 RVA: 0x000085D0 File Offset: 0x000067D0
|
||||
public bool HasKeys()
|
||||
{
|
||||
return base.BaseHasKeys();
|
||||
}
|
||||
|
||||
/// <summary>Removes the entries with the specified key from the <see cref="T:System.Collections.Specialized.NameObjectCollectionBase" /> instance.</summary>
|
||||
/// <param name="name">The <see cref="T:System.String" /> key of the entry to remove. The key can be null.</param>
|
||||
/// <exception cref="T:System.NotSupportedException">The collection is read-only.</exception>
|
||||
// Token: 0x06000223 RID: 547 RVA: 0x000085D8 File Offset: 0x000067D8
|
||||
public virtual void Remove(string name)
|
||||
{
|
||||
if (base.IsReadOnly)
|
||||
{
|
||||
throw new NotSupportedException("Collection is read-only");
|
||||
}
|
||||
this.InvalidateCachedArrays();
|
||||
base.BaseRemove(name);
|
||||
}
|
||||
|
||||
/// <summary>Sets the value of an entry in the <see cref="T:System.Collections.Specialized.NameValueCollection" />.</summary>
|
||||
/// <param name="name">The <see cref="T:System.String" /> key of the entry to add the new value to. The key can be null.</param>
|
||||
/// <param name="value">The <see cref="T:System.Object" /> that represents the new value to add to the specified entry. The value can be null.</param>
|
||||
/// <exception cref="T:System.NotSupportedException">The collection is read-only.</exception>
|
||||
// Token: 0x06000224 RID: 548 RVA: 0x00008600 File Offset: 0x00006800
|
||||
public virtual void Set(string name, string value)
|
||||
{
|
||||
if (base.IsReadOnly)
|
||||
{
|
||||
throw new NotSupportedException("Collection is read-only");
|
||||
}
|
||||
this.InvalidateCachedArrays();
|
||||
ArrayList arrayList = new ArrayList();
|
||||
if (value != null)
|
||||
{
|
||||
arrayList.Add(value);
|
||||
base.BaseSet(name, arrayList);
|
||||
}
|
||||
else
|
||||
{
|
||||
base.BaseSet(name, null);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Resets the cached arrays of the collection to null.</summary>
|
||||
// Token: 0x06000225 RID: 549 RVA: 0x00008654 File Offset: 0x00006854
|
||||
protected void InvalidateCachedArrays()
|
||||
{
|
||||
this.cachedAllKeys = null;
|
||||
this.cachedAll = null;
|
||||
}
|
||||
|
||||
// Token: 0x040000A4 RID: 164
|
||||
private string[] cachedAllKeys;
|
||||
|
||||
// Token: 0x040000A5 RID: 165
|
||||
private string[] cachedAll;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,584 @@
|
||||
using System;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
namespace System.Collections.Specialized
|
||||
{
|
||||
/// <summary>Represents a collection of key/value pairs that are accessible by the key or index.</summary>
|
||||
// Token: 0x02000034 RID: 52
|
||||
[Serializable]
|
||||
public class OrderedDictionary : ICollection, IOrderedDictionary, IDictionary, IDeserializationCallback, IEnumerable, ISerializable
|
||||
{
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.Specialized.OrderedDictionary" /> class.</summary>
|
||||
// Token: 0x06000226 RID: 550 RVA: 0x00008664 File Offset: 0x00006864
|
||||
public OrderedDictionary()
|
||||
{
|
||||
this.list = new ArrayList();
|
||||
this.hash = new Hashtable();
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.Specialized.OrderedDictionary" /> class using the specified initial capacity.</summary>
|
||||
/// <param name="capacity">The initial number of elements that the <see cref="T:System.Collections.Specialized.OrderedDictionary" /> collection can contain.</param>
|
||||
// Token: 0x06000227 RID: 551 RVA: 0x00008684 File Offset: 0x00006884
|
||||
public OrderedDictionary(int capacity)
|
||||
{
|
||||
this.initialCapacity = ((capacity >= 0) ? capacity : 0);
|
||||
this.list = new ArrayList(this.initialCapacity);
|
||||
this.hash = new Hashtable(this.initialCapacity);
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.Specialized.OrderedDictionary" /> class using the specified comparer.</summary>
|
||||
/// <param name="comparer">The <see cref="T:System.Collections.IComparer" /> to use to determine whether two keys are equal.-or- null to use the default comparer, which is each key's implementation of <see cref="M:System.Object.Equals(System.Object)" />.</param>
|
||||
// Token: 0x06000228 RID: 552 RVA: 0x000086D0 File Offset: 0x000068D0
|
||||
public OrderedDictionary(IEqualityComparer equalityComparer)
|
||||
{
|
||||
this.list = new ArrayList();
|
||||
this.hash = new Hashtable(equalityComparer);
|
||||
this.comparer = equalityComparer;
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.Specialized.OrderedDictionary" /> class using the specified initial capacity and comparer.</summary>
|
||||
/// <param name="capacity">The initial number of elements that the <see cref="T:System.Collections.Specialized.OrderedDictionary" /> collection can contain.</param>
|
||||
/// <param name="comparer">The <see cref="T:System.Collections.IComparer" /> to use to determine whether two keys are equal.-or- null to use the default comparer, which is each key's implementation of <see cref="M:System.Object.Equals(System.Object)" />.</param>
|
||||
// Token: 0x06000229 RID: 553 RVA: 0x00008704 File Offset: 0x00006904
|
||||
public OrderedDictionary(int capacity, IEqualityComparer equalityComparer)
|
||||
{
|
||||
this.initialCapacity = ((capacity >= 0) ? capacity : 0);
|
||||
this.list = new ArrayList(this.initialCapacity);
|
||||
this.hash = new Hashtable(this.initialCapacity, equalityComparer);
|
||||
this.comparer = equalityComparer;
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.Specialized.OrderedDictionary" /> class that is serializable using the specified <see cref="T:System.Runtime.Serialization.SerializationInfo" /> and <see cref="T:System.Runtime.Serialization.StreamingContext" /> objects.</summary>
|
||||
/// <param name="info">A <see cref="T:System.Runtime.Serialization.SerializationInfo" /> object containing the information required to serialize the <see cref="T:System.Collections.Specialized.OrderedDictionary" /> collection.</param>
|
||||
/// <param name="context">A <see cref="T:System.Runtime.Serialization.StreamingContext" /> object containing the source and destination of the serialized stream associated with the <see cref="T:System.Collections.Specialized.OrderedDictionary" />.</param>
|
||||
// Token: 0x0600022A RID: 554 RVA: 0x00008758 File Offset: 0x00006958
|
||||
protected OrderedDictionary(SerializationInfo info, StreamingContext context)
|
||||
{
|
||||
this.serializationInfo = info;
|
||||
}
|
||||
|
||||
/// <summary>Implements the <see cref="T:System.Runtime.Serialization.ISerializable" /> interface and is called back by the deserialization event when deserialization is complete.</summary>
|
||||
/// <param name="sender">The source of the deserialization event.</param>
|
||||
// Token: 0x0600022B RID: 555 RVA: 0x00008768 File Offset: 0x00006968
|
||||
void IDeserializationCallback.OnDeserialization(object sender)
|
||||
{
|
||||
if (this.serializationInfo == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
this.comparer = (IEqualityComparer)this.serializationInfo.GetValue("KeyComparer", typeof(IEqualityComparer));
|
||||
this.readOnly = this.serializationInfo.GetBoolean("ReadOnly");
|
||||
this.initialCapacity = this.serializationInfo.GetInt32("InitialCapacity");
|
||||
if (this.list == null)
|
||||
{
|
||||
this.list = new ArrayList();
|
||||
}
|
||||
else
|
||||
{
|
||||
this.list.Clear();
|
||||
}
|
||||
this.hash = new Hashtable(this.comparer);
|
||||
object[] array = (object[])this.serializationInfo.GetValue("ArrayList", typeof(object[]));
|
||||
foreach (DictionaryEntry dictionaryEntry in array)
|
||||
{
|
||||
this.hash.Add(dictionaryEntry.Key, dictionaryEntry.Value);
|
||||
this.list.Add(dictionaryEntry);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Returns an <see cref="T:System.Collections.IDictionaryEnumerator" /> object that iterates through the <see cref="T:System.Collections.Specialized.OrderedDictionary" /> collection.</summary>
|
||||
/// <returns>An <see cref="T:System.Collections.IDictionaryEnumerator" /> object for the <see cref="T:System.Collections.Specialized.OrderedDictionary" /> collection.</returns>
|
||||
// Token: 0x0600022C RID: 556 RVA: 0x00008874 File Offset: 0x00006A74
|
||||
IEnumerator IEnumerable.GetEnumerator()
|
||||
{
|
||||
return this.list.GetEnumerator();
|
||||
}
|
||||
|
||||
/// <summary>Gets a value indicating whether access to the <see cref="T:System.Collections.Specialized.OrderedDictionary" /> object is synchronized (thread-safe).</summary>
|
||||
/// <returns>This method always returns false.</returns>
|
||||
// Token: 0x17000093 RID: 147
|
||||
// (get) Token: 0x0600022D RID: 557 RVA: 0x00008884 File Offset: 0x00006A84
|
||||
bool ICollection.IsSynchronized
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.list.IsSynchronized;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets an object that can be used to synchronize access to the <see cref="T:System.Collections.Specialized.OrderedDictionary" /> object.</summary>
|
||||
/// <returns>An object that can be used to synchronize access to the <see cref="T:System.Collections.Specialized.OrderedDictionary" /> object.</returns>
|
||||
// Token: 0x17000094 RID: 148
|
||||
// (get) Token: 0x0600022E RID: 558 RVA: 0x00008894 File Offset: 0x00006A94
|
||||
object ICollection.SyncRoot
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.list.SyncRoot;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a value indicating whether the <see cref="T:System.Collections.Specialized.OrderedDictionary" /> has a fixed size.</summary>
|
||||
/// <returns>true if the <see cref="T:System.Collections.Specialized.OrderedDictionary" /> has a fixed size; otherwise, false. The default is false.</returns>
|
||||
// Token: 0x17000095 RID: 149
|
||||
// (get) Token: 0x0600022F RID: 559 RVA: 0x000088A4 File Offset: 0x00006AA4
|
||||
bool IDictionary.IsFixedSize
|
||||
{
|
||||
get
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Implements the <see cref="T:System.Runtime.Serialization.ISerializable" /> interface and is called back by the deserialization event when deserialization is complete.</summary>
|
||||
/// <param name="sender">The source of the deserialization event.</param>
|
||||
/// <exception cref="T:System.Runtime.Serialization.SerializationException">The <see cref="T:System.Runtime.Serialization.SerializationInfo" /> object associated with the current <see cref="T:System.Collections.Specialized.OrderedDictionary" /> collection is invalid.</exception>
|
||||
// Token: 0x06000230 RID: 560 RVA: 0x000088A8 File Offset: 0x00006AA8
|
||||
protected virtual void OnDeserialization(object sender)
|
||||
{
|
||||
((IDeserializationCallback)this).OnDeserialization(sender);
|
||||
}
|
||||
|
||||
/// <summary>Implements the <see cref="T:System.Runtime.Serialization.ISerializable" /> interface and returns the data needed to serialize the <see cref="T:System.Collections.Specialized.OrderedDictionary" /> collection.</summary>
|
||||
/// <param name="info">A <see cref="T:System.Runtime.Serialization.SerializationInfo" /> object containing the information required to serialize the <see cref="T:System.Collections.Specialized.OrderedDictionary" /> collection.</param>
|
||||
/// <param name="context">A <see cref="T:System.Runtime.Serialization.StreamingContext" /> object containing the source and destination of the serialized stream associated with the <see cref="T:System.Collections.Specialized.OrderedDictionary" />.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="info" /> is null.</exception>
|
||||
// Token: 0x06000231 RID: 561 RVA: 0x000088B4 File Offset: 0x00006AB4
|
||||
public virtual void GetObjectData(SerializationInfo info, StreamingContext context)
|
||||
{
|
||||
if (info == null)
|
||||
{
|
||||
throw new ArgumentNullException("info");
|
||||
}
|
||||
info.AddValue("KeyComparer", this.comparer, typeof(IEqualityComparer));
|
||||
info.AddValue("ReadOnly", this.readOnly);
|
||||
info.AddValue("InitialCapacity", this.initialCapacity);
|
||||
object[] array = new object[this.hash.Count];
|
||||
this.hash.CopyTo(array, 0);
|
||||
info.AddValue("ArrayList", array);
|
||||
}
|
||||
|
||||
/// <summary>Gets the number of key/values pairs contained in the <see cref="T:System.Collections.Specialized.OrderedDictionary" /> collection.</summary>
|
||||
/// <returns>The number of key/value pairs contained in the <see cref="T:System.Collections.Specialized.OrderedDictionary" /> collection.</returns>
|
||||
// Token: 0x17000096 RID: 150
|
||||
// (get) Token: 0x06000232 RID: 562 RVA: 0x0000893C File Offset: 0x00006B3C
|
||||
public int Count
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.list.Count;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Copies the <see cref="T:System.Collections.Specialized.OrderedDictionary" /> elements to a one-dimensional <see cref="T:System.Array" /> object at the specified index.</summary>
|
||||
/// <param name="array">The one-dimensional <see cref="T:System.Array" /> object that is the destination of the <see cref="T:System.Collections.DictionaryEntry" /> objects copied from <see cref="T:System.Collections.Specialized.OrderedDictionary" /> collection. The <see cref="T:System.Array" /> must have zero-based indexing.</param>
|
||||
/// <param name="index">The zero-based index in <paramref name="array" /> at which copying begins.</param>
|
||||
// Token: 0x06000233 RID: 563 RVA: 0x0000894C File Offset: 0x00006B4C
|
||||
public void CopyTo(Array array, int index)
|
||||
{
|
||||
this.list.CopyTo(array, index);
|
||||
}
|
||||
|
||||
/// <summary>Gets a value indicating whether the <see cref="T:System.Collections.Specialized.OrderedDictionary" /> collection is read-only.</summary>
|
||||
/// <returns>true if the <see cref="T:System.Collections.Specialized.OrderedDictionary" /> collection is read-only; otherwise, false. The default is false.</returns>
|
||||
// Token: 0x17000097 RID: 151
|
||||
// (get) Token: 0x06000234 RID: 564 RVA: 0x0000895C File Offset: 0x00006B5C
|
||||
public bool IsReadOnly
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.readOnly;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets or sets the value with the specified key.</summary>
|
||||
/// <returns>The value associated with the specified key. If the specified key is not found, attempting to get it returns null, and attempting to set it creates a new element using the specified key.</returns>
|
||||
/// <param name="key">The key of the value to get or set.</param>
|
||||
/// <exception cref="T:System.NotSupportedException">The property is being set and the <see cref="T:System.Collections.Specialized.OrderedDictionary" /> collection is read-only.</exception>
|
||||
// Token: 0x17000098 RID: 152
|
||||
public object this[object key]
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.hash[key];
|
||||
}
|
||||
set
|
||||
{
|
||||
this.WriteCheck();
|
||||
if (this.hash.Contains(key))
|
||||
{
|
||||
int num = this.FindListEntry(key);
|
||||
this.list[num] = new DictionaryEntry(key, value);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.list.Add(new DictionaryEntry(key, value));
|
||||
}
|
||||
this.hash[key] = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets or sets the value at the specified index.</summary>
|
||||
/// <returns>The value of the item at the specified index. </returns>
|
||||
/// <param name="index">The zero-based index of the value to get or set.</param>
|
||||
/// <exception cref="T:System.NotSupportedException">The property is being set and the <see cref="T:System.Collections.Specialized.OrderedDictionary" /> collection is read-only.</exception>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="index" /> is less than zero.-or-<paramref name="index" /> is equal to or greater than <see cref="P:System.Collections.Specialized.OrderedDictionary.Count" />.</exception>
|
||||
// Token: 0x17000099 RID: 153
|
||||
public object this[int index]
|
||||
{
|
||||
get
|
||||
{
|
||||
return ((DictionaryEntry)this.list[index]).Value;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.WriteCheck();
|
||||
DictionaryEntry dictionaryEntry = (DictionaryEntry)this.list[index];
|
||||
dictionaryEntry.Value = value;
|
||||
this.list[index] = dictionaryEntry;
|
||||
this.hash[dictionaryEntry.Key] = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets an <see cref="T:System.Collections.ICollection" /> object containing the keys in the <see cref="T:System.Collections.Specialized.OrderedDictionary" /> collection.</summary>
|
||||
/// <returns>An <see cref="T:System.Collections.ICollection" /> object containing the keys in the <see cref="T:System.Collections.Specialized.OrderedDictionary" /> collection.</returns>
|
||||
// Token: 0x1700009A RID: 154
|
||||
// (get) Token: 0x06000239 RID: 569 RVA: 0x00008A60 File Offset: 0x00006C60
|
||||
public ICollection Keys
|
||||
{
|
||||
get
|
||||
{
|
||||
return new OrderedDictionary.OrderedCollection(this.list, true);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets an <see cref="T:System.Collections.ICollection" /> object containing the values in the <see cref="T:System.Collections.Specialized.OrderedDictionary" /> collection.</summary>
|
||||
/// <returns>An <see cref="T:System.Collections.ICollection" /> object containing the values in the <see cref="T:System.Collections.Specialized.OrderedDictionary" /> collection.</returns>
|
||||
// Token: 0x1700009B RID: 155
|
||||
// (get) Token: 0x0600023A RID: 570 RVA: 0x00008A70 File Offset: 0x00006C70
|
||||
public ICollection Values
|
||||
{
|
||||
get
|
||||
{
|
||||
return new OrderedDictionary.OrderedCollection(this.list, false);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Adds an entry with the specified key and value into the <see cref="T:System.Collections.Specialized.OrderedDictionary" /> collection with the lowest available index.</summary>
|
||||
/// <param name="key">The key of the entry to add.</param>
|
||||
/// <param name="value">The value of the entry to add. This value can be null.</param>
|
||||
/// <exception cref="T:System.NotSupportedException">The <see cref="T:System.Collections.Specialized.OrderedDictionary" /> collection is read-only.</exception>
|
||||
// Token: 0x0600023B RID: 571 RVA: 0x00008A80 File Offset: 0x00006C80
|
||||
public void Add(object key, object value)
|
||||
{
|
||||
this.WriteCheck();
|
||||
this.hash.Add(key, value);
|
||||
this.list.Add(new DictionaryEntry(key, value));
|
||||
}
|
||||
|
||||
/// <summary>Removes all elements from the <see cref="T:System.Collections.Specialized.OrderedDictionary" /> collection.</summary>
|
||||
/// <exception cref="T:System.NotSupportedException">The <see cref="T:System.Collections.Specialized.OrderedDictionary" /> collection is read-only.</exception>
|
||||
// Token: 0x0600023C RID: 572 RVA: 0x00008AB0 File Offset: 0x00006CB0
|
||||
public void Clear()
|
||||
{
|
||||
this.WriteCheck();
|
||||
this.hash.Clear();
|
||||
this.list.Clear();
|
||||
}
|
||||
|
||||
/// <summary>Determines whether the <see cref="T:System.Collections.Specialized.OrderedDictionary" /> collection contains a specific key.</summary>
|
||||
/// <returns>true if the <see cref="T:System.Collections.Specialized.OrderedDictionary" /> collection contains an element with the specified key; otherwise, false.</returns>
|
||||
/// <param name="key">The key to locate in the <see cref="T:System.Collections.Specialized.OrderedDictionary" /> collection.</param>
|
||||
// Token: 0x0600023D RID: 573 RVA: 0x00008AD0 File Offset: 0x00006CD0
|
||||
public bool Contains(object key)
|
||||
{
|
||||
return this.hash.Contains(key);
|
||||
}
|
||||
|
||||
/// <summary>Returns an <see cref="T:System.Collections.IDictionaryEnumerator" /> object that iterates through the <see cref="T:System.Collections.Specialized.OrderedDictionary" /> collection.</summary>
|
||||
/// <returns>An <see cref="T:System.Collections.IDictionaryEnumerator" /> object for the <see cref="T:System.Collections.Specialized.OrderedDictionary" /> collection.</returns>
|
||||
// Token: 0x0600023E RID: 574 RVA: 0x00008AE0 File Offset: 0x00006CE0
|
||||
public virtual IDictionaryEnumerator GetEnumerator()
|
||||
{
|
||||
return new OrderedDictionary.OrderedEntryCollectionEnumerator(this.list.GetEnumerator());
|
||||
}
|
||||
|
||||
/// <summary>Removes the entry with the specified key from the <see cref="T:System.Collections.Specialized.OrderedDictionary" /> collection.</summary>
|
||||
/// <param name="key">The key of the entry to remove.</param>
|
||||
/// <exception cref="T:System.NotSupportedException">The <see cref="T:System.Collections.Specialized.OrderedDictionary" /> collection is read-only.</exception>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="key" /> is null.</exception>
|
||||
// Token: 0x0600023F RID: 575 RVA: 0x00008AF4 File Offset: 0x00006CF4
|
||||
public void Remove(object key)
|
||||
{
|
||||
this.WriteCheck();
|
||||
if (this.hash.Contains(key))
|
||||
{
|
||||
this.hash.Remove(key);
|
||||
int num = this.FindListEntry(key);
|
||||
this.list.RemoveAt(num);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000240 RID: 576 RVA: 0x00008B38 File Offset: 0x00006D38
|
||||
private int FindListEntry(object key)
|
||||
{
|
||||
for (int i = 0; i < this.list.Count; i++)
|
||||
{
|
||||
DictionaryEntry dictionaryEntry = (DictionaryEntry)this.list[i];
|
||||
if ((this.comparer == null) ? dictionaryEntry.Key.Equals(key) : this.comparer.Equals(dictionaryEntry.Key, key))
|
||||
{
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
// Token: 0x06000241 RID: 577 RVA: 0x00008BAC File Offset: 0x00006DAC
|
||||
private void WriteCheck()
|
||||
{
|
||||
if (this.readOnly)
|
||||
{
|
||||
throw new NotSupportedException("Collection is read only");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Returns a read-only copy of the current <see cref="T:System.Collections.Specialized.OrderedDictionary" /> collection.</summary>
|
||||
/// <returns>A read-only copy of the current <see cref="T:System.Collections.Specialized.OrderedDictionary" /> collection.</returns>
|
||||
// Token: 0x06000242 RID: 578 RVA: 0x00008BC4 File Offset: 0x00006DC4
|
||||
public OrderedDictionary AsReadOnly()
|
||||
{
|
||||
return new OrderedDictionary
|
||||
{
|
||||
list = this.list,
|
||||
hash = this.hash,
|
||||
comparer = this.comparer,
|
||||
readOnly = true
|
||||
};
|
||||
}
|
||||
|
||||
/// <summary>Inserts a new entry into the <see cref="T:System.Collections.Specialized.OrderedDictionary" /> collection with the specified key and value at the specified index.</summary>
|
||||
/// <param name="index">The zero-based index at which the element should be inserted.</param>
|
||||
/// <param name="key">The key of the entry to add.</param>
|
||||
/// <param name="value">The value of the entry to add. The value can be null.</param>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="index" /> is out of range.</exception>
|
||||
/// <exception cref="T:System.NotSupportedException">This collection is read-only.</exception>
|
||||
// Token: 0x06000243 RID: 579 RVA: 0x00008C04 File Offset: 0x00006E04
|
||||
public void Insert(int index, object key, object value)
|
||||
{
|
||||
this.WriteCheck();
|
||||
this.hash.Add(key, value);
|
||||
this.list.Insert(index, new DictionaryEntry(key, value));
|
||||
}
|
||||
|
||||
/// <summary>Removes the entry at the specified index from the <see cref="T:System.Collections.Specialized.OrderedDictionary" /> collection.</summary>
|
||||
/// <param name="index">The zero-based index of the entry to remove.</param>
|
||||
/// <exception cref="T:System.NotSupportedException">The <see cref="T:System.Collections.Specialized.OrderedDictionary" /> collection is read-only.</exception>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="index" /> is less than zero.- or -<paramref name="index" /> is equal to or greater than <see cref="P:System.Collections.Specialized.OrderedDictionary.Count" />.</exception>
|
||||
// Token: 0x06000244 RID: 580 RVA: 0x00008C3C File Offset: 0x00006E3C
|
||||
public void RemoveAt(int index)
|
||||
{
|
||||
this.WriteCheck();
|
||||
DictionaryEntry dictionaryEntry = (DictionaryEntry)this.list[index];
|
||||
this.list.RemoveAt(index);
|
||||
this.hash.Remove(dictionaryEntry.Key);
|
||||
}
|
||||
|
||||
// Token: 0x040000A6 RID: 166
|
||||
private ArrayList list;
|
||||
|
||||
// Token: 0x040000A7 RID: 167
|
||||
private Hashtable hash;
|
||||
|
||||
// Token: 0x040000A8 RID: 168
|
||||
private bool readOnly;
|
||||
|
||||
// Token: 0x040000A9 RID: 169
|
||||
private int initialCapacity;
|
||||
|
||||
// Token: 0x040000AA RID: 170
|
||||
private SerializationInfo serializationInfo;
|
||||
|
||||
// Token: 0x040000AB RID: 171
|
||||
private IEqualityComparer comparer;
|
||||
|
||||
// Token: 0x02000035 RID: 53
|
||||
private class OrderedEntryCollectionEnumerator : IEnumerator, IDictionaryEnumerator
|
||||
{
|
||||
// Token: 0x06000245 RID: 581 RVA: 0x00008C80 File Offset: 0x00006E80
|
||||
public OrderedEntryCollectionEnumerator(IEnumerator listEnumerator)
|
||||
{
|
||||
this.listEnumerator = listEnumerator;
|
||||
}
|
||||
|
||||
// Token: 0x06000246 RID: 582 RVA: 0x00008C90 File Offset: 0x00006E90
|
||||
public bool MoveNext()
|
||||
{
|
||||
return this.listEnumerator.MoveNext();
|
||||
}
|
||||
|
||||
// Token: 0x06000247 RID: 583 RVA: 0x00008CA0 File Offset: 0x00006EA0
|
||||
public void Reset()
|
||||
{
|
||||
this.listEnumerator.Reset();
|
||||
}
|
||||
|
||||
// Token: 0x1700009C RID: 156
|
||||
// (get) Token: 0x06000248 RID: 584 RVA: 0x00008CB0 File Offset: 0x00006EB0
|
||||
public object Current
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.listEnumerator.Current;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700009D RID: 157
|
||||
// (get) Token: 0x06000249 RID: 585 RVA: 0x00008CC0 File Offset: 0x00006EC0
|
||||
public DictionaryEntry Entry
|
||||
{
|
||||
get
|
||||
{
|
||||
return (DictionaryEntry)this.listEnumerator.Current;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700009E RID: 158
|
||||
// (get) Token: 0x0600024A RID: 586 RVA: 0x00008CD4 File Offset: 0x00006ED4
|
||||
public object Key
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Entry.Key;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700009F RID: 159
|
||||
// (get) Token: 0x0600024B RID: 587 RVA: 0x00008CF0 File Offset: 0x00006EF0
|
||||
public object Value
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Entry.Value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x040000AC RID: 172
|
||||
private IEnumerator listEnumerator;
|
||||
}
|
||||
|
||||
// Token: 0x02000036 RID: 54
|
||||
private class OrderedCollection : ICollection, IEnumerable
|
||||
{
|
||||
// Token: 0x0600024C RID: 588 RVA: 0x00008D0C File Offset: 0x00006F0C
|
||||
public OrderedCollection(ArrayList list, bool isKeyList)
|
||||
{
|
||||
this.list = list;
|
||||
this.isKeyList = isKeyList;
|
||||
}
|
||||
|
||||
// Token: 0x170000A0 RID: 160
|
||||
// (get) Token: 0x0600024D RID: 589 RVA: 0x00008D24 File Offset: 0x00006F24
|
||||
public int Count
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.list.Count;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170000A1 RID: 161
|
||||
// (get) Token: 0x0600024E RID: 590 RVA: 0x00008D34 File Offset: 0x00006F34
|
||||
public bool IsSynchronized
|
||||
{
|
||||
get
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170000A2 RID: 162
|
||||
// (get) Token: 0x0600024F RID: 591 RVA: 0x00008D38 File Offset: 0x00006F38
|
||||
public object SyncRoot
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.list.SyncRoot;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000250 RID: 592 RVA: 0x00008D48 File Offset: 0x00006F48
|
||||
public void CopyTo(Array array, int index)
|
||||
{
|
||||
for (int i = 0; i < this.list.Count; i++)
|
||||
{
|
||||
DictionaryEntry dictionaryEntry = (DictionaryEntry)this.list[i];
|
||||
if (this.isKeyList)
|
||||
{
|
||||
array.SetValue(dictionaryEntry.Key, index + i);
|
||||
}
|
||||
else
|
||||
{
|
||||
array.SetValue(dictionaryEntry.Value, index + i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000251 RID: 593 RVA: 0x00008DB4 File Offset: 0x00006FB4
|
||||
public IEnumerator GetEnumerator()
|
||||
{
|
||||
return new OrderedDictionary.OrderedCollection.OrderedCollectionEnumerator(this.list.GetEnumerator(), this.isKeyList);
|
||||
}
|
||||
|
||||
// Token: 0x040000AD RID: 173
|
||||
private ArrayList list;
|
||||
|
||||
// Token: 0x040000AE RID: 174
|
||||
private bool isKeyList;
|
||||
|
||||
// Token: 0x02000037 RID: 55
|
||||
private class OrderedCollectionEnumerator : IEnumerator
|
||||
{
|
||||
// Token: 0x06000252 RID: 594 RVA: 0x00008DCC File Offset: 0x00006FCC
|
||||
public OrderedCollectionEnumerator(IEnumerator listEnumerator, bool isKeyList)
|
||||
{
|
||||
this.listEnumerator = listEnumerator;
|
||||
this.isKeyList = isKeyList;
|
||||
}
|
||||
|
||||
// Token: 0x170000A3 RID: 163
|
||||
// (get) Token: 0x06000253 RID: 595 RVA: 0x00008DE4 File Offset: 0x00006FE4
|
||||
public object Current
|
||||
{
|
||||
get
|
||||
{
|
||||
DictionaryEntry dictionaryEntry = (DictionaryEntry)this.listEnumerator.Current;
|
||||
return (!this.isKeyList) ? dictionaryEntry.Value : dictionaryEntry.Key;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000254 RID: 596 RVA: 0x00008E20 File Offset: 0x00007020
|
||||
public bool MoveNext()
|
||||
{
|
||||
return this.listEnumerator.MoveNext();
|
||||
}
|
||||
|
||||
// Token: 0x06000255 RID: 597 RVA: 0x00008E30 File Offset: 0x00007030
|
||||
public void Reset()
|
||||
{
|
||||
this.listEnumerator.Reset();
|
||||
}
|
||||
|
||||
// Token: 0x040000AF RID: 175
|
||||
private bool isKeyList;
|
||||
|
||||
// Token: 0x040000B0 RID: 176
|
||||
private IEnumerator listEnumerator;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,130 @@
|
||||
using System;
|
||||
|
||||
namespace System.Collections.Specialized
|
||||
{
|
||||
// Token: 0x02000038 RID: 56
|
||||
internal class ProcessStringDictionary : StringDictionary, IEnumerable
|
||||
{
|
||||
// Token: 0x06000256 RID: 598 RVA: 0x00008E40 File Offset: 0x00007040
|
||||
public ProcessStringDictionary()
|
||||
{
|
||||
IHashCodeProvider hashCodeProvider = null;
|
||||
IComparer comparer = null;
|
||||
int platform = (int)Environment.OSVersion.Platform;
|
||||
if (platform != 4 && platform != 128)
|
||||
{
|
||||
hashCodeProvider = CaseInsensitiveHashCodeProvider.DefaultInvariant;
|
||||
comparer = CaseInsensitiveComparer.DefaultInvariant;
|
||||
}
|
||||
this.table = new Hashtable(hashCodeProvider, comparer);
|
||||
}
|
||||
|
||||
// Token: 0x170000A4 RID: 164
|
||||
// (get) Token: 0x06000257 RID: 599 RVA: 0x00008E90 File Offset: 0x00007090
|
||||
public override int Count
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.table.Count;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170000A5 RID: 165
|
||||
// (get) Token: 0x06000258 RID: 600 RVA: 0x00008EA0 File Offset: 0x000070A0
|
||||
public override bool IsSynchronized
|
||||
{
|
||||
get
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170000A6 RID: 166
|
||||
public override string this[string key]
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)this.table[key];
|
||||
}
|
||||
set
|
||||
{
|
||||
this.table[key] = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170000A7 RID: 167
|
||||
// (get) Token: 0x0600025B RID: 603 RVA: 0x00008EC8 File Offset: 0x000070C8
|
||||
public override ICollection Keys
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.table.Keys;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170000A8 RID: 168
|
||||
// (get) Token: 0x0600025C RID: 604 RVA: 0x00008ED8 File Offset: 0x000070D8
|
||||
public override ICollection Values
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.table.Values;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170000A9 RID: 169
|
||||
// (get) Token: 0x0600025D RID: 605 RVA: 0x00008EE8 File Offset: 0x000070E8
|
||||
public override object SyncRoot
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.table.SyncRoot;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600025E RID: 606 RVA: 0x00008EF8 File Offset: 0x000070F8
|
||||
public override void Add(string key, string value)
|
||||
{
|
||||
this.table.Add(key, value);
|
||||
}
|
||||
|
||||
// Token: 0x0600025F RID: 607 RVA: 0x00008F08 File Offset: 0x00007108
|
||||
public override void Clear()
|
||||
{
|
||||
this.table.Clear();
|
||||
}
|
||||
|
||||
// Token: 0x06000260 RID: 608 RVA: 0x00008F18 File Offset: 0x00007118
|
||||
public override bool ContainsKey(string key)
|
||||
{
|
||||
return this.table.ContainsKey(key);
|
||||
}
|
||||
|
||||
// Token: 0x06000261 RID: 609 RVA: 0x00008F28 File Offset: 0x00007128
|
||||
public override bool ContainsValue(string value)
|
||||
{
|
||||
return this.table.ContainsValue(value);
|
||||
}
|
||||
|
||||
// Token: 0x06000262 RID: 610 RVA: 0x00008F38 File Offset: 0x00007138
|
||||
public override void CopyTo(Array array, int index)
|
||||
{
|
||||
this.table.CopyTo(array, index);
|
||||
}
|
||||
|
||||
// Token: 0x06000263 RID: 611 RVA: 0x00008F48 File Offset: 0x00007148
|
||||
public override IEnumerator GetEnumerator()
|
||||
{
|
||||
return this.table.GetEnumerator();
|
||||
}
|
||||
|
||||
// Token: 0x06000264 RID: 612 RVA: 0x00008F58 File Offset: 0x00007158
|
||||
public override void Remove(string key)
|
||||
{
|
||||
this.table.Remove(key);
|
||||
}
|
||||
|
||||
// Token: 0x040000B1 RID: 177
|
||||
private Hashtable table;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,295 @@
|
||||
using System;
|
||||
|
||||
namespace System.Collections.Specialized
|
||||
{
|
||||
/// <summary>Represents a collection of strings.</summary>
|
||||
// Token: 0x02000039 RID: 57
|
||||
[Serializable]
|
||||
public class StringCollection : ICollection, IEnumerable, IList
|
||||
{
|
||||
/// <summary>Gets a value indicating whether the <see cref="T:System.Collections.Specialized.StringCollection" /> object is read-only.</summary>
|
||||
/// <returns>true if the <see cref="T:System.Collections.Specialized.StringCollection" /> object is read-only; otherwise, false. The default is false.</returns>
|
||||
// Token: 0x170000AA RID: 170
|
||||
// (get) Token: 0x06000266 RID: 614 RVA: 0x00008F7C File Offset: 0x0000717C
|
||||
bool IList.IsReadOnly
|
||||
{
|
||||
get
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a value indicating whether the <see cref="T:System.Collections.Specialized.StringCollection" /> object has a fixed size.</summary>
|
||||
/// <returns>true if the <see cref="T:System.Collections.Specialized.StringCollection" /> object has a fixed size; otherwise, false. The default is false.</returns>
|
||||
// Token: 0x170000AB RID: 171
|
||||
// (get) Token: 0x06000267 RID: 615 RVA: 0x00008F80 File Offset: 0x00007180
|
||||
bool IList.IsFixedSize
|
||||
{
|
||||
get
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets or sets the element at the specified index.</summary>
|
||||
/// <returns>The element at the specified index.</returns>
|
||||
/// <param name="index">The zero-based index of the element to get or set. </param>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="index" /> is less than zero.-or- <paramref name="index" /> is equal to or greater than <see cref="P:System.Collections.Specialized.StringCollection.Count" />. </exception>
|
||||
// Token: 0x170000AC RID: 172
|
||||
object IList.this[int index]
|
||||
{
|
||||
get
|
||||
{
|
||||
return this[index];
|
||||
}
|
||||
set
|
||||
{
|
||||
this[index] = (string)value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Adds an object to the end of the <see cref="T:System.Collections.Specialized.StringCollection" />.</summary>
|
||||
/// <returns>The <see cref="T:System.Collections.Specialized.StringCollection" /> index at which the <paramref name="value" /> has been added.</returns>
|
||||
/// <param name="value">The <see cref="T:System.Object" /> to be added to the end of the <see cref="T:System.Collections.Specialized.StringCollection" />. The value can be null. </param>
|
||||
/// <exception cref="T:System.NotSupportedException">The <see cref="T:System.Collections.Specialized.StringCollection" /> is read-only.-or- The <see cref="T:System.Collections.Specialized.StringCollection" /> has a fixed size. </exception>
|
||||
// Token: 0x0600026A RID: 618 RVA: 0x00008FA0 File Offset: 0x000071A0
|
||||
int IList.Add(object value)
|
||||
{
|
||||
return this.Add((string)value);
|
||||
}
|
||||
|
||||
/// <summary>Determines whether an element is in the <see cref="T:System.Collections.Specialized.StringCollection" />.</summary>
|
||||
/// <returns>true if <paramref name="value" /> is found in the <see cref="T:System.Collections.Specialized.StringCollection" />; otherwise, false.</returns>
|
||||
/// <param name="value">The <see cref="T:System.Object" /> to locate in the <see cref="T:System.Collections.Specialized.StringCollection" />. The value can be null. </param>
|
||||
// Token: 0x0600026B RID: 619 RVA: 0x00008FB0 File Offset: 0x000071B0
|
||||
bool IList.Contains(object value)
|
||||
{
|
||||
return this.Contains((string)value);
|
||||
}
|
||||
|
||||
/// <summary>Searches for the specified <see cref="T:System.Object" /> and returns the zero-based index of the first occurrence within the entire <see cref="T:System.Collections.Specialized.StringCollection" />.</summary>
|
||||
/// <returns>The zero-based index of the first occurrence of <paramref name="value" /> within the entire <see cref="T:System.Collections.Specialized.StringCollection" />, if found; otherwise, -1.</returns>
|
||||
/// <param name="value">The <see cref="T:System.Object" /> to locate in the <see cref="T:System.Collections.Specialized.StringCollection" />. The value can be null. </param>
|
||||
// Token: 0x0600026C RID: 620 RVA: 0x00008FC0 File Offset: 0x000071C0
|
||||
int IList.IndexOf(object value)
|
||||
{
|
||||
return this.IndexOf((string)value);
|
||||
}
|
||||
|
||||
/// <summary>Inserts an element into the <see cref="T:System.Collections.Specialized.StringCollection" /> at the specified index.</summary>
|
||||
/// <param name="index">The zero-based index at which <paramref name="value" /> should be inserted. </param>
|
||||
/// <param name="value">The <see cref="T:System.Object" /> to insert. The value can be null. </param>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="index" /> is less than zero.-or- <paramref name="index" /> is greater than <see cref="P:System.Collections.Specialized.StringCollection.Count" />. </exception>
|
||||
/// <exception cref="T:System.NotSupportedException">The <see cref="T:System.Collections.Specialized.StringCollection" /> is read-only.-or- The <see cref="T:System.Collections.Specialized.StringCollection" /> has a fixed size. </exception>
|
||||
// Token: 0x0600026D RID: 621 RVA: 0x00008FD0 File Offset: 0x000071D0
|
||||
void IList.Insert(int index, object value)
|
||||
{
|
||||
this.Insert(index, (string)value);
|
||||
}
|
||||
|
||||
/// <summary>Removes the first occurrence of a specific object from the <see cref="T:System.Collections.Specialized.StringCollection" />.</summary>
|
||||
/// <param name="value">The <see cref="T:System.Object" /> to remove from the <see cref="T:System.Collections.Specialized.StringCollection" />. The value can be null. </param>
|
||||
/// <exception cref="T:System.NotSupportedException">The <see cref="T:System.Collections.Specialized.StringCollection" /> is read-only.-or- The <see cref="T:System.Collections.Specialized.StringCollection" /> has a fixed size. </exception>
|
||||
// Token: 0x0600026E RID: 622 RVA: 0x00008FE0 File Offset: 0x000071E0
|
||||
void IList.Remove(object value)
|
||||
{
|
||||
this.Remove((string)value);
|
||||
}
|
||||
|
||||
/// <summary>Copies the entire <see cref="T:System.Collections.Specialized.StringCollection" /> to a compatible one-dimensional <see cref="T:System.Array" />, starting at the specified index of the target array.</summary>
|
||||
/// <param name="array">The one-dimensional <see cref="T:System.Array" /> that is the destination of the elements copied from <see cref="T:System.Collections.Specialized.StringCollection" />. The <see cref="T:System.Array" /> must have zero-based indexing. </param>
|
||||
/// <param name="index">The zero-based index in <paramref name="array" /> at which copying begins. </param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="array" /> is null. </exception>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="index" /> is less than zero. </exception>
|
||||
/// <exception cref="T:System.ArgumentException">
|
||||
/// <paramref name="array" /> is multidimensional.-or- The number of elements in the source <see cref="T:System.Collections.Specialized.StringCollection" /> is greater than the available space from <paramref name="index" /> to the end of the destination <paramref name="array" />. </exception>
|
||||
/// <exception cref="T:System.InvalidCastException">The type of the source <see cref="T:System.Collections.Specialized.StringCollection" /> cannot be cast automatically to the type of the destination <paramref name="array" />. </exception>
|
||||
// Token: 0x0600026F RID: 623 RVA: 0x00008FF0 File Offset: 0x000071F0
|
||||
void ICollection.CopyTo(Array array, int index)
|
||||
{
|
||||
this.data.CopyTo(array, index);
|
||||
}
|
||||
|
||||
/// <summary>Returns a <see cref="T:System.Collections.IEnumerator" /> that iterates through the <see cref="T:System.Collections.Specialized.StringCollection" />.</summary>
|
||||
/// <returns>A <see cref="T:System.Collections.IEnumerator" /> for the <see cref="T:System.Collections.Specialized.StringCollection" />.</returns>
|
||||
// Token: 0x06000270 RID: 624 RVA: 0x00009000 File Offset: 0x00007200
|
||||
IEnumerator IEnumerable.GetEnumerator()
|
||||
{
|
||||
return this.data.GetEnumerator();
|
||||
}
|
||||
|
||||
/// <summary>Gets or sets the element at the specified index.</summary>
|
||||
/// <returns>The element at the specified index.</returns>
|
||||
/// <param name="index">The zero-based index of the entry to get or set. </param>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="index" /> is less than zero.-or- <paramref name="index" /> is equal to or greater than <see cref="P:System.Collections.Specialized.StringCollection.Count" />. </exception>
|
||||
// Token: 0x170000AD RID: 173
|
||||
public string this[int index]
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)this.data[index];
|
||||
}
|
||||
set
|
||||
{
|
||||
this.data[index] = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets the number of strings contained in the <see cref="T:System.Collections.Specialized.StringCollection" />.</summary>
|
||||
/// <returns>The number of strings contained in the <see cref="T:System.Collections.Specialized.StringCollection" />.</returns>
|
||||
// Token: 0x170000AE RID: 174
|
||||
// (get) Token: 0x06000273 RID: 627 RVA: 0x00009034 File Offset: 0x00007234
|
||||
public int Count
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.data.Count;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Adds a string to the end of the <see cref="T:System.Collections.Specialized.StringCollection" />.</summary>
|
||||
/// <returns>The zero-based index at which the new element is inserted.</returns>
|
||||
/// <param name="value">The string to add to the end of the <see cref="T:System.Collections.Specialized.StringCollection" />. The value can be null. </param>
|
||||
// Token: 0x06000274 RID: 628 RVA: 0x00009044 File Offset: 0x00007244
|
||||
public int Add(string value)
|
||||
{
|
||||
return this.data.Add(value);
|
||||
}
|
||||
|
||||
/// <summary>Copies the elements of a string array to the end of the <see cref="T:System.Collections.Specialized.StringCollection" />.</summary>
|
||||
/// <param name="value">An array of strings to add to the end of the <see cref="T:System.Collections.Specialized.StringCollection" />. The array itself can not be null but it can contain elements that are null. </param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="value" /> is null. </exception>
|
||||
// Token: 0x06000275 RID: 629 RVA: 0x00009054 File Offset: 0x00007254
|
||||
public void AddRange(string[] value)
|
||||
{
|
||||
if (value == null)
|
||||
{
|
||||
throw new ArgumentNullException("value");
|
||||
}
|
||||
this.data.AddRange(value);
|
||||
}
|
||||
|
||||
/// <summary>Removes all the strings from the <see cref="T:System.Collections.Specialized.StringCollection" />.</summary>
|
||||
// Token: 0x06000276 RID: 630 RVA: 0x00009074 File Offset: 0x00007274
|
||||
public void Clear()
|
||||
{
|
||||
this.data.Clear();
|
||||
}
|
||||
|
||||
/// <summary>Determines whether the specified string is in the <see cref="T:System.Collections.Specialized.StringCollection" />.</summary>
|
||||
/// <returns>true if <paramref name="value" /> is found in the <see cref="T:System.Collections.Specialized.StringCollection" />; otherwise, false.</returns>
|
||||
/// <param name="value">The string to locate in the <see cref="T:System.Collections.Specialized.StringCollection" />. The value can be null. </param>
|
||||
// Token: 0x06000277 RID: 631 RVA: 0x00009084 File Offset: 0x00007284
|
||||
public bool Contains(string value)
|
||||
{
|
||||
return this.data.Contains(value);
|
||||
}
|
||||
|
||||
/// <summary>Copies the entire <see cref="T:System.Collections.Specialized.StringCollection" /> values to a one-dimensional array of strings, starting at the specified index of the target array.</summary>
|
||||
/// <param name="array">The one-dimensional array of strings that is the destination of the elements copied from <see cref="T:System.Collections.Specialized.StringCollection" />. The <see cref="T:System.Array" /> must have zero-based indexing. </param>
|
||||
/// <param name="index">The zero-based index in <paramref name="array" /> at which copying begins. </param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="array" /> is null. </exception>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="index" /> is less than zero. </exception>
|
||||
/// <exception cref="T:System.ArgumentException">
|
||||
/// <paramref name="array" /> is multidimensional.-or- The number of elements in the source <see cref="T:System.Collections.Specialized.StringCollection" /> is greater than the available space from <paramref name="index" /> to the end of the destination <paramref name="array" />. </exception>
|
||||
/// <exception cref="T:System.InvalidCastException">The type of the source <see cref="T:System.Collections.Specialized.StringCollection" /> cannot be cast automatically to the type of the destination <paramref name="array" />. </exception>
|
||||
// Token: 0x06000278 RID: 632 RVA: 0x00009094 File Offset: 0x00007294
|
||||
public void CopyTo(string[] array, int index)
|
||||
{
|
||||
this.data.CopyTo(array, index);
|
||||
}
|
||||
|
||||
/// <summary>Returns a <see cref="T:System.Collections.Specialized.StringEnumerator" /> that iterates through the <see cref="T:System.Collections.Specialized.StringCollection" />.</summary>
|
||||
/// <returns>A <see cref="T:System.Collections.Specialized.StringEnumerator" /> for the <see cref="T:System.Collections.Specialized.StringCollection" />.</returns>
|
||||
// Token: 0x06000279 RID: 633 RVA: 0x000090A4 File Offset: 0x000072A4
|
||||
public StringEnumerator GetEnumerator()
|
||||
{
|
||||
return new StringEnumerator(this);
|
||||
}
|
||||
|
||||
/// <summary>Searches for the specified string and returns the zero-based index of the first occurrence within the <see cref="T:System.Collections.Specialized.StringCollection" />.</summary>
|
||||
/// <returns>The zero-based index of the first occurrence of <paramref name="value" /> in the <see cref="T:System.Collections.Specialized.StringCollection" />, if found; otherwise, -1.</returns>
|
||||
/// <param name="value">The string to locate. The value can be null. </param>
|
||||
// Token: 0x0600027A RID: 634 RVA: 0x000090AC File Offset: 0x000072AC
|
||||
public int IndexOf(string value)
|
||||
{
|
||||
return this.data.IndexOf(value);
|
||||
}
|
||||
|
||||
/// <summary>Inserts a string into the <see cref="T:System.Collections.Specialized.StringCollection" /> at the specified index.</summary>
|
||||
/// <param name="index">The zero-based index at which <paramref name="value" /> is inserted. </param>
|
||||
/// <param name="value">The string to insert. The value can be null. </param>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="index" /> is less than zero.-or- <paramref name="index" /> greater than <see cref="P:System.Collections.Specialized.StringCollection.Count" />. </exception>
|
||||
// Token: 0x0600027B RID: 635 RVA: 0x000090BC File Offset: 0x000072BC
|
||||
public void Insert(int index, string value)
|
||||
{
|
||||
this.data.Insert(index, value);
|
||||
}
|
||||
|
||||
/// <summary>Gets a value indicating whether the <see cref="T:System.Collections.Specialized.StringCollection" /> is read-only.</summary>
|
||||
/// <returns>This property always returns false.</returns>
|
||||
// Token: 0x170000AF RID: 175
|
||||
// (get) Token: 0x0600027C RID: 636 RVA: 0x000090CC File Offset: 0x000072CC
|
||||
public bool IsReadOnly
|
||||
{
|
||||
get
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a value indicating whether access to the <see cref="T:System.Collections.Specialized.StringCollection" /> is synchronized (thread safe).</summary>
|
||||
/// <returns>This property always returns false.</returns>
|
||||
// Token: 0x170000B0 RID: 176
|
||||
// (get) Token: 0x0600027D RID: 637 RVA: 0x000090D0 File Offset: 0x000072D0
|
||||
public bool IsSynchronized
|
||||
{
|
||||
get
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Removes the first occurrence of a specific string from the <see cref="T:System.Collections.Specialized.StringCollection" />.</summary>
|
||||
/// <param name="value">The string to remove from the <see cref="T:System.Collections.Specialized.StringCollection" />. The value can be null. </param>
|
||||
// Token: 0x0600027E RID: 638 RVA: 0x000090D4 File Offset: 0x000072D4
|
||||
public void Remove(string value)
|
||||
{
|
||||
this.data.Remove(value);
|
||||
}
|
||||
|
||||
/// <summary>Removes the string at the specified index of the <see cref="T:System.Collections.Specialized.StringCollection" />.</summary>
|
||||
/// <param name="index">The zero-based index of the string to remove. </param>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="index" /> is less than zero.-or- <paramref name="index" /> is equal to or greater than <see cref="P:System.Collections.Specialized.StringCollection.Count" />. </exception>
|
||||
// Token: 0x0600027F RID: 639 RVA: 0x000090E4 File Offset: 0x000072E4
|
||||
public void RemoveAt(int index)
|
||||
{
|
||||
this.data.RemoveAt(index);
|
||||
}
|
||||
|
||||
/// <summary>Gets an object that can be used to synchronize access to the <see cref="T:System.Collections.Specialized.StringCollection" />.</summary>
|
||||
/// <returns>An object that can be used to synchronize access to the <see cref="T:System.Collections.Specialized.StringCollection" />.</returns>
|
||||
// Token: 0x170000B1 RID: 177
|
||||
// (get) Token: 0x06000280 RID: 640 RVA: 0x000090F4 File Offset: 0x000072F4
|
||||
public object SyncRoot
|
||||
{
|
||||
get
|
||||
{
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x040000B2 RID: 178
|
||||
private ArrayList data = new ArrayList();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,192 @@
|
||||
using System;
|
||||
using System.Globalization;
|
||||
|
||||
namespace System.Collections.Specialized
|
||||
{
|
||||
/// <summary>Implements a hash table with the key and the value strongly typed to be strings rather than objects.</summary>
|
||||
// Token: 0x0200003A RID: 58
|
||||
[Serializable]
|
||||
public class StringDictionary : IEnumerable
|
||||
{
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.Specialized.StringDictionary" /> class.</summary>
|
||||
// Token: 0x06000281 RID: 641 RVA: 0x000090F8 File Offset: 0x000072F8
|
||||
public StringDictionary()
|
||||
{
|
||||
this.contents = new Hashtable();
|
||||
}
|
||||
|
||||
/// <summary>Gets the number of key/value pairs in the <see cref="T:System.Collections.Specialized.StringDictionary" />.</summary>
|
||||
/// <returns>The number of key/value pairs in the <see cref="T:System.Collections.Specialized.StringDictionary" />.Retrieving the value of this property is an O(1) operation.</returns>
|
||||
// Token: 0x170000B2 RID: 178
|
||||
// (get) Token: 0x06000282 RID: 642 RVA: 0x0000910C File Offset: 0x0000730C
|
||||
public virtual int Count
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.contents.Count;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a value indicating whether access to the <see cref="T:System.Collections.Specialized.StringDictionary" /> is synchronized (thread safe).</summary>
|
||||
/// <returns>true if access to the <see cref="T:System.Collections.Specialized.StringDictionary" /> is synchronized (thread safe); otherwise, false.</returns>
|
||||
// Token: 0x170000B3 RID: 179
|
||||
// (get) Token: 0x06000283 RID: 643 RVA: 0x0000911C File Offset: 0x0000731C
|
||||
public virtual bool IsSynchronized
|
||||
{
|
||||
get
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets or sets the value associated with the specified key.</summary>
|
||||
/// <returns>The value associated with the specified key. If the specified key is not found, Get returns null, and Set creates a new entry with the specified key.</returns>
|
||||
/// <param name="key">The key whose value to get or set. </param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="key" /> is null.</exception>
|
||||
// Token: 0x170000B4 RID: 180
|
||||
public virtual string this[string key]
|
||||
{
|
||||
get
|
||||
{
|
||||
if (key == null)
|
||||
{
|
||||
throw new ArgumentNullException("key");
|
||||
}
|
||||
return (string)this.contents[key.ToLower(CultureInfo.InvariantCulture)];
|
||||
}
|
||||
set
|
||||
{
|
||||
if (key == null)
|
||||
{
|
||||
throw new ArgumentNullException("key");
|
||||
}
|
||||
this.contents[key.ToLower(CultureInfo.InvariantCulture)] = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a collection of keys in the <see cref="T:System.Collections.Specialized.StringDictionary" />.</summary>
|
||||
/// <returns>An <see cref="T:System.Collections.ICollection" /> that provides the keys in the <see cref="T:System.Collections.Specialized.StringDictionary" />.</returns>
|
||||
// Token: 0x170000B5 RID: 181
|
||||
// (get) Token: 0x06000286 RID: 646 RVA: 0x00009194 File Offset: 0x00007394
|
||||
public virtual ICollection Keys
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.contents.Keys;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a collection of values in the <see cref="T:System.Collections.Specialized.StringDictionary" />.</summary>
|
||||
/// <returns>An <see cref="T:System.Collections.ICollection" /> that provides the values in the <see cref="T:System.Collections.Specialized.StringDictionary" />.</returns>
|
||||
// Token: 0x170000B6 RID: 182
|
||||
// (get) Token: 0x06000287 RID: 647 RVA: 0x000091A4 File Offset: 0x000073A4
|
||||
public virtual ICollection Values
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.contents.Values;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets an object that can be used to synchronize access to the <see cref="T:System.Collections.Specialized.StringDictionary" />.</summary>
|
||||
/// <returns>An <see cref="T:System.Object" /> that can be used to synchronize access to the <see cref="T:System.Collections.Specialized.StringDictionary" />.</returns>
|
||||
// Token: 0x170000B7 RID: 183
|
||||
// (get) Token: 0x06000288 RID: 648 RVA: 0x000091B4 File Offset: 0x000073B4
|
||||
public virtual object SyncRoot
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.contents.SyncRoot;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Adds an entry with the specified key and value into the <see cref="T:System.Collections.Specialized.StringDictionary" />.</summary>
|
||||
/// <param name="key">The key of the entry to add. </param>
|
||||
/// <param name="value">The value of the entry to add. The value can be null. </param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="key" /> is null. </exception>
|
||||
/// <exception cref="T:System.ArgumentException">An entry with the same key already exists in the <see cref="T:System.Collections.Specialized.StringDictionary" />. </exception>
|
||||
/// <exception cref="T:System.NotSupportedException">The <see cref="T:System.Collections.Specialized.StringDictionary" /> is read-only. </exception>
|
||||
// Token: 0x06000289 RID: 649 RVA: 0x000091C4 File Offset: 0x000073C4
|
||||
public virtual void Add(string key, string value)
|
||||
{
|
||||
if (key == null)
|
||||
{
|
||||
throw new ArgumentNullException("key");
|
||||
}
|
||||
this.contents.Add(key.ToLower(CultureInfo.InvariantCulture), value);
|
||||
}
|
||||
|
||||
/// <summary>Removes all entries from the <see cref="T:System.Collections.Specialized.StringDictionary" />.</summary>
|
||||
/// <exception cref="T:System.NotSupportedException">The <see cref="T:System.Collections.Specialized.StringDictionary" /> is read-only. </exception>
|
||||
// Token: 0x0600028A RID: 650 RVA: 0x000091FC File Offset: 0x000073FC
|
||||
public virtual void Clear()
|
||||
{
|
||||
this.contents.Clear();
|
||||
}
|
||||
|
||||
/// <summary>Determines if the <see cref="T:System.Collections.Specialized.StringDictionary" /> contains a specific key.</summary>
|
||||
/// <returns>true if the <see cref="T:System.Collections.Specialized.StringDictionary" /> contains an entry with the specified key; otherwise, false.</returns>
|
||||
/// <param name="key">The key to locate in the <see cref="T:System.Collections.Specialized.StringDictionary" />. </param>
|
||||
/// <exception cref="T:System.ArgumentNullException">The key is null. </exception>
|
||||
// Token: 0x0600028B RID: 651 RVA: 0x0000920C File Offset: 0x0000740C
|
||||
public virtual bool ContainsKey(string key)
|
||||
{
|
||||
if (key == null)
|
||||
{
|
||||
throw new ArgumentNullException("key");
|
||||
}
|
||||
return this.contents.ContainsKey(key.ToLower(CultureInfo.InvariantCulture));
|
||||
}
|
||||
|
||||
/// <summary>Determines if the <see cref="T:System.Collections.Specialized.StringDictionary" /> contains a specific value.</summary>
|
||||
/// <returns>true if the <see cref="T:System.Collections.Specialized.StringDictionary" /> contains an element with the specified value; otherwise, false.</returns>
|
||||
/// <param name="value">The value to locate in the <see cref="T:System.Collections.Specialized.StringDictionary" />. The value can be null. </param>
|
||||
// Token: 0x0600028C RID: 652 RVA: 0x00009238 File Offset: 0x00007438
|
||||
public virtual bool ContainsValue(string value)
|
||||
{
|
||||
return this.contents.ContainsValue(value);
|
||||
}
|
||||
|
||||
/// <summary>Copies the string dictionary values to a one-dimensional <see cref="T:System.Array" /> instance at the specified index.</summary>
|
||||
/// <param name="array">The one-dimensional <see cref="T:System.Array" /> that is the destination of the values copied from the <see cref="T:System.Collections.Specialized.StringDictionary" />. </param>
|
||||
/// <param name="index">The index in the array where copying begins. </param>
|
||||
/// <exception cref="T:System.ArgumentException">
|
||||
/// <paramref name="array" /> is multidimensional.-or- The number of elements in the <see cref="T:System.Collections.Specialized.StringDictionary" /> is greater than the available space from <paramref name="index" /> to the end of <paramref name="array" />. </exception>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="array" /> is null. </exception>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="index" /> is less than the lower bound of <paramref name="array" />. </exception>
|
||||
// Token: 0x0600028D RID: 653 RVA: 0x00009248 File Offset: 0x00007448
|
||||
public virtual void CopyTo(Array array, int index)
|
||||
{
|
||||
this.contents.CopyTo(array, index);
|
||||
}
|
||||
|
||||
/// <summary>Returns an enumerator that iterates through the string dictionary.</summary>
|
||||
/// <returns>An <see cref="T:System.Collections.IEnumerator" /> that iterates through the string dictionary.</returns>
|
||||
// Token: 0x0600028E RID: 654 RVA: 0x00009258 File Offset: 0x00007458
|
||||
public virtual IEnumerator GetEnumerator()
|
||||
{
|
||||
return this.contents.GetEnumerator();
|
||||
}
|
||||
|
||||
/// <summary>Removes the entry with the specified key from the string dictionary.</summary>
|
||||
/// <param name="key">The key of the entry to remove. </param>
|
||||
/// <exception cref="T:System.ArgumentNullException">The key is null. </exception>
|
||||
/// <exception cref="T:System.NotSupportedException">The <see cref="T:System.Collections.Specialized.StringDictionary" /> is read-only. </exception>
|
||||
// Token: 0x0600028F RID: 655 RVA: 0x00009268 File Offset: 0x00007468
|
||||
public virtual void Remove(string key)
|
||||
{
|
||||
if (key == null)
|
||||
{
|
||||
throw new ArgumentNullException("key");
|
||||
}
|
||||
this.contents.Remove(key.ToLower(CultureInfo.InvariantCulture));
|
||||
}
|
||||
|
||||
// Token: 0x040000B3 RID: 179
|
||||
private Hashtable contents;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
using System;
|
||||
|
||||
namespace System.Collections.Specialized
|
||||
{
|
||||
/// <summary>Supports a simple iteration over a <see cref="T:System.Collections.Specialized.StringCollection" />.</summary>
|
||||
// Token: 0x0200003B RID: 59
|
||||
public class StringEnumerator
|
||||
{
|
||||
// Token: 0x06000290 RID: 656 RVA: 0x00009294 File Offset: 0x00007494
|
||||
internal StringEnumerator(StringCollection coll)
|
||||
{
|
||||
this.enumerable = ((IEnumerable)coll).GetEnumerator();
|
||||
}
|
||||
|
||||
/// <summary>Gets the current element in the collection.</summary>
|
||||
/// <returns>The current element in the collection.</returns>
|
||||
/// <exception cref="T:System.InvalidOperationException">The enumerator is positioned before the first element of the collection or after the last element. </exception>
|
||||
// Token: 0x170000B8 RID: 184
|
||||
// (get) Token: 0x06000291 RID: 657 RVA: 0x000092A8 File Offset: 0x000074A8
|
||||
public string Current
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)this.enumerable.Current;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Advances the enumerator to the next element of the collection.</summary>
|
||||
/// <returns>true if the enumerator was successfully advanced to the next element; false if the enumerator has passed the end of the collection.</returns>
|
||||
/// <exception cref="T:System.InvalidOperationException">The collection was modified after the enumerator was created. </exception>
|
||||
// Token: 0x06000292 RID: 658 RVA: 0x000092BC File Offset: 0x000074BC
|
||||
public bool MoveNext()
|
||||
{
|
||||
return this.enumerable.MoveNext();
|
||||
}
|
||||
|
||||
/// <summary>Sets the enumerator to its initial position, which is before the first element in the collection.</summary>
|
||||
/// <exception cref="T:System.InvalidOperationException">The collection was modified after the enumerator was created. </exception>
|
||||
// Token: 0x06000293 RID: 659 RVA: 0x000092CC File Offset: 0x000074CC
|
||||
public void Reset()
|
||||
{
|
||||
this.enumerable.Reset();
|
||||
}
|
||||
|
||||
// Token: 0x040000B4 RID: 180
|
||||
private IEnumerator enumerable;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user