scripts
This commit is contained in:
@@ -0,0 +1,3588 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.Collections
|
||||
{
|
||||
/// <summary>Implements the <see cref="T:System.Collections.IList" /> interface using an array whose size is dynamically increased as required.</summary>
|
||||
/// <filterpriority>1</filterpriority>
|
||||
// Token: 0x02000113 RID: 275
|
||||
[DebuggerDisplay("Count={Count}")]
|
||||
[DebuggerTypeProxy(typeof(CollectionDebuggerView))]
|
||||
[ComVisible(true)]
|
||||
[Serializable]
|
||||
public class ArrayList : IEnumerable, ICloneable, ICollection, IList
|
||||
{
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.ArrayList" /> class that is empty and has the default initial capacity.</summary>
|
||||
// Token: 0x06000DB9 RID: 3513 RVA: 0x0003BB44 File Offset: 0x00039D44
|
||||
public ArrayList()
|
||||
{
|
||||
this._items = ArrayList.EmptyArray;
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.ArrayList" /> class that contains elements copied from the specified collection and that has the same initial capacity as the number of elements copied.</summary>
|
||||
/// <param name="c">The <see cref="T:System.Collections.ICollection" /> whose elements are copied to the new list. </param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="c" /> is null. </exception>
|
||||
// Token: 0x06000DBA RID: 3514 RVA: 0x0003BB58 File Offset: 0x00039D58
|
||||
public ArrayList(ICollection c)
|
||||
{
|
||||
if (c == null)
|
||||
{
|
||||
throw new ArgumentNullException("c");
|
||||
}
|
||||
Array array = c as Array;
|
||||
if (array != null && array.Rank != 1)
|
||||
{
|
||||
throw new RankException();
|
||||
}
|
||||
this._items = new object[c.Count];
|
||||
this.AddRange(c);
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.ArrayList" /> class that is empty and has the specified initial capacity.</summary>
|
||||
/// <param name="capacity">The number of elements that the new list can initially store. </param>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="capacity" /> is less than zero. </exception>
|
||||
// Token: 0x06000DBB RID: 3515 RVA: 0x0003BBB4 File Offset: 0x00039DB4
|
||||
public ArrayList(int capacity)
|
||||
{
|
||||
if (capacity < 0)
|
||||
{
|
||||
ArrayList.ThrowNewArgumentOutOfRangeException("capacity", capacity, "The initial capacity can't be smaller than zero.");
|
||||
}
|
||||
if (capacity == 0)
|
||||
{
|
||||
capacity = 4;
|
||||
}
|
||||
this._items = new object[capacity];
|
||||
}
|
||||
|
||||
// Token: 0x06000DBC RID: 3516 RVA: 0x0003BBF0 File Offset: 0x00039DF0
|
||||
private ArrayList(int initialCapacity, bool forceZeroSize)
|
||||
{
|
||||
if (forceZeroSize)
|
||||
{
|
||||
this._items = null;
|
||||
return;
|
||||
}
|
||||
throw new InvalidOperationException("Use ArrayList(int)");
|
||||
}
|
||||
|
||||
// Token: 0x06000DBD RID: 3517 RVA: 0x0003BC18 File Offset: 0x00039E18
|
||||
private ArrayList(object[] array, int index, int count)
|
||||
{
|
||||
if (count == 0)
|
||||
{
|
||||
this._items = new object[4];
|
||||
}
|
||||
else
|
||||
{
|
||||
this._items = new object[count];
|
||||
}
|
||||
Array.Copy(array, index, this._items, 0, count);
|
||||
this._size = count;
|
||||
}
|
||||
|
||||
/// <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.ArrayList.Count" />. </exception>
|
||||
/// <filterpriority>1</filterpriority>
|
||||
// Token: 0x17000215 RID: 533
|
||||
public virtual object this[int index]
|
||||
{
|
||||
get
|
||||
{
|
||||
if (index < 0 || index >= this._size)
|
||||
{
|
||||
ArrayList.ThrowNewArgumentOutOfRangeException("index", index, "Index is less than 0 or more than or equal to the list count.");
|
||||
}
|
||||
return this._items[index];
|
||||
}
|
||||
set
|
||||
{
|
||||
if (index < 0 || index >= this._size)
|
||||
{
|
||||
ArrayList.ThrowNewArgumentOutOfRangeException("index", index, "Index is less than 0 or more than or equal to the list count.");
|
||||
}
|
||||
this._items[index] = value;
|
||||
this._version++;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets the number of elements actually contained in the <see cref="T:System.Collections.ArrayList" />.</summary>
|
||||
/// <returns>The number of elements actually contained in the <see cref="T:System.Collections.ArrayList" />.</returns>
|
||||
/// <filterpriority>1</filterpriority>
|
||||
// Token: 0x17000216 RID: 534
|
||||
// (get) Token: 0x06000DC1 RID: 3521 RVA: 0x0003BD00 File Offset: 0x00039F00
|
||||
public virtual int Count
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._size;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets or sets the number of elements that the <see cref="T:System.Collections.ArrayList" /> can contain.</summary>
|
||||
/// <returns>The number of elements that the <see cref="T:System.Collections.ArrayList" /> can contain.</returns>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <see cref="P:System.Collections.ArrayList.Capacity" /> is set to a value that is less than <see cref="P:System.Collections.ArrayList.Count" />.</exception>
|
||||
/// <exception cref="T:System.OutOfMemoryException">There is not enough memory available on the system.</exception>
|
||||
/// <filterpriority>1</filterpriority>
|
||||
// Token: 0x17000217 RID: 535
|
||||
// (get) Token: 0x06000DC2 RID: 3522 RVA: 0x0003BD08 File Offset: 0x00039F08
|
||||
// (set) Token: 0x06000DC3 RID: 3523 RVA: 0x0003BD14 File Offset: 0x00039F14
|
||||
public virtual int Capacity
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._items.Length;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (value < this._size)
|
||||
{
|
||||
ArrayList.ThrowNewArgumentOutOfRangeException("Capacity", value, "Must be more than count.");
|
||||
}
|
||||
object[] array = new object[value];
|
||||
Array.Copy(this._items, 0, array, 0, this._size);
|
||||
this._items = array;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a value indicating whether the <see cref="T:System.Collections.ArrayList" /> has a fixed size.</summary>
|
||||
/// <returns>true if the <see cref="T:System.Collections.ArrayList" /> has a fixed size; otherwise, false. The default is false.</returns>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x17000218 RID: 536
|
||||
// (get) Token: 0x06000DC4 RID: 3524 RVA: 0x0003BD64 File Offset: 0x00039F64
|
||||
public virtual bool IsFixedSize
|
||||
{
|
||||
get
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a value indicating whether the <see cref="T:System.Collections.ArrayList" /> is read-only.</summary>
|
||||
/// <returns>true if the <see cref="T:System.Collections.ArrayList" /> is read-only; otherwise, false. The default is false.</returns>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x17000219 RID: 537
|
||||
// (get) Token: 0x06000DC5 RID: 3525 RVA: 0x0003BD68 File Offset: 0x00039F68
|
||||
public virtual bool IsReadOnly
|
||||
{
|
||||
get
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a value indicating whether access to the <see cref="T:System.Collections.ArrayList" /> is synchronized (thread safe).</summary>
|
||||
/// <returns>true if access to the <see cref="T:System.Collections.ArrayList" /> is synchronized (thread safe); otherwise, false. The default is false.</returns>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x1700021A RID: 538
|
||||
// (get) Token: 0x06000DC6 RID: 3526 RVA: 0x0003BD6C File Offset: 0x00039F6C
|
||||
public virtual bool IsSynchronized
|
||||
{
|
||||
get
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets an object that can be used to synchronize access to the <see cref="T:System.Collections.ArrayList" />.</summary>
|
||||
/// <returns>An object that can be used to synchronize access to the <see cref="T:System.Collections.ArrayList" />.</returns>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x1700021B RID: 539
|
||||
// (get) Token: 0x06000DC7 RID: 3527 RVA: 0x0003BD70 File Offset: 0x00039F70
|
||||
public virtual object SyncRoot
|
||||
{
|
||||
get
|
||||
{
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000DC8 RID: 3528 RVA: 0x0003BD74 File Offset: 0x00039F74
|
||||
private void EnsureCapacity(int count)
|
||||
{
|
||||
if (count <= this._items.Length)
|
||||
{
|
||||
return;
|
||||
}
|
||||
int i = this._items.Length << 1;
|
||||
if (i == 0)
|
||||
{
|
||||
i = 4;
|
||||
}
|
||||
while (i < count)
|
||||
{
|
||||
i <<= 1;
|
||||
}
|
||||
object[] array = new object[i];
|
||||
Array.Copy(this._items, 0, array, 0, this._items.Length);
|
||||
this._items = array;
|
||||
}
|
||||
|
||||
// Token: 0x06000DC9 RID: 3529 RVA: 0x0003BDD8 File Offset: 0x00039FD8
|
||||
private void Shift(int index, int count)
|
||||
{
|
||||
if (count > 0)
|
||||
{
|
||||
if (this._size + count > this._items.Length)
|
||||
{
|
||||
int i;
|
||||
for (i = ((this._items.Length <= 0) ? 1 : (this._items.Length << 1)); i < this._size + count; i <<= 1)
|
||||
{
|
||||
}
|
||||
object[] array = new object[i];
|
||||
Array.Copy(this._items, 0, array, 0, index);
|
||||
Array.Copy(this._items, index, array, index + count, this._size - index);
|
||||
this._items = array;
|
||||
}
|
||||
else
|
||||
{
|
||||
Array.Copy(this._items, index, this._items, index + count, this._size - index);
|
||||
}
|
||||
}
|
||||
else if (count < 0)
|
||||
{
|
||||
int num = index - count;
|
||||
Array.Copy(this._items, num, this._items, index, this._size - num);
|
||||
Array.Clear(this._items, this._size + count, -count);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Adds an object to the end of the <see cref="T:System.Collections.ArrayList" />.</summary>
|
||||
/// <returns>The <see cref="T:System.Collections.ArrayList" /> 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.ArrayList" />. The value can be null. </param>
|
||||
/// <exception cref="T:System.NotSupportedException">The <see cref="T:System.Collections.ArrayList" /> is read-only.-or- The <see cref="T:System.Collections.ArrayList" /> has a fixed size. </exception>
|
||||
/// <filterpriority>1</filterpriority>
|
||||
// Token: 0x06000DCA RID: 3530 RVA: 0x0003BED0 File Offset: 0x0003A0D0
|
||||
public virtual int Add(object value)
|
||||
{
|
||||
if (this._items.Length <= this._size)
|
||||
{
|
||||
this.EnsureCapacity(this._size + 1);
|
||||
}
|
||||
this._items[this._size] = value;
|
||||
this._version++;
|
||||
return this._size++;
|
||||
}
|
||||
|
||||
/// <summary>Removes all elements from the <see cref="T:System.Collections.ArrayList" />.</summary>
|
||||
/// <exception cref="T:System.NotSupportedException">The <see cref="T:System.Collections.ArrayList" /> is read-only.-or- The <see cref="T:System.Collections.ArrayList" /> has a fixed size. </exception>
|
||||
/// <filterpriority>1</filterpriority>
|
||||
// Token: 0x06000DCB RID: 3531 RVA: 0x0003BF2C File Offset: 0x0003A12C
|
||||
public virtual void Clear()
|
||||
{
|
||||
Array.Clear(this._items, 0, this._size);
|
||||
this._size = 0;
|
||||
this._version++;
|
||||
}
|
||||
|
||||
/// <summary>Determines whether an element is in the <see cref="T:System.Collections.ArrayList" />.</summary>
|
||||
/// <returns>true if <paramref name="item" /> is found in the <see cref="T:System.Collections.ArrayList" />; otherwise, false.</returns>
|
||||
/// <param name="item">The <see cref="T:System.Object" /> to locate in the <see cref="T:System.Collections.ArrayList" />. The value can be null. </param>
|
||||
/// <filterpriority>1</filterpriority>
|
||||
// Token: 0x06000DCC RID: 3532 RVA: 0x0003BF58 File Offset: 0x0003A158
|
||||
public virtual bool Contains(object item)
|
||||
{
|
||||
return this.IndexOf(item, 0, this._size) > -1;
|
||||
}
|
||||
|
||||
// Token: 0x06000DCD RID: 3533 RVA: 0x0003BF6C File Offset: 0x0003A16C
|
||||
internal virtual bool Contains(object value, int startIndex, int count)
|
||||
{
|
||||
return this.IndexOf(value, startIndex, count) > -1;
|
||||
}
|
||||
|
||||
/// <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.ArrayList" />.</summary>
|
||||
/// <returns>The zero-based index of the first occurrence of <paramref name="value" /> within the entire <see cref="T:System.Collections.ArrayList" />, if found; otherwise, -1.</returns>
|
||||
/// <param name="value">The <see cref="T:System.Object" /> to locate in the <see cref="T:System.Collections.ArrayList" />. The value can be null. </param>
|
||||
/// <filterpriority>1</filterpriority>
|
||||
// Token: 0x06000DCE RID: 3534 RVA: 0x0003BF7C File Offset: 0x0003A17C
|
||||
public virtual int IndexOf(object value)
|
||||
{
|
||||
return this.IndexOf(value, 0);
|
||||
}
|
||||
|
||||
/// <summary>Searches for the specified <see cref="T:System.Object" /> and returns the zero-based index of the first occurrence within the range of elements in the <see cref="T:System.Collections.ArrayList" /> that extends from the specified index to the last element.</summary>
|
||||
/// <returns>The zero-based index of the first occurrence of <paramref name="value" /> within the range of elements in the <see cref="T:System.Collections.ArrayList" /> that extends from <paramref name="startIndex" /> to the last element, if found; otherwise, -1.</returns>
|
||||
/// <param name="value">The <see cref="T:System.Object" /> to locate in the <see cref="T:System.Collections.ArrayList" />. The value can be null. </param>
|
||||
/// <param name="startIndex">The zero-based starting index of the search. 0 (zero) is valid in an empty array.</param>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="startIndex" /> is outside the range of valid indexes for the <see cref="T:System.Collections.ArrayList" />. </exception>
|
||||
/// <filterpriority>1</filterpriority>
|
||||
// Token: 0x06000DCF RID: 3535 RVA: 0x0003BF88 File Offset: 0x0003A188
|
||||
public virtual int IndexOf(object value, int startIndex)
|
||||
{
|
||||
return this.IndexOf(value, startIndex, this._size - startIndex);
|
||||
}
|
||||
|
||||
/// <summary>Searches for the specified <see cref="T:System.Object" /> and returns the zero-based index of the first occurrence within the range of elements in the <see cref="T:System.Collections.ArrayList" /> that starts at the specified index and contains the specified number of elements.</summary>
|
||||
/// <returns>The zero-based index of the first occurrence of <paramref name="value" /> within the range of elements in the <see cref="T:System.Collections.ArrayList" /> that starts at <paramref name="startIndex" /> and contains <paramref name="count" /> number of elements, if found; otherwise, -1.</returns>
|
||||
/// <param name="value">The <see cref="T:System.Object" /> to locate in the <see cref="T:System.Collections.ArrayList" />. The value can be null. </param>
|
||||
/// <param name="startIndex">The zero-based starting index of the search. 0 (zero) is valid in an empty array.</param>
|
||||
/// <param name="count">The number of elements in the section to search. </param>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="startIndex" /> is outside the range of valid indexes for the <see cref="T:System.Collections.ArrayList" />.-or- <paramref name="count" /> is less than zero.-or- <paramref name="startIndex" /> and <paramref name="count" /> do not specify a valid section in the <see cref="T:System.Collections.ArrayList" />. </exception>
|
||||
/// <filterpriority>1</filterpriority>
|
||||
// Token: 0x06000DD0 RID: 3536 RVA: 0x0003BF9C File Offset: 0x0003A19C
|
||||
public virtual int IndexOf(object value, int startIndex, int count)
|
||||
{
|
||||
if (startIndex < 0 || startIndex > this._size)
|
||||
{
|
||||
ArrayList.ThrowNewArgumentOutOfRangeException("startIndex", startIndex, "Does not specify valid index.");
|
||||
}
|
||||
if (count < 0)
|
||||
{
|
||||
ArrayList.ThrowNewArgumentOutOfRangeException("count", count, "Can't be less than 0.");
|
||||
}
|
||||
if (startIndex > this._size - count)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException("count", "Start index and count do not specify a valid range.");
|
||||
}
|
||||
return Array.IndexOf<object>(this._items, value, startIndex, count);
|
||||
}
|
||||
|
||||
/// <summary>Searches for the specified <see cref="T:System.Object" /> and returns the zero-based index of the last occurrence within the entire <see cref="T:System.Collections.ArrayList" />.</summary>
|
||||
/// <returns>The zero-based index of the last occurrence of <paramref name="value" /> within the entire the <see cref="T:System.Collections.ArrayList" />, if found; otherwise, -1.</returns>
|
||||
/// <param name="value">The <see cref="T:System.Object" /> to locate in the <see cref="T:System.Collections.ArrayList" />. The value can be null. </param>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x06000DD1 RID: 3537 RVA: 0x0003C01C File Offset: 0x0003A21C
|
||||
public virtual int LastIndexOf(object value)
|
||||
{
|
||||
return this.LastIndexOf(value, this._size - 1);
|
||||
}
|
||||
|
||||
/// <summary>Searches for the specified <see cref="T:System.Object" /> and returns the zero-based index of the last occurrence within the range of elements in the <see cref="T:System.Collections.ArrayList" /> that extends from the first element to the specified index.</summary>
|
||||
/// <returns>The zero-based index of the last occurrence of <paramref name="value" /> within the range of elements in the <see cref="T:System.Collections.ArrayList" /> that extends from the first element to <paramref name="startIndex" />, if found; otherwise, -1.</returns>
|
||||
/// <param name="value">The <see cref="T:System.Object" /> to locate in the <see cref="T:System.Collections.ArrayList" />. The value can be null. </param>
|
||||
/// <param name="startIndex">The zero-based starting index of the backward search. </param>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="startIndex" /> is outside the range of valid indexes for the <see cref="T:System.Collections.ArrayList" />. </exception>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x06000DD2 RID: 3538 RVA: 0x0003C030 File Offset: 0x0003A230
|
||||
public virtual int LastIndexOf(object value, int startIndex)
|
||||
{
|
||||
return this.LastIndexOf(value, startIndex, startIndex + 1);
|
||||
}
|
||||
|
||||
/// <summary>Searches for the specified <see cref="T:System.Object" /> and returns the zero-based index of the last occurrence within the range of elements in the <see cref="T:System.Collections.ArrayList" /> that contains the specified number of elements and ends at the specified index.</summary>
|
||||
/// <returns>The zero-based index of the last occurrence of <paramref name="value" /> within the range of elements in the <see cref="T:System.Collections.ArrayList" /> that contains <paramref name="count" /> number of elements and ends at <paramref name="startIndex" />, if found; otherwise, -1.</returns>
|
||||
/// <param name="value">The <see cref="T:System.Object" /> to locate in the <see cref="T:System.Collections.ArrayList" />. The value can be null. </param>
|
||||
/// <param name="startIndex">The zero-based starting index of the backward search. </param>
|
||||
/// <param name="count">The number of elements in the section to search. </param>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="startIndex" /> is outside the range of valid indexes for the <see cref="T:System.Collections.ArrayList" />.-or- <paramref name="count" /> is less than zero.-or- <paramref name="startIndex" /> and <paramref name="count" /> do not specify a valid section in the <see cref="T:System.Collections.ArrayList" />. </exception>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x06000DD3 RID: 3539 RVA: 0x0003C040 File Offset: 0x0003A240
|
||||
public virtual int LastIndexOf(object value, int startIndex, int count)
|
||||
{
|
||||
return Array.LastIndexOf<object>(this._items, value, startIndex, count);
|
||||
}
|
||||
|
||||
/// <summary>Inserts an element into the <see cref="T:System.Collections.ArrayList" /> 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.ArrayList.Count" />. </exception>
|
||||
/// <exception cref="T:System.NotSupportedException">The <see cref="T:System.Collections.ArrayList" /> is read-only.-or- The <see cref="T:System.Collections.ArrayList" /> has a fixed size. </exception>
|
||||
/// <filterpriority>1</filterpriority>
|
||||
// Token: 0x06000DD4 RID: 3540 RVA: 0x0003C050 File Offset: 0x0003A250
|
||||
public virtual void Insert(int index, object value)
|
||||
{
|
||||
if (index < 0 || index > this._size)
|
||||
{
|
||||
ArrayList.ThrowNewArgumentOutOfRangeException("index", index, "Index must be >= 0 and <= Count.");
|
||||
}
|
||||
this.Shift(index, 1);
|
||||
this._items[index] = value;
|
||||
this._size++;
|
||||
this._version++;
|
||||
}
|
||||
|
||||
/// <summary>Inserts the elements of a collection into the <see cref="T:System.Collections.ArrayList" /> at the specified index.</summary>
|
||||
/// <param name="index">The zero-based index at which the new elements should be inserted. </param>
|
||||
/// <param name="c">The <see cref="T:System.Collections.ICollection" /> whose elements should be inserted into the <see cref="T:System.Collections.ArrayList" />. The collection itself cannot be null, but it can contain elements that are null. </param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="c" /> is null. </exception>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="index" /> is less than zero.-or- <paramref name="index" /> is greater than <see cref="P:System.Collections.ArrayList.Count" />. </exception>
|
||||
/// <exception cref="T:System.NotSupportedException">The <see cref="T:System.Collections.ArrayList" /> is read-only.-or- The <see cref="T:System.Collections.ArrayList" /> has a fixed size. </exception>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x06000DD5 RID: 3541 RVA: 0x0003C0B4 File Offset: 0x0003A2B4
|
||||
public virtual void InsertRange(int index, ICollection c)
|
||||
{
|
||||
if (c == null)
|
||||
{
|
||||
throw new ArgumentNullException("c");
|
||||
}
|
||||
if (index < 0 || index > this._size)
|
||||
{
|
||||
ArrayList.ThrowNewArgumentOutOfRangeException("index", index, "Index must be >= 0 and <= Count.");
|
||||
}
|
||||
int count = c.Count;
|
||||
if (this._items.Length < this._size + count)
|
||||
{
|
||||
this.EnsureCapacity(this._size + count);
|
||||
}
|
||||
if (index < this._size)
|
||||
{
|
||||
Array.Copy(this._items, index, this._items, index + count, this._size - index);
|
||||
}
|
||||
if (this == c.SyncRoot)
|
||||
{
|
||||
Array.Copy(this._items, 0, this._items, index, index);
|
||||
Array.Copy(this._items, index + count, this._items, index << 1, this._size - index);
|
||||
}
|
||||
else
|
||||
{
|
||||
c.CopyTo(this._items, index);
|
||||
}
|
||||
this._size += c.Count;
|
||||
this._version++;
|
||||
}
|
||||
|
||||
/// <summary>Removes the first occurrence of a specific object from the <see cref="T:System.Collections.ArrayList" />.</summary>
|
||||
/// <param name="obj">The <see cref="T:System.Object" /> to remove from the <see cref="T:System.Collections.ArrayList" />. The value can be null. </param>
|
||||
/// <exception cref="T:System.NotSupportedException">The <see cref="T:System.Collections.ArrayList" /> is read-only.-or- The <see cref="T:System.Collections.ArrayList" /> has a fixed size. </exception>
|
||||
/// <filterpriority>1</filterpriority>
|
||||
// Token: 0x06000DD6 RID: 3542 RVA: 0x0003C1C0 File Offset: 0x0003A3C0
|
||||
public virtual void Remove(object obj)
|
||||
{
|
||||
int num = this.IndexOf(obj);
|
||||
if (num > -1)
|
||||
{
|
||||
this.RemoveAt(num);
|
||||
}
|
||||
this._version++;
|
||||
}
|
||||
|
||||
/// <summary>Removes the element at the specified index of the <see cref="T:System.Collections.ArrayList" />.</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 zero.-or- <paramref name="index" /> is equal to or greater than <see cref="P:System.Collections.ArrayList.Count" />. </exception>
|
||||
/// <exception cref="T:System.NotSupportedException">The <see cref="T:System.Collections.ArrayList" /> is read-only.-or- The <see cref="T:System.Collections.ArrayList" /> has a fixed size. </exception>
|
||||
/// <filterpriority>1</filterpriority>
|
||||
// Token: 0x06000DD7 RID: 3543 RVA: 0x0003C1F4 File Offset: 0x0003A3F4
|
||||
public virtual void RemoveAt(int index)
|
||||
{
|
||||
if (index < 0 || index >= this._size)
|
||||
{
|
||||
ArrayList.ThrowNewArgumentOutOfRangeException("index", index, "Less than 0 or more than list count.");
|
||||
}
|
||||
this.Shift(index, -1);
|
||||
this._size--;
|
||||
this._version++;
|
||||
}
|
||||
|
||||
/// <summary>Removes a range of elements from the <see cref="T:System.Collections.ArrayList" />.</summary>
|
||||
/// <param name="index">The zero-based starting index of the range of elements to remove. </param>
|
||||
/// <param name="count">The number of elements to remove. </param>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="index" /> is less than zero.-or- <paramref name="count" /> is less than zero. </exception>
|
||||
/// <exception cref="T:System.ArgumentException">
|
||||
/// <paramref name="index" /> and <paramref name="count" /> do not denote a valid range of elements in the <see cref="T:System.Collections.ArrayList" />. </exception>
|
||||
/// <exception cref="T:System.NotSupportedException">The <see cref="T:System.Collections.ArrayList" /> is read-only.-or- The <see cref="T:System.Collections.ArrayList" /> has a fixed size. </exception>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x06000DD8 RID: 3544 RVA: 0x0003C250 File Offset: 0x0003A450
|
||||
public virtual void RemoveRange(int index, int count)
|
||||
{
|
||||
ArrayList.CheckRange(index, count, this._size);
|
||||
this.Shift(index, -count);
|
||||
this._size -= count;
|
||||
this._version++;
|
||||
}
|
||||
|
||||
/// <summary>Reverses the order of the elements in the entire <see cref="T:System.Collections.ArrayList" />.</summary>
|
||||
/// <exception cref="T:System.NotSupportedException">The <see cref="T:System.Collections.ArrayList" /> is read-only. </exception>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x06000DD9 RID: 3545 RVA: 0x0003C290 File Offset: 0x0003A490
|
||||
public virtual void Reverse()
|
||||
{
|
||||
Array.Reverse(this._items, 0, this._size);
|
||||
this._version++;
|
||||
}
|
||||
|
||||
/// <summary>Reverses the order of the elements in the specified range.</summary>
|
||||
/// <param name="index">The zero-based starting index of the range to reverse. </param>
|
||||
/// <param name="count">The number of elements in the range to reverse. </param>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="index" /> is less than zero.-or- <paramref name="count" /> is less than zero. </exception>
|
||||
/// <exception cref="T:System.ArgumentException">
|
||||
/// <paramref name="index" /> and <paramref name="count" /> do not denote a valid range of elements in the <see cref="T:System.Collections.ArrayList" />. </exception>
|
||||
/// <exception cref="T:System.NotSupportedException">The <see cref="T:System.Collections.ArrayList" /> is read-only. </exception>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x06000DDA RID: 3546 RVA: 0x0003C2C0 File Offset: 0x0003A4C0
|
||||
public virtual void Reverse(int index, int count)
|
||||
{
|
||||
ArrayList.CheckRange(index, count, this._size);
|
||||
Array.Reverse(this._items, index, count);
|
||||
this._version++;
|
||||
}
|
||||
|
||||
/// <summary>Copies the entire <see cref="T:System.Collections.ArrayList" /> to a compatible one-dimensional <see cref="T:System.Array" />, starting at the beginning 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.ArrayList" />. The <see cref="T:System.Array" /> must have zero-based indexing. </param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="array" /> is null. </exception>
|
||||
/// <exception cref="T:System.ArgumentException">
|
||||
/// <paramref name="array" /> is multidimensional.-or- The number of elements in the source <see cref="T:System.Collections.ArrayList" /> is greater than the number of elements that the destination <paramref name="array" /> can contain. </exception>
|
||||
/// <exception cref="T:System.InvalidCastException">The type of the source <see cref="T:System.Collections.ArrayList" /> cannot be cast automatically to the type of the destination <paramref name="array" />. </exception>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x06000DDB RID: 3547 RVA: 0x0003C2F8 File Offset: 0x0003A4F8
|
||||
public virtual void CopyTo(Array array)
|
||||
{
|
||||
Array.Copy(this._items, array, this._size);
|
||||
}
|
||||
|
||||
/// <summary>Copies the entire <see cref="T:System.Collections.ArrayList" /> 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.ArrayList" />. The <see cref="T:System.Array" /> must have zero-based indexing. </param>
|
||||
/// <param name="arrayIndex">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="arrayIndex" /> 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.ArrayList" /> is greater than the available space from <paramref name="arrayIndex" /> 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.ArrayList" /> cannot be cast automatically to the type of the destination <paramref name="array" />. </exception>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x06000DDC RID: 3548 RVA: 0x0003C30C File Offset: 0x0003A50C
|
||||
public virtual void CopyTo(Array array, int arrayIndex)
|
||||
{
|
||||
this.CopyTo(0, array, arrayIndex, this._size);
|
||||
}
|
||||
|
||||
/// <summary>Copies a range of elements from the <see cref="T:System.Collections.ArrayList" /> to a compatible one-dimensional <see cref="T:System.Array" />, starting at the specified index of the target array.</summary>
|
||||
/// <param name="index">The zero-based index in the source <see cref="T:System.Collections.ArrayList" /> at which copying begins. </param>
|
||||
/// <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.ArrayList" />. The <see cref="T:System.Array" /> must have zero-based indexing. </param>
|
||||
/// <param name="arrayIndex">The zero-based index in <paramref name="array" /> at which copying begins. </param>
|
||||
/// <param name="count">The number of elements to copy. </param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="array" /> is null. </exception>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="index" /> is less than zero.-or- <paramref name="arrayIndex" /> is less than zero.-or- <paramref name="count" /> is less than zero. </exception>
|
||||
/// <exception cref="T:System.ArgumentException">
|
||||
/// <paramref name="array" /> is multidimensional.-or- <paramref name="index" /> is equal to or greater than the <see cref="P:System.Collections.ArrayList.Count" /> of the source <see cref="T:System.Collections.ArrayList" />.-or- The number of elements from <paramref name="index" /> to the end of the source <see cref="T:System.Collections.ArrayList" /> is greater than the available space from <paramref name="arrayIndex" /> 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.ArrayList" /> cannot be cast automatically to the type of the destination <paramref name="array" />. </exception>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x06000DDD RID: 3549 RVA: 0x0003C320 File Offset: 0x0003A520
|
||||
public virtual void CopyTo(int index, Array array, int arrayIndex, int count)
|
||||
{
|
||||
if (array == null)
|
||||
{
|
||||
throw new ArgumentNullException("array");
|
||||
}
|
||||
if (array.Rank != 1)
|
||||
{
|
||||
throw new ArgumentException("Must have only 1 dimensions.", "array");
|
||||
}
|
||||
Array.Copy(this._items, index, array, arrayIndex, count);
|
||||
}
|
||||
|
||||
/// <summary>Returns an enumerator for the entire <see cref="T:System.Collections.ArrayList" />.</summary>
|
||||
/// <returns>An <see cref="T:System.Collections.IEnumerator" /> for the entire <see cref="T:System.Collections.ArrayList" />.</returns>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x06000DDE RID: 3550 RVA: 0x0003C360 File Offset: 0x0003A560
|
||||
public virtual IEnumerator GetEnumerator()
|
||||
{
|
||||
return new ArrayList.SimpleEnumerator(this);
|
||||
}
|
||||
|
||||
/// <summary>Returns an enumerator for a range of elements in the <see cref="T:System.Collections.ArrayList" />.</summary>
|
||||
/// <returns>An <see cref="T:System.Collections.IEnumerator" /> for the specified range of elements in the <see cref="T:System.Collections.ArrayList" />.</returns>
|
||||
/// <param name="index">The zero-based starting index of the <see cref="T:System.Collections.ArrayList" /> section that the enumerator should refer to. </param>
|
||||
/// <param name="count">The number of elements in the <see cref="T:System.Collections.ArrayList" /> section that the enumerator should refer to. </param>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="index" /> is less than zero.-or- <paramref name="count" /> is less than zero. </exception>
|
||||
/// <exception cref="T:System.ArgumentException">
|
||||
/// <paramref name="index" /> and <paramref name="count" /> do not specify a valid range in the <see cref="T:System.Collections.ArrayList" />. </exception>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x06000DDF RID: 3551 RVA: 0x0003C368 File Offset: 0x0003A568
|
||||
public virtual IEnumerator GetEnumerator(int index, int count)
|
||||
{
|
||||
ArrayList.CheckRange(index, count, this._size);
|
||||
return new ArrayList.ArrayListEnumerator(this, index, count);
|
||||
}
|
||||
|
||||
/// <summary>Adds the elements of an <see cref="T:System.Collections.ICollection" /> to the end of the <see cref="T:System.Collections.ArrayList" />.</summary>
|
||||
/// <param name="c">The <see cref="T:System.Collections.ICollection" /> whose elements should be added to the end of the <see cref="T:System.Collections.ArrayList" />. The collection itself cannot be null, but it can contain elements that are null. </param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="c" /> is null. </exception>
|
||||
/// <exception cref="T:System.NotSupportedException">The <see cref="T:System.Collections.ArrayList" /> is read-only.-or- The <see cref="T:System.Collections.ArrayList" /> has a fixed size. </exception>
|
||||
/// <filterpriority>1</filterpriority>
|
||||
// Token: 0x06000DE0 RID: 3552 RVA: 0x0003C380 File Offset: 0x0003A580
|
||||
public virtual void AddRange(ICollection c)
|
||||
{
|
||||
this.InsertRange(this._size, c);
|
||||
}
|
||||
|
||||
/// <summary>Searches the entire sorted <see cref="T:System.Collections.ArrayList" /> for an element using the default comparer and returns the zero-based index of the element.</summary>
|
||||
/// <returns>The zero-based index of <paramref name="value" /> in the sorted <see cref="T:System.Collections.ArrayList" />, if <paramref name="value" /> is found; otherwise, a negative number, which is the bitwise complement of the index of the next element that is larger than <paramref name="value" /> or, if there is no larger element, the bitwise complement of <see cref="P:System.Collections.ArrayList.Count" />.</returns>
|
||||
/// <param name="value">The <see cref="T:System.Object" /> to locate. The value can be null. </param>
|
||||
/// <exception cref="T:System.ArgumentException">Neither <paramref name="value" /> nor the elements of <see cref="T:System.Collections.ArrayList" /> implement the <see cref="T:System.IComparable" /> interface. </exception>
|
||||
/// <exception cref="T:System.InvalidOperationException">
|
||||
/// <paramref name="value" /> is not of the same type as the elements of the <see cref="T:System.Collections.ArrayList" />. </exception>
|
||||
/// <filterpriority>1</filterpriority>
|
||||
// Token: 0x06000DE1 RID: 3553 RVA: 0x0003C390 File Offset: 0x0003A590
|
||||
public virtual int BinarySearch(object value)
|
||||
{
|
||||
int num;
|
||||
try
|
||||
{
|
||||
num = Array.BinarySearch<object>(this._items, 0, this._size, value);
|
||||
}
|
||||
catch (InvalidOperationException ex)
|
||||
{
|
||||
throw new ArgumentException(ex.Message);
|
||||
}
|
||||
return num;
|
||||
}
|
||||
|
||||
/// <summary>Searches the entire sorted <see cref="T:System.Collections.ArrayList" /> for an element using the specified comparer and returns the zero-based index of the element.</summary>
|
||||
/// <returns>The zero-based index of <paramref name="value" /> in the sorted <see cref="T:System.Collections.ArrayList" />, if <paramref name="value" /> is found; otherwise, a negative number, which is the bitwise complement of the index of the next element that is larger than <paramref name="value" /> or, if there is no larger element, the bitwise complement of <see cref="P:System.Collections.ArrayList.Count" />.</returns>
|
||||
/// <param name="value">The <see cref="T:System.Object" /> to locate. The value can be null. </param>
|
||||
/// <param name="comparer">The <see cref="T:System.Collections.IComparer" /> implementation to use when comparing elements.-or- null to use the default comparer that is the <see cref="T:System.IComparable" /> implementation of each element. </param>
|
||||
/// <exception cref="T:System.ArgumentException">
|
||||
/// <paramref name="comparer" /> is null and neither <paramref name="value" /> nor the elements of <see cref="T:System.Collections.ArrayList" /> implement the <see cref="T:System.IComparable" /> interface. </exception>
|
||||
/// <exception cref="T:System.InvalidOperationException">
|
||||
/// <paramref name="comparer" /> is null and <paramref name="value" /> is not of the same type as the elements of the <see cref="T:System.Collections.ArrayList" />. </exception>
|
||||
/// <filterpriority>1</filterpriority>
|
||||
// Token: 0x06000DE2 RID: 3554 RVA: 0x0003C3EC File Offset: 0x0003A5EC
|
||||
public virtual int BinarySearch(object value, IComparer comparer)
|
||||
{
|
||||
int num;
|
||||
try
|
||||
{
|
||||
num = Array.BinarySearch(this._items, 0, this._size, value, comparer);
|
||||
}
|
||||
catch (InvalidOperationException ex)
|
||||
{
|
||||
throw new ArgumentException(ex.Message);
|
||||
}
|
||||
return num;
|
||||
}
|
||||
|
||||
/// <summary>Searches a range of elements in the sorted <see cref="T:System.Collections.ArrayList" /> for an element using the specified comparer and returns the zero-based index of the element.</summary>
|
||||
/// <returns>The zero-based index of <paramref name="value" /> in the sorted <see cref="T:System.Collections.ArrayList" />, if <paramref name="value" /> is found; otherwise, a negative number, which is the bitwise complement of the index of the next element that is larger than <paramref name="value" /> or, if there is no larger element, the bitwise complement of <see cref="P:System.Collections.ArrayList.Count" />.</returns>
|
||||
/// <param name="index">The zero-based starting index of the range to search. </param>
|
||||
/// <param name="count">The length of the range to search. </param>
|
||||
/// <param name="value">The <see cref="T:System.Object" /> to locate. The value can be null. </param>
|
||||
/// <param name="comparer">The <see cref="T:System.Collections.IComparer" /> implementation to use when comparing elements.-or- null to use the default comparer that is the <see cref="T:System.IComparable" /> implementation of each element. </param>
|
||||
/// <exception cref="T:System.ArgumentException">
|
||||
/// <paramref name="index" /> and <paramref name="count" /> do not denote a valid range in the <see cref="T:System.Collections.ArrayList" />.-or- <paramref name="comparer" /> is null and neither <paramref name="value" /> nor the elements of <see cref="T:System.Collections.ArrayList" /> implement the <see cref="T:System.IComparable" /> interface. </exception>
|
||||
/// <exception cref="T:System.InvalidOperationException">
|
||||
/// <paramref name="comparer" /> is null and <paramref name="value" /> is not of the same type as the elements of the <see cref="T:System.Collections.ArrayList" />. </exception>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="index" /> is less than zero.-or- <paramref name="count" /> is less than zero. </exception>
|
||||
/// <filterpriority>1</filterpriority>
|
||||
// Token: 0x06000DE3 RID: 3555 RVA: 0x0003C448 File Offset: 0x0003A648
|
||||
public virtual int BinarySearch(int index, int count, object value, IComparer comparer)
|
||||
{
|
||||
int num;
|
||||
try
|
||||
{
|
||||
num = Array.BinarySearch(this._items, index, count, value, comparer);
|
||||
}
|
||||
catch (InvalidOperationException ex)
|
||||
{
|
||||
throw new ArgumentException(ex.Message);
|
||||
}
|
||||
return num;
|
||||
}
|
||||
|
||||
/// <summary>Returns an <see cref="T:System.Collections.ArrayList" /> which represents a subset of the elements in the source <see cref="T:System.Collections.ArrayList" />.</summary>
|
||||
/// <returns>An <see cref="T:System.Collections.ArrayList" /> which represents a subset of the elements in the source <see cref="T:System.Collections.ArrayList" />.</returns>
|
||||
/// <param name="index">The zero-based <see cref="T:System.Collections.ArrayList" /> index at which the range starts. </param>
|
||||
/// <param name="count">The number of elements in the range. </param>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="index" /> is less than zero.-or- <paramref name="count" /> is less than zero. </exception>
|
||||
/// <exception cref="T:System.ArgumentException">
|
||||
/// <paramref name="index" /> and <paramref name="count" /> do not denote a valid range of elements in the <see cref="T:System.Collections.ArrayList" />. </exception>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x06000DE4 RID: 3556 RVA: 0x0003C4A0 File Offset: 0x0003A6A0
|
||||
public virtual ArrayList GetRange(int index, int count)
|
||||
{
|
||||
ArrayList.CheckRange(index, count, this._size);
|
||||
if (this.IsSynchronized)
|
||||
{
|
||||
return ArrayList.Synchronized(new ArrayList.RangedArrayList(this, index, count));
|
||||
}
|
||||
return new ArrayList.RangedArrayList(this, index, count);
|
||||
}
|
||||
|
||||
/// <summary>Copies the elements of a collection over a range of elements in the <see cref="T:System.Collections.ArrayList" />.</summary>
|
||||
/// <param name="index">The zero-based <see cref="T:System.Collections.ArrayList" /> index at which to start copying the elements of <paramref name="c" />. </param>
|
||||
/// <param name="c">The <see cref="T:System.Collections.ICollection" /> whose elements to copy to the <see cref="T:System.Collections.ArrayList" />. The collection itself cannot be null, but it can contain elements that are null. </param>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="index" /> is less than zero.-or- <paramref name="index" /> plus the number of elements in <paramref name="c" /> is greater than <see cref="P:System.Collections.ArrayList.Count" />. </exception>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="c" /> is null. </exception>
|
||||
/// <exception cref="T:System.NotSupportedException">The <see cref="T:System.Collections.ArrayList" /> is read-only. </exception>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x06000DE5 RID: 3557 RVA: 0x0003C4DC File Offset: 0x0003A6DC
|
||||
public virtual void SetRange(int index, ICollection c)
|
||||
{
|
||||
if (c == null)
|
||||
{
|
||||
throw new ArgumentNullException("c");
|
||||
}
|
||||
if (index < 0 || index + c.Count > this._size)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException("index");
|
||||
}
|
||||
c.CopyTo(this._items, index);
|
||||
this._version++;
|
||||
}
|
||||
|
||||
/// <summary>Sets the capacity to the actual number of elements in the <see cref="T:System.Collections.ArrayList" />.</summary>
|
||||
/// <exception cref="T:System.NotSupportedException">The <see cref="T:System.Collections.ArrayList" /> is read-only.-or- The <see cref="T:System.Collections.ArrayList" /> has a fixed size. </exception>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x06000DE6 RID: 3558 RVA: 0x0003C53C File Offset: 0x0003A73C
|
||||
public virtual void TrimToSize()
|
||||
{
|
||||
if (this._items.Length > this._size)
|
||||
{
|
||||
object[] array;
|
||||
if (this._size == 0)
|
||||
{
|
||||
array = new object[4];
|
||||
}
|
||||
else
|
||||
{
|
||||
array = new object[this._size];
|
||||
}
|
||||
Array.Copy(this._items, 0, array, 0, this._size);
|
||||
this._items = array;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Sorts the elements in the entire <see cref="T:System.Collections.ArrayList" />.</summary>
|
||||
/// <exception cref="T:System.NotSupportedException">The <see cref="T:System.Collections.ArrayList" /> is read-only. </exception>
|
||||
/// <filterpriority>1</filterpriority>
|
||||
// Token: 0x06000DE7 RID: 3559 RVA: 0x0003C59C File Offset: 0x0003A79C
|
||||
public virtual void Sort()
|
||||
{
|
||||
Array.Sort<object>(this._items, 0, this._size);
|
||||
this._version++;
|
||||
}
|
||||
|
||||
/// <summary>Sorts the elements in the entire <see cref="T:System.Collections.ArrayList" /> using the specified comparer.</summary>
|
||||
/// <param name="comparer">The <see cref="T:System.Collections.IComparer" /> implementation to use when comparing elements.-or- null to use the <see cref="T:System.IComparable" /> implementation of each element. </param>
|
||||
/// <exception cref="T:System.NotSupportedException">The <see cref="T:System.Collections.ArrayList" /> is read-only. </exception>
|
||||
/// <filterpriority>1</filterpriority>
|
||||
// Token: 0x06000DE8 RID: 3560 RVA: 0x0003C5CC File Offset: 0x0003A7CC
|
||||
public virtual void Sort(IComparer comparer)
|
||||
{
|
||||
Array.Sort(this._items, 0, this._size, comparer);
|
||||
}
|
||||
|
||||
/// <summary>Sorts the elements in a range of elements in <see cref="T:System.Collections.ArrayList" /> using the specified comparer.</summary>
|
||||
/// <param name="index">The zero-based starting index of the range to sort. </param>
|
||||
/// <param name="count">The length of the range to sort. </param>
|
||||
/// <param name="comparer">The <see cref="T:System.Collections.IComparer" /> implementation to use when comparing elements.-or- null to use the <see cref="T:System.IComparable" /> implementation of each element. </param>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="index" /> is less than zero.-or- <paramref name="count" /> is less than zero. </exception>
|
||||
/// <exception cref="T:System.ArgumentException">
|
||||
/// <paramref name="index" /> and <paramref name="count" /> do not specify a valid range in the <see cref="T:System.Collections.ArrayList" />. </exception>
|
||||
/// <exception cref="T:System.NotSupportedException">The <see cref="T:System.Collections.ArrayList" /> is read-only. </exception>
|
||||
/// <filterpriority>1</filterpriority>
|
||||
// Token: 0x06000DE9 RID: 3561 RVA: 0x0003C5E4 File Offset: 0x0003A7E4
|
||||
public virtual void Sort(int index, int count, IComparer comparer)
|
||||
{
|
||||
ArrayList.CheckRange(index, count, this._size);
|
||||
Array.Sort(this._items, index, count, comparer);
|
||||
}
|
||||
|
||||
/// <summary>Copies the elements of the <see cref="T:System.Collections.ArrayList" /> to a new <see cref="T:System.Object" /> array.</summary>
|
||||
/// <returns>An <see cref="T:System.Object" /> array containing copies of the elements of the <see cref="T:System.Collections.ArrayList" />.</returns>
|
||||
/// <filterpriority>1</filterpriority>
|
||||
// Token: 0x06000DEA RID: 3562 RVA: 0x0003C604 File Offset: 0x0003A804
|
||||
public virtual object[] ToArray()
|
||||
{
|
||||
object[] array = new object[this._size];
|
||||
this.CopyTo(array);
|
||||
return array;
|
||||
}
|
||||
|
||||
/// <summary>Copies the elements of the <see cref="T:System.Collections.ArrayList" /> to a new array of the specified element type.</summary>
|
||||
/// <returns>An array of the specified element type containing copies of the elements of the <see cref="T:System.Collections.ArrayList" />.</returns>
|
||||
/// <param name="type">The element <see cref="T:System.Type" /> of the destination array to create and copy elements to.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="type" /> is null. </exception>
|
||||
/// <exception cref="T:System.InvalidCastException">The type of the source <see cref="T:System.Collections.ArrayList" /> cannot be cast automatically to the specified type. </exception>
|
||||
/// <filterpriority>1</filterpriority>
|
||||
// Token: 0x06000DEB RID: 3563 RVA: 0x0003C628 File Offset: 0x0003A828
|
||||
public virtual Array ToArray(Type type)
|
||||
{
|
||||
Array array = Array.CreateInstance(type, this._size);
|
||||
this.CopyTo(array);
|
||||
return array;
|
||||
}
|
||||
|
||||
/// <summary>Creates a shallow copy of the <see cref="T:System.Collections.ArrayList" />.</summary>
|
||||
/// <returns>A shallow copy of the <see cref="T:System.Collections.ArrayList" />.</returns>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x06000DEC RID: 3564 RVA: 0x0003C64C File Offset: 0x0003A84C
|
||||
public virtual object Clone()
|
||||
{
|
||||
return new ArrayList(this._items, 0, this._size);
|
||||
}
|
||||
|
||||
// Token: 0x06000DED RID: 3565 RVA: 0x0003C660 File Offset: 0x0003A860
|
||||
internal static void CheckRange(int index, int count, int listCount)
|
||||
{
|
||||
if (index < 0)
|
||||
{
|
||||
ArrayList.ThrowNewArgumentOutOfRangeException("index", index, "Can't be less than 0.");
|
||||
}
|
||||
if (count < 0)
|
||||
{
|
||||
ArrayList.ThrowNewArgumentOutOfRangeException("count", count, "Can't be less than 0.");
|
||||
}
|
||||
if (index > listCount - count)
|
||||
{
|
||||
throw new ArgumentException("Index and count do not denote a valid range of elements.", "index");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000DEE RID: 3566 RVA: 0x0003C6C0 File Offset: 0x0003A8C0
|
||||
internal static void ThrowNewArgumentOutOfRangeException(string name, object actual, string message)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException(name, actual, message);
|
||||
}
|
||||
|
||||
/// <summary>Creates an <see cref="T:System.Collections.ArrayList" /> wrapper for a specific <see cref="T:System.Collections.IList" />.</summary>
|
||||
/// <returns>The <see cref="T:System.Collections.ArrayList" /> wrapper around the <see cref="T:System.Collections.IList" />.</returns>
|
||||
/// <param name="list">The <see cref="T:System.Collections.IList" /> to wrap.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="list" /> is null.</exception>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x06000DEF RID: 3567 RVA: 0x0003C6CC File Offset: 0x0003A8CC
|
||||
public static ArrayList Adapter(IList list)
|
||||
{
|
||||
if (list == null)
|
||||
{
|
||||
throw new ArgumentNullException("list");
|
||||
}
|
||||
ArrayList arrayList = list as ArrayList;
|
||||
if (arrayList != null)
|
||||
{
|
||||
return arrayList;
|
||||
}
|
||||
arrayList = new ArrayList.ArrayListAdapter(list);
|
||||
if (list.IsSynchronized)
|
||||
{
|
||||
return ArrayList.Synchronized(arrayList);
|
||||
}
|
||||
return arrayList;
|
||||
}
|
||||
|
||||
/// <summary>Returns an <see cref="T:System.Collections.ArrayList" /> wrapper that is synchronized (thread safe).</summary>
|
||||
/// <returns>An <see cref="T:System.Collections.ArrayList" /> wrapper that is synchronized (thread safe).</returns>
|
||||
/// <param name="list">The <see cref="T:System.Collections.ArrayList" /> to synchronize. </param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="list" /> is null. </exception>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x06000DF0 RID: 3568 RVA: 0x0003C714 File Offset: 0x0003A914
|
||||
public static ArrayList Synchronized(ArrayList list)
|
||||
{
|
||||
if (list == null)
|
||||
{
|
||||
throw new ArgumentNullException("list");
|
||||
}
|
||||
if (list.IsSynchronized)
|
||||
{
|
||||
return list;
|
||||
}
|
||||
return new ArrayList.SynchronizedArrayListWrapper(list);
|
||||
}
|
||||
|
||||
/// <summary>Returns an <see cref="T:System.Collections.IList" /> wrapper that is synchronized (thread safe).</summary>
|
||||
/// <returns>An <see cref="T:System.Collections.IList" /> wrapper that is synchronized (thread safe).</returns>
|
||||
/// <param name="list">The <see cref="T:System.Collections.IList" /> to synchronize. </param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="list" /> is null. </exception>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x06000DF1 RID: 3569 RVA: 0x0003C748 File Offset: 0x0003A948
|
||||
public static IList Synchronized(IList list)
|
||||
{
|
||||
if (list == null)
|
||||
{
|
||||
throw new ArgumentNullException("list");
|
||||
}
|
||||
if (list.IsSynchronized)
|
||||
{
|
||||
return list;
|
||||
}
|
||||
return new ArrayList.SynchronizedListWrapper(list);
|
||||
}
|
||||
|
||||
/// <summary>Returns a read-only <see cref="T:System.Collections.ArrayList" /> wrapper.</summary>
|
||||
/// <returns>A read-only <see cref="T:System.Collections.ArrayList" /> wrapper around <paramref name="list" />.</returns>
|
||||
/// <param name="list">The <see cref="T:System.Collections.ArrayList" /> to wrap. </param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="list" /> is null. </exception>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x06000DF2 RID: 3570 RVA: 0x0003C77C File Offset: 0x0003A97C
|
||||
public static ArrayList ReadOnly(ArrayList list)
|
||||
{
|
||||
if (list == null)
|
||||
{
|
||||
throw new ArgumentNullException("list");
|
||||
}
|
||||
if (list.IsReadOnly)
|
||||
{
|
||||
return list;
|
||||
}
|
||||
return new ArrayList.ReadOnlyArrayListWrapper(list);
|
||||
}
|
||||
|
||||
/// <summary>Returns a read-only <see cref="T:System.Collections.IList" /> wrapper.</summary>
|
||||
/// <returns>A read-only <see cref="T:System.Collections.IList" /> wrapper around <paramref name="list" />.</returns>
|
||||
/// <param name="list">The <see cref="T:System.Collections.IList" /> to wrap. </param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="list" /> is null. </exception>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x06000DF3 RID: 3571 RVA: 0x0003C7B0 File Offset: 0x0003A9B0
|
||||
public static IList ReadOnly(IList list)
|
||||
{
|
||||
if (list == null)
|
||||
{
|
||||
throw new ArgumentNullException("list");
|
||||
}
|
||||
if (list.IsReadOnly)
|
||||
{
|
||||
return list;
|
||||
}
|
||||
return new ArrayList.ReadOnlyListWrapper(list);
|
||||
}
|
||||
|
||||
/// <summary>Returns an <see cref="T:System.Collections.ArrayList" /> wrapper with a fixed size.</summary>
|
||||
/// <returns>An <see cref="T:System.Collections.ArrayList" /> wrapper with a fixed size.</returns>
|
||||
/// <param name="list">The <see cref="T:System.Collections.ArrayList" /> to wrap. </param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="list" /> is null. </exception>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x06000DF4 RID: 3572 RVA: 0x0003C7E4 File Offset: 0x0003A9E4
|
||||
public static ArrayList FixedSize(ArrayList list)
|
||||
{
|
||||
if (list == null)
|
||||
{
|
||||
throw new ArgumentNullException("list");
|
||||
}
|
||||
if (list.IsFixedSize)
|
||||
{
|
||||
return list;
|
||||
}
|
||||
return new ArrayList.FixedSizeArrayListWrapper(list);
|
||||
}
|
||||
|
||||
/// <summary>Returns an <see cref="T:System.Collections.IList" /> wrapper with a fixed size.</summary>
|
||||
/// <returns>An <see cref="T:System.Collections.IList" /> wrapper with a fixed size.</returns>
|
||||
/// <param name="list">The <see cref="T:System.Collections.IList" /> to wrap. </param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="list" /> is null. </exception>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x06000DF5 RID: 3573 RVA: 0x0003C818 File Offset: 0x0003AA18
|
||||
public static IList FixedSize(IList list)
|
||||
{
|
||||
if (list == null)
|
||||
{
|
||||
throw new ArgumentNullException("list");
|
||||
}
|
||||
if (list.IsFixedSize)
|
||||
{
|
||||
return list;
|
||||
}
|
||||
return new ArrayList.FixedSizeListWrapper(list);
|
||||
}
|
||||
|
||||
/// <summary>Returns an <see cref="T:System.Collections.ArrayList" /> whose elements are copies of the specified value.</summary>
|
||||
/// <returns>An <see cref="T:System.Collections.ArrayList" /> with <paramref name="count" /> number of elements, all of which are copies of <paramref name="value" />.</returns>
|
||||
/// <param name="value">The <see cref="T:System.Object" /> to copy multiple times in the new <see cref="T:System.Collections.ArrayList" />. The value can be null. </param>
|
||||
/// <param name="count">The number of times <paramref name="value" /> should be copied. </param>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="count" /> is less than zero. </exception>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x06000DF6 RID: 3574 RVA: 0x0003C84C File Offset: 0x0003AA4C
|
||||
public static ArrayList Repeat(object value, int count)
|
||||
{
|
||||
ArrayList arrayList = new ArrayList(count);
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
arrayList.Add(value);
|
||||
}
|
||||
return arrayList;
|
||||
}
|
||||
|
||||
// Token: 0x0400038D RID: 909
|
||||
private const int DefaultInitialCapacity = 4;
|
||||
|
||||
// Token: 0x0400038E RID: 910
|
||||
private int _size;
|
||||
|
||||
// Token: 0x0400038F RID: 911
|
||||
private object[] _items;
|
||||
|
||||
// Token: 0x04000390 RID: 912
|
||||
private int _version;
|
||||
|
||||
// Token: 0x04000391 RID: 913
|
||||
private static readonly object[] EmptyArray = new object[0];
|
||||
|
||||
// Token: 0x02000114 RID: 276
|
||||
private sealed class ArrayListEnumerator : IEnumerator, ICloneable
|
||||
{
|
||||
// Token: 0x06000DF7 RID: 3575 RVA: 0x0003C87C File Offset: 0x0003AA7C
|
||||
public ArrayListEnumerator(ArrayList list)
|
||||
: this(list, 0, list.Count)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x06000DF8 RID: 3576 RVA: 0x0003C88C File Offset: 0x0003AA8C
|
||||
public ArrayListEnumerator(ArrayList list, int index, int count)
|
||||
{
|
||||
this.m_List = list;
|
||||
this.m_Index = index;
|
||||
this.m_Count = count;
|
||||
this.m_Pos = this.m_Index - 1;
|
||||
this.m_Current = null;
|
||||
this.m_ExpectedStateChanges = list._version;
|
||||
}
|
||||
|
||||
// Token: 0x06000DF9 RID: 3577 RVA: 0x0003C8D8 File Offset: 0x0003AAD8
|
||||
public object Clone()
|
||||
{
|
||||
return base.MemberwiseClone();
|
||||
}
|
||||
|
||||
// Token: 0x1700021C RID: 540
|
||||
// (get) Token: 0x06000DFA RID: 3578 RVA: 0x0003C8E0 File Offset: 0x0003AAE0
|
||||
public object Current
|
||||
{
|
||||
get
|
||||
{
|
||||
if (this.m_Pos == this.m_Index - 1)
|
||||
{
|
||||
throw new InvalidOperationException("Enumerator unusable (Reset pending, or past end of array.");
|
||||
}
|
||||
return this.m_Current;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000DFB RID: 3579 RVA: 0x0003C914 File Offset: 0x0003AB14
|
||||
public bool MoveNext()
|
||||
{
|
||||
if (this.m_List._version != this.m_ExpectedStateChanges)
|
||||
{
|
||||
throw new InvalidOperationException("List has changed.");
|
||||
}
|
||||
this.m_Pos++;
|
||||
if (this.m_Pos - this.m_Index < this.m_Count)
|
||||
{
|
||||
this.m_Current = this.m_List[this.m_Pos];
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// Token: 0x06000DFC RID: 3580 RVA: 0x0003C984 File Offset: 0x0003AB84
|
||||
public void Reset()
|
||||
{
|
||||
this.m_Current = null;
|
||||
this.m_Pos = this.m_Index - 1;
|
||||
}
|
||||
|
||||
// Token: 0x04000392 RID: 914
|
||||
private int m_Pos;
|
||||
|
||||
// Token: 0x04000393 RID: 915
|
||||
private int m_Index;
|
||||
|
||||
// Token: 0x04000394 RID: 916
|
||||
private int m_Count;
|
||||
|
||||
// Token: 0x04000395 RID: 917
|
||||
private object m_Current;
|
||||
|
||||
// Token: 0x04000396 RID: 918
|
||||
private ArrayList m_List;
|
||||
|
||||
// Token: 0x04000397 RID: 919
|
||||
private int m_ExpectedStateChanges;
|
||||
}
|
||||
|
||||
// Token: 0x02000115 RID: 277
|
||||
private sealed class SimpleEnumerator : IEnumerator, ICloneable
|
||||
{
|
||||
// Token: 0x06000DFD RID: 3581 RVA: 0x0003C99C File Offset: 0x0003AB9C
|
||||
public SimpleEnumerator(ArrayList list)
|
||||
{
|
||||
this.list = list;
|
||||
this.index = -1;
|
||||
this.version = list._version;
|
||||
this.currentElement = ArrayList.SimpleEnumerator.endFlag;
|
||||
}
|
||||
|
||||
// Token: 0x06000DFF RID: 3583 RVA: 0x0003C9D8 File Offset: 0x0003ABD8
|
||||
public object Clone()
|
||||
{
|
||||
return base.MemberwiseClone();
|
||||
}
|
||||
|
||||
// Token: 0x06000E00 RID: 3584 RVA: 0x0003C9E0 File Offset: 0x0003ABE0
|
||||
public bool MoveNext()
|
||||
{
|
||||
if (this.version != this.list._version)
|
||||
{
|
||||
throw new InvalidOperationException("List has changed.");
|
||||
}
|
||||
if (++this.index < this.list.Count)
|
||||
{
|
||||
this.currentElement = this.list[this.index];
|
||||
return true;
|
||||
}
|
||||
this.currentElement = ArrayList.SimpleEnumerator.endFlag;
|
||||
return false;
|
||||
}
|
||||
|
||||
// Token: 0x1700021D RID: 541
|
||||
// (get) Token: 0x06000E01 RID: 3585 RVA: 0x0003CA54 File Offset: 0x0003AC54
|
||||
public object Current
|
||||
{
|
||||
get
|
||||
{
|
||||
if (this.currentElement != ArrayList.SimpleEnumerator.endFlag)
|
||||
{
|
||||
return this.currentElement;
|
||||
}
|
||||
if (this.index == -1)
|
||||
{
|
||||
throw new InvalidOperationException("Enumerator not started");
|
||||
}
|
||||
throw new InvalidOperationException("Enumerator ended");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000E02 RID: 3586 RVA: 0x0003CA9C File Offset: 0x0003AC9C
|
||||
public void Reset()
|
||||
{
|
||||
if (this.version != this.list._version)
|
||||
{
|
||||
throw new InvalidOperationException("List has changed.");
|
||||
}
|
||||
this.currentElement = ArrayList.SimpleEnumerator.endFlag;
|
||||
this.index = -1;
|
||||
}
|
||||
|
||||
// Token: 0x04000398 RID: 920
|
||||
private ArrayList list;
|
||||
|
||||
// Token: 0x04000399 RID: 921
|
||||
private int index;
|
||||
|
||||
// Token: 0x0400039A RID: 922
|
||||
private int version;
|
||||
|
||||
// Token: 0x0400039B RID: 923
|
||||
private object currentElement;
|
||||
|
||||
// Token: 0x0400039C RID: 924
|
||||
private static object endFlag = new object();
|
||||
}
|
||||
|
||||
// Token: 0x02000116 RID: 278
|
||||
[Serializable]
|
||||
private sealed class ArrayListAdapter : ArrayList
|
||||
{
|
||||
// Token: 0x06000E03 RID: 3587 RVA: 0x0003CAD4 File Offset: 0x0003ACD4
|
||||
public ArrayListAdapter(IList adaptee)
|
||||
: base(0, true)
|
||||
{
|
||||
this.m_Adaptee = adaptee;
|
||||
}
|
||||
|
||||
// Token: 0x1700021E RID: 542
|
||||
public override object this[int index]
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.m_Adaptee[index];
|
||||
}
|
||||
set
|
||||
{
|
||||
this.m_Adaptee[index] = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700021F RID: 543
|
||||
// (get) Token: 0x06000E06 RID: 3590 RVA: 0x0003CB08 File Offset: 0x0003AD08
|
||||
public override int Count
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.m_Adaptee.Count;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000220 RID: 544
|
||||
// (get) Token: 0x06000E07 RID: 3591 RVA: 0x0003CB18 File Offset: 0x0003AD18
|
||||
// (set) Token: 0x06000E08 RID: 3592 RVA: 0x0003CB28 File Offset: 0x0003AD28
|
||||
public override int Capacity
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.m_Adaptee.Count;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (value < this.m_Adaptee.Count)
|
||||
{
|
||||
throw new ArgumentException("capacity");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000221 RID: 545
|
||||
// (get) Token: 0x06000E09 RID: 3593 RVA: 0x0003CB48 File Offset: 0x0003AD48
|
||||
public override bool IsFixedSize
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.m_Adaptee.IsFixedSize;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000222 RID: 546
|
||||
// (get) Token: 0x06000E0A RID: 3594 RVA: 0x0003CB58 File Offset: 0x0003AD58
|
||||
public override bool IsReadOnly
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.m_Adaptee.IsReadOnly;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000223 RID: 547
|
||||
// (get) Token: 0x06000E0B RID: 3595 RVA: 0x0003CB68 File Offset: 0x0003AD68
|
||||
public override object SyncRoot
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.m_Adaptee.SyncRoot;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000E0C RID: 3596 RVA: 0x0003CB78 File Offset: 0x0003AD78
|
||||
public override int Add(object value)
|
||||
{
|
||||
return this.m_Adaptee.Add(value);
|
||||
}
|
||||
|
||||
// Token: 0x06000E0D RID: 3597 RVA: 0x0003CB88 File Offset: 0x0003AD88
|
||||
public override void Clear()
|
||||
{
|
||||
this.m_Adaptee.Clear();
|
||||
}
|
||||
|
||||
// Token: 0x06000E0E RID: 3598 RVA: 0x0003CB98 File Offset: 0x0003AD98
|
||||
public override bool Contains(object value)
|
||||
{
|
||||
return this.m_Adaptee.Contains(value);
|
||||
}
|
||||
|
||||
// Token: 0x06000E0F RID: 3599 RVA: 0x0003CBA8 File Offset: 0x0003ADA8
|
||||
public override int IndexOf(object value)
|
||||
{
|
||||
return this.m_Adaptee.IndexOf(value);
|
||||
}
|
||||
|
||||
// Token: 0x06000E10 RID: 3600 RVA: 0x0003CBB8 File Offset: 0x0003ADB8
|
||||
public override int IndexOf(object value, int startIndex)
|
||||
{
|
||||
return this.IndexOf(value, startIndex, this.m_Adaptee.Count - startIndex);
|
||||
}
|
||||
|
||||
// Token: 0x06000E11 RID: 3601 RVA: 0x0003CBD0 File Offset: 0x0003ADD0
|
||||
public override int IndexOf(object value, int startIndex, int count)
|
||||
{
|
||||
if (startIndex < 0 || startIndex > this.m_Adaptee.Count)
|
||||
{
|
||||
ArrayList.ThrowNewArgumentOutOfRangeException("startIndex", startIndex, "Does not specify valid index.");
|
||||
}
|
||||
if (count < 0)
|
||||
{
|
||||
ArrayList.ThrowNewArgumentOutOfRangeException("count", count, "Can't be less than 0.");
|
||||
}
|
||||
if (startIndex > this.m_Adaptee.Count - count)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException("count", "Start index and count do not specify a valid range.");
|
||||
}
|
||||
if (value == null)
|
||||
{
|
||||
for (int i = startIndex; i < startIndex + count; i++)
|
||||
{
|
||||
if (this.m_Adaptee[i] == null)
|
||||
{
|
||||
return i;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int j = startIndex; j < startIndex + count; j++)
|
||||
{
|
||||
if (value.Equals(this.m_Adaptee[j]))
|
||||
{
|
||||
return j;
|
||||
}
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
// Token: 0x06000E12 RID: 3602 RVA: 0x0003CCAC File Offset: 0x0003AEAC
|
||||
public override int LastIndexOf(object value)
|
||||
{
|
||||
return this.LastIndexOf(value, this.m_Adaptee.Count - 1);
|
||||
}
|
||||
|
||||
// Token: 0x06000E13 RID: 3603 RVA: 0x0003CCC4 File Offset: 0x0003AEC4
|
||||
public override int LastIndexOf(object value, int startIndex)
|
||||
{
|
||||
return this.LastIndexOf(value, startIndex, startIndex + 1);
|
||||
}
|
||||
|
||||
// Token: 0x06000E14 RID: 3604 RVA: 0x0003CCD4 File Offset: 0x0003AED4
|
||||
public override int LastIndexOf(object value, int startIndex, int count)
|
||||
{
|
||||
if (startIndex < 0)
|
||||
{
|
||||
ArrayList.ThrowNewArgumentOutOfRangeException("startIndex", startIndex, "< 0");
|
||||
}
|
||||
if (count < 0)
|
||||
{
|
||||
ArrayList.ThrowNewArgumentOutOfRangeException("count", count, "count is negative.");
|
||||
}
|
||||
if (startIndex - count + 1 < 0)
|
||||
{
|
||||
ArrayList.ThrowNewArgumentOutOfRangeException("count", count, "count is too large.");
|
||||
}
|
||||
if (value == null)
|
||||
{
|
||||
for (int i = startIndex; i > startIndex - count; i--)
|
||||
{
|
||||
if (this.m_Adaptee[i] == null)
|
||||
{
|
||||
return i;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int j = startIndex; j > startIndex - count; j--)
|
||||
{
|
||||
if (value.Equals(this.m_Adaptee[j]))
|
||||
{
|
||||
return j;
|
||||
}
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
// Token: 0x06000E15 RID: 3605 RVA: 0x0003CD9C File Offset: 0x0003AF9C
|
||||
public override void Insert(int index, object value)
|
||||
{
|
||||
this.m_Adaptee.Insert(index, value);
|
||||
}
|
||||
|
||||
// Token: 0x06000E16 RID: 3606 RVA: 0x0003CDAC File Offset: 0x0003AFAC
|
||||
public override void InsertRange(int index, ICollection c)
|
||||
{
|
||||
if (c == null)
|
||||
{
|
||||
throw new ArgumentNullException("c");
|
||||
}
|
||||
if (index > this.m_Adaptee.Count)
|
||||
{
|
||||
ArrayList.ThrowNewArgumentOutOfRangeException("index", index, "Index must be >= 0 and <= Count.");
|
||||
}
|
||||
foreach (object obj in c)
|
||||
{
|
||||
this.m_Adaptee.Insert(index++, obj);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000E17 RID: 3607 RVA: 0x0003CE54 File Offset: 0x0003B054
|
||||
public override void Remove(object value)
|
||||
{
|
||||
this.m_Adaptee.Remove(value);
|
||||
}
|
||||
|
||||
// Token: 0x06000E18 RID: 3608 RVA: 0x0003CE64 File Offset: 0x0003B064
|
||||
public override void RemoveAt(int index)
|
||||
{
|
||||
this.m_Adaptee.RemoveAt(index);
|
||||
}
|
||||
|
||||
// Token: 0x06000E19 RID: 3609 RVA: 0x0003CE74 File Offset: 0x0003B074
|
||||
public override void RemoveRange(int index, int count)
|
||||
{
|
||||
ArrayList.CheckRange(index, count, this.m_Adaptee.Count);
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
this.m_Adaptee.RemoveAt(index);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000E1A RID: 3610 RVA: 0x0003CEB4 File Offset: 0x0003B0B4
|
||||
public override void Reverse()
|
||||
{
|
||||
this.Reverse(0, this.m_Adaptee.Count);
|
||||
}
|
||||
|
||||
// Token: 0x06000E1B RID: 3611 RVA: 0x0003CEC8 File Offset: 0x0003B0C8
|
||||
public override void Reverse(int index, int count)
|
||||
{
|
||||
ArrayList.CheckRange(index, count, this.m_Adaptee.Count);
|
||||
for (int i = 0; i < count / 2; i++)
|
||||
{
|
||||
object obj = this.m_Adaptee[i + index];
|
||||
this.m_Adaptee[i + index] = this.m_Adaptee[index + count - i + index - 1];
|
||||
this.m_Adaptee[index + count - i + index - 1] = obj;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000E1C RID: 3612 RVA: 0x0003CF44 File Offset: 0x0003B144
|
||||
public override void SetRange(int index, ICollection c)
|
||||
{
|
||||
if (c == null)
|
||||
{
|
||||
throw new ArgumentNullException("c");
|
||||
}
|
||||
if (index < 0 || index + c.Count > this.m_Adaptee.Count)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException("index");
|
||||
}
|
||||
int num = index;
|
||||
foreach (object obj in c)
|
||||
{
|
||||
this.m_Adaptee[num++] = obj;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000E1D RID: 3613 RVA: 0x0003CFF0 File Offset: 0x0003B1F0
|
||||
public override void CopyTo(Array array)
|
||||
{
|
||||
this.m_Adaptee.CopyTo(array, 0);
|
||||
}
|
||||
|
||||
// Token: 0x06000E1E RID: 3614 RVA: 0x0003D000 File Offset: 0x0003B200
|
||||
public override void CopyTo(Array array, int index)
|
||||
{
|
||||
this.m_Adaptee.CopyTo(array, index);
|
||||
}
|
||||
|
||||
// Token: 0x06000E1F RID: 3615 RVA: 0x0003D010 File Offset: 0x0003B210
|
||||
public override void CopyTo(int index, Array array, int arrayIndex, int count)
|
||||
{
|
||||
if (index < 0)
|
||||
{
|
||||
ArrayList.ThrowNewArgumentOutOfRangeException("index", index, "Can't be less than zero.");
|
||||
}
|
||||
if (arrayIndex < 0)
|
||||
{
|
||||
ArrayList.ThrowNewArgumentOutOfRangeException("arrayIndex", arrayIndex, "Can't be less than zero.");
|
||||
}
|
||||
if (count < 0)
|
||||
{
|
||||
ArrayList.ThrowNewArgumentOutOfRangeException("index", index, "Can't be less than zero.");
|
||||
}
|
||||
if (index >= this.m_Adaptee.Count)
|
||||
{
|
||||
throw new ArgumentException("Can't be more or equal to list count.", "index");
|
||||
}
|
||||
if (array.Rank > 1)
|
||||
{
|
||||
throw new ArgumentException("Can't copy into multi-dimensional array.");
|
||||
}
|
||||
if (arrayIndex >= array.Length)
|
||||
{
|
||||
throw new ArgumentException("arrayIndex can't be greater than array.Length - 1.");
|
||||
}
|
||||
if (array.Length - arrayIndex + 1 < count)
|
||||
{
|
||||
throw new ArgumentException("Destination array is too small.");
|
||||
}
|
||||
if (index > this.m_Adaptee.Count - count)
|
||||
{
|
||||
throw new ArgumentException("Index and count do not denote a valid range of elements.", "index");
|
||||
}
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
array.SetValue(this.m_Adaptee[index + i], arrayIndex + i);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000224 RID: 548
|
||||
// (get) Token: 0x06000E20 RID: 3616 RVA: 0x0003D12C File Offset: 0x0003B32C
|
||||
public override bool IsSynchronized
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.m_Adaptee.IsSynchronized;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000E21 RID: 3617 RVA: 0x0003D13C File Offset: 0x0003B33C
|
||||
public override IEnumerator GetEnumerator()
|
||||
{
|
||||
return this.m_Adaptee.GetEnumerator();
|
||||
}
|
||||
|
||||
// Token: 0x06000E22 RID: 3618 RVA: 0x0003D14C File Offset: 0x0003B34C
|
||||
public override IEnumerator GetEnumerator(int index, int count)
|
||||
{
|
||||
ArrayList.CheckRange(index, count, this.m_Adaptee.Count);
|
||||
return new ArrayList.ArrayListAdapter.EnumeratorWithRange(this.m_Adaptee.GetEnumerator(), index, count);
|
||||
}
|
||||
|
||||
// Token: 0x06000E23 RID: 3619 RVA: 0x0003D180 File Offset: 0x0003B380
|
||||
public override void AddRange(ICollection c)
|
||||
{
|
||||
foreach (object obj in c)
|
||||
{
|
||||
this.m_Adaptee.Add(obj);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000E24 RID: 3620 RVA: 0x0003D1EC File Offset: 0x0003B3EC
|
||||
public override int BinarySearch(object value)
|
||||
{
|
||||
return this.BinarySearch(value, null);
|
||||
}
|
||||
|
||||
// Token: 0x06000E25 RID: 3621 RVA: 0x0003D1F8 File Offset: 0x0003B3F8
|
||||
public override int BinarySearch(object value, IComparer comparer)
|
||||
{
|
||||
return this.BinarySearch(0, this.m_Adaptee.Count, value, comparer);
|
||||
}
|
||||
|
||||
// Token: 0x06000E26 RID: 3622 RVA: 0x0003D210 File Offset: 0x0003B410
|
||||
public override int BinarySearch(int index, int count, object value, IComparer comparer)
|
||||
{
|
||||
ArrayList.CheckRange(index, count, this.m_Adaptee.Count);
|
||||
if (comparer == null)
|
||||
{
|
||||
comparer = Comparer.Default;
|
||||
}
|
||||
int i = index;
|
||||
int num = index + count - 1;
|
||||
while (i <= num)
|
||||
{
|
||||
int num2 = i + (num - i) / 2;
|
||||
int num3 = comparer.Compare(value, this.m_Adaptee[num2]);
|
||||
if (num3 < 0)
|
||||
{
|
||||
num = num2 - 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (num3 <= 0)
|
||||
{
|
||||
return num2;
|
||||
}
|
||||
i = num2 + 1;
|
||||
}
|
||||
}
|
||||
return ~i;
|
||||
}
|
||||
|
||||
// Token: 0x06000E27 RID: 3623 RVA: 0x0003D294 File Offset: 0x0003B494
|
||||
public override object Clone()
|
||||
{
|
||||
return new ArrayList.ArrayListAdapter(this.m_Adaptee);
|
||||
}
|
||||
|
||||
// Token: 0x06000E28 RID: 3624 RVA: 0x0003D2A4 File Offset: 0x0003B4A4
|
||||
public override ArrayList GetRange(int index, int count)
|
||||
{
|
||||
ArrayList.CheckRange(index, count, this.m_Adaptee.Count);
|
||||
return new ArrayList.RangedArrayList(this, index, count);
|
||||
}
|
||||
|
||||
// Token: 0x06000E29 RID: 3625 RVA: 0x0003D2C0 File Offset: 0x0003B4C0
|
||||
public override void TrimToSize()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x06000E2A RID: 3626 RVA: 0x0003D2C4 File Offset: 0x0003B4C4
|
||||
public override void Sort()
|
||||
{
|
||||
this.Sort(Comparer.Default);
|
||||
}
|
||||
|
||||
// Token: 0x06000E2B RID: 3627 RVA: 0x0003D2D4 File Offset: 0x0003B4D4
|
||||
public override void Sort(IComparer comparer)
|
||||
{
|
||||
this.Sort(0, this.m_Adaptee.Count, comparer);
|
||||
}
|
||||
|
||||
// Token: 0x06000E2C RID: 3628 RVA: 0x0003D2EC File Offset: 0x0003B4EC
|
||||
public override void Sort(int index, int count, IComparer comparer)
|
||||
{
|
||||
ArrayList.CheckRange(index, count, this.m_Adaptee.Count);
|
||||
if (comparer == null)
|
||||
{
|
||||
comparer = Comparer.Default;
|
||||
}
|
||||
ArrayList.ArrayListAdapter.QuickSort(this.m_Adaptee, index, index + count - 1, comparer);
|
||||
}
|
||||
|
||||
// Token: 0x06000E2D RID: 3629 RVA: 0x0003D32C File Offset: 0x0003B52C
|
||||
private static void Swap(IList list, int x, int y)
|
||||
{
|
||||
object obj = list[x];
|
||||
list[x] = list[y];
|
||||
list[y] = obj;
|
||||
}
|
||||
|
||||
// Token: 0x06000E2E RID: 3630 RVA: 0x0003D358 File Offset: 0x0003B558
|
||||
internal static void QuickSort(IList list, int left, int right, IComparer comparer)
|
||||
{
|
||||
if (left >= right)
|
||||
{
|
||||
return;
|
||||
}
|
||||
int num = left + (right - left) / 2;
|
||||
if (comparer.Compare(list[num], list[left]) < 0)
|
||||
{
|
||||
ArrayList.ArrayListAdapter.Swap(list, num, left);
|
||||
}
|
||||
if (comparer.Compare(list[right], list[left]) < 0)
|
||||
{
|
||||
ArrayList.ArrayListAdapter.Swap(list, right, left);
|
||||
}
|
||||
if (comparer.Compare(list[right], list[num]) < 0)
|
||||
{
|
||||
ArrayList.ArrayListAdapter.Swap(list, right, num);
|
||||
}
|
||||
if (right - left + 1 <= 3)
|
||||
{
|
||||
return;
|
||||
}
|
||||
ArrayList.ArrayListAdapter.Swap(list, right - 1, num);
|
||||
object obj = list[right - 1];
|
||||
int num2 = left;
|
||||
int num3 = right - 1;
|
||||
for (;;)
|
||||
{
|
||||
while (comparer.Compare(list[++num2], obj) < 0)
|
||||
{
|
||||
}
|
||||
while (comparer.Compare(list[--num3], obj) > 0)
|
||||
{
|
||||
}
|
||||
if (num2 >= num3)
|
||||
{
|
||||
break;
|
||||
}
|
||||
ArrayList.ArrayListAdapter.Swap(list, num2, num3);
|
||||
}
|
||||
ArrayList.ArrayListAdapter.Swap(list, right - 1, num2);
|
||||
ArrayList.ArrayListAdapter.QuickSort(list, left, num2 - 1, comparer);
|
||||
ArrayList.ArrayListAdapter.QuickSort(list, num2 + 1, right, comparer);
|
||||
}
|
||||
|
||||
// Token: 0x06000E2F RID: 3631 RVA: 0x0003D480 File Offset: 0x0003B680
|
||||
public override object[] ToArray()
|
||||
{
|
||||
object[] array = new object[this.m_Adaptee.Count];
|
||||
this.m_Adaptee.CopyTo(array, 0);
|
||||
return array;
|
||||
}
|
||||
|
||||
// Token: 0x06000E30 RID: 3632 RVA: 0x0003D4AC File Offset: 0x0003B6AC
|
||||
public override Array ToArray(Type elementType)
|
||||
{
|
||||
Array array = Array.CreateInstance(elementType, this.m_Adaptee.Count);
|
||||
this.m_Adaptee.CopyTo(array, 0);
|
||||
return array;
|
||||
}
|
||||
|
||||
// Token: 0x0400039D RID: 925
|
||||
private IList m_Adaptee;
|
||||
|
||||
// Token: 0x02000117 RID: 279
|
||||
private sealed class EnumeratorWithRange : IEnumerator, ICloneable
|
||||
{
|
||||
// Token: 0x06000E31 RID: 3633 RVA: 0x0003D4DC File Offset: 0x0003B6DC
|
||||
public EnumeratorWithRange(IEnumerator enumerator, int index, int count)
|
||||
{
|
||||
this.m_Count = 0;
|
||||
this.m_StartIndex = index;
|
||||
this.m_MaxCount = count;
|
||||
this.m_Enumerator = enumerator;
|
||||
this.Reset();
|
||||
}
|
||||
|
||||
// Token: 0x06000E32 RID: 3634 RVA: 0x0003D514 File Offset: 0x0003B714
|
||||
public object Clone()
|
||||
{
|
||||
return base.MemberwiseClone();
|
||||
}
|
||||
|
||||
// Token: 0x17000225 RID: 549
|
||||
// (get) Token: 0x06000E33 RID: 3635 RVA: 0x0003D51C File Offset: 0x0003B71C
|
||||
public object Current
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.m_Enumerator.Current;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000E34 RID: 3636 RVA: 0x0003D52C File Offset: 0x0003B72C
|
||||
public bool MoveNext()
|
||||
{
|
||||
if (this.m_Count >= this.m_MaxCount)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
this.m_Count++;
|
||||
return this.m_Enumerator.MoveNext();
|
||||
}
|
||||
|
||||
// Token: 0x06000E35 RID: 3637 RVA: 0x0003D568 File Offset: 0x0003B768
|
||||
public void Reset()
|
||||
{
|
||||
this.m_Count = 0;
|
||||
this.m_Enumerator.Reset();
|
||||
for (int i = 0; i < this.m_StartIndex; i++)
|
||||
{
|
||||
this.m_Enumerator.MoveNext();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0400039E RID: 926
|
||||
private int m_StartIndex;
|
||||
|
||||
// Token: 0x0400039F RID: 927
|
||||
private int m_Count;
|
||||
|
||||
// Token: 0x040003A0 RID: 928
|
||||
private int m_MaxCount;
|
||||
|
||||
// Token: 0x040003A1 RID: 929
|
||||
private IEnumerator m_Enumerator;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x02000118 RID: 280
|
||||
[Serializable]
|
||||
private class ArrayListWrapper : ArrayList
|
||||
{
|
||||
// Token: 0x06000E36 RID: 3638 RVA: 0x0003D5AC File Offset: 0x0003B7AC
|
||||
public ArrayListWrapper(ArrayList innerArrayList)
|
||||
{
|
||||
this.m_InnerArrayList = innerArrayList;
|
||||
}
|
||||
|
||||
// Token: 0x17000226 RID: 550
|
||||
public override object this[int index]
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.m_InnerArrayList[index];
|
||||
}
|
||||
set
|
||||
{
|
||||
this.m_InnerArrayList[index] = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000227 RID: 551
|
||||
// (get) Token: 0x06000E39 RID: 3641 RVA: 0x0003D5DC File Offset: 0x0003B7DC
|
||||
public override int Count
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.m_InnerArrayList.Count;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000228 RID: 552
|
||||
// (get) Token: 0x06000E3A RID: 3642 RVA: 0x0003D5EC File Offset: 0x0003B7EC
|
||||
// (set) Token: 0x06000E3B RID: 3643 RVA: 0x0003D5FC File Offset: 0x0003B7FC
|
||||
public override int Capacity
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.m_InnerArrayList.Capacity;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.m_InnerArrayList.Capacity = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000229 RID: 553
|
||||
// (get) Token: 0x06000E3C RID: 3644 RVA: 0x0003D60C File Offset: 0x0003B80C
|
||||
public override bool IsFixedSize
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.m_InnerArrayList.IsFixedSize;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700022A RID: 554
|
||||
// (get) Token: 0x06000E3D RID: 3645 RVA: 0x0003D61C File Offset: 0x0003B81C
|
||||
public override bool IsReadOnly
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.m_InnerArrayList.IsReadOnly;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700022B RID: 555
|
||||
// (get) Token: 0x06000E3E RID: 3646 RVA: 0x0003D62C File Offset: 0x0003B82C
|
||||
public override bool IsSynchronized
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.m_InnerArrayList.IsSynchronized;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700022C RID: 556
|
||||
// (get) Token: 0x06000E3F RID: 3647 RVA: 0x0003D63C File Offset: 0x0003B83C
|
||||
public override object SyncRoot
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.m_InnerArrayList.SyncRoot;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000E40 RID: 3648 RVA: 0x0003D64C File Offset: 0x0003B84C
|
||||
public override int Add(object value)
|
||||
{
|
||||
return this.m_InnerArrayList.Add(value);
|
||||
}
|
||||
|
||||
// Token: 0x06000E41 RID: 3649 RVA: 0x0003D65C File Offset: 0x0003B85C
|
||||
public override void Clear()
|
||||
{
|
||||
this.m_InnerArrayList.Clear();
|
||||
}
|
||||
|
||||
// Token: 0x06000E42 RID: 3650 RVA: 0x0003D66C File Offset: 0x0003B86C
|
||||
public override bool Contains(object value)
|
||||
{
|
||||
return this.m_InnerArrayList.Contains(value);
|
||||
}
|
||||
|
||||
// Token: 0x06000E43 RID: 3651 RVA: 0x0003D67C File Offset: 0x0003B87C
|
||||
public override int IndexOf(object value)
|
||||
{
|
||||
return this.m_InnerArrayList.IndexOf(value);
|
||||
}
|
||||
|
||||
// Token: 0x06000E44 RID: 3652 RVA: 0x0003D68C File Offset: 0x0003B88C
|
||||
public override int IndexOf(object value, int startIndex)
|
||||
{
|
||||
return this.m_InnerArrayList.IndexOf(value, startIndex);
|
||||
}
|
||||
|
||||
// Token: 0x06000E45 RID: 3653 RVA: 0x0003D69C File Offset: 0x0003B89C
|
||||
public override int IndexOf(object value, int startIndex, int count)
|
||||
{
|
||||
return this.m_InnerArrayList.IndexOf(value, startIndex, count);
|
||||
}
|
||||
|
||||
// Token: 0x06000E46 RID: 3654 RVA: 0x0003D6AC File Offset: 0x0003B8AC
|
||||
public override int LastIndexOf(object value)
|
||||
{
|
||||
return this.m_InnerArrayList.LastIndexOf(value);
|
||||
}
|
||||
|
||||
// Token: 0x06000E47 RID: 3655 RVA: 0x0003D6BC File Offset: 0x0003B8BC
|
||||
public override int LastIndexOf(object value, int startIndex)
|
||||
{
|
||||
return this.m_InnerArrayList.LastIndexOf(value, startIndex);
|
||||
}
|
||||
|
||||
// Token: 0x06000E48 RID: 3656 RVA: 0x0003D6CC File Offset: 0x0003B8CC
|
||||
public override int LastIndexOf(object value, int startIndex, int count)
|
||||
{
|
||||
return this.m_InnerArrayList.LastIndexOf(value, startIndex, count);
|
||||
}
|
||||
|
||||
// Token: 0x06000E49 RID: 3657 RVA: 0x0003D6DC File Offset: 0x0003B8DC
|
||||
public override void Insert(int index, object value)
|
||||
{
|
||||
this.m_InnerArrayList.Insert(index, value);
|
||||
}
|
||||
|
||||
// Token: 0x06000E4A RID: 3658 RVA: 0x0003D6EC File Offset: 0x0003B8EC
|
||||
public override void InsertRange(int index, ICollection c)
|
||||
{
|
||||
this.m_InnerArrayList.InsertRange(index, c);
|
||||
}
|
||||
|
||||
// Token: 0x06000E4B RID: 3659 RVA: 0x0003D6FC File Offset: 0x0003B8FC
|
||||
public override void Remove(object value)
|
||||
{
|
||||
this.m_InnerArrayList.Remove(value);
|
||||
}
|
||||
|
||||
// Token: 0x06000E4C RID: 3660 RVA: 0x0003D70C File Offset: 0x0003B90C
|
||||
public override void RemoveAt(int index)
|
||||
{
|
||||
this.m_InnerArrayList.RemoveAt(index);
|
||||
}
|
||||
|
||||
// Token: 0x06000E4D RID: 3661 RVA: 0x0003D71C File Offset: 0x0003B91C
|
||||
public override void RemoveRange(int index, int count)
|
||||
{
|
||||
this.m_InnerArrayList.RemoveRange(index, count);
|
||||
}
|
||||
|
||||
// Token: 0x06000E4E RID: 3662 RVA: 0x0003D72C File Offset: 0x0003B92C
|
||||
public override void Reverse()
|
||||
{
|
||||
this.m_InnerArrayList.Reverse();
|
||||
}
|
||||
|
||||
// Token: 0x06000E4F RID: 3663 RVA: 0x0003D73C File Offset: 0x0003B93C
|
||||
public override void Reverse(int index, int count)
|
||||
{
|
||||
this.m_InnerArrayList.Reverse(index, count);
|
||||
}
|
||||
|
||||
// Token: 0x06000E50 RID: 3664 RVA: 0x0003D74C File Offset: 0x0003B94C
|
||||
public override void SetRange(int index, ICollection c)
|
||||
{
|
||||
this.m_InnerArrayList.SetRange(index, c);
|
||||
}
|
||||
|
||||
// Token: 0x06000E51 RID: 3665 RVA: 0x0003D75C File Offset: 0x0003B95C
|
||||
public override void CopyTo(Array array)
|
||||
{
|
||||
this.m_InnerArrayList.CopyTo(array);
|
||||
}
|
||||
|
||||
// Token: 0x06000E52 RID: 3666 RVA: 0x0003D76C File Offset: 0x0003B96C
|
||||
public override void CopyTo(Array array, int index)
|
||||
{
|
||||
this.m_InnerArrayList.CopyTo(array, index);
|
||||
}
|
||||
|
||||
// Token: 0x06000E53 RID: 3667 RVA: 0x0003D77C File Offset: 0x0003B97C
|
||||
public override void CopyTo(int index, Array array, int arrayIndex, int count)
|
||||
{
|
||||
this.m_InnerArrayList.CopyTo(index, array, arrayIndex, count);
|
||||
}
|
||||
|
||||
// Token: 0x06000E54 RID: 3668 RVA: 0x0003D790 File Offset: 0x0003B990
|
||||
public override IEnumerator GetEnumerator()
|
||||
{
|
||||
return this.m_InnerArrayList.GetEnumerator();
|
||||
}
|
||||
|
||||
// Token: 0x06000E55 RID: 3669 RVA: 0x0003D7A0 File Offset: 0x0003B9A0
|
||||
public override IEnumerator GetEnumerator(int index, int count)
|
||||
{
|
||||
return this.m_InnerArrayList.GetEnumerator(index, count);
|
||||
}
|
||||
|
||||
// Token: 0x06000E56 RID: 3670 RVA: 0x0003D7B0 File Offset: 0x0003B9B0
|
||||
public override void AddRange(ICollection c)
|
||||
{
|
||||
this.m_InnerArrayList.AddRange(c);
|
||||
}
|
||||
|
||||
// Token: 0x06000E57 RID: 3671 RVA: 0x0003D7C0 File Offset: 0x0003B9C0
|
||||
public override int BinarySearch(object value)
|
||||
{
|
||||
return this.m_InnerArrayList.BinarySearch(value);
|
||||
}
|
||||
|
||||
// Token: 0x06000E58 RID: 3672 RVA: 0x0003D7D0 File Offset: 0x0003B9D0
|
||||
public override int BinarySearch(object value, IComparer comparer)
|
||||
{
|
||||
return this.m_InnerArrayList.BinarySearch(value, comparer);
|
||||
}
|
||||
|
||||
// Token: 0x06000E59 RID: 3673 RVA: 0x0003D7E0 File Offset: 0x0003B9E0
|
||||
public override int BinarySearch(int index, int count, object value, IComparer comparer)
|
||||
{
|
||||
return this.m_InnerArrayList.BinarySearch(index, count, value, comparer);
|
||||
}
|
||||
|
||||
// Token: 0x06000E5A RID: 3674 RVA: 0x0003D7F4 File Offset: 0x0003B9F4
|
||||
public override object Clone()
|
||||
{
|
||||
return this.m_InnerArrayList.Clone();
|
||||
}
|
||||
|
||||
// Token: 0x06000E5B RID: 3675 RVA: 0x0003D804 File Offset: 0x0003BA04
|
||||
public override ArrayList GetRange(int index, int count)
|
||||
{
|
||||
return this.m_InnerArrayList.GetRange(index, count);
|
||||
}
|
||||
|
||||
// Token: 0x06000E5C RID: 3676 RVA: 0x0003D814 File Offset: 0x0003BA14
|
||||
public override void TrimToSize()
|
||||
{
|
||||
this.m_InnerArrayList.TrimToSize();
|
||||
}
|
||||
|
||||
// Token: 0x06000E5D RID: 3677 RVA: 0x0003D824 File Offset: 0x0003BA24
|
||||
public override void Sort()
|
||||
{
|
||||
this.m_InnerArrayList.Sort();
|
||||
}
|
||||
|
||||
// Token: 0x06000E5E RID: 3678 RVA: 0x0003D834 File Offset: 0x0003BA34
|
||||
public override void Sort(IComparer comparer)
|
||||
{
|
||||
this.m_InnerArrayList.Sort(comparer);
|
||||
}
|
||||
|
||||
// Token: 0x06000E5F RID: 3679 RVA: 0x0003D844 File Offset: 0x0003BA44
|
||||
public override void Sort(int index, int count, IComparer comparer)
|
||||
{
|
||||
this.m_InnerArrayList.Sort(index, count, comparer);
|
||||
}
|
||||
|
||||
// Token: 0x06000E60 RID: 3680 RVA: 0x0003D854 File Offset: 0x0003BA54
|
||||
public override object[] ToArray()
|
||||
{
|
||||
return this.m_InnerArrayList.ToArray();
|
||||
}
|
||||
|
||||
// Token: 0x06000E61 RID: 3681 RVA: 0x0003D864 File Offset: 0x0003BA64
|
||||
public override Array ToArray(Type elementType)
|
||||
{
|
||||
return this.m_InnerArrayList.ToArray(elementType);
|
||||
}
|
||||
|
||||
// Token: 0x040003A2 RID: 930
|
||||
protected ArrayList m_InnerArrayList;
|
||||
}
|
||||
|
||||
// Token: 0x02000119 RID: 281
|
||||
[Serializable]
|
||||
private sealed class SynchronizedArrayListWrapper : ArrayList.ArrayListWrapper
|
||||
{
|
||||
// Token: 0x06000E62 RID: 3682 RVA: 0x0003D874 File Offset: 0x0003BA74
|
||||
internal SynchronizedArrayListWrapper(ArrayList innerArrayList)
|
||||
: base(innerArrayList)
|
||||
{
|
||||
this.m_SyncRoot = innerArrayList.SyncRoot;
|
||||
}
|
||||
|
||||
// Token: 0x1700022D RID: 557
|
||||
public override object this[int index]
|
||||
{
|
||||
get
|
||||
{
|
||||
object syncRoot = this.m_SyncRoot;
|
||||
object obj;
|
||||
lock (syncRoot)
|
||||
{
|
||||
obj = this.m_InnerArrayList[index];
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
set
|
||||
{
|
||||
object syncRoot = this.m_SyncRoot;
|
||||
lock (syncRoot)
|
||||
{
|
||||
this.m_InnerArrayList[index] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700022E RID: 558
|
||||
// (get) Token: 0x06000E65 RID: 3685 RVA: 0x0003D934 File Offset: 0x0003BB34
|
||||
public override int Count
|
||||
{
|
||||
get
|
||||
{
|
||||
object syncRoot = this.m_SyncRoot;
|
||||
int count;
|
||||
lock (syncRoot)
|
||||
{
|
||||
count = this.m_InnerArrayList.Count;
|
||||
}
|
||||
return count;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700022F RID: 559
|
||||
// (get) Token: 0x06000E66 RID: 3686 RVA: 0x0003D988 File Offset: 0x0003BB88
|
||||
// (set) Token: 0x06000E67 RID: 3687 RVA: 0x0003D9DC File Offset: 0x0003BBDC
|
||||
public override int Capacity
|
||||
{
|
||||
get
|
||||
{
|
||||
object syncRoot = this.m_SyncRoot;
|
||||
int capacity;
|
||||
lock (syncRoot)
|
||||
{
|
||||
capacity = this.m_InnerArrayList.Capacity;
|
||||
}
|
||||
return capacity;
|
||||
}
|
||||
set
|
||||
{
|
||||
object syncRoot = this.m_SyncRoot;
|
||||
lock (syncRoot)
|
||||
{
|
||||
this.m_InnerArrayList.Capacity = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000230 RID: 560
|
||||
// (get) Token: 0x06000E68 RID: 3688 RVA: 0x0003DA2C File Offset: 0x0003BC2C
|
||||
public override bool IsFixedSize
|
||||
{
|
||||
get
|
||||
{
|
||||
object syncRoot = this.m_SyncRoot;
|
||||
bool isFixedSize;
|
||||
lock (syncRoot)
|
||||
{
|
||||
isFixedSize = this.m_InnerArrayList.IsFixedSize;
|
||||
}
|
||||
return isFixedSize;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000231 RID: 561
|
||||
// (get) Token: 0x06000E69 RID: 3689 RVA: 0x0003DA80 File Offset: 0x0003BC80
|
||||
public override bool IsReadOnly
|
||||
{
|
||||
get
|
||||
{
|
||||
object syncRoot = this.m_SyncRoot;
|
||||
bool isReadOnly;
|
||||
lock (syncRoot)
|
||||
{
|
||||
isReadOnly = this.m_InnerArrayList.IsReadOnly;
|
||||
}
|
||||
return isReadOnly;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000232 RID: 562
|
||||
// (get) Token: 0x06000E6A RID: 3690 RVA: 0x0003DAD4 File Offset: 0x0003BCD4
|
||||
public override bool IsSynchronized
|
||||
{
|
||||
get
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000233 RID: 563
|
||||
// (get) Token: 0x06000E6B RID: 3691 RVA: 0x0003DAD8 File Offset: 0x0003BCD8
|
||||
public override object SyncRoot
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.m_SyncRoot;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000E6C RID: 3692 RVA: 0x0003DAE0 File Offset: 0x0003BCE0
|
||||
public override int Add(object value)
|
||||
{
|
||||
object syncRoot = this.m_SyncRoot;
|
||||
int num;
|
||||
lock (syncRoot)
|
||||
{
|
||||
num = this.m_InnerArrayList.Add(value);
|
||||
}
|
||||
return num;
|
||||
}
|
||||
|
||||
// Token: 0x06000E6D RID: 3693 RVA: 0x0003DB38 File Offset: 0x0003BD38
|
||||
public override void Clear()
|
||||
{
|
||||
object syncRoot = this.m_SyncRoot;
|
||||
lock (syncRoot)
|
||||
{
|
||||
this.m_InnerArrayList.Clear();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000E6E RID: 3694 RVA: 0x0003DB88 File Offset: 0x0003BD88
|
||||
public override bool Contains(object value)
|
||||
{
|
||||
object syncRoot = this.m_SyncRoot;
|
||||
bool flag;
|
||||
lock (syncRoot)
|
||||
{
|
||||
flag = this.m_InnerArrayList.Contains(value);
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
// Token: 0x06000E6F RID: 3695 RVA: 0x0003DBE0 File Offset: 0x0003BDE0
|
||||
public override int IndexOf(object value)
|
||||
{
|
||||
object syncRoot = this.m_SyncRoot;
|
||||
int num;
|
||||
lock (syncRoot)
|
||||
{
|
||||
num = this.m_InnerArrayList.IndexOf(value);
|
||||
}
|
||||
return num;
|
||||
}
|
||||
|
||||
// Token: 0x06000E70 RID: 3696 RVA: 0x0003DC38 File Offset: 0x0003BE38
|
||||
public override int IndexOf(object value, int startIndex)
|
||||
{
|
||||
object syncRoot = this.m_SyncRoot;
|
||||
int num;
|
||||
lock (syncRoot)
|
||||
{
|
||||
num = this.m_InnerArrayList.IndexOf(value, startIndex);
|
||||
}
|
||||
return num;
|
||||
}
|
||||
|
||||
// Token: 0x06000E71 RID: 3697 RVA: 0x0003DC90 File Offset: 0x0003BE90
|
||||
public override int IndexOf(object value, int startIndex, int count)
|
||||
{
|
||||
object syncRoot = this.m_SyncRoot;
|
||||
int num;
|
||||
lock (syncRoot)
|
||||
{
|
||||
num = this.m_InnerArrayList.IndexOf(value, startIndex, count);
|
||||
}
|
||||
return num;
|
||||
}
|
||||
|
||||
// Token: 0x06000E72 RID: 3698 RVA: 0x0003DCE8 File Offset: 0x0003BEE8
|
||||
public override int LastIndexOf(object value)
|
||||
{
|
||||
object syncRoot = this.m_SyncRoot;
|
||||
int num;
|
||||
lock (syncRoot)
|
||||
{
|
||||
num = this.m_InnerArrayList.LastIndexOf(value);
|
||||
}
|
||||
return num;
|
||||
}
|
||||
|
||||
// Token: 0x06000E73 RID: 3699 RVA: 0x0003DD40 File Offset: 0x0003BF40
|
||||
public override int LastIndexOf(object value, int startIndex)
|
||||
{
|
||||
object syncRoot = this.m_SyncRoot;
|
||||
int num;
|
||||
lock (syncRoot)
|
||||
{
|
||||
num = this.m_InnerArrayList.LastIndexOf(value, startIndex);
|
||||
}
|
||||
return num;
|
||||
}
|
||||
|
||||
// Token: 0x06000E74 RID: 3700 RVA: 0x0003DD98 File Offset: 0x0003BF98
|
||||
public override int LastIndexOf(object value, int startIndex, int count)
|
||||
{
|
||||
object syncRoot = this.m_SyncRoot;
|
||||
int num;
|
||||
lock (syncRoot)
|
||||
{
|
||||
num = this.m_InnerArrayList.LastIndexOf(value, startIndex, count);
|
||||
}
|
||||
return num;
|
||||
}
|
||||
|
||||
// Token: 0x06000E75 RID: 3701 RVA: 0x0003DDF0 File Offset: 0x0003BFF0
|
||||
public override void Insert(int index, object value)
|
||||
{
|
||||
object syncRoot = this.m_SyncRoot;
|
||||
lock (syncRoot)
|
||||
{
|
||||
this.m_InnerArrayList.Insert(index, value);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000E76 RID: 3702 RVA: 0x0003DE40 File Offset: 0x0003C040
|
||||
public override void InsertRange(int index, ICollection c)
|
||||
{
|
||||
object syncRoot = this.m_SyncRoot;
|
||||
lock (syncRoot)
|
||||
{
|
||||
this.m_InnerArrayList.InsertRange(index, c);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000E77 RID: 3703 RVA: 0x0003DE90 File Offset: 0x0003C090
|
||||
public override void Remove(object value)
|
||||
{
|
||||
object syncRoot = this.m_SyncRoot;
|
||||
lock (syncRoot)
|
||||
{
|
||||
this.m_InnerArrayList.Remove(value);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000E78 RID: 3704 RVA: 0x0003DEE0 File Offset: 0x0003C0E0
|
||||
public override void RemoveAt(int index)
|
||||
{
|
||||
object syncRoot = this.m_SyncRoot;
|
||||
lock (syncRoot)
|
||||
{
|
||||
this.m_InnerArrayList.RemoveAt(index);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000E79 RID: 3705 RVA: 0x0003DF30 File Offset: 0x0003C130
|
||||
public override void RemoveRange(int index, int count)
|
||||
{
|
||||
object syncRoot = this.m_SyncRoot;
|
||||
lock (syncRoot)
|
||||
{
|
||||
this.m_InnerArrayList.RemoveRange(index, count);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000E7A RID: 3706 RVA: 0x0003DF80 File Offset: 0x0003C180
|
||||
public override void Reverse()
|
||||
{
|
||||
object syncRoot = this.m_SyncRoot;
|
||||
lock (syncRoot)
|
||||
{
|
||||
this.m_InnerArrayList.Reverse();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000E7B RID: 3707 RVA: 0x0003DFD0 File Offset: 0x0003C1D0
|
||||
public override void Reverse(int index, int count)
|
||||
{
|
||||
object syncRoot = this.m_SyncRoot;
|
||||
lock (syncRoot)
|
||||
{
|
||||
this.m_InnerArrayList.Reverse(index, count);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000E7C RID: 3708 RVA: 0x0003E020 File Offset: 0x0003C220
|
||||
public override void CopyTo(Array array)
|
||||
{
|
||||
object syncRoot = this.m_SyncRoot;
|
||||
lock (syncRoot)
|
||||
{
|
||||
this.m_InnerArrayList.CopyTo(array);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000E7D RID: 3709 RVA: 0x0003E070 File Offset: 0x0003C270
|
||||
public override void CopyTo(Array array, int index)
|
||||
{
|
||||
object syncRoot = this.m_SyncRoot;
|
||||
lock (syncRoot)
|
||||
{
|
||||
this.m_InnerArrayList.CopyTo(array, index);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000E7E RID: 3710 RVA: 0x0003E0C0 File Offset: 0x0003C2C0
|
||||
public override void CopyTo(int index, Array array, int arrayIndex, int count)
|
||||
{
|
||||
object syncRoot = this.m_SyncRoot;
|
||||
lock (syncRoot)
|
||||
{
|
||||
this.m_InnerArrayList.CopyTo(index, array, arrayIndex, count);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000E7F RID: 3711 RVA: 0x0003E114 File Offset: 0x0003C314
|
||||
public override IEnumerator GetEnumerator()
|
||||
{
|
||||
object syncRoot = this.m_SyncRoot;
|
||||
IEnumerator enumerator;
|
||||
lock (syncRoot)
|
||||
{
|
||||
enumerator = this.m_InnerArrayList.GetEnumerator();
|
||||
}
|
||||
return enumerator;
|
||||
}
|
||||
|
||||
// Token: 0x06000E80 RID: 3712 RVA: 0x0003E168 File Offset: 0x0003C368
|
||||
public override IEnumerator GetEnumerator(int index, int count)
|
||||
{
|
||||
object syncRoot = this.m_SyncRoot;
|
||||
IEnumerator enumerator;
|
||||
lock (syncRoot)
|
||||
{
|
||||
enumerator = this.m_InnerArrayList.GetEnumerator(index, count);
|
||||
}
|
||||
return enumerator;
|
||||
}
|
||||
|
||||
// Token: 0x06000E81 RID: 3713 RVA: 0x0003E1C0 File Offset: 0x0003C3C0
|
||||
public override void AddRange(ICollection c)
|
||||
{
|
||||
object syncRoot = this.m_SyncRoot;
|
||||
lock (syncRoot)
|
||||
{
|
||||
this.m_InnerArrayList.AddRange(c);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000E82 RID: 3714 RVA: 0x0003E210 File Offset: 0x0003C410
|
||||
public override int BinarySearch(object value)
|
||||
{
|
||||
object syncRoot = this.m_SyncRoot;
|
||||
int num;
|
||||
lock (syncRoot)
|
||||
{
|
||||
num = this.m_InnerArrayList.BinarySearch(value);
|
||||
}
|
||||
return num;
|
||||
}
|
||||
|
||||
// Token: 0x06000E83 RID: 3715 RVA: 0x0003E268 File Offset: 0x0003C468
|
||||
public override int BinarySearch(object value, IComparer comparer)
|
||||
{
|
||||
object syncRoot = this.m_SyncRoot;
|
||||
int num;
|
||||
lock (syncRoot)
|
||||
{
|
||||
num = this.m_InnerArrayList.BinarySearch(value, comparer);
|
||||
}
|
||||
return num;
|
||||
}
|
||||
|
||||
// Token: 0x06000E84 RID: 3716 RVA: 0x0003E2C0 File Offset: 0x0003C4C0
|
||||
public override int BinarySearch(int index, int count, object value, IComparer comparer)
|
||||
{
|
||||
object syncRoot = this.m_SyncRoot;
|
||||
int num;
|
||||
lock (syncRoot)
|
||||
{
|
||||
num = this.m_InnerArrayList.BinarySearch(index, count, value, comparer);
|
||||
}
|
||||
return num;
|
||||
}
|
||||
|
||||
// Token: 0x06000E85 RID: 3717 RVA: 0x0003E31C File Offset: 0x0003C51C
|
||||
public override object Clone()
|
||||
{
|
||||
object syncRoot = this.m_SyncRoot;
|
||||
object obj;
|
||||
lock (syncRoot)
|
||||
{
|
||||
obj = this.m_InnerArrayList.Clone();
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
// Token: 0x06000E86 RID: 3718 RVA: 0x0003E370 File Offset: 0x0003C570
|
||||
public override ArrayList GetRange(int index, int count)
|
||||
{
|
||||
object syncRoot = this.m_SyncRoot;
|
||||
ArrayList range;
|
||||
lock (syncRoot)
|
||||
{
|
||||
range = this.m_InnerArrayList.GetRange(index, count);
|
||||
}
|
||||
return range;
|
||||
}
|
||||
|
||||
// Token: 0x06000E87 RID: 3719 RVA: 0x0003E3C8 File Offset: 0x0003C5C8
|
||||
public override void TrimToSize()
|
||||
{
|
||||
object syncRoot = this.m_SyncRoot;
|
||||
lock (syncRoot)
|
||||
{
|
||||
this.m_InnerArrayList.TrimToSize();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000E88 RID: 3720 RVA: 0x0003E418 File Offset: 0x0003C618
|
||||
public override void Sort()
|
||||
{
|
||||
object syncRoot = this.m_SyncRoot;
|
||||
lock (syncRoot)
|
||||
{
|
||||
this.m_InnerArrayList.Sort();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000E89 RID: 3721 RVA: 0x0003E468 File Offset: 0x0003C668
|
||||
public override void Sort(IComparer comparer)
|
||||
{
|
||||
object syncRoot = this.m_SyncRoot;
|
||||
lock (syncRoot)
|
||||
{
|
||||
this.m_InnerArrayList.Sort(comparer);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000E8A RID: 3722 RVA: 0x0003E4B8 File Offset: 0x0003C6B8
|
||||
public override void Sort(int index, int count, IComparer comparer)
|
||||
{
|
||||
object syncRoot = this.m_SyncRoot;
|
||||
lock (syncRoot)
|
||||
{
|
||||
this.m_InnerArrayList.Sort(index, count, comparer);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000E8B RID: 3723 RVA: 0x0003E508 File Offset: 0x0003C708
|
||||
public override object[] ToArray()
|
||||
{
|
||||
object syncRoot = this.m_SyncRoot;
|
||||
object[] array;
|
||||
lock (syncRoot)
|
||||
{
|
||||
array = this.m_InnerArrayList.ToArray();
|
||||
}
|
||||
return array;
|
||||
}
|
||||
|
||||
// Token: 0x06000E8C RID: 3724 RVA: 0x0003E55C File Offset: 0x0003C75C
|
||||
public override Array ToArray(Type elementType)
|
||||
{
|
||||
object syncRoot = this.m_SyncRoot;
|
||||
Array array;
|
||||
lock (syncRoot)
|
||||
{
|
||||
array = this.m_InnerArrayList.ToArray(elementType);
|
||||
}
|
||||
return array;
|
||||
}
|
||||
|
||||
// Token: 0x040003A3 RID: 931
|
||||
private object m_SyncRoot;
|
||||
}
|
||||
|
||||
// Token: 0x0200011A RID: 282
|
||||
[Serializable]
|
||||
private class FixedSizeArrayListWrapper : ArrayList.ArrayListWrapper
|
||||
{
|
||||
// Token: 0x06000E8D RID: 3725 RVA: 0x0003E5B4 File Offset: 0x0003C7B4
|
||||
public FixedSizeArrayListWrapper(ArrayList innerList)
|
||||
: base(innerList)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x17000234 RID: 564
|
||||
// (get) Token: 0x06000E8E RID: 3726 RVA: 0x0003E5C0 File Offset: 0x0003C7C0
|
||||
protected virtual string ErrorMessage
|
||||
{
|
||||
get
|
||||
{
|
||||
return "Can't add or remove from a fixed-size list.";
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000235 RID: 565
|
||||
// (get) Token: 0x06000E8F RID: 3727 RVA: 0x0003E5C8 File Offset: 0x0003C7C8
|
||||
// (set) Token: 0x06000E90 RID: 3728 RVA: 0x0003E5D0 File Offset: 0x0003C7D0
|
||||
public override int Capacity
|
||||
{
|
||||
get
|
||||
{
|
||||
return base.Capacity;
|
||||
}
|
||||
set
|
||||
{
|
||||
throw new NotSupportedException(this.ErrorMessage);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000236 RID: 566
|
||||
// (get) Token: 0x06000E91 RID: 3729 RVA: 0x0003E5E0 File Offset: 0x0003C7E0
|
||||
public override bool IsFixedSize
|
||||
{
|
||||
get
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000E92 RID: 3730 RVA: 0x0003E5E4 File Offset: 0x0003C7E4
|
||||
public override int Add(object value)
|
||||
{
|
||||
throw new NotSupportedException(this.ErrorMessage);
|
||||
}
|
||||
|
||||
// Token: 0x06000E93 RID: 3731 RVA: 0x0003E5F4 File Offset: 0x0003C7F4
|
||||
public override void AddRange(ICollection c)
|
||||
{
|
||||
throw new NotSupportedException(this.ErrorMessage);
|
||||
}
|
||||
|
||||
// Token: 0x06000E94 RID: 3732 RVA: 0x0003E604 File Offset: 0x0003C804
|
||||
public override void Clear()
|
||||
{
|
||||
throw new NotSupportedException(this.ErrorMessage);
|
||||
}
|
||||
|
||||
// Token: 0x06000E95 RID: 3733 RVA: 0x0003E614 File Offset: 0x0003C814
|
||||
public override void Insert(int index, object value)
|
||||
{
|
||||
throw new NotSupportedException(this.ErrorMessage);
|
||||
}
|
||||
|
||||
// Token: 0x06000E96 RID: 3734 RVA: 0x0003E624 File Offset: 0x0003C824
|
||||
public override void InsertRange(int index, ICollection c)
|
||||
{
|
||||
throw new NotSupportedException(this.ErrorMessage);
|
||||
}
|
||||
|
||||
// Token: 0x06000E97 RID: 3735 RVA: 0x0003E634 File Offset: 0x0003C834
|
||||
public override void Remove(object value)
|
||||
{
|
||||
throw new NotSupportedException(this.ErrorMessage);
|
||||
}
|
||||
|
||||
// Token: 0x06000E98 RID: 3736 RVA: 0x0003E644 File Offset: 0x0003C844
|
||||
public override void RemoveAt(int index)
|
||||
{
|
||||
throw new NotSupportedException(this.ErrorMessage);
|
||||
}
|
||||
|
||||
// Token: 0x06000E99 RID: 3737 RVA: 0x0003E654 File Offset: 0x0003C854
|
||||
public override void RemoveRange(int index, int count)
|
||||
{
|
||||
throw new NotSupportedException(this.ErrorMessage);
|
||||
}
|
||||
|
||||
// Token: 0x06000E9A RID: 3738 RVA: 0x0003E664 File Offset: 0x0003C864
|
||||
public override void TrimToSize()
|
||||
{
|
||||
throw new NotSupportedException(this.ErrorMessage);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0200011B RID: 283
|
||||
[Serializable]
|
||||
private sealed class ReadOnlyArrayListWrapper : ArrayList.FixedSizeArrayListWrapper
|
||||
{
|
||||
// Token: 0x06000E9B RID: 3739 RVA: 0x0003E674 File Offset: 0x0003C874
|
||||
public ReadOnlyArrayListWrapper(ArrayList innerArrayList)
|
||||
: base(innerArrayList)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x17000237 RID: 567
|
||||
// (get) Token: 0x06000E9C RID: 3740 RVA: 0x0003E680 File Offset: 0x0003C880
|
||||
protected override string ErrorMessage
|
||||
{
|
||||
get
|
||||
{
|
||||
return "Can't modify a readonly list.";
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000238 RID: 568
|
||||
// (get) Token: 0x06000E9D RID: 3741 RVA: 0x0003E688 File Offset: 0x0003C888
|
||||
public override bool IsReadOnly
|
||||
{
|
||||
get
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000239 RID: 569
|
||||
public override object this[int index]
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.m_InnerArrayList[index];
|
||||
}
|
||||
set
|
||||
{
|
||||
throw new NotSupportedException(this.ErrorMessage);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000EA0 RID: 3744 RVA: 0x0003E6AC File Offset: 0x0003C8AC
|
||||
public override void Reverse()
|
||||
{
|
||||
throw new NotSupportedException(this.ErrorMessage);
|
||||
}
|
||||
|
||||
// Token: 0x06000EA1 RID: 3745 RVA: 0x0003E6BC File Offset: 0x0003C8BC
|
||||
public override void Reverse(int index, int count)
|
||||
{
|
||||
throw new NotSupportedException(this.ErrorMessage);
|
||||
}
|
||||
|
||||
// Token: 0x06000EA2 RID: 3746 RVA: 0x0003E6CC File Offset: 0x0003C8CC
|
||||
public override void SetRange(int index, ICollection c)
|
||||
{
|
||||
throw new NotSupportedException(this.ErrorMessage);
|
||||
}
|
||||
|
||||
// Token: 0x06000EA3 RID: 3747 RVA: 0x0003E6DC File Offset: 0x0003C8DC
|
||||
public override void Sort()
|
||||
{
|
||||
throw new NotSupportedException(this.ErrorMessage);
|
||||
}
|
||||
|
||||
// Token: 0x06000EA4 RID: 3748 RVA: 0x0003E6EC File Offset: 0x0003C8EC
|
||||
public override void Sort(IComparer comparer)
|
||||
{
|
||||
throw new NotSupportedException(this.ErrorMessage);
|
||||
}
|
||||
|
||||
// Token: 0x06000EA5 RID: 3749 RVA: 0x0003E6FC File Offset: 0x0003C8FC
|
||||
public override void Sort(int index, int count, IComparer comparer)
|
||||
{
|
||||
throw new NotSupportedException(this.ErrorMessage);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0200011C RID: 284
|
||||
[Serializable]
|
||||
private sealed class RangedArrayList : ArrayList.ArrayListWrapper
|
||||
{
|
||||
// Token: 0x06000EA6 RID: 3750 RVA: 0x0003E70C File Offset: 0x0003C90C
|
||||
public RangedArrayList(ArrayList innerList, int index, int count)
|
||||
: base(innerList)
|
||||
{
|
||||
this.m_InnerIndex = index;
|
||||
this.m_InnerCount = count;
|
||||
this.m_InnerStateChanges = innerList._version;
|
||||
}
|
||||
|
||||
// Token: 0x1700023A RID: 570
|
||||
// (get) Token: 0x06000EA7 RID: 3751 RVA: 0x0003E730 File Offset: 0x0003C930
|
||||
public override bool IsSynchronized
|
||||
{
|
||||
get
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700023B RID: 571
|
||||
public override object this[int index]
|
||||
{
|
||||
get
|
||||
{
|
||||
if (index < 0 || index > this.m_InnerCount)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException("index");
|
||||
}
|
||||
return this.m_InnerArrayList[this.m_InnerIndex + index];
|
||||
}
|
||||
set
|
||||
{
|
||||
if (index < 0 || index > this.m_InnerCount)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException("index");
|
||||
}
|
||||
this.m_InnerArrayList[this.m_InnerIndex + index] = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700023C RID: 572
|
||||
// (get) Token: 0x06000EAA RID: 3754 RVA: 0x0003E7A8 File Offset: 0x0003C9A8
|
||||
public override int Count
|
||||
{
|
||||
get
|
||||
{
|
||||
this.VerifyStateChanges();
|
||||
return this.m_InnerCount;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700023D RID: 573
|
||||
// (get) Token: 0x06000EAB RID: 3755 RVA: 0x0003E7B8 File Offset: 0x0003C9B8
|
||||
// (set) Token: 0x06000EAC RID: 3756 RVA: 0x0003E7C8 File Offset: 0x0003C9C8
|
||||
public override int Capacity
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.m_InnerArrayList.Capacity;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (value < this.m_InnerCount)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000EAD RID: 3757 RVA: 0x0003E7DC File Offset: 0x0003C9DC
|
||||
private void VerifyStateChanges()
|
||||
{
|
||||
if (this.m_InnerStateChanges != this.m_InnerArrayList._version)
|
||||
{
|
||||
throw new InvalidOperationException("ArrayList view is invalid because the underlying ArrayList was modified.");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000EAE RID: 3758 RVA: 0x0003E800 File Offset: 0x0003CA00
|
||||
public override int Add(object value)
|
||||
{
|
||||
this.VerifyStateChanges();
|
||||
this.m_InnerArrayList.Insert(this.m_InnerIndex + this.m_InnerCount, value);
|
||||
this.m_InnerStateChanges = this.m_InnerArrayList._version;
|
||||
return ++this.m_InnerCount;
|
||||
}
|
||||
|
||||
// Token: 0x06000EAF RID: 3759 RVA: 0x0003E850 File Offset: 0x0003CA50
|
||||
public override void Clear()
|
||||
{
|
||||
this.VerifyStateChanges();
|
||||
this.m_InnerArrayList.RemoveRange(this.m_InnerIndex, this.m_InnerCount);
|
||||
this.m_InnerCount = 0;
|
||||
this.m_InnerStateChanges = this.m_InnerArrayList._version;
|
||||
}
|
||||
|
||||
// Token: 0x06000EB0 RID: 3760 RVA: 0x0003E894 File Offset: 0x0003CA94
|
||||
public override bool Contains(object value)
|
||||
{
|
||||
return this.m_InnerArrayList.Contains(value, this.m_InnerIndex, this.m_InnerCount);
|
||||
}
|
||||
|
||||
// Token: 0x06000EB1 RID: 3761 RVA: 0x0003E8B0 File Offset: 0x0003CAB0
|
||||
public override int IndexOf(object value)
|
||||
{
|
||||
return this.IndexOf(value, 0);
|
||||
}
|
||||
|
||||
// Token: 0x06000EB2 RID: 3762 RVA: 0x0003E8BC File Offset: 0x0003CABC
|
||||
public override int IndexOf(object value, int startIndex)
|
||||
{
|
||||
return this.IndexOf(value, startIndex, this.m_InnerCount - startIndex);
|
||||
}
|
||||
|
||||
// Token: 0x06000EB3 RID: 3763 RVA: 0x0003E8D0 File Offset: 0x0003CAD0
|
||||
public override int IndexOf(object value, int startIndex, int count)
|
||||
{
|
||||
if (startIndex < 0 || startIndex > this.m_InnerCount)
|
||||
{
|
||||
ArrayList.ThrowNewArgumentOutOfRangeException("startIndex", startIndex, "Does not specify valid index.");
|
||||
}
|
||||
if (count < 0)
|
||||
{
|
||||
ArrayList.ThrowNewArgumentOutOfRangeException("count", count, "Can't be less than 0.");
|
||||
}
|
||||
if (startIndex > this.m_InnerCount - count)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException("count", "Start index and count do not specify a valid range.");
|
||||
}
|
||||
int num = this.m_InnerArrayList.IndexOf(value, this.m_InnerIndex + startIndex, count);
|
||||
if (num == -1)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
return num - this.m_InnerIndex;
|
||||
}
|
||||
|
||||
// Token: 0x06000EB4 RID: 3764 RVA: 0x0003E968 File Offset: 0x0003CB68
|
||||
public override int LastIndexOf(object value)
|
||||
{
|
||||
return this.LastIndexOf(value, this.m_InnerCount - 1);
|
||||
}
|
||||
|
||||
// Token: 0x06000EB5 RID: 3765 RVA: 0x0003E97C File Offset: 0x0003CB7C
|
||||
public override int LastIndexOf(object value, int startIndex)
|
||||
{
|
||||
return this.LastIndexOf(value, startIndex, startIndex + 1);
|
||||
}
|
||||
|
||||
// Token: 0x06000EB6 RID: 3766 RVA: 0x0003E98C File Offset: 0x0003CB8C
|
||||
public override int LastIndexOf(object value, int startIndex, int count)
|
||||
{
|
||||
if (startIndex < 0)
|
||||
{
|
||||
ArrayList.ThrowNewArgumentOutOfRangeException("startIndex", startIndex, "< 0");
|
||||
}
|
||||
if (count < 0)
|
||||
{
|
||||
ArrayList.ThrowNewArgumentOutOfRangeException("count", count, "count is negative.");
|
||||
}
|
||||
int num = this.m_InnerArrayList.LastIndexOf(value, this.m_InnerIndex + startIndex, count);
|
||||
if (num == -1)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
return num - this.m_InnerIndex;
|
||||
}
|
||||
|
||||
// Token: 0x06000EB7 RID: 3767 RVA: 0x0003E9F8 File Offset: 0x0003CBF8
|
||||
public override void Insert(int index, object value)
|
||||
{
|
||||
this.VerifyStateChanges();
|
||||
if (index < 0 || index > this.m_InnerCount)
|
||||
{
|
||||
ArrayList.ThrowNewArgumentOutOfRangeException("index", index, "Index must be >= 0 and <= Count.");
|
||||
}
|
||||
this.m_InnerArrayList.Insert(this.m_InnerIndex + index, value);
|
||||
this.m_InnerCount++;
|
||||
this.m_InnerStateChanges = this.m_InnerArrayList._version;
|
||||
}
|
||||
|
||||
// Token: 0x06000EB8 RID: 3768 RVA: 0x0003EA68 File Offset: 0x0003CC68
|
||||
public override void InsertRange(int index, ICollection c)
|
||||
{
|
||||
this.VerifyStateChanges();
|
||||
if (index < 0 || index > this.m_InnerCount)
|
||||
{
|
||||
ArrayList.ThrowNewArgumentOutOfRangeException("index", index, "Index must be >= 0 and <= Count.");
|
||||
}
|
||||
this.m_InnerArrayList.InsertRange(this.m_InnerIndex + index, c);
|
||||
this.m_InnerCount += c.Count;
|
||||
this.m_InnerStateChanges = this.m_InnerArrayList._version;
|
||||
}
|
||||
|
||||
// Token: 0x06000EB9 RID: 3769 RVA: 0x0003EADC File Offset: 0x0003CCDC
|
||||
public override void Remove(object value)
|
||||
{
|
||||
this.VerifyStateChanges();
|
||||
int num = this.IndexOf(value);
|
||||
if (num > -1)
|
||||
{
|
||||
this.RemoveAt(num);
|
||||
}
|
||||
this.m_InnerStateChanges = this.m_InnerArrayList._version;
|
||||
}
|
||||
|
||||
// Token: 0x06000EBA RID: 3770 RVA: 0x0003EB18 File Offset: 0x0003CD18
|
||||
public override void RemoveAt(int index)
|
||||
{
|
||||
this.VerifyStateChanges();
|
||||
if (index < 0 || index > this.m_InnerCount)
|
||||
{
|
||||
ArrayList.ThrowNewArgumentOutOfRangeException("index", index, "Index must be >= 0 and <= Count.");
|
||||
}
|
||||
this.m_InnerArrayList.RemoveAt(this.m_InnerIndex + index);
|
||||
this.m_InnerCount--;
|
||||
this.m_InnerStateChanges = this.m_InnerArrayList._version;
|
||||
}
|
||||
|
||||
// Token: 0x06000EBB RID: 3771 RVA: 0x0003EB88 File Offset: 0x0003CD88
|
||||
public override void RemoveRange(int index, int count)
|
||||
{
|
||||
this.VerifyStateChanges();
|
||||
ArrayList.CheckRange(index, count, this.m_InnerCount);
|
||||
this.m_InnerArrayList.RemoveRange(this.m_InnerIndex + index, count);
|
||||
this.m_InnerCount -= count;
|
||||
this.m_InnerStateChanges = this.m_InnerArrayList._version;
|
||||
}
|
||||
|
||||
// Token: 0x06000EBC RID: 3772 RVA: 0x0003EBDC File Offset: 0x0003CDDC
|
||||
public override void Reverse()
|
||||
{
|
||||
this.Reverse(0, this.m_InnerCount);
|
||||
}
|
||||
|
||||
// Token: 0x06000EBD RID: 3773 RVA: 0x0003EBEC File Offset: 0x0003CDEC
|
||||
public override void Reverse(int index, int count)
|
||||
{
|
||||
this.VerifyStateChanges();
|
||||
ArrayList.CheckRange(index, count, this.m_InnerCount);
|
||||
this.m_InnerArrayList.Reverse(this.m_InnerIndex + index, count);
|
||||
this.m_InnerStateChanges = this.m_InnerArrayList._version;
|
||||
}
|
||||
|
||||
// Token: 0x06000EBE RID: 3774 RVA: 0x0003EC34 File Offset: 0x0003CE34
|
||||
public override void SetRange(int index, ICollection c)
|
||||
{
|
||||
this.VerifyStateChanges();
|
||||
if (index < 0 || index > this.m_InnerCount)
|
||||
{
|
||||
ArrayList.ThrowNewArgumentOutOfRangeException("index", index, "Index must be >= 0 and <= Count.");
|
||||
}
|
||||
this.m_InnerArrayList.SetRange(this.m_InnerIndex + index, c);
|
||||
this.m_InnerStateChanges = this.m_InnerArrayList._version;
|
||||
}
|
||||
|
||||
// Token: 0x06000EBF RID: 3775 RVA: 0x0003EC94 File Offset: 0x0003CE94
|
||||
public override void CopyTo(Array array)
|
||||
{
|
||||
this.CopyTo(array, 0);
|
||||
}
|
||||
|
||||
// Token: 0x06000EC0 RID: 3776 RVA: 0x0003ECA0 File Offset: 0x0003CEA0
|
||||
public override void CopyTo(Array array, int index)
|
||||
{
|
||||
this.CopyTo(0, array, index, this.m_InnerCount);
|
||||
}
|
||||
|
||||
// Token: 0x06000EC1 RID: 3777 RVA: 0x0003ECB4 File Offset: 0x0003CEB4
|
||||
public override void CopyTo(int index, Array array, int arrayIndex, int count)
|
||||
{
|
||||
ArrayList.CheckRange(index, count, this.m_InnerCount);
|
||||
this.m_InnerArrayList.CopyTo(this.m_InnerIndex + index, array, arrayIndex, count);
|
||||
}
|
||||
|
||||
// Token: 0x06000EC2 RID: 3778 RVA: 0x0003ECDC File Offset: 0x0003CEDC
|
||||
public override IEnumerator GetEnumerator()
|
||||
{
|
||||
return this.GetEnumerator(0, this.m_InnerCount);
|
||||
}
|
||||
|
||||
// Token: 0x06000EC3 RID: 3779 RVA: 0x0003ECEC File Offset: 0x0003CEEC
|
||||
public override IEnumerator GetEnumerator(int index, int count)
|
||||
{
|
||||
ArrayList.CheckRange(index, count, this.m_InnerCount);
|
||||
return this.m_InnerArrayList.GetEnumerator(this.m_InnerIndex + index, count);
|
||||
}
|
||||
|
||||
// Token: 0x06000EC4 RID: 3780 RVA: 0x0003ED10 File Offset: 0x0003CF10
|
||||
public override void AddRange(ICollection c)
|
||||
{
|
||||
this.VerifyStateChanges();
|
||||
this.m_InnerArrayList.InsertRange(this.m_InnerCount, c);
|
||||
this.m_InnerCount += c.Count;
|
||||
this.m_InnerStateChanges = this.m_InnerArrayList._version;
|
||||
}
|
||||
|
||||
// Token: 0x06000EC5 RID: 3781 RVA: 0x0003ED5C File Offset: 0x0003CF5C
|
||||
public override int BinarySearch(object value)
|
||||
{
|
||||
return this.BinarySearch(0, this.m_InnerCount, value, Comparer.Default);
|
||||
}
|
||||
|
||||
// Token: 0x06000EC6 RID: 3782 RVA: 0x0003ED74 File Offset: 0x0003CF74
|
||||
public override int BinarySearch(object value, IComparer comparer)
|
||||
{
|
||||
return this.BinarySearch(0, this.m_InnerCount, value, comparer);
|
||||
}
|
||||
|
||||
// Token: 0x06000EC7 RID: 3783 RVA: 0x0003ED88 File Offset: 0x0003CF88
|
||||
public override int BinarySearch(int index, int count, object value, IComparer comparer)
|
||||
{
|
||||
ArrayList.CheckRange(index, count, this.m_InnerCount);
|
||||
return this.m_InnerArrayList.BinarySearch(this.m_InnerIndex + index, count, value, comparer);
|
||||
}
|
||||
|
||||
// Token: 0x06000EC8 RID: 3784 RVA: 0x0003EDBC File Offset: 0x0003CFBC
|
||||
public override object Clone()
|
||||
{
|
||||
return new ArrayList.RangedArrayList((ArrayList)this.m_InnerArrayList.Clone(), this.m_InnerIndex, this.m_InnerCount);
|
||||
}
|
||||
|
||||
// Token: 0x06000EC9 RID: 3785 RVA: 0x0003EDE0 File Offset: 0x0003CFE0
|
||||
public override ArrayList GetRange(int index, int count)
|
||||
{
|
||||
ArrayList.CheckRange(index, count, this.m_InnerCount);
|
||||
return new ArrayList.RangedArrayList(this, index, count);
|
||||
}
|
||||
|
||||
// Token: 0x06000ECA RID: 3786 RVA: 0x0003EDF8 File Offset: 0x0003CFF8
|
||||
public override void TrimToSize()
|
||||
{
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
|
||||
// Token: 0x06000ECB RID: 3787 RVA: 0x0003EE00 File Offset: 0x0003D000
|
||||
public override void Sort()
|
||||
{
|
||||
this.Sort(Comparer.Default);
|
||||
}
|
||||
|
||||
// Token: 0x06000ECC RID: 3788 RVA: 0x0003EE10 File Offset: 0x0003D010
|
||||
public override void Sort(IComparer comparer)
|
||||
{
|
||||
this.Sort(0, this.m_InnerCount, comparer);
|
||||
}
|
||||
|
||||
// Token: 0x06000ECD RID: 3789 RVA: 0x0003EE20 File Offset: 0x0003D020
|
||||
public override void Sort(int index, int count, IComparer comparer)
|
||||
{
|
||||
this.VerifyStateChanges();
|
||||
ArrayList.CheckRange(index, count, this.m_InnerCount);
|
||||
this.m_InnerArrayList.Sort(this.m_InnerIndex + index, count, comparer);
|
||||
this.m_InnerStateChanges = this.m_InnerArrayList._version;
|
||||
}
|
||||
|
||||
// Token: 0x06000ECE RID: 3790 RVA: 0x0003EE68 File Offset: 0x0003D068
|
||||
public override object[] ToArray()
|
||||
{
|
||||
object[] array = new object[this.m_InnerCount];
|
||||
this.m_InnerArrayList.CopyTo(this.m_InnerIndex, array, 0, this.m_InnerCount);
|
||||
return array;
|
||||
}
|
||||
|
||||
// Token: 0x06000ECF RID: 3791 RVA: 0x0003EE9C File Offset: 0x0003D09C
|
||||
public override Array ToArray(Type elementType)
|
||||
{
|
||||
Array array = Array.CreateInstance(elementType, this.m_InnerCount);
|
||||
this.m_InnerArrayList.CopyTo(this.m_InnerIndex, array, 0, this.m_InnerCount);
|
||||
return array;
|
||||
}
|
||||
|
||||
// Token: 0x040003A4 RID: 932
|
||||
private int m_InnerIndex;
|
||||
|
||||
// Token: 0x040003A5 RID: 933
|
||||
private int m_InnerCount;
|
||||
|
||||
// Token: 0x040003A6 RID: 934
|
||||
private int m_InnerStateChanges;
|
||||
}
|
||||
|
||||
// Token: 0x0200011D RID: 285
|
||||
[Serializable]
|
||||
private sealed class SynchronizedListWrapper : ArrayList.ListWrapper
|
||||
{
|
||||
// Token: 0x06000ED0 RID: 3792 RVA: 0x0003EED0 File Offset: 0x0003D0D0
|
||||
public SynchronizedListWrapper(IList innerList)
|
||||
: base(innerList)
|
||||
{
|
||||
this.m_SyncRoot = innerList.SyncRoot;
|
||||
}
|
||||
|
||||
// Token: 0x1700023E RID: 574
|
||||
// (get) Token: 0x06000ED1 RID: 3793 RVA: 0x0003EEE8 File Offset: 0x0003D0E8
|
||||
public override int Count
|
||||
{
|
||||
get
|
||||
{
|
||||
object syncRoot = this.m_SyncRoot;
|
||||
int count;
|
||||
lock (syncRoot)
|
||||
{
|
||||
count = this.m_InnerList.Count;
|
||||
}
|
||||
return count;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700023F RID: 575
|
||||
// (get) Token: 0x06000ED2 RID: 3794 RVA: 0x0003EF3C File Offset: 0x0003D13C
|
||||
public override bool IsSynchronized
|
||||
{
|
||||
get
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000240 RID: 576
|
||||
// (get) Token: 0x06000ED3 RID: 3795 RVA: 0x0003EF40 File Offset: 0x0003D140
|
||||
public override object SyncRoot
|
||||
{
|
||||
get
|
||||
{
|
||||
object syncRoot = this.m_SyncRoot;
|
||||
object syncRoot2;
|
||||
lock (syncRoot)
|
||||
{
|
||||
syncRoot2 = this.m_InnerList.SyncRoot;
|
||||
}
|
||||
return syncRoot2;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000241 RID: 577
|
||||
// (get) Token: 0x06000ED4 RID: 3796 RVA: 0x0003EF94 File Offset: 0x0003D194
|
||||
public override bool IsFixedSize
|
||||
{
|
||||
get
|
||||
{
|
||||
object syncRoot = this.m_SyncRoot;
|
||||
bool isFixedSize;
|
||||
lock (syncRoot)
|
||||
{
|
||||
isFixedSize = this.m_InnerList.IsFixedSize;
|
||||
}
|
||||
return isFixedSize;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000242 RID: 578
|
||||
// (get) Token: 0x06000ED5 RID: 3797 RVA: 0x0003EFE8 File Offset: 0x0003D1E8
|
||||
public override bool IsReadOnly
|
||||
{
|
||||
get
|
||||
{
|
||||
object syncRoot = this.m_SyncRoot;
|
||||
bool isReadOnly;
|
||||
lock (syncRoot)
|
||||
{
|
||||
isReadOnly = this.m_InnerList.IsReadOnly;
|
||||
}
|
||||
return isReadOnly;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000243 RID: 579
|
||||
public override object this[int index]
|
||||
{
|
||||
get
|
||||
{
|
||||
object syncRoot = this.m_SyncRoot;
|
||||
object obj;
|
||||
lock (syncRoot)
|
||||
{
|
||||
obj = this.m_InnerList[index];
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
set
|
||||
{
|
||||
object syncRoot = this.m_SyncRoot;
|
||||
lock (syncRoot)
|
||||
{
|
||||
this.m_InnerList[index] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000ED8 RID: 3800 RVA: 0x0003F0E4 File Offset: 0x0003D2E4
|
||||
public override int Add(object value)
|
||||
{
|
||||
object syncRoot = this.m_SyncRoot;
|
||||
int num;
|
||||
lock (syncRoot)
|
||||
{
|
||||
num = this.m_InnerList.Add(value);
|
||||
}
|
||||
return num;
|
||||
}
|
||||
|
||||
// Token: 0x06000ED9 RID: 3801 RVA: 0x0003F13C File Offset: 0x0003D33C
|
||||
public override void Clear()
|
||||
{
|
||||
object syncRoot = this.m_SyncRoot;
|
||||
lock (syncRoot)
|
||||
{
|
||||
this.m_InnerList.Clear();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000EDA RID: 3802 RVA: 0x0003F18C File Offset: 0x0003D38C
|
||||
public override bool Contains(object value)
|
||||
{
|
||||
object syncRoot = this.m_SyncRoot;
|
||||
bool flag;
|
||||
lock (syncRoot)
|
||||
{
|
||||
flag = this.m_InnerList.Contains(value);
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
// Token: 0x06000EDB RID: 3803 RVA: 0x0003F1E4 File Offset: 0x0003D3E4
|
||||
public override int IndexOf(object value)
|
||||
{
|
||||
object syncRoot = this.m_SyncRoot;
|
||||
int num;
|
||||
lock (syncRoot)
|
||||
{
|
||||
num = this.m_InnerList.IndexOf(value);
|
||||
}
|
||||
return num;
|
||||
}
|
||||
|
||||
// Token: 0x06000EDC RID: 3804 RVA: 0x0003F23C File Offset: 0x0003D43C
|
||||
public override void Insert(int index, object value)
|
||||
{
|
||||
object syncRoot = this.m_SyncRoot;
|
||||
lock (syncRoot)
|
||||
{
|
||||
this.m_InnerList.Insert(index, value);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000EDD RID: 3805 RVA: 0x0003F28C File Offset: 0x0003D48C
|
||||
public override void Remove(object value)
|
||||
{
|
||||
object syncRoot = this.m_SyncRoot;
|
||||
lock (syncRoot)
|
||||
{
|
||||
this.m_InnerList.Remove(value);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000EDE RID: 3806 RVA: 0x0003F2DC File Offset: 0x0003D4DC
|
||||
public override void RemoveAt(int index)
|
||||
{
|
||||
object syncRoot = this.m_SyncRoot;
|
||||
lock (syncRoot)
|
||||
{
|
||||
this.m_InnerList.RemoveAt(index);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000EDF RID: 3807 RVA: 0x0003F32C File Offset: 0x0003D52C
|
||||
public override void CopyTo(Array array, int index)
|
||||
{
|
||||
object syncRoot = this.m_SyncRoot;
|
||||
lock (syncRoot)
|
||||
{
|
||||
this.m_InnerList.CopyTo(array, index);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000EE0 RID: 3808 RVA: 0x0003F37C File Offset: 0x0003D57C
|
||||
public override IEnumerator GetEnumerator()
|
||||
{
|
||||
object syncRoot = this.m_SyncRoot;
|
||||
IEnumerator enumerator;
|
||||
lock (syncRoot)
|
||||
{
|
||||
enumerator = this.m_InnerList.GetEnumerator();
|
||||
}
|
||||
return enumerator;
|
||||
}
|
||||
|
||||
// Token: 0x040003A7 RID: 935
|
||||
private object m_SyncRoot;
|
||||
}
|
||||
|
||||
// Token: 0x0200011E RID: 286
|
||||
[Serializable]
|
||||
private class FixedSizeListWrapper : ArrayList.ListWrapper
|
||||
{
|
||||
// Token: 0x06000EE1 RID: 3809 RVA: 0x0003F3D0 File Offset: 0x0003D5D0
|
||||
public FixedSizeListWrapper(IList innerList)
|
||||
: base(innerList)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x17000244 RID: 580
|
||||
// (get) Token: 0x06000EE2 RID: 3810 RVA: 0x0003F3DC File Offset: 0x0003D5DC
|
||||
protected virtual string ErrorMessage
|
||||
{
|
||||
get
|
||||
{
|
||||
return "List is fixed-size.";
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000245 RID: 581
|
||||
// (get) Token: 0x06000EE3 RID: 3811 RVA: 0x0003F3E4 File Offset: 0x0003D5E4
|
||||
public override bool IsFixedSize
|
||||
{
|
||||
get
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000EE4 RID: 3812 RVA: 0x0003F3E8 File Offset: 0x0003D5E8
|
||||
public override int Add(object value)
|
||||
{
|
||||
throw new NotSupportedException(this.ErrorMessage);
|
||||
}
|
||||
|
||||
// Token: 0x06000EE5 RID: 3813 RVA: 0x0003F3F8 File Offset: 0x0003D5F8
|
||||
public override void Clear()
|
||||
{
|
||||
throw new NotSupportedException(this.ErrorMessage);
|
||||
}
|
||||
|
||||
// Token: 0x06000EE6 RID: 3814 RVA: 0x0003F408 File Offset: 0x0003D608
|
||||
public override void Insert(int index, object value)
|
||||
{
|
||||
throw new NotSupportedException(this.ErrorMessage);
|
||||
}
|
||||
|
||||
// Token: 0x06000EE7 RID: 3815 RVA: 0x0003F418 File Offset: 0x0003D618
|
||||
public override void Remove(object value)
|
||||
{
|
||||
throw new NotSupportedException(this.ErrorMessage);
|
||||
}
|
||||
|
||||
// Token: 0x06000EE8 RID: 3816 RVA: 0x0003F428 File Offset: 0x0003D628
|
||||
public override void RemoveAt(int index)
|
||||
{
|
||||
throw new NotSupportedException(this.ErrorMessage);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0200011F RID: 287
|
||||
[Serializable]
|
||||
private sealed class ReadOnlyListWrapper : ArrayList.FixedSizeListWrapper
|
||||
{
|
||||
// Token: 0x06000EE9 RID: 3817 RVA: 0x0003F438 File Offset: 0x0003D638
|
||||
public ReadOnlyListWrapper(IList innerList)
|
||||
: base(innerList)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x17000246 RID: 582
|
||||
// (get) Token: 0x06000EEA RID: 3818 RVA: 0x0003F444 File Offset: 0x0003D644
|
||||
protected override string ErrorMessage
|
||||
{
|
||||
get
|
||||
{
|
||||
return "List is read-only.";
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000247 RID: 583
|
||||
// (get) Token: 0x06000EEB RID: 3819 RVA: 0x0003F44C File Offset: 0x0003D64C
|
||||
public override bool IsReadOnly
|
||||
{
|
||||
get
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000248 RID: 584
|
||||
public override object this[int index]
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.m_InnerList[index];
|
||||
}
|
||||
set
|
||||
{
|
||||
throw new NotSupportedException(this.ErrorMessage);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x02000120 RID: 288
|
||||
[Serializable]
|
||||
private class ListWrapper : IEnumerable, ICollection, IList
|
||||
{
|
||||
// Token: 0x06000EEE RID: 3822 RVA: 0x0003F470 File Offset: 0x0003D670
|
||||
public ListWrapper(IList innerList)
|
||||
{
|
||||
this.m_InnerList = innerList;
|
||||
}
|
||||
|
||||
// Token: 0x17000249 RID: 585
|
||||
public virtual object this[int index]
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.m_InnerList[index];
|
||||
}
|
||||
set
|
||||
{
|
||||
this.m_InnerList[index] = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700024A RID: 586
|
||||
// (get) Token: 0x06000EF1 RID: 3825 RVA: 0x0003F4A0 File Offset: 0x0003D6A0
|
||||
public virtual int Count
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.m_InnerList.Count;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700024B RID: 587
|
||||
// (get) Token: 0x06000EF2 RID: 3826 RVA: 0x0003F4B0 File Offset: 0x0003D6B0
|
||||
public virtual bool IsSynchronized
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.m_InnerList.IsSynchronized;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700024C RID: 588
|
||||
// (get) Token: 0x06000EF3 RID: 3827 RVA: 0x0003F4C0 File Offset: 0x0003D6C0
|
||||
public virtual object SyncRoot
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.m_InnerList.SyncRoot;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700024D RID: 589
|
||||
// (get) Token: 0x06000EF4 RID: 3828 RVA: 0x0003F4D0 File Offset: 0x0003D6D0
|
||||
public virtual bool IsFixedSize
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.m_InnerList.IsFixedSize;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700024E RID: 590
|
||||
// (get) Token: 0x06000EF5 RID: 3829 RVA: 0x0003F4E0 File Offset: 0x0003D6E0
|
||||
public virtual bool IsReadOnly
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.m_InnerList.IsReadOnly;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000EF6 RID: 3830 RVA: 0x0003F4F0 File Offset: 0x0003D6F0
|
||||
public virtual int Add(object value)
|
||||
{
|
||||
return this.m_InnerList.Add(value);
|
||||
}
|
||||
|
||||
// Token: 0x06000EF7 RID: 3831 RVA: 0x0003F500 File Offset: 0x0003D700
|
||||
public virtual void Clear()
|
||||
{
|
||||
this.m_InnerList.Clear();
|
||||
}
|
||||
|
||||
// Token: 0x06000EF8 RID: 3832 RVA: 0x0003F510 File Offset: 0x0003D710
|
||||
public virtual bool Contains(object value)
|
||||
{
|
||||
return this.m_InnerList.Contains(value);
|
||||
}
|
||||
|
||||
// Token: 0x06000EF9 RID: 3833 RVA: 0x0003F520 File Offset: 0x0003D720
|
||||
public virtual int IndexOf(object value)
|
||||
{
|
||||
return this.m_InnerList.IndexOf(value);
|
||||
}
|
||||
|
||||
// Token: 0x06000EFA RID: 3834 RVA: 0x0003F530 File Offset: 0x0003D730
|
||||
public virtual void Insert(int index, object value)
|
||||
{
|
||||
this.m_InnerList.Insert(index, value);
|
||||
}
|
||||
|
||||
// Token: 0x06000EFB RID: 3835 RVA: 0x0003F540 File Offset: 0x0003D740
|
||||
public virtual void Remove(object value)
|
||||
{
|
||||
this.m_InnerList.Remove(value);
|
||||
}
|
||||
|
||||
// Token: 0x06000EFC RID: 3836 RVA: 0x0003F550 File Offset: 0x0003D750
|
||||
public virtual void RemoveAt(int index)
|
||||
{
|
||||
this.m_InnerList.RemoveAt(index);
|
||||
}
|
||||
|
||||
// Token: 0x06000EFD RID: 3837 RVA: 0x0003F560 File Offset: 0x0003D760
|
||||
public virtual void CopyTo(Array array, int index)
|
||||
{
|
||||
this.m_InnerList.CopyTo(array, index);
|
||||
}
|
||||
|
||||
// Token: 0x06000EFE RID: 3838 RVA: 0x0003F570 File Offset: 0x0003D770
|
||||
public virtual IEnumerator GetEnumerator()
|
||||
{
|
||||
return this.m_InnerList.GetEnumerator();
|
||||
}
|
||||
|
||||
// Token: 0x040003A8 RID: 936
|
||||
protected IList m_InnerList;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,592 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.Collections
|
||||
{
|
||||
/// <summary>Manages a compact array of bit values, which are represented as Booleans, where true indicates that the bit is on (1) and false indicates the bit is off (0).</summary>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x02000121 RID: 289
|
||||
[ComVisible(true)]
|
||||
[Serializable]
|
||||
public sealed class BitArray : IEnumerable, ICloneable, ICollection
|
||||
{
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.BitArray" /> class that contains bit values copied from the specified <see cref="T:System.Collections.BitArray" />.</summary>
|
||||
/// <param name="bits">The <see cref="T:System.Collections.BitArray" /> to copy. </param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="bits" /> is null. </exception>
|
||||
// Token: 0x06000EFF RID: 3839 RVA: 0x0003F580 File Offset: 0x0003D780
|
||||
public BitArray(BitArray bits)
|
||||
{
|
||||
if (bits == null)
|
||||
{
|
||||
throw new ArgumentNullException("bits");
|
||||
}
|
||||
this.m_length = bits.m_length;
|
||||
this.m_array = new int[(this.m_length + 31) / 32];
|
||||
if (this.m_array.Length == 1)
|
||||
{
|
||||
this.m_array[0] = bits.m_array[0];
|
||||
}
|
||||
else
|
||||
{
|
||||
Array.Copy(bits.m_array, this.m_array, this.m_array.Length);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.BitArray" /> class that contains bit values copied from the specified array of Booleans.</summary>
|
||||
/// <param name="values">An array of Booleans to copy. </param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="values" /> is null. </exception>
|
||||
// Token: 0x06000F00 RID: 3840 RVA: 0x0003F604 File Offset: 0x0003D804
|
||||
public BitArray(bool[] values)
|
||||
{
|
||||
if (values == null)
|
||||
{
|
||||
throw new ArgumentNullException("values");
|
||||
}
|
||||
this.m_length = values.Length;
|
||||
this.m_array = new int[(this.m_length + 31) / 32];
|
||||
for (int i = 0; i < values.Length; i++)
|
||||
{
|
||||
this[i] = values[i];
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.BitArray" /> class that contains bit values copied from the specified array of bytes. </summary>
|
||||
/// <param name="bytes">An array of bytes containing the values to copy, where each byte represents eight consecutive bits. </param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="bytes" /> is null. </exception>
|
||||
/// <exception cref="T:System.ArgumentException">The length of <paramref name="bytes" /> is greater than <see cref="F:System.Int32.MaxValue" />.</exception>
|
||||
// Token: 0x06000F01 RID: 3841 RVA: 0x0003F668 File Offset: 0x0003D868
|
||||
public BitArray(byte[] bytes)
|
||||
{
|
||||
if (bytes == null)
|
||||
{
|
||||
throw new ArgumentNullException("bytes");
|
||||
}
|
||||
this.m_length = bytes.Length * 8;
|
||||
this.m_array = new int[(this.m_length + 31) / 32];
|
||||
for (int i = 0; i < bytes.Length; i++)
|
||||
{
|
||||
this.setByte(i, bytes[i]);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.BitArray" /> class that contains bit values copied from the specified array of 32-bit integers.</summary>
|
||||
/// <param name="values">An array of integers containing the values to copy, where each integer represents 32 consecutive bits. </param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="values" /> is null. </exception>
|
||||
/// <exception cref="T:System.ArgumentException">The length of <paramref name="values" /> is greater than <see cref="F:System.Int32.MaxValue" /></exception>
|
||||
// Token: 0x06000F02 RID: 3842 RVA: 0x0003F6CC File Offset: 0x0003D8CC
|
||||
public BitArray(int[] values)
|
||||
{
|
||||
if (values == null)
|
||||
{
|
||||
throw new ArgumentNullException("values");
|
||||
}
|
||||
int num = values.Length;
|
||||
this.m_length = num * 32;
|
||||
this.m_array = new int[num];
|
||||
Array.Copy(values, this.m_array, num);
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.BitArray" /> class that can hold the specified number of bit values, which are initially set to false.</summary>
|
||||
/// <param name="length">The number of bit values in the new <see cref="T:System.Collections.BitArray" />. </param>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="length" /> is less than zero. </exception>
|
||||
// Token: 0x06000F03 RID: 3843 RVA: 0x0003F718 File Offset: 0x0003D918
|
||||
public BitArray(int length)
|
||||
{
|
||||
if (length < 0)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException("length");
|
||||
}
|
||||
this.m_length = length;
|
||||
this.m_array = new int[(this.m_length + 31) / 32];
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.BitArray" /> class that can hold the specified number of bit values, which are initially set to the specified value.</summary>
|
||||
/// <param name="length">The number of bit values in the new <see cref="T:System.Collections.BitArray" />. </param>
|
||||
/// <param name="defaultValue">The Boolean value to assign to each bit. </param>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="length" /> is less than zero. </exception>
|
||||
// Token: 0x06000F04 RID: 3844 RVA: 0x0003F75C File Offset: 0x0003D95C
|
||||
public BitArray(int length, bool defaultValue)
|
||||
: this(length)
|
||||
{
|
||||
if (defaultValue)
|
||||
{
|
||||
for (int i = 0; i < this.m_array.Length; i++)
|
||||
{
|
||||
this.m_array[i] = -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000F05 RID: 3845 RVA: 0x0003F798 File Offset: 0x0003D998
|
||||
private BitArray(int[] array, int length)
|
||||
{
|
||||
this.m_array = array;
|
||||
this.m_length = length;
|
||||
}
|
||||
|
||||
// Token: 0x06000F06 RID: 3846 RVA: 0x0003F7B0 File Offset: 0x0003D9B0
|
||||
private byte getByte(int byteIndex)
|
||||
{
|
||||
int num = byteIndex / 4;
|
||||
int num2 = byteIndex % 4 * 8;
|
||||
int num3 = this.m_array[num] & (255 << num2);
|
||||
return (byte)((num3 >> num2) & 255);
|
||||
}
|
||||
|
||||
// Token: 0x06000F07 RID: 3847 RVA: 0x0003F7E8 File Offset: 0x0003D9E8
|
||||
private void setByte(int byteIndex, byte value)
|
||||
{
|
||||
int num = byteIndex / 4;
|
||||
int num2 = byteIndex % 4 * 8;
|
||||
this.m_array[num] &= ~(255 << num2);
|
||||
this.m_array[num] |= (int)value << num2;
|
||||
this._version++;
|
||||
}
|
||||
|
||||
// Token: 0x06000F08 RID: 3848 RVA: 0x0003F844 File Offset: 0x0003DA44
|
||||
private void checkOperand(BitArray operand)
|
||||
{
|
||||
if (operand == null)
|
||||
{
|
||||
throw new ArgumentNullException();
|
||||
}
|
||||
if (operand.m_length != this.m_length)
|
||||
{
|
||||
throw new ArgumentException();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets the number of elements contained in the <see cref="T:System.Collections.BitArray" />.</summary>
|
||||
/// <returns>The number of elements contained in the <see cref="T:System.Collections.BitArray" />.</returns>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x1700024F RID: 591
|
||||
// (get) Token: 0x06000F09 RID: 3849 RVA: 0x0003F86C File Offset: 0x0003DA6C
|
||||
public int Count
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.m_length;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a value indicating whether the <see cref="T:System.Collections.BitArray" /> is read-only.</summary>
|
||||
/// <returns>This property is always false.</returns>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x17000250 RID: 592
|
||||
// (get) Token: 0x06000F0A RID: 3850 RVA: 0x0003F874 File Offset: 0x0003DA74
|
||||
public bool IsReadOnly
|
||||
{
|
||||
get
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a value indicating whether access to the <see cref="T:System.Collections.BitArray" /> is synchronized (thread safe).</summary>
|
||||
/// <returns>This property is always false.</returns>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x17000251 RID: 593
|
||||
// (get) Token: 0x06000F0B RID: 3851 RVA: 0x0003F878 File Offset: 0x0003DA78
|
||||
public bool IsSynchronized
|
||||
{
|
||||
get
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets or sets the value of the bit at a specific position in the <see cref="T:System.Collections.BitArray" />.</summary>
|
||||
/// <returns>The value of the bit at position <paramref name="index" />.</returns>
|
||||
/// <param name="index">The zero-based index of the value 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.BitArray.Count" />. </exception>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x17000252 RID: 594
|
||||
public bool this[int index]
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Get(index);
|
||||
}
|
||||
set
|
||||
{
|
||||
this.Set(index, value);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets or sets the number of elements in the <see cref="T:System.Collections.BitArray" />.</summary>
|
||||
/// <returns>The number of elements in the <see cref="T:System.Collections.BitArray" />.</returns>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">The property is set to a value that is less than zero. </exception>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x17000253 RID: 595
|
||||
// (get) Token: 0x06000F0E RID: 3854 RVA: 0x0003F894 File Offset: 0x0003DA94
|
||||
// (set) Token: 0x06000F0F RID: 3855 RVA: 0x0003F89C File Offset: 0x0003DA9C
|
||||
public int Length
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.m_length;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (this.m_length == value)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (value < 0)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException();
|
||||
}
|
||||
if (value > this.m_length)
|
||||
{
|
||||
int num = (value + 31) / 32;
|
||||
int num2 = (this.m_length + 31) / 32;
|
||||
if (num > this.m_array.Length)
|
||||
{
|
||||
int[] array = new int[num];
|
||||
Array.Copy(this.m_array, array, this.m_array.Length);
|
||||
this.m_array = array;
|
||||
}
|
||||
else
|
||||
{
|
||||
Array.Clear(this.m_array, num2, num - num2);
|
||||
}
|
||||
int num3 = this.m_length % 32;
|
||||
if (num3 > 0)
|
||||
{
|
||||
this.m_array[num2 - 1] &= (1 << num3) - 1;
|
||||
}
|
||||
}
|
||||
this.m_length = value;
|
||||
this._version++;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets an object that can be used to synchronize access to the <see cref="T:System.Collections.BitArray" />.</summary>
|
||||
/// <returns>An object that can be used to synchronize access to the <see cref="T:System.Collections.BitArray" />.</returns>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x17000254 RID: 596
|
||||
// (get) Token: 0x06000F10 RID: 3856 RVA: 0x0003F96C File Offset: 0x0003DB6C
|
||||
public object SyncRoot
|
||||
{
|
||||
get
|
||||
{
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Creates a shallow copy of the <see cref="T:System.Collections.BitArray" />.</summary>
|
||||
/// <returns>A shallow copy of the <see cref="T:System.Collections.BitArray" />.</returns>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x06000F11 RID: 3857 RVA: 0x0003F970 File Offset: 0x0003DB70
|
||||
public object Clone()
|
||||
{
|
||||
return new BitArray(this);
|
||||
}
|
||||
|
||||
/// <summary>Copies the entire <see cref="T:System.Collections.BitArray" /> 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.BitArray" />. 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.BitArray" /> 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.BitArray" /> cannot be cast automatically to the type of the destination <paramref name="array" />. </exception>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x06000F12 RID: 3858 RVA: 0x0003F978 File Offset: 0x0003DB78
|
||||
public void CopyTo(Array array, int index)
|
||||
{
|
||||
if (array == null)
|
||||
{
|
||||
throw new ArgumentNullException("array");
|
||||
}
|
||||
if (index < 0)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException("index");
|
||||
}
|
||||
if (array.Rank != 1)
|
||||
{
|
||||
throw new ArgumentException("array", "Array rank must be 1");
|
||||
}
|
||||
if (index >= array.Length && this.m_length > 0)
|
||||
{
|
||||
throw new ArgumentException("index", "index is greater than array.Length");
|
||||
}
|
||||
if (array is bool[])
|
||||
{
|
||||
if (array.Length - index < this.m_length)
|
||||
{
|
||||
throw new ArgumentException();
|
||||
}
|
||||
bool[] array2 = (bool[])array;
|
||||
for (int i = 0; i < this.m_length; i++)
|
||||
{
|
||||
array2[index + i] = this[i];
|
||||
}
|
||||
}
|
||||
else if (array is byte[])
|
||||
{
|
||||
int num = (this.m_length + 7) / 8;
|
||||
if (array.Length - index < num)
|
||||
{
|
||||
throw new ArgumentException();
|
||||
}
|
||||
byte[] array3 = (byte[])array;
|
||||
for (int j = 0; j < num; j++)
|
||||
{
|
||||
array3[index + j] = this.getByte(j);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!(array is int[]))
|
||||
{
|
||||
throw new ArgumentException("array", "Unsupported type");
|
||||
}
|
||||
Array.Copy(this.m_array, 0, array, index, (this.m_length + 31) / 32);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Inverts all the bit values in the current <see cref="T:System.Collections.BitArray" />, so that elements set to true are changed to false, and elements set to false are changed to true.</summary>
|
||||
/// <returns>The current instance with inverted bit values.</returns>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x06000F13 RID: 3859 RVA: 0x0003FAD4 File Offset: 0x0003DCD4
|
||||
public BitArray Not()
|
||||
{
|
||||
int num = (this.m_length + 31) / 32;
|
||||
for (int i = 0; i < num; i++)
|
||||
{
|
||||
this.m_array[i] = ~this.m_array[i];
|
||||
}
|
||||
this._version++;
|
||||
return this;
|
||||
}
|
||||
|
||||
/// <summary>Performs the bitwise AND operation on the elements in the current <see cref="T:System.Collections.BitArray" /> against the corresponding elements in the specified <see cref="T:System.Collections.BitArray" />.</summary>
|
||||
/// <returns>A <see cref="T:System.Collections.BitArray" /> containing the result of the bitwise AND operation on the elements in the current <see cref="T:System.Collections.BitArray" /> against the corresponding elements in the specified <see cref="T:System.Collections.BitArray" />.</returns>
|
||||
/// <param name="value">The <see cref="T:System.Collections.BitArray" /> with which to perform the bitwise AND operation. </param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="value" /> is null. </exception>
|
||||
/// <exception cref="T:System.ArgumentException">
|
||||
/// <paramref name="value" /> and the current <see cref="T:System.Collections.BitArray" /> do not have the same number of elements. </exception>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x06000F14 RID: 3860 RVA: 0x0003FB20 File Offset: 0x0003DD20
|
||||
public BitArray And(BitArray value)
|
||||
{
|
||||
this.checkOperand(value);
|
||||
int num = (this.m_length + 31) / 32;
|
||||
for (int i = 0; i < num; i++)
|
||||
{
|
||||
this.m_array[i] &= value.m_array[i];
|
||||
}
|
||||
this._version++;
|
||||
return this;
|
||||
}
|
||||
|
||||
/// <summary>Performs the bitwise OR operation on the elements in the current <see cref="T:System.Collections.BitArray" /> against the corresponding elements in the specified <see cref="T:System.Collections.BitArray" />.</summary>
|
||||
/// <returns>A <see cref="T:System.Collections.BitArray" /> containing the result of the bitwise OR operation on the elements in the current <see cref="T:System.Collections.BitArray" /> against the corresponding elements in the specified <see cref="T:System.Collections.BitArray" />.</returns>
|
||||
/// <param name="value">The <see cref="T:System.Collections.BitArray" /> with which to perform the bitwise OR operation. </param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="value" /> is null. </exception>
|
||||
/// <exception cref="T:System.ArgumentException">
|
||||
/// <paramref name="value" /> and the current <see cref="T:System.Collections.BitArray" /> do not have the same number of elements. </exception>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x06000F15 RID: 3861 RVA: 0x0003FB7C File Offset: 0x0003DD7C
|
||||
public BitArray Or(BitArray value)
|
||||
{
|
||||
this.checkOperand(value);
|
||||
int num = (this.m_length + 31) / 32;
|
||||
for (int i = 0; i < num; i++)
|
||||
{
|
||||
this.m_array[i] |= value.m_array[i];
|
||||
}
|
||||
this._version++;
|
||||
return this;
|
||||
}
|
||||
|
||||
/// <summary>Performs the bitwise exclusive OR operation on the elements in the current <see cref="T:System.Collections.BitArray" /> against the corresponding elements in the specified <see cref="T:System.Collections.BitArray" />.</summary>
|
||||
/// <returns>A <see cref="T:System.Collections.BitArray" /> containing the result of the bitwise exclusive OR operation on the elements in the current <see cref="T:System.Collections.BitArray" /> against the corresponding elements in the specified <see cref="T:System.Collections.BitArray" />.</returns>
|
||||
/// <param name="value">The <see cref="T:System.Collections.BitArray" /> with which to perform the bitwise exclusive OR operation. </param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="value" /> is null. </exception>
|
||||
/// <exception cref="T:System.ArgumentException">
|
||||
/// <paramref name="value" /> and the current <see cref="T:System.Collections.BitArray" /> do not have the same number of elements. </exception>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x06000F16 RID: 3862 RVA: 0x0003FBD8 File Offset: 0x0003DDD8
|
||||
public BitArray Xor(BitArray value)
|
||||
{
|
||||
this.checkOperand(value);
|
||||
int num = (this.m_length + 31) / 32;
|
||||
for (int i = 0; i < num; i++)
|
||||
{
|
||||
this.m_array[i] ^= value.m_array[i];
|
||||
}
|
||||
this._version++;
|
||||
return this;
|
||||
}
|
||||
|
||||
/// <summary>Gets the value of the bit at a specific position in the <see cref="T:System.Collections.BitArray" />.</summary>
|
||||
/// <returns>The value of the bit at position <paramref name="index" />.</returns>
|
||||
/// <param name="index">The zero-based index of the value to get. </param>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="index" /> is less than zero.-or- <paramref name="index" /> is greater than or equal to the number of elements in the <see cref="T:System.Collections.BitArray" />. </exception>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x06000F17 RID: 3863 RVA: 0x0003FC34 File Offset: 0x0003DE34
|
||||
public bool Get(int index)
|
||||
{
|
||||
if (index < 0 || index >= this.m_length)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException();
|
||||
}
|
||||
return (this.m_array[index >> 5] & (1 << index)) != 0;
|
||||
}
|
||||
|
||||
/// <summary>Sets the bit at a specific position in the <see cref="T:System.Collections.BitArray" /> to the specified value.</summary>
|
||||
/// <param name="index">The zero-based index of the bit to set. </param>
|
||||
/// <param name="value">The Boolean value to assign to the bit. </param>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="index" /> is less than zero.-or- <paramref name="index" /> is greater than or equal to the number of elements in the <see cref="T:System.Collections.BitArray" />. </exception>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x06000F18 RID: 3864 RVA: 0x0003FC6C File Offset: 0x0003DE6C
|
||||
public void Set(int index, bool value)
|
||||
{
|
||||
if (index < 0 || index >= this.m_length)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException();
|
||||
}
|
||||
if (value)
|
||||
{
|
||||
this.m_array[index >> 5] |= 1 << index;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.m_array[index >> 5] &= ~(1 << index);
|
||||
}
|
||||
this._version++;
|
||||
}
|
||||
|
||||
/// <summary>Sets all bits in the <see cref="T:System.Collections.BitArray" /> to the specified value.</summary>
|
||||
/// <param name="value">The Boolean value to assign to all bits. </param>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x06000F19 RID: 3865 RVA: 0x0003FCE8 File Offset: 0x0003DEE8
|
||||
public void SetAll(bool value)
|
||||
{
|
||||
if (value)
|
||||
{
|
||||
for (int i = 0; i < this.m_array.Length; i++)
|
||||
{
|
||||
this.m_array[i] = -1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Array.Clear(this.m_array, 0, this.m_array.Length);
|
||||
}
|
||||
this._version++;
|
||||
}
|
||||
|
||||
/// <summary>Returns an enumerator that iterates through the <see cref="T:System.Collections.BitArray" />.</summary>
|
||||
/// <returns>An <see cref="T:System.Collections.IEnumerator" /> for the entire <see cref="T:System.Collections.BitArray" />.</returns>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x06000F1A RID: 3866 RVA: 0x0003FD44 File Offset: 0x0003DF44
|
||||
public IEnumerator GetEnumerator()
|
||||
{
|
||||
return new BitArray.BitArrayEnumerator(this);
|
||||
}
|
||||
|
||||
// Token: 0x040003A9 RID: 937
|
||||
private int[] m_array;
|
||||
|
||||
// Token: 0x040003AA RID: 938
|
||||
private int m_length;
|
||||
|
||||
// Token: 0x040003AB RID: 939
|
||||
private int _version;
|
||||
|
||||
// Token: 0x02000122 RID: 290
|
||||
[Serializable]
|
||||
private class BitArrayEnumerator : IEnumerator, ICloneable
|
||||
{
|
||||
// Token: 0x06000F1B RID: 3867 RVA: 0x0003FD4C File Offset: 0x0003DF4C
|
||||
public BitArrayEnumerator(BitArray ba)
|
||||
{
|
||||
this._index = -1;
|
||||
this._bitArray = ba;
|
||||
this._version = ba._version;
|
||||
}
|
||||
|
||||
// Token: 0x06000F1C RID: 3868 RVA: 0x0003FD7C File Offset: 0x0003DF7C
|
||||
public object Clone()
|
||||
{
|
||||
return base.MemberwiseClone();
|
||||
}
|
||||
|
||||
// Token: 0x17000255 RID: 597
|
||||
// (get) Token: 0x06000F1D RID: 3869 RVA: 0x0003FD84 File Offset: 0x0003DF84
|
||||
public object Current
|
||||
{
|
||||
get
|
||||
{
|
||||
if (this._index == -1)
|
||||
{
|
||||
throw new InvalidOperationException("Enum not started");
|
||||
}
|
||||
if (this._index >= this._bitArray.Count)
|
||||
{
|
||||
throw new InvalidOperationException("Enum Ended");
|
||||
}
|
||||
return this._current;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000F1E RID: 3870 RVA: 0x0003FDD4 File Offset: 0x0003DFD4
|
||||
public bool MoveNext()
|
||||
{
|
||||
this.checkVersion();
|
||||
if (this._index < this._bitArray.Count - 1)
|
||||
{
|
||||
this._current = this._bitArray[++this._index];
|
||||
return true;
|
||||
}
|
||||
this._index = this._bitArray.Count;
|
||||
return false;
|
||||
}
|
||||
|
||||
// Token: 0x06000F1F RID: 3871 RVA: 0x0003FE38 File Offset: 0x0003E038
|
||||
public void Reset()
|
||||
{
|
||||
this.checkVersion();
|
||||
this._index = -1;
|
||||
}
|
||||
|
||||
// Token: 0x06000F20 RID: 3872 RVA: 0x0003FE48 File Offset: 0x0003E048
|
||||
private void checkVersion()
|
||||
{
|
||||
if (this._version != this._bitArray._version)
|
||||
{
|
||||
throw new InvalidOperationException();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x040003AC RID: 940
|
||||
private BitArray _bitArray;
|
||||
|
||||
// Token: 0x040003AD RID: 941
|
||||
private bool _current;
|
||||
|
||||
// Token: 0x040003AE RID: 942
|
||||
private int _index;
|
||||
|
||||
// Token: 0x040003AF RID: 943
|
||||
private int _version;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,106 @@
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.Collections
|
||||
{
|
||||
/// <summary>Compares two objects for equivalence, ignoring the case of strings.</summary>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x02000123 RID: 291
|
||||
[ComVisible(true)]
|
||||
[Serializable]
|
||||
public class CaseInsensitiveComparer : IComparer
|
||||
{
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.CaseInsensitiveComparer" /> class using the <see cref="P:System.Threading.Thread.CurrentCulture" /> of the current thread.</summary>
|
||||
// Token: 0x06000F21 RID: 3873 RVA: 0x0003FE68 File Offset: 0x0003E068
|
||||
public CaseInsensitiveComparer()
|
||||
{
|
||||
this.culture = CultureInfo.CurrentCulture;
|
||||
}
|
||||
|
||||
// Token: 0x06000F22 RID: 3874 RVA: 0x0003FE7C File Offset: 0x0003E07C
|
||||
private CaseInsensitiveComparer(bool invariant)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.CaseInsensitiveComparer" /> class using the specified <see cref="T:System.Globalization.CultureInfo" />.</summary>
|
||||
/// <param name="culture">The <see cref="T:System.Globalization.CultureInfo" /> to use for the new <see cref="T:System.Collections.CaseInsensitiveComparer" />. </param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="culture" /> is null. </exception>
|
||||
// Token: 0x06000F23 RID: 3875 RVA: 0x0003FE84 File Offset: 0x0003E084
|
||||
public CaseInsensitiveComparer(CultureInfo culture)
|
||||
{
|
||||
if (culture == null)
|
||||
{
|
||||
throw new ArgumentNullException("culture");
|
||||
}
|
||||
if (culture.LCID != CultureInfo.InvariantCulture.LCID)
|
||||
{
|
||||
this.culture = culture;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets an instance of <see cref="T:System.Collections.CaseInsensitiveComparer" /> that is associated with the <see cref="P:System.Threading.Thread.CurrentCulture" /> of the current thread and that is always available.</summary>
|
||||
/// <returns>An instance of <see cref="T:System.Collections.CaseInsensitiveComparer" /> that is associated with the <see cref="P:System.Threading.Thread.CurrentCulture" /> of the current thread.</returns>
|
||||
/// <filterpriority>1</filterpriority>
|
||||
/// <PermissionSet>
|
||||
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="UnmanagedCode" />
|
||||
/// </PermissionSet>
|
||||
// Token: 0x17000256 RID: 598
|
||||
// (get) Token: 0x06000F25 RID: 3877 RVA: 0x0003FEDC File Offset: 0x0003E0DC
|
||||
public static CaseInsensitiveComparer Default
|
||||
{
|
||||
get
|
||||
{
|
||||
return CaseInsensitiveComparer.defaultComparer;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets an instance of <see cref="T:System.Collections.CaseInsensitiveComparer" /> that is associated with <see cref="P:System.Globalization.CultureInfo.InvariantCulture" /> and that is always available.</summary>
|
||||
/// <returns>An instance of <see cref="T:System.Collections.CaseInsensitiveComparer" /> that is associated with <see cref="P:System.Globalization.CultureInfo.InvariantCulture" />.</returns>
|
||||
/// <filterpriority>1</filterpriority>
|
||||
/// <PermissionSet>
|
||||
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="UnmanagedCode" />
|
||||
/// </PermissionSet>
|
||||
// Token: 0x17000257 RID: 599
|
||||
// (get) Token: 0x06000F26 RID: 3878 RVA: 0x0003FEE4 File Offset: 0x0003E0E4
|
||||
public static CaseInsensitiveComparer DefaultInvariant
|
||||
{
|
||||
get
|
||||
{
|
||||
return CaseInsensitiveComparer.defaultInvariantComparer;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Performs a case-insensitive comparison of two objects of the same type and returns a value indicating whether one is less than, equal to, or greater than the other.</summary>
|
||||
/// <returns>Value Condition Less than zero <paramref name="a" /> is less than <paramref name="b" />, with casing ignored. Zero <paramref name="a" /> equals <paramref name="b" />, with casing ignored. Greater than zero <paramref name="a" /> is greater than <paramref name="b" />, with casing ignored. </returns>
|
||||
/// <param name="a">The first object to compare. </param>
|
||||
/// <param name="b">The second object to compare. </param>
|
||||
/// <exception cref="T:System.ArgumentException">Neither <paramref name="a" /> nor <paramref name="b" /> implements the <see cref="T:System.IComparable" /> interface.-or- <paramref name="a" /> and <paramref name="b" /> are of different types. </exception>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x06000F27 RID: 3879 RVA: 0x0003FEEC File Offset: 0x0003E0EC
|
||||
public int Compare(object a, object b)
|
||||
{
|
||||
string text = a as string;
|
||||
string text2 = b as string;
|
||||
if (text == null || text2 == null)
|
||||
{
|
||||
return Comparer.Default.Compare(a, b);
|
||||
}
|
||||
if (this.culture != null)
|
||||
{
|
||||
return this.culture.CompareInfo.Compare(text, text2, CompareOptions.IgnoreCase);
|
||||
}
|
||||
return CultureInfo.InvariantCulture.CompareInfo.Compare(text, text2, CompareOptions.IgnoreCase);
|
||||
}
|
||||
|
||||
// Token: 0x040003B0 RID: 944
|
||||
private static CaseInsensitiveComparer defaultComparer = new CaseInsensitiveComparer();
|
||||
|
||||
// Token: 0x040003B1 RID: 945
|
||||
private static CaseInsensitiveComparer defaultInvariantComparer = new CaseInsensitiveComparer(true);
|
||||
|
||||
// Token: 0x040003B2 RID: 946
|
||||
private CultureInfo culture;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,160 @@
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.Collections
|
||||
{
|
||||
/// <summary>Supplies a hash code for an object, using a hashing algorithm that ignores the case of strings.</summary>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x02000124 RID: 292
|
||||
[ComVisible(true)]
|
||||
[Obsolete("Please use StringComparer instead.")]
|
||||
[Serializable]
|
||||
public class CaseInsensitiveHashCodeProvider : IHashCodeProvider
|
||||
{
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.CaseInsensitiveHashCodeProvider" /> class using the <see cref="P:System.Threading.Thread.CurrentCulture" /> of the current thread.</summary>
|
||||
// Token: 0x06000F28 RID: 3880 RVA: 0x0003FF54 File Offset: 0x0003E154
|
||||
public CaseInsensitiveHashCodeProvider()
|
||||
{
|
||||
CultureInfo currentCulture = CultureInfo.CurrentCulture;
|
||||
if (!CaseInsensitiveHashCodeProvider.AreEqual(currentCulture, CultureInfo.InvariantCulture))
|
||||
{
|
||||
this.m_text = CultureInfo.CurrentCulture.TextInfo;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.CaseInsensitiveHashCodeProvider" /> class using the specified <see cref="T:System.Globalization.CultureInfo" />.</summary>
|
||||
/// <param name="culture">The <see cref="T:System.Globalization.CultureInfo" /> to use for the new <see cref="T:System.Collections.CaseInsensitiveHashCodeProvider" />. </param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="culture" /> is null. </exception>
|
||||
// Token: 0x06000F29 RID: 3881 RVA: 0x0003FF90 File Offset: 0x0003E190
|
||||
public CaseInsensitiveHashCodeProvider(CultureInfo culture)
|
||||
{
|
||||
if (culture == null)
|
||||
{
|
||||
throw new ArgumentNullException("culture");
|
||||
}
|
||||
if (!CaseInsensitiveHashCodeProvider.AreEqual(culture, CultureInfo.InvariantCulture))
|
||||
{
|
||||
this.m_text = culture.TextInfo;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets an instance of <see cref="T:System.Collections.CaseInsensitiveHashCodeProvider" /> that is associated with the <see cref="P:System.Threading.Thread.CurrentCulture" /> of the current thread and that is always available.</summary>
|
||||
/// <returns>An instance of <see cref="T:System.Collections.CaseInsensitiveHashCodeProvider" /> that is associated with the <see cref="P:System.Threading.Thread.CurrentCulture" /> of the current thread.</returns>
|
||||
/// <filterpriority>1</filterpriority>
|
||||
/// <PermissionSet>
|
||||
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="UnmanagedCode" />
|
||||
/// </PermissionSet>
|
||||
// Token: 0x17000258 RID: 600
|
||||
// (get) Token: 0x06000F2B RID: 3883 RVA: 0x0003FFE4 File Offset: 0x0003E1E4
|
||||
public static CaseInsensitiveHashCodeProvider Default
|
||||
{
|
||||
get
|
||||
{
|
||||
object obj = CaseInsensitiveHashCodeProvider.sync;
|
||||
CaseInsensitiveHashCodeProvider caseInsensitiveHashCodeProvider;
|
||||
lock (obj)
|
||||
{
|
||||
if (CaseInsensitiveHashCodeProvider.singleton == null)
|
||||
{
|
||||
CaseInsensitiveHashCodeProvider.singleton = new CaseInsensitiveHashCodeProvider();
|
||||
}
|
||||
else if (CaseInsensitiveHashCodeProvider.singleton.m_text == null)
|
||||
{
|
||||
if (!CaseInsensitiveHashCodeProvider.AreEqual(CultureInfo.CurrentCulture, CultureInfo.InvariantCulture))
|
||||
{
|
||||
CaseInsensitiveHashCodeProvider.singleton = new CaseInsensitiveHashCodeProvider();
|
||||
}
|
||||
}
|
||||
else if (!CaseInsensitiveHashCodeProvider.AreEqual(CaseInsensitiveHashCodeProvider.singleton.m_text, CultureInfo.CurrentCulture))
|
||||
{
|
||||
CaseInsensitiveHashCodeProvider.singleton = new CaseInsensitiveHashCodeProvider();
|
||||
}
|
||||
caseInsensitiveHashCodeProvider = CaseInsensitiveHashCodeProvider.singleton;
|
||||
}
|
||||
return caseInsensitiveHashCodeProvider;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000F2C RID: 3884 RVA: 0x000400A0 File Offset: 0x0003E2A0
|
||||
private static bool AreEqual(CultureInfo a, CultureInfo b)
|
||||
{
|
||||
return a.Name == b.Name;
|
||||
}
|
||||
|
||||
// Token: 0x06000F2D RID: 3885 RVA: 0x000400B4 File Offset: 0x0003E2B4
|
||||
private static bool AreEqual(TextInfo info, CultureInfo culture)
|
||||
{
|
||||
return info.CultureName == culture.Name;
|
||||
}
|
||||
|
||||
/// <summary>Gets an instance of <see cref="T:System.Collections.CaseInsensitiveHashCodeProvider" /> that is associated with <see cref="P:System.Globalization.CultureInfo.InvariantCulture" /> and that is always available.</summary>
|
||||
/// <returns>An instance of <see cref="T:System.Collections.CaseInsensitiveHashCodeProvider" /> that is associated with <see cref="P:System.Globalization.CultureInfo.InvariantCulture" />.</returns>
|
||||
/// <filterpriority>1</filterpriority>
|
||||
/// <PermissionSet>
|
||||
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="UnmanagedCode" />
|
||||
/// </PermissionSet>
|
||||
// Token: 0x17000259 RID: 601
|
||||
// (get) Token: 0x06000F2E RID: 3886 RVA: 0x000400C8 File Offset: 0x0003E2C8
|
||||
public static CaseInsensitiveHashCodeProvider DefaultInvariant
|
||||
{
|
||||
get
|
||||
{
|
||||
return CaseInsensitiveHashCodeProvider.singletonInvariant;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Returns a hash code for the given object, using a hashing algorithm that ignores the case of strings.</summary>
|
||||
/// <returns>A hash code for the given object, using a hashing algorithm that ignores the case of strings.</returns>
|
||||
/// <param name="obj">The <see cref="T:System.Object" /> for which a hash code is to be returned. </param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="obj" /> is null. </exception>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
/// <PermissionSet>
|
||||
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="UnmanagedCode" />
|
||||
/// </PermissionSet>
|
||||
// Token: 0x06000F2F RID: 3887 RVA: 0x000400D0 File Offset: 0x0003E2D0
|
||||
public int GetHashCode(object obj)
|
||||
{
|
||||
if (obj == null)
|
||||
{
|
||||
throw new ArgumentNullException("obj");
|
||||
}
|
||||
string text = obj as string;
|
||||
if (text == null)
|
||||
{
|
||||
return obj.GetHashCode();
|
||||
}
|
||||
int num = 0;
|
||||
if (this.m_text != null && !CaseInsensitiveHashCodeProvider.AreEqual(this.m_text, CultureInfo.InvariantCulture))
|
||||
{
|
||||
foreach (char c in this.m_text.ToLower(text))
|
||||
{
|
||||
num = num * 31 + (int)c;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int j = 0; j < text.Length; j++)
|
||||
{
|
||||
char c = char.ToLower(text[j], CultureInfo.InvariantCulture);
|
||||
num = num * 31 + (int)c;
|
||||
}
|
||||
}
|
||||
return num;
|
||||
}
|
||||
|
||||
// Token: 0x040003B3 RID: 947
|
||||
private static readonly CaseInsensitiveHashCodeProvider singletonInvariant = new CaseInsensitiveHashCodeProvider(CultureInfo.InvariantCulture);
|
||||
|
||||
// Token: 0x040003B4 RID: 948
|
||||
private static CaseInsensitiveHashCodeProvider singleton;
|
||||
|
||||
// Token: 0x040003B5 RID: 949
|
||||
private static readonly object sync = new object();
|
||||
|
||||
// Token: 0x040003B6 RID: 950
|
||||
private TextInfo m_text;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,390 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.Collections
|
||||
{
|
||||
/// <summary>Provides the abstract base class for a strongly typed collection.</summary>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x02000125 RID: 293
|
||||
[ComVisible(true)]
|
||||
[Serializable]
|
||||
public abstract class CollectionBase : IEnumerable, ICollection, IList
|
||||
{
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.CollectionBase" /> class with the default initial capacity.</summary>
|
||||
// Token: 0x06000F30 RID: 3888 RVA: 0x00040194 File Offset: 0x0003E394
|
||||
protected CollectionBase()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.CollectionBase" /> class with the specified capacity.</summary>
|
||||
/// <param name="capacity">The number of elements that the new list can initially store.</param>
|
||||
// Token: 0x06000F31 RID: 3889 RVA: 0x0004019C File Offset: 0x0003E39C
|
||||
protected CollectionBase(int capacity)
|
||||
{
|
||||
this.list = new ArrayList(capacity);
|
||||
}
|
||||
|
||||
/// <summary>Copies the entire <see cref="T:System.Collections.CollectionBase" /> 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.CollectionBase" />. 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.CollectionBase" /> 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.CollectionBase" /> cannot be cast automatically to the type of the destination <paramref name="array" />.</exception>
|
||||
// Token: 0x06000F32 RID: 3890 RVA: 0x000401B0 File Offset: 0x0003E3B0
|
||||
void ICollection.CopyTo(Array array, int index)
|
||||
{
|
||||
this.InnerList.CopyTo(array, index);
|
||||
}
|
||||
|
||||
/// <summary>Gets an object that can be used to synchronize access to the <see cref="T:System.Collections.CollectionBase" />.</summary>
|
||||
/// <returns>An object that can be used to synchronize access to the <see cref="T:System.Collections.CollectionBase" />.</returns>
|
||||
// Token: 0x1700025A RID: 602
|
||||
// (get) Token: 0x06000F33 RID: 3891 RVA: 0x000401C0 File Offset: 0x0003E3C0
|
||||
object ICollection.SyncRoot
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.InnerList.SyncRoot;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a value indicating whether access to the <see cref="T:System.Collections.CollectionBase" /> is synchronized (thread safe).</summary>
|
||||
/// <returns>true if access to the <see cref="T:System.Collections.CollectionBase" /> is synchronized (thread safe); otherwise, false. The default is false.</returns>
|
||||
// Token: 0x1700025B RID: 603
|
||||
// (get) Token: 0x06000F34 RID: 3892 RVA: 0x000401D0 File Offset: 0x0003E3D0
|
||||
bool ICollection.IsSynchronized
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.InnerList.IsSynchronized;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Adds an object to the end of the <see cref="T:System.Collections.CollectionBase" />.</summary>
|
||||
/// <returns>The <see cref="T:System.Collections.CollectionBase" /> 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.CollectionBase" />.</param>
|
||||
/// <exception cref="T:System.NotSupportedException">The <see cref="T:System.Collections.CollectionBase" /> is read-only.-or-The <see cref="T:System.Collections.CollectionBase" /> has a fixed size.</exception>
|
||||
// Token: 0x06000F35 RID: 3893 RVA: 0x000401E0 File Offset: 0x0003E3E0
|
||||
int IList.Add(object value)
|
||||
{
|
||||
this.OnValidate(value);
|
||||
int count = this.InnerList.Count;
|
||||
this.OnInsert(count, value);
|
||||
this.InnerList.Add(value);
|
||||
try
|
||||
{
|
||||
this.OnInsertComplete(count, value);
|
||||
}
|
||||
catch
|
||||
{
|
||||
this.InnerList.RemoveAt(count);
|
||||
throw;
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
||||
/// <summary>Determines whether the <see cref="T:System.Collections.CollectionBase" /> contains a specific element.</summary>
|
||||
/// <returns>true if the <see cref="T:System.Collections.CollectionBase" /> contains the specified <paramref name="value" />; otherwise, false.</returns>
|
||||
/// <param name="value">The <see cref="T:System.Object" /> to locate in the <see cref="T:System.Collections.CollectionBase" />.</param>
|
||||
// Token: 0x06000F36 RID: 3894 RVA: 0x00040254 File Offset: 0x0003E454
|
||||
bool IList.Contains(object value)
|
||||
{
|
||||
return this.InnerList.Contains(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.CollectionBase" />.</summary>
|
||||
/// <returns>The zero-based index of the first occurrence of <paramref name="value" /> within the entire <see cref="T:System.Collections.CollectionBase" />, if found; otherwise, -1.</returns>
|
||||
/// <param name="value">The <see cref="T:System.Object" /> to locate in the <see cref="T:System.Collections.CollectionBase" />.</param>
|
||||
// Token: 0x06000F37 RID: 3895 RVA: 0x00040264 File Offset: 0x0003E464
|
||||
int IList.IndexOf(object value)
|
||||
{
|
||||
return this.InnerList.IndexOf(value);
|
||||
}
|
||||
|
||||
/// <summary>Inserts an element into the <see cref="T:System.Collections.CollectionBase" /> 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.</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.CollectionBase.Count" />.</exception>
|
||||
/// <exception cref="T:System.NotSupportedException">The <see cref="T:System.Collections.CollectionBase" /> is read-only.-or-The <see cref="T:System.Collections.CollectionBase" /> has a fixed size.</exception>
|
||||
// Token: 0x06000F38 RID: 3896 RVA: 0x00040274 File Offset: 0x0003E474
|
||||
void IList.Insert(int index, object value)
|
||||
{
|
||||
this.OnValidate(value);
|
||||
this.OnInsert(index, value);
|
||||
this.InnerList.Insert(index, value);
|
||||
try
|
||||
{
|
||||
this.OnInsertComplete(index, value);
|
||||
}
|
||||
catch
|
||||
{
|
||||
this.InnerList.RemoveAt(index);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Removes the first occurrence of a specific object from the <see cref="T:System.Collections.CollectionBase" />.</summary>
|
||||
/// <param name="value">The <see cref="T:System.Object" /> to remove from the <see cref="T:System.Collections.CollectionBase" />.</param>
|
||||
/// <exception cref="T:System.ArgumentException">The <paramref name="value" /> parameter was not found in the <see cref="T:System.Collections.CollectionBase" /> object.</exception>
|
||||
/// <exception cref="T:System.NotSupportedException">The <see cref="T:System.Collections.CollectionBase" /> is read-only.-or-The <see cref="T:System.Collections.CollectionBase" /> has a fixed size.</exception>
|
||||
// Token: 0x06000F39 RID: 3897 RVA: 0x000402DC File Offset: 0x0003E4DC
|
||||
void IList.Remove(object value)
|
||||
{
|
||||
this.OnValidate(value);
|
||||
int num = this.InnerList.IndexOf(value);
|
||||
if (num == -1)
|
||||
{
|
||||
throw new ArgumentException("The element cannot be found.", "value");
|
||||
}
|
||||
this.OnRemove(num, value);
|
||||
this.InnerList.Remove(value);
|
||||
this.OnRemoveComplete(num, value);
|
||||
}
|
||||
|
||||
/// <summary>Gets a value indicating whether the <see cref="T:System.Collections.CollectionBase" /> has a fixed size.</summary>
|
||||
/// <returns>true if the <see cref="T:System.Collections.CollectionBase" /> has a fixed size; otherwise, false. The default is false.</returns>
|
||||
// Token: 0x1700025C RID: 604
|
||||
// (get) Token: 0x06000F3A RID: 3898 RVA: 0x00040330 File Offset: 0x0003E530
|
||||
bool IList.IsFixedSize
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.InnerList.IsFixedSize;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a value indicating whether the <see cref="T:System.Collections.CollectionBase" /> is read-only.</summary>
|
||||
/// <returns>true if the <see cref="T:System.Collections.CollectionBase" /> is read-only; otherwise, false. The default is false.</returns>
|
||||
// Token: 0x1700025D RID: 605
|
||||
// (get) Token: 0x06000F3B RID: 3899 RVA: 0x00040340 File Offset: 0x0003E540
|
||||
bool IList.IsReadOnly
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.InnerList.IsReadOnly;
|
||||
}
|
||||
}
|
||||
|
||||
/// <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.CollectionBase.Count" />.</exception>
|
||||
// Token: 0x1700025E RID: 606
|
||||
object IList.this[int index]
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.InnerList[index];
|
||||
}
|
||||
set
|
||||
{
|
||||
if (index < 0 || index >= this.InnerList.Count)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException("index");
|
||||
}
|
||||
this.OnValidate(value);
|
||||
object obj = this.InnerList[index];
|
||||
this.OnSet(index, obj, value);
|
||||
this.InnerList[index] = value;
|
||||
try
|
||||
{
|
||||
this.OnSetComplete(index, obj, value);
|
||||
}
|
||||
catch
|
||||
{
|
||||
this.InnerList[index] = obj;
|
||||
throw;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets the number of elements contained in the <see cref="T:System.Collections.CollectionBase" /> instance. This property cannot be overridden.</summary>
|
||||
/// <returns>The number of elements contained in the <see cref="T:System.Collections.CollectionBase" /> instance.Retrieving the value of this property is an O(1) operation.</returns>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x1700025F RID: 607
|
||||
// (get) Token: 0x06000F3E RID: 3902 RVA: 0x000403FC File Offset: 0x0003E5FC
|
||||
public int Count
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.InnerList.Count;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Returns an enumerator that iterates through the <see cref="T:System.Collections.CollectionBase" /> instance.</summary>
|
||||
/// <returns>An <see cref="T:System.Collections.IEnumerator" /> for the <see cref="T:System.Collections.CollectionBase" /> instance.</returns>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x06000F3F RID: 3903 RVA: 0x0004040C File Offset: 0x0003E60C
|
||||
public IEnumerator GetEnumerator()
|
||||
{
|
||||
return this.InnerList.GetEnumerator();
|
||||
}
|
||||
|
||||
/// <summary>Removes all objects from the <see cref="T:System.Collections.CollectionBase" /> instance. This method cannot be overridden.</summary>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x06000F40 RID: 3904 RVA: 0x0004041C File Offset: 0x0003E61C
|
||||
public void Clear()
|
||||
{
|
||||
this.OnClear();
|
||||
this.InnerList.Clear();
|
||||
this.OnClearComplete();
|
||||
}
|
||||
|
||||
/// <summary>Removes the element at the specified index of the <see cref="T:System.Collections.CollectionBase" /> instance. This method is not overridable.</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 zero.-or-<paramref name="index" /> is equal to or greater than <see cref="P:System.Collections.CollectionBase.Count" />.</exception>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x06000F41 RID: 3905 RVA: 0x00040440 File Offset: 0x0003E640
|
||||
public void RemoveAt(int index)
|
||||
{
|
||||
object obj = this.InnerList[index];
|
||||
this.OnValidate(obj);
|
||||
this.OnRemove(index, obj);
|
||||
this.InnerList.RemoveAt(index);
|
||||
this.OnRemoveComplete(index, obj);
|
||||
}
|
||||
|
||||
/// <summary>Gets or sets the number of elements that the <see cref="T:System.Collections.CollectionBase" /> can contain.</summary>
|
||||
/// <returns>The number of elements that the <see cref="T:System.Collections.CollectionBase" /> can contain.</returns>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <see cref="P:System.Collections.CollectionBase.Capacity" /> is set to a value that is less than <see cref="P:System.Collections.CollectionBase.Count" />.</exception>
|
||||
/// <exception cref="T:System.OutOfMemoryException">There is not enough memory available on the system.</exception>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x17000260 RID: 608
|
||||
// (get) Token: 0x06000F42 RID: 3906 RVA: 0x00040480 File Offset: 0x0003E680
|
||||
// (set) Token: 0x06000F43 RID: 3907 RVA: 0x000404A4 File Offset: 0x0003E6A4
|
||||
[ComVisible(false)]
|
||||
public int Capacity
|
||||
{
|
||||
get
|
||||
{
|
||||
if (this.list == null)
|
||||
{
|
||||
this.list = new ArrayList();
|
||||
}
|
||||
return this.list.Capacity;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (this.list == null)
|
||||
{
|
||||
this.list = new ArrayList();
|
||||
}
|
||||
this.list.Capacity = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets an <see cref="T:System.Collections.ArrayList" /> containing the list of elements in the <see cref="T:System.Collections.CollectionBase" /> instance.</summary>
|
||||
/// <returns>An <see cref="T:System.Collections.ArrayList" /> representing the <see cref="T:System.Collections.CollectionBase" /> instance itself.Retrieving the value of this property is an O(1) operation.</returns>
|
||||
// Token: 0x17000261 RID: 609
|
||||
// (get) Token: 0x06000F44 RID: 3908 RVA: 0x000404D4 File Offset: 0x0003E6D4
|
||||
protected ArrayList InnerList
|
||||
{
|
||||
get
|
||||
{
|
||||
if (this.list == null)
|
||||
{
|
||||
this.list = new ArrayList();
|
||||
}
|
||||
return this.list;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets an <see cref="T:System.Collections.IList" /> containing the list of elements in the <see cref="T:System.Collections.CollectionBase" /> instance.</summary>
|
||||
/// <returns>An <see cref="T:System.Collections.IList" /> representing the <see cref="T:System.Collections.CollectionBase" /> instance itself.</returns>
|
||||
// Token: 0x17000262 RID: 610
|
||||
// (get) Token: 0x06000F45 RID: 3909 RVA: 0x000404F4 File Offset: 0x0003E6F4
|
||||
protected IList List
|
||||
{
|
||||
get
|
||||
{
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Performs additional custom processes when clearing the contents of the <see cref="T:System.Collections.CollectionBase" /> instance.</summary>
|
||||
// Token: 0x06000F46 RID: 3910 RVA: 0x000404F8 File Offset: 0x0003E6F8
|
||||
protected virtual void OnClear()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Performs additional custom processes after clearing the contents of the <see cref="T:System.Collections.CollectionBase" /> instance.</summary>
|
||||
// Token: 0x06000F47 RID: 3911 RVA: 0x000404FC File Offset: 0x0003E6FC
|
||||
protected virtual void OnClearComplete()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Performs additional custom processes before inserting a new element into the <see cref="T:System.Collections.CollectionBase" /> instance.</summary>
|
||||
/// <param name="index">The zero-based index at which to insert <paramref name="value" />.</param>
|
||||
/// <param name="value">The new value of the element at <paramref name="index" />.</param>
|
||||
// Token: 0x06000F48 RID: 3912 RVA: 0x00040500 File Offset: 0x0003E700
|
||||
protected virtual void OnInsert(int index, object value)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Performs additional custom processes after inserting a new element into the <see cref="T:System.Collections.CollectionBase" /> instance.</summary>
|
||||
/// <param name="index">The zero-based index at which to insert <paramref name="value" />.</param>
|
||||
/// <param name="value">The new value of the element at <paramref name="index" />.</param>
|
||||
// Token: 0x06000F49 RID: 3913 RVA: 0x00040504 File Offset: 0x0003E704
|
||||
protected virtual void OnInsertComplete(int index, object value)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Performs additional custom processes when removing an element from the <see cref="T:System.Collections.CollectionBase" /> instance.</summary>
|
||||
/// <param name="index">The zero-based index at which <paramref name="value" /> can be found.</param>
|
||||
/// <param name="value">The value of the element to remove from <paramref name="index" />.</param>
|
||||
// Token: 0x06000F4A RID: 3914 RVA: 0x00040508 File Offset: 0x0003E708
|
||||
protected virtual void OnRemove(int index, object value)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Performs additional custom processes after removing an element from the <see cref="T:System.Collections.CollectionBase" /> instance.</summary>
|
||||
/// <param name="index">The zero-based index at which <paramref name="value" /> can be found.</param>
|
||||
/// <param name="value">The value of the element to remove from <paramref name="index" />.</param>
|
||||
// Token: 0x06000F4B RID: 3915 RVA: 0x0004050C File Offset: 0x0003E70C
|
||||
protected virtual void OnRemoveComplete(int index, object value)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Performs additional custom processes before setting a value in the <see cref="T:System.Collections.CollectionBase" /> instance.</summary>
|
||||
/// <param name="index">The zero-based index at which <paramref name="oldValue" /> can be found.</param>
|
||||
/// <param name="oldValue">The value to replace with <paramref name="newValue" />.</param>
|
||||
/// <param name="newValue">The new value of the element at <paramref name="index" />.</param>
|
||||
// Token: 0x06000F4C RID: 3916 RVA: 0x00040510 File Offset: 0x0003E710
|
||||
protected virtual void OnSet(int index, object oldValue, object newValue)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Performs additional custom processes after setting a value in the <see cref="T:System.Collections.CollectionBase" /> instance.</summary>
|
||||
/// <param name="index">The zero-based index at which <paramref name="oldValue" /> can be found.</param>
|
||||
/// <param name="oldValue">The value to replace with <paramref name="newValue" />.</param>
|
||||
/// <param name="newValue">The new value of the element at <paramref name="index" />.</param>
|
||||
// Token: 0x06000F4D RID: 3917 RVA: 0x00040514 File Offset: 0x0003E714
|
||||
protected virtual void OnSetComplete(int index, object oldValue, object newValue)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Performs additional custom processes when validating a value.</summary>
|
||||
/// <param name="value">The object to validate.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="value" /> is null.</exception>
|
||||
// Token: 0x06000F4E RID: 3918 RVA: 0x00040518 File Offset: 0x0003E718
|
||||
protected virtual void OnValidate(object value)
|
||||
{
|
||||
if (value == null)
|
||||
{
|
||||
throw new ArgumentNullException("CollectionBase.OnValidate: Invalid parameter value passed to method: null");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x040003B7 RID: 951
|
||||
private ArrayList list;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace System.Collections
|
||||
{
|
||||
// Token: 0x02000126 RID: 294
|
||||
internal sealed class CollectionDebuggerView
|
||||
{
|
||||
// Token: 0x06000F4F RID: 3919 RVA: 0x0004052C File Offset: 0x0003E72C
|
||||
public CollectionDebuggerView(ICollection col)
|
||||
{
|
||||
this.c = col;
|
||||
}
|
||||
|
||||
// Token: 0x17000263 RID: 611
|
||||
// (get) Token: 0x06000F50 RID: 3920 RVA: 0x0004053C File Offset: 0x0003E73C
|
||||
[DebuggerBrowsable(DebuggerBrowsableState.RootHidden)]
|
||||
public object[] Items
|
||||
{
|
||||
get
|
||||
{
|
||||
object[] array = new object[Math.Min(this.c.Count, 1024)];
|
||||
this.c.CopyTo(array, 0);
|
||||
return array;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x040003B8 RID: 952
|
||||
private readonly ICollection c;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,103 @@
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
namespace System.Collections
|
||||
{
|
||||
/// <summary>Compares two objects for equivalence, where string comparisons are case-sensitive.</summary>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x02000127 RID: 295
|
||||
[ComVisible(true)]
|
||||
[Serializable]
|
||||
public sealed class Comparer : ISerializable, IComparer
|
||||
{
|
||||
// Token: 0x06000F51 RID: 3921 RVA: 0x00040574 File Offset: 0x0003E774
|
||||
private Comparer()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.Comparer" /> class using the specified <see cref="T:System.Globalization.CultureInfo" />.</summary>
|
||||
/// <param name="culture">The <see cref="T:System.Globalization.CultureInfo" /> to use for the new <see cref="T:System.Collections.Comparer" />. </param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="culture" /> is null. </exception>
|
||||
// Token: 0x06000F52 RID: 3922 RVA: 0x0004057C File Offset: 0x0003E77C
|
||||
public Comparer(CultureInfo culture)
|
||||
{
|
||||
if (culture == null)
|
||||
{
|
||||
throw new ArgumentNullException("culture");
|
||||
}
|
||||
this.m_compareInfo = culture.CompareInfo;
|
||||
}
|
||||
|
||||
/// <summary>Performs a case-sensitive comparison of two objects of the same type and returns a value indicating whether one is less than, equal to, or greater than the other.</summary>
|
||||
/// <returns>Value Condition Less than zero <paramref name="a" /> is less than <paramref name="b" />. Zero <paramref name="a" /> equals <paramref name="b" />. Greater than zero <paramref name="a" /> is greater than <paramref name="b" />. </returns>
|
||||
/// <param name="a">The first object to compare. </param>
|
||||
/// <param name="b">The second object to compare. </param>
|
||||
/// <exception cref="T:System.ArgumentException">Neither <paramref name="a" /> nor <paramref name="b" /> implements the <see cref="T:System.IComparable" /> interface.-or- <paramref name="a" /> and <paramref name="b" /> are of different types and neither one can handle comparisons with the other. </exception>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x06000F54 RID: 3924 RVA: 0x000405C0 File Offset: 0x0003E7C0
|
||||
public int Compare(object a, object b)
|
||||
{
|
||||
if (a == b)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
if (a == null)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
if (b == null)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
if (this.m_compareInfo != null)
|
||||
{
|
||||
string text = a as string;
|
||||
string text2 = b as string;
|
||||
if (text != null && text2 != null)
|
||||
{
|
||||
return this.m_compareInfo.Compare(text, text2);
|
||||
}
|
||||
}
|
||||
if (a is IComparable)
|
||||
{
|
||||
return (a as IComparable).CompareTo(b);
|
||||
}
|
||||
if (b is IComparable)
|
||||
{
|
||||
return -(b as IComparable).CompareTo(a);
|
||||
}
|
||||
throw new ArgumentException(Locale.GetText("Neither 'a' nor 'b' implements IComparable."));
|
||||
}
|
||||
|
||||
/// <summary>Populates a <see cref="T:System.Runtime.Serialization.SerializationInfo" /> object with the data required for serialization. </summary>
|
||||
/// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo" /> object to populate with data.</param>
|
||||
/// <param name="context">The context information about the source or destination of the serialization.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">The <paramref name="info" /> parameter is null.</exception>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x06000F55 RID: 3925 RVA: 0x0004065C File Offset: 0x0003E85C
|
||||
public void GetObjectData(SerializationInfo info, StreamingContext context)
|
||||
{
|
||||
if (info == null)
|
||||
{
|
||||
throw new ArgumentNullException("info");
|
||||
}
|
||||
info.AddValue("CompareInfo", this.m_compareInfo, typeof(CompareInfo));
|
||||
}
|
||||
|
||||
/// <summary>Represents an instance of <see cref="T:System.Collections.Comparer" /> that is associated with the <see cref="P:System.Threading.Thread.CurrentCulture" /> of the current thread. This field is read-only.</summary>
|
||||
/// <filterpriority>1</filterpriority>
|
||||
// Token: 0x040003B9 RID: 953
|
||||
public static readonly Comparer Default = new Comparer();
|
||||
|
||||
/// <summary>Represents an instance of <see cref="T:System.Collections.Comparer" /> that is associated with <see cref="P:System.Globalization.CultureInfo.InvariantCulture" />. This field is read-only.</summary>
|
||||
/// <filterpriority>1</filterpriority>
|
||||
// Token: 0x040003BA RID: 954
|
||||
public static readonly Comparer DefaultInvariant = new Comparer(CultureInfo.InvariantCulture);
|
||||
|
||||
// Token: 0x040003BB RID: 955
|
||||
private CompareInfo m_compareInfo;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,382 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.Collections
|
||||
{
|
||||
/// <summary>Provides the abstract base class for a strongly typed collection of key/value pairs.</summary>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x02000128 RID: 296
|
||||
[ComVisible(true)]
|
||||
[Serializable]
|
||||
public abstract class DictionaryBase : IEnumerable, ICollection, IDictionary
|
||||
{
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.DictionaryBase" /> class.</summary>
|
||||
// Token: 0x06000F56 RID: 3926 RVA: 0x00040698 File Offset: 0x0003E898
|
||||
protected DictionaryBase()
|
||||
{
|
||||
this.hashtable = new Hashtable();
|
||||
}
|
||||
|
||||
/// <summary>Gets a value indicating whether a <see cref="T:System.Collections.DictionaryBase" /> object has a fixed size.</summary>
|
||||
/// <returns>true if the <see cref="T:System.Collections.DictionaryBase" /> object has a fixed size; otherwise, false. The default is false.</returns>
|
||||
// Token: 0x17000264 RID: 612
|
||||
// (get) Token: 0x06000F57 RID: 3927 RVA: 0x000406AC File Offset: 0x0003E8AC
|
||||
bool IDictionary.IsFixedSize
|
||||
{
|
||||
get
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a value indicating whether a <see cref="T:System.Collections.DictionaryBase" /> object is read-only.</summary>
|
||||
/// <returns>true if the <see cref="T:System.Collections.DictionaryBase" /> object is read-only; otherwise, false. The default is false.</returns>
|
||||
// Token: 0x17000265 RID: 613
|
||||
// (get) Token: 0x06000F58 RID: 3928 RVA: 0x000406B0 File Offset: 0x0003E8B0
|
||||
bool IDictionary.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 element 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>
|
||||
/// <exception cref="T:System.NotSupportedException">The property is set and the <see cref="T:System.Collections.DictionaryBase" /> is read-only.-or- The property is set, <paramref name="key" /> does not exist in the collection, and the <see cref="T:System.Collections.DictionaryBase" /> has a fixed size. </exception>
|
||||
// Token: 0x17000266 RID: 614
|
||||
object IDictionary.this[object key]
|
||||
{
|
||||
get
|
||||
{
|
||||
object obj = this.hashtable[key];
|
||||
this.OnGet(key, obj);
|
||||
return obj;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.OnValidate(key, value);
|
||||
object obj = this.hashtable[key];
|
||||
this.OnSet(key, obj, value);
|
||||
this.hashtable[key] = value;
|
||||
try
|
||||
{
|
||||
this.OnSetComplete(key, obj, value);
|
||||
}
|
||||
catch
|
||||
{
|
||||
this.hashtable[key] = obj;
|
||||
throw;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets an <see cref="T:System.Collections.ICollection" /> object containing the keys in the <see cref="T:System.Collections.DictionaryBase" /> object.</summary>
|
||||
/// <returns>An <see cref="T:System.Collections.ICollection" /> object containing the keys in the <see cref="T:System.Collections.DictionaryBase" /> object.</returns>
|
||||
// Token: 0x17000267 RID: 615
|
||||
// (get) Token: 0x06000F5B RID: 3931 RVA: 0x00040750 File Offset: 0x0003E950
|
||||
ICollection IDictionary.Keys
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.hashtable.Keys;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets an <see cref="T:System.Collections.ICollection" /> object containing the values in the <see cref="T:System.Collections.DictionaryBase" /> object.</summary>
|
||||
/// <returns>An <see cref="T:System.Collections.ICollection" /> object containing the values in the <see cref="T:System.Collections.DictionaryBase" /> object.</returns>
|
||||
// Token: 0x17000268 RID: 616
|
||||
// (get) Token: 0x06000F5C RID: 3932 RVA: 0x00040760 File Offset: 0x0003E960
|
||||
ICollection IDictionary.Values
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.hashtable.Values;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Adds an element with the specified key and value into the <see cref="T:System.Collections.DictionaryBase" />.</summary>
|
||||
/// <param name="key">The key of the element to add.</param>
|
||||
/// <param name="value">The value of the element to add.</param>
|
||||
/// <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.DictionaryBase" />. </exception>
|
||||
/// <exception cref="T:System.NotSupportedException">The <see cref="T:System.Collections.DictionaryBase" /> is read-only.-or- The <see cref="T:System.Collections.DictionaryBase" /> has a fixed size. </exception>
|
||||
// Token: 0x06000F5D RID: 3933 RVA: 0x00040770 File Offset: 0x0003E970
|
||||
void IDictionary.Add(object key, object value)
|
||||
{
|
||||
this.OnValidate(key, value);
|
||||
this.OnInsert(key, value);
|
||||
this.hashtable.Add(key, value);
|
||||
try
|
||||
{
|
||||
this.OnInsertComplete(key, value);
|
||||
}
|
||||
catch
|
||||
{
|
||||
this.hashtable.Remove(key);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Removes the element with the specified key from the <see cref="T:System.Collections.DictionaryBase" />.</summary>
|
||||
/// <param name="key">The key of the element to remove.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="key" /> is null. </exception>
|
||||
/// <exception cref="T:System.NotSupportedException">The <see cref="T:System.Collections.DictionaryBase" /> is read-only.-or- The <see cref="T:System.Collections.DictionaryBase" /> has a fixed size. </exception>
|
||||
// Token: 0x06000F5E RID: 3934 RVA: 0x000407D8 File Offset: 0x0003E9D8
|
||||
void IDictionary.Remove(object key)
|
||||
{
|
||||
if (!this.hashtable.Contains(key))
|
||||
{
|
||||
return;
|
||||
}
|
||||
object obj = this.hashtable[key];
|
||||
this.OnValidate(key, obj);
|
||||
this.OnRemove(key, obj);
|
||||
this.hashtable.Remove(key);
|
||||
try
|
||||
{
|
||||
this.OnRemoveComplete(key, obj);
|
||||
}
|
||||
catch
|
||||
{
|
||||
this.hashtable[key] = obj;
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Determines whether the <see cref="T:System.Collections.DictionaryBase" /> contains a specific key.</summary>
|
||||
/// <returns>true if the <see cref="T:System.Collections.DictionaryBase" /> contains an element with the specified key; otherwise, false.</returns>
|
||||
/// <param name="key">The key to locate in the <see cref="T:System.Collections.DictionaryBase" />.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="key" /> is null. </exception>
|
||||
// Token: 0x06000F5F RID: 3935 RVA: 0x00040860 File Offset: 0x0003EA60
|
||||
bool IDictionary.Contains(object key)
|
||||
{
|
||||
return this.hashtable.Contains(key);
|
||||
}
|
||||
|
||||
/// <summary>Gets a value indicating whether access to a <see cref="T:System.Collections.DictionaryBase" /> object is synchronized (thread safe).</summary>
|
||||
/// <returns>true if access to the <see cref="T:System.Collections.DictionaryBase" /> object is synchronized (thread safe); otherwise, false. The default is false.</returns>
|
||||
// Token: 0x17000269 RID: 617
|
||||
// (get) Token: 0x06000F60 RID: 3936 RVA: 0x00040870 File Offset: 0x0003EA70
|
||||
bool ICollection.IsSynchronized
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.hashtable.IsSynchronized;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets an object that can be used to synchronize access to a <see cref="T:System.Collections.DictionaryBase" /> object.</summary>
|
||||
/// <returns>An object that can be used to synchronize access to the <see cref="T:System.Collections.DictionaryBase" /> object.</returns>
|
||||
// Token: 0x1700026A RID: 618
|
||||
// (get) Token: 0x06000F61 RID: 3937 RVA: 0x00040880 File Offset: 0x0003EA80
|
||||
object ICollection.SyncRoot
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.hashtable.SyncRoot;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Returns an <see cref="T:System.Collections.IEnumerator" /> that iterates through the <see cref="T:System.Collections.DictionaryBase" />.</summary>
|
||||
/// <returns>An <see cref="T:System.Collections.IEnumerator" /> for the <see cref="T:System.Collections.DictionaryBase" />.</returns>
|
||||
// Token: 0x06000F62 RID: 3938 RVA: 0x00040890 File Offset: 0x0003EA90
|
||||
IEnumerator IEnumerable.GetEnumerator()
|
||||
{
|
||||
return this.hashtable.GetEnumerator();
|
||||
}
|
||||
|
||||
/// <summary>Clears the contents of the <see cref="T:System.Collections.DictionaryBase" /> instance.</summary>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x06000F63 RID: 3939 RVA: 0x000408A0 File Offset: 0x0003EAA0
|
||||
public void Clear()
|
||||
{
|
||||
this.OnClear();
|
||||
this.hashtable.Clear();
|
||||
this.OnClearComplete();
|
||||
}
|
||||
|
||||
/// <summary>Gets the number of elements contained in the <see cref="T:System.Collections.DictionaryBase" /> instance.</summary>
|
||||
/// <returns>The number of elements contained in the <see cref="T:System.Collections.DictionaryBase" /> instance.</returns>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x1700026B RID: 619
|
||||
// (get) Token: 0x06000F64 RID: 3940 RVA: 0x000408C4 File Offset: 0x0003EAC4
|
||||
public int Count
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.hashtable.Count;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets the list of elements contained in the <see cref="T:System.Collections.DictionaryBase" /> instance.</summary>
|
||||
/// <returns>An <see cref="T:System.Collections.IDictionary" /> representing the <see cref="T:System.Collections.DictionaryBase" /> instance itself.</returns>
|
||||
// Token: 0x1700026C RID: 620
|
||||
// (get) Token: 0x06000F65 RID: 3941 RVA: 0x000408D4 File Offset: 0x0003EAD4
|
||||
protected IDictionary Dictionary
|
||||
{
|
||||
get
|
||||
{
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets the list of elements contained in the <see cref="T:System.Collections.DictionaryBase" /> instance.</summary>
|
||||
/// <returns>A <see cref="T:System.Collections.Hashtable" /> representing the <see cref="T:System.Collections.DictionaryBase" /> instance itself.</returns>
|
||||
// Token: 0x1700026D RID: 621
|
||||
// (get) Token: 0x06000F66 RID: 3942 RVA: 0x000408D8 File Offset: 0x0003EAD8
|
||||
protected Hashtable InnerHashtable
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.hashtable;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Copies the <see cref="T:System.Collections.DictionaryBase" /> elements to a one-dimensional <see cref="T:System.Array" /> 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 the <see cref="T:System.Collections.DictionaryBase" /> instance. 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.DictionaryBase" /> 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.DictionaryBase" /> cannot be cast automatically to the type of the destination <paramref name="array" />. </exception>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x06000F67 RID: 3943 RVA: 0x000408E0 File Offset: 0x0003EAE0
|
||||
public void CopyTo(Array array, int index)
|
||||
{
|
||||
if (array == null)
|
||||
{
|
||||
throw new ArgumentNullException("array");
|
||||
}
|
||||
if (index < 0)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException("index must be possitive");
|
||||
}
|
||||
if (array.Rank > 1)
|
||||
{
|
||||
throw new ArgumentException("array is multidimensional");
|
||||
}
|
||||
int length = array.Length;
|
||||
if (index > length)
|
||||
{
|
||||
throw new ArgumentException("index is larger than array size");
|
||||
}
|
||||
if (index + this.Count > length)
|
||||
{
|
||||
throw new ArgumentException("Copy will overlflow array");
|
||||
}
|
||||
this.DoCopy(array, index);
|
||||
}
|
||||
|
||||
// Token: 0x06000F68 RID: 3944 RVA: 0x00040964 File Offset: 0x0003EB64
|
||||
private void DoCopy(Array array, int index)
|
||||
{
|
||||
foreach (object obj in this.hashtable)
|
||||
{
|
||||
DictionaryEntry dictionaryEntry = (DictionaryEntry)obj;
|
||||
array.SetValue(dictionaryEntry, index++);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Returns an <see cref="T:System.Collections.IDictionaryEnumerator" /> that iterates through the <see cref="T:System.Collections.DictionaryBase" /> instance.</summary>
|
||||
/// <returns>An <see cref="T:System.Collections.IDictionaryEnumerator" /> for the <see cref="T:System.Collections.DictionaryBase" /> instance.</returns>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x06000F69 RID: 3945 RVA: 0x000409E0 File Offset: 0x0003EBE0
|
||||
public IDictionaryEnumerator GetEnumerator()
|
||||
{
|
||||
return this.hashtable.GetEnumerator();
|
||||
}
|
||||
|
||||
/// <summary>Performs additional custom processes before clearing the contents of the <see cref="T:System.Collections.DictionaryBase" /> instance.</summary>
|
||||
// Token: 0x06000F6A RID: 3946 RVA: 0x000409F0 File Offset: 0x0003EBF0
|
||||
protected virtual void OnClear()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Performs additional custom processes after clearing the contents of the <see cref="T:System.Collections.DictionaryBase" /> instance.</summary>
|
||||
// Token: 0x06000F6B RID: 3947 RVA: 0x000409F4 File Offset: 0x0003EBF4
|
||||
protected virtual void OnClearComplete()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Gets the element with the specified key and value in the <see cref="T:System.Collections.DictionaryBase" /> instance.</summary>
|
||||
/// <returns>An <see cref="T:System.Object" /> containing the element with the specified key and value.</returns>
|
||||
/// <param name="key">The key of the element to get. </param>
|
||||
/// <param name="currentValue">The current value of the element associated with <paramref name="key" />. </param>
|
||||
// Token: 0x06000F6C RID: 3948 RVA: 0x000409F8 File Offset: 0x0003EBF8
|
||||
protected virtual object OnGet(object key, object currentValue)
|
||||
{
|
||||
return currentValue;
|
||||
}
|
||||
|
||||
/// <summary>Performs additional custom processes before inserting a new element into the <see cref="T:System.Collections.DictionaryBase" /> instance.</summary>
|
||||
/// <param name="key">The key of the element to insert. </param>
|
||||
/// <param name="value">The value of the element to insert. </param>
|
||||
// Token: 0x06000F6D RID: 3949 RVA: 0x000409FC File Offset: 0x0003EBFC
|
||||
protected virtual void OnInsert(object key, object value)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Performs additional custom processes after inserting a new element into the <see cref="T:System.Collections.DictionaryBase" /> instance.</summary>
|
||||
/// <param name="key">The key of the element to insert. </param>
|
||||
/// <param name="value">The value of the element to insert. </param>
|
||||
// Token: 0x06000F6E RID: 3950 RVA: 0x00040A00 File Offset: 0x0003EC00
|
||||
protected virtual void OnInsertComplete(object key, object value)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Performs additional custom processes before setting a value in the <see cref="T:System.Collections.DictionaryBase" /> instance.</summary>
|
||||
/// <param name="key">The key of the element to locate. </param>
|
||||
/// <param name="oldValue">The old value of the element associated with <paramref name="key" />. </param>
|
||||
/// <param name="newValue">The new value of the element associated with <paramref name="key" />. </param>
|
||||
// Token: 0x06000F6F RID: 3951 RVA: 0x00040A04 File Offset: 0x0003EC04
|
||||
protected virtual void OnSet(object key, object oldValue, object newValue)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Performs additional custom processes after setting a value in the <see cref="T:System.Collections.DictionaryBase" /> instance.</summary>
|
||||
/// <param name="key">The key of the element to locate. </param>
|
||||
/// <param name="oldValue">The old value of the element associated with <paramref name="key" />. </param>
|
||||
/// <param name="newValue">The new value of the element associated with <paramref name="key" />. </param>
|
||||
// Token: 0x06000F70 RID: 3952 RVA: 0x00040A08 File Offset: 0x0003EC08
|
||||
protected virtual void OnSetComplete(object key, object oldValue, object newValue)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Performs additional custom processes before removing an element from the <see cref="T:System.Collections.DictionaryBase" /> instance.</summary>
|
||||
/// <param name="key">The key of the element to remove. </param>
|
||||
/// <param name="value">The value of the element to remove. </param>
|
||||
// Token: 0x06000F71 RID: 3953 RVA: 0x00040A0C File Offset: 0x0003EC0C
|
||||
protected virtual void OnRemove(object key, object value)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Performs additional custom processes after removing an element from the <see cref="T:System.Collections.DictionaryBase" /> instance.</summary>
|
||||
/// <param name="key">The key of the element to remove. </param>
|
||||
/// <param name="value">The value of the element to remove. </param>
|
||||
// Token: 0x06000F72 RID: 3954 RVA: 0x00040A10 File Offset: 0x0003EC10
|
||||
protected virtual void OnRemoveComplete(object key, object value)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Performs additional custom processes when validating the element with the specified key and value.</summary>
|
||||
/// <param name="key">The key of the element to validate. </param>
|
||||
/// <param name="value">The value of the element to validate. </param>
|
||||
// Token: 0x06000F73 RID: 3955 RVA: 0x00040A14 File Offset: 0x0003EC14
|
||||
protected virtual void OnValidate(object key, object value)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x040003BC RID: 956
|
||||
private Hashtable hashtable;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.Collections
|
||||
{
|
||||
/// <summary>Defines a dictionary key/value pair that can be set or retrieved.</summary>
|
||||
/// <filterpriority>1</filterpriority>
|
||||
// Token: 0x02000129 RID: 297
|
||||
[DebuggerDisplay("{_value}", Name = "[{_key}]")]
|
||||
[ComVisible(true)]
|
||||
[Serializable]
|
||||
public struct DictionaryEntry
|
||||
{
|
||||
/// <summary>Initializes an instance of the <see cref="T:System.Collections.DictionaryEntry" /> type with the specified key and value.</summary>
|
||||
/// <param name="key">The object defined in each key/value pair. </param>
|
||||
/// <param name="value">The definition associated with <paramref name="key" />. </param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="key" /> is null and the .NET Framework version is 1.0 or 1.1. </exception>
|
||||
// Token: 0x06000F74 RID: 3956 RVA: 0x00040A18 File Offset: 0x0003EC18
|
||||
public DictionaryEntry(object key, object value)
|
||||
{
|
||||
this._key = key;
|
||||
this._value = value;
|
||||
}
|
||||
|
||||
/// <summary>Gets or sets the key in the key/value pair.</summary>
|
||||
/// <returns>The key in the key/value pair.</returns>
|
||||
/// <filterpriority>1</filterpriority>
|
||||
// Token: 0x1700026E RID: 622
|
||||
// (get) Token: 0x06000F75 RID: 3957 RVA: 0x00040A28 File Offset: 0x0003EC28
|
||||
// (set) Token: 0x06000F76 RID: 3958 RVA: 0x00040A30 File Offset: 0x0003EC30
|
||||
public object Key
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._key;
|
||||
}
|
||||
set
|
||||
{
|
||||
this._key = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets or sets the value in the key/value pair.</summary>
|
||||
/// <returns>The value in the key/value pair.</returns>
|
||||
/// <filterpriority>1</filterpriority>
|
||||
// Token: 0x1700026F RID: 623
|
||||
// (get) Token: 0x06000F77 RID: 3959 RVA: 0x00040A3C File Offset: 0x0003EC3C
|
||||
// (set) Token: 0x06000F78 RID: 3960 RVA: 0x00040A44 File Offset: 0x0003EC44
|
||||
public object Value
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._value;
|
||||
}
|
||||
set
|
||||
{
|
||||
this._value = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x040003BD RID: 957
|
||||
private object _key;
|
||||
|
||||
// Token: 0x040003BE RID: 958
|
||||
private object _value;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace System.Collections.Generic
|
||||
{
|
||||
// Token: 0x020000FA RID: 250
|
||||
internal sealed class CollectionDebuggerView<T, U>
|
||||
{
|
||||
// Token: 0x06000C64 RID: 3172 RVA: 0x0003842C File Offset: 0x0003662C
|
||||
public CollectionDebuggerView(ICollection<KeyValuePair<T, U>> col)
|
||||
{
|
||||
this.c = col;
|
||||
}
|
||||
|
||||
// Token: 0x170001C6 RID: 454
|
||||
// (get) Token: 0x06000C65 RID: 3173 RVA: 0x0003843C File Offset: 0x0003663C
|
||||
[DebuggerBrowsable(DebuggerBrowsableState.RootHidden)]
|
||||
public KeyValuePair<T, U>[] Items
|
||||
{
|
||||
get
|
||||
{
|
||||
KeyValuePair<T, U>[] array = new KeyValuePair<T, U>[this.c.Count];
|
||||
this.c.CopyTo(array, 0);
|
||||
return array;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0400035E RID: 862
|
||||
private readonly ICollection<KeyValuePair<T, U>> c;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace System.Collections.Generic
|
||||
{
|
||||
// Token: 0x020000F9 RID: 249
|
||||
internal sealed class CollectionDebuggerView<T>
|
||||
{
|
||||
// Token: 0x06000C62 RID: 3170 RVA: 0x000383F0 File Offset: 0x000365F0
|
||||
public CollectionDebuggerView(ICollection<T> col)
|
||||
{
|
||||
this.c = col;
|
||||
}
|
||||
|
||||
// Token: 0x170001C5 RID: 453
|
||||
// (get) Token: 0x06000C63 RID: 3171 RVA: 0x00038400 File Offset: 0x00036600
|
||||
[DebuggerBrowsable(DebuggerBrowsableState.RootHidden)]
|
||||
public T[] Items
|
||||
{
|
||||
get
|
||||
{
|
||||
T[] array = new T[this.c.Count];
|
||||
this.c.CopyTo(array, 0);
|
||||
return array;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0400035D RID: 861
|
||||
private readonly ICollection<T> c;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,98 @@
|
||||
using System;
|
||||
|
||||
namespace System.Collections.Generic
|
||||
{
|
||||
/// <summary>Provides a base class for implementations of the <see cref="T:System.Collections.Generic.IComparer`1" /> generic interface.</summary>
|
||||
/// <typeparam name="T">The type of objects to compare.</typeparam>
|
||||
/// <filterpriority>1</filterpriority>
|
||||
// Token: 0x020000FB RID: 251
|
||||
[Serializable]
|
||||
public abstract class Comparer<T> : IComparer<T>, IComparer
|
||||
{
|
||||
// Token: 0x06000C67 RID: 3175 RVA: 0x00038470 File Offset: 0x00036670
|
||||
static Comparer()
|
||||
{
|
||||
if (typeof(IComparable<T>).IsAssignableFrom(typeof(T)))
|
||||
{
|
||||
Comparer<T>._default = (Comparer<T>)Activator.CreateInstance(typeof(GenericComparer<>).MakeGenericType(new Type[] { typeof(T) }));
|
||||
}
|
||||
else
|
||||
{
|
||||
Comparer<T>._default = new Comparer<T>.DefaultComparer();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Compares two objects and returns a value indicating whether one is less than, equal to, or greater than the other.</summary>
|
||||
/// <returns>A signed integer that indicates the relative values of <paramref name="x" /> and <paramref name="y" />, as shown in the following table.Value Meaning Less than zero<paramref name="x" /> is less than <paramref name="y" />.Zero<paramref name="x" /> equals <paramref name="y" />.Greater than zero<paramref name="x" /> is greater than <paramref name="y" />.</returns>
|
||||
/// <param name="x">The first object to compare.</param>
|
||||
/// <param name="y">The second object to compare.</param>
|
||||
/// <exception cref="T:System.ArgumentException">
|
||||
/// <paramref name="x" /> or <paramref name="y" /> is of a type that cannot be cast to type <paramref name="T" />.-or-<paramref name="x" /> and <paramref name="y" /> do not implement either the <see cref="T:System.IComparable`1" /> generic interface or the <see cref="T:System.IComparable" /> interface.</exception>
|
||||
// Token: 0x06000C68 RID: 3176 RVA: 0x000384DC File Offset: 0x000366DC
|
||||
int IComparer.Compare(object x, object y)
|
||||
{
|
||||
if (x == null)
|
||||
{
|
||||
return (y != null) ? (-1) : 0;
|
||||
}
|
||||
if (y == null)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
if (x is T && y is T)
|
||||
{
|
||||
return this.Compare((T)((object)x), (T)((object)y));
|
||||
}
|
||||
throw new ArgumentException();
|
||||
}
|
||||
|
||||
/// <summary>When overridden in a derived class, performs a comparison of two objects of the same type and returns a value indicating whether one object is less than, equal to, or greater than the other.</summary>
|
||||
/// <returns>A signed integer that indicates the relative values of <paramref name="x" /> and <paramref name="y" />, as shown in the following table.Value Meaning Less than zero <paramref name="x" /> is less than <paramref name="y" />.Zero <paramref name="x" /> equals <paramref name="y" />.Greater than zero <paramref name="x" /> is greater than <paramref name="y" />.</returns>
|
||||
/// <param name="x">The first object to compare.</param>
|
||||
/// <param name="y">The second object to compare.</param>
|
||||
/// <exception cref="T:System.ArgumentException">Type <paramref name="T" /> does not implement either the <see cref="T:System.IComparable`1" /> generic interface or the <see cref="T:System.IComparable" /> interface.</exception>
|
||||
// Token: 0x06000C69 RID: 3177
|
||||
public abstract int Compare(T x, T y);
|
||||
|
||||
/// <summary>Returns a default sort order comparer for the type specified by the generic argument.</summary>
|
||||
/// <returns>An object that inherits <see cref="T:System.Collections.Generic.Comparer`1" /> and serves as a sort order comparer for type <paramref name="T" />.</returns>
|
||||
// Token: 0x170001C7 RID: 455
|
||||
// (get) Token: 0x06000C6A RID: 3178 RVA: 0x00038534 File Offset: 0x00036734
|
||||
public static Comparer<T> Default
|
||||
{
|
||||
get
|
||||
{
|
||||
return Comparer<T>._default;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0400035F RID: 863
|
||||
private static readonly Comparer<T> _default;
|
||||
|
||||
// Token: 0x020000FC RID: 252
|
||||
private sealed class DefaultComparer : Comparer<T>
|
||||
{
|
||||
// Token: 0x06000C6C RID: 3180 RVA: 0x00038544 File Offset: 0x00036744
|
||||
public override int Compare(T x, T y)
|
||||
{
|
||||
if (x == null)
|
||||
{
|
||||
return (y != null) ? (-1) : 0;
|
||||
}
|
||||
if (y == null)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
if (x is IComparable<T>)
|
||||
{
|
||||
return ((IComparable<T>)((object)x)).CompareTo(y);
|
||||
}
|
||||
if (x is IComparable)
|
||||
{
|
||||
return ((IComparable)((object)x)).CompareTo(y);
|
||||
}
|
||||
throw new ArgumentException("does not implement right interface");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,1625 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
namespace System.Collections.Generic
|
||||
{
|
||||
/// <summary>Represents a collection of keys and values.</summary>
|
||||
/// <typeparam name="TKey">The type of the keys in the dictionary.</typeparam>
|
||||
/// <typeparam name="TValue">The type of the values in the dictionary.</typeparam>
|
||||
/// <filterpriority>1</filterpriority>
|
||||
// Token: 0x020000FF RID: 255
|
||||
[DebuggerTypeProxy(typeof(CollectionDebuggerView<, >))]
|
||||
[DebuggerDisplay("Count={Count}")]
|
||||
[ComVisible(false)]
|
||||
[Serializable]
|
||||
public class Dictionary<TKey, TValue> : IEnumerable, ISerializable, ICollection, ICollection<KeyValuePair<TKey, TValue>>, IEnumerable<KeyValuePair<TKey, TValue>>, IDictionary<TKey, TValue>, IDictionary, IDeserializationCallback
|
||||
{
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.Generic.Dictionary`2" /> class that is empty, has the default initial capacity, and uses the default equality comparer for the key type.</summary>
|
||||
// Token: 0x06000C6F RID: 3183 RVA: 0x00038614 File Offset: 0x00036814
|
||||
public Dictionary()
|
||||
{
|
||||
this.Init(10, null);
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.Generic.Dictionary`2" /> class that is empty, has the default initial capacity, and uses the specified <see cref="T:System.Collections.Generic.IEqualityComparer`1" />.</summary>
|
||||
/// <param name="comparer">The <see cref="T:System.Collections.Generic.IEqualityComparer`1" /> implementation to use when comparing keys, or null to use the default <see cref="T:System.Collections.Generic.EqualityComparer`1" /> for the type of the key.</param>
|
||||
// Token: 0x06000C70 RID: 3184 RVA: 0x00038628 File Offset: 0x00036828
|
||||
public Dictionary(IEqualityComparer<TKey> comparer)
|
||||
{
|
||||
this.Init(10, comparer);
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.Generic.Dictionary`2" /> class that contains elements copied from the specified <see cref="T:System.Collections.Generic.IDictionary`2" /> and uses the default equality comparer for the key type.</summary>
|
||||
/// <param name="dictionary">The <see cref="T:System.Collections.Generic.IDictionary`2" /> whose elements are copied to the new <see cref="T:System.Collections.Generic.Dictionary`2" />.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="dictionary" /> is null.</exception>
|
||||
/// <exception cref="T:System.ArgumentException">
|
||||
/// <paramref name="dictionary" /> contains one or more duplicate keys.</exception>
|
||||
// Token: 0x06000C71 RID: 3185 RVA: 0x0003863C File Offset: 0x0003683C
|
||||
public Dictionary(IDictionary<TKey, TValue> dictionary)
|
||||
: this(dictionary, null)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.Generic.Dictionary`2" /> class that is empty, has the specified initial capacity, and uses the default equality comparer for the key type.</summary>
|
||||
/// <param name="capacity">The initial number of elements that the <see cref="T:System.Collections.Generic.Dictionary`2" /> can contain.</param>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="capacity" /> is less than 0.</exception>
|
||||
// Token: 0x06000C72 RID: 3186 RVA: 0x00038648 File Offset: 0x00036848
|
||||
public Dictionary(int capacity)
|
||||
{
|
||||
this.Init(capacity, null);
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.Generic.Dictionary`2" /> class that contains elements copied from the specified <see cref="T:System.Collections.Generic.IDictionary`2" /> and uses the specified <see cref="T:System.Collections.Generic.IEqualityComparer`1" />.</summary>
|
||||
/// <param name="dictionary">The <see cref="T:System.Collections.Generic.IDictionary`2" /> whose elements are copied to the new <see cref="T:System.Collections.Generic.Dictionary`2" />.</param>
|
||||
/// <param name="comparer">The <see cref="T:System.Collections.Generic.IEqualityComparer`1" /> implementation to use when comparing keys, or null to use the default <see cref="T:System.Collections.Generic.EqualityComparer`1" /> for the type of the key.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="dictionary" /> is null.</exception>
|
||||
/// <exception cref="T:System.ArgumentException">
|
||||
/// <paramref name="dictionary" /> contains one or more duplicate keys.</exception>
|
||||
// Token: 0x06000C73 RID: 3187 RVA: 0x00038658 File Offset: 0x00036858
|
||||
public Dictionary(IDictionary<TKey, TValue> dictionary, IEqualityComparer<TKey> comparer)
|
||||
{
|
||||
if (dictionary == null)
|
||||
{
|
||||
throw new ArgumentNullException("dictionary");
|
||||
}
|
||||
int num = dictionary.Count;
|
||||
this.Init(num, comparer);
|
||||
foreach (KeyValuePair<TKey, TValue> keyValuePair in dictionary)
|
||||
{
|
||||
this.Add(keyValuePair.Key, keyValuePair.Value);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.Generic.Dictionary`2" /> class that is empty, has the specified initial capacity, and uses the specified <see cref="T:System.Collections.Generic.IEqualityComparer`1" />.</summary>
|
||||
/// <param name="capacity">The initial number of elements that the <see cref="T:System.Collections.Generic.Dictionary`2" /> can contain.</param>
|
||||
/// <param name="comparer">The <see cref="T:System.Collections.Generic.IEqualityComparer`1" /> implementation to use when comparing keys, or null to use the default <see cref="T:System.Collections.Generic.EqualityComparer`1" /> for the type of the key.</param>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="capacity" /> is less than 0.</exception>
|
||||
// Token: 0x06000C74 RID: 3188 RVA: 0x000386EC File Offset: 0x000368EC
|
||||
public Dictionary(int capacity, IEqualityComparer<TKey> comparer)
|
||||
{
|
||||
this.Init(capacity, comparer);
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.Generic.Dictionary`2" /> class with serialized data.</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.Generic.Dictionary`2" />.</param>
|
||||
/// <param name="context">A <see cref="T:System.Runtime.Serialization.StreamingContext" /> structure containing the source and destination of the serialized stream associated with the <see cref="T:System.Collections.Generic.Dictionary`2" />.</param>
|
||||
// Token: 0x06000C75 RID: 3189 RVA: 0x000386FC File Offset: 0x000368FC
|
||||
protected Dictionary(SerializationInfo info, StreamingContext context)
|
||||
{
|
||||
this.serialization_info = info;
|
||||
}
|
||||
|
||||
// Token: 0x170001C8 RID: 456
|
||||
// (get) Token: 0x06000C76 RID: 3190 RVA: 0x0003870C File Offset: 0x0003690C
|
||||
ICollection<TKey> IDictionary<TKey, TValue>.Keys
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Keys;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170001C9 RID: 457
|
||||
// (get) Token: 0x06000C77 RID: 3191 RVA: 0x00038714 File Offset: 0x00036914
|
||||
ICollection<TValue> IDictionary<TKey, TValue>.Values
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Values;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets an <see cref="T:System.Collections.ICollection" /> containing the keys of the <see cref="T:System.Collections.IDictionary" />.</summary>
|
||||
/// <returns>An <see cref="T:System.Collections.ICollection" /> containing the keys of the <see cref="T:System.Collections.IDictionary" />.</returns>
|
||||
// Token: 0x170001CA RID: 458
|
||||
// (get) Token: 0x06000C78 RID: 3192 RVA: 0x0003871C File Offset: 0x0003691C
|
||||
ICollection IDictionary.Keys
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Keys;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets an <see cref="T:System.Collections.ICollection" /> containing the values in the <see cref="T:System.Collections.IDictionary" />.</summary>
|
||||
/// <returns>An <see cref="T:System.Collections.ICollection" /> containing the values in the <see cref="T:System.Collections.IDictionary" />.</returns>
|
||||
// Token: 0x170001CB RID: 459
|
||||
// (get) Token: 0x06000C79 RID: 3193 RVA: 0x00038724 File Offset: 0x00036924
|
||||
ICollection IDictionary.Values
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Values;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a value indicating whether the <see cref="T:System.Collections.IDictionary" /> has a fixed size.</summary>
|
||||
/// <returns>true if the <see cref="T:System.Collections.IDictionary" /> has a fixed size; otherwise, false. In the default implementation of <see cref="T:System.Collections.Generic.Dictionary`2" />, this property always returns false.</returns>
|
||||
// Token: 0x170001CC RID: 460
|
||||
// (get) Token: 0x06000C7A RID: 3194 RVA: 0x0003872C File Offset: 0x0003692C
|
||||
bool IDictionary.IsFixedSize
|
||||
{
|
||||
get
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a value indicating whether the <see cref="T:System.Collections.IDictionary" /> is read-only.</summary>
|
||||
/// <returns>true if the <see cref="T:System.Collections.IDictionary" /> is read-only; otherwise, false. In the default implementation of <see cref="T:System.Collections.Generic.Dictionary`2" />, this property always returns false.</returns>
|
||||
// Token: 0x170001CD RID: 461
|
||||
// (get) Token: 0x06000C7B RID: 3195 RVA: 0x00038730 File Offset: 0x00036930
|
||||
bool IDictionary.IsReadOnly
|
||||
{
|
||||
get
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets or sets the value with the specified key.</summary>
|
||||
/// <returns>The value associated with the specified key, or null if <paramref name="key" /> is not in the dictionary or <paramref name="key" /> is of a type that is not assignable to the key type <paramref name="TKey" /> of the <see cref="T:System.Collections.Generic.Dictionary`2" />.</returns>
|
||||
/// <param name="key">The key of the value to get.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="key" /> is null.</exception>
|
||||
/// <exception cref="T:System.ArgumentException">A value is being assigned, and <paramref name="key" /> is of a type that is not assignable to the key type <paramref name="TKey" /> of the <see cref="T:System.Collections.Generic.Dictionary`2" />.-or-A value is being assigned, and <paramref name="value" /> is of a type that is not assignable to the value type <paramref name="TValue" /> of the <see cref="T:System.Collections.Generic.Dictionary`2" />.</exception>
|
||||
// Token: 0x170001CE RID: 462
|
||||
object IDictionary.this[object key]
|
||||
{
|
||||
get
|
||||
{
|
||||
if (key is TKey && this.ContainsKey((TKey)((object)key)))
|
||||
{
|
||||
return this[this.ToTKey(key)];
|
||||
}
|
||||
return null;
|
||||
}
|
||||
set
|
||||
{
|
||||
this[this.ToTKey(key)] = this.ToTValue(value);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Adds the specified key and value to the dictionary.</summary>
|
||||
/// <param name="key">The object to use as the key.</param>
|
||||
/// <param name="value">The object to use as the value.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="key" /> is null.</exception>
|
||||
/// <exception cref="T:System.ArgumentException">
|
||||
/// <paramref name="key" /> is of a type that is not assignable to the key type <paramref name="TKey" /> of the <see cref="T:System.Collections.Generic.Dictionary`2" />.-or-<paramref name="value" /> is of a type that is not assignable to <paramref name="TValue" />, the type of values in the <see cref="T:System.Collections.Generic.Dictionary`2" />.-or-A value with the same key already exists in the <see cref="T:System.Collections.Generic.Dictionary`2" />.</exception>
|
||||
// Token: 0x06000C7E RID: 3198 RVA: 0x0003878C File Offset: 0x0003698C
|
||||
void IDictionary.Add(object key, object value)
|
||||
{
|
||||
this.Add(this.ToTKey(key), this.ToTValue(value));
|
||||
}
|
||||
|
||||
/// <summary>Determines whether the <see cref="T:System.Collections.IDictionary" /> contains an element with the specified key.</summary>
|
||||
/// <returns>true if the <see cref="T:System.Collections.IDictionary" /> contains an element with the specified key; otherwise, false.</returns>
|
||||
/// <param name="key">The key to locate in the <see cref="T:System.Collections.IDictionary" />.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="key" /> is null.</exception>
|
||||
// Token: 0x06000C7F RID: 3199 RVA: 0x000387A4 File Offset: 0x000369A4
|
||||
bool IDictionary.Contains(object key)
|
||||
{
|
||||
if (key == null)
|
||||
{
|
||||
throw new ArgumentNullException("key");
|
||||
}
|
||||
return key is TKey && this.ContainsKey((TKey)((object)key));
|
||||
}
|
||||
|
||||
/// <summary>Removes the element with the specified key from the <see cref="T:System.Collections.IDictionary" />.</summary>
|
||||
/// <param name="key">The key of the element to remove.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="key" /> is null.</exception>
|
||||
// Token: 0x06000C80 RID: 3200 RVA: 0x000387DC File Offset: 0x000369DC
|
||||
void IDictionary.Remove(object key)
|
||||
{
|
||||
if (key == null)
|
||||
{
|
||||
throw new ArgumentNullException("key");
|
||||
}
|
||||
if (key is TKey)
|
||||
{
|
||||
this.Remove((TKey)((object)key));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a value indicating whether access to the <see cref="T:System.Collections.ICollection" /> is synchronized (thread safe).</summary>
|
||||
/// <returns>true if access to the <see cref="T:System.Collections.ICollection" /> is synchronized (thread safe); otherwise, false. In the default implementation of <see cref="T:System.Collections.Generic.Dictionary`2" />, this property always returns false.</returns>
|
||||
// Token: 0x170001CF RID: 463
|
||||
// (get) Token: 0x06000C81 RID: 3201 RVA: 0x00038808 File Offset: 0x00036A08
|
||||
bool ICollection.IsSynchronized
|
||||
{
|
||||
get
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets an object that can be used to synchronize access to the <see cref="T:System.Collections.ICollection" />.</summary>
|
||||
/// <returns>An object that can be used to synchronize access to the <see cref="T:System.Collections.ICollection" />. </returns>
|
||||
// Token: 0x170001D0 RID: 464
|
||||
// (get) Token: 0x06000C82 RID: 3202 RVA: 0x0003880C File Offset: 0x00036A0C
|
||||
object ICollection.SyncRoot
|
||||
{
|
||||
get
|
||||
{
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170001D1 RID: 465
|
||||
// (get) Token: 0x06000C83 RID: 3203 RVA: 0x00038810 File Offset: 0x00036A10
|
||||
bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly
|
||||
{
|
||||
get
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000C84 RID: 3204 RVA: 0x00038814 File Offset: 0x00036A14
|
||||
void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> keyValuePair)
|
||||
{
|
||||
this.Add(keyValuePair.Key, keyValuePair.Value);
|
||||
}
|
||||
|
||||
// Token: 0x06000C85 RID: 3205 RVA: 0x0003882C File Offset: 0x00036A2C
|
||||
bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> keyValuePair)
|
||||
{
|
||||
return this.ContainsKeyValuePair(keyValuePair);
|
||||
}
|
||||
|
||||
// Token: 0x06000C86 RID: 3206 RVA: 0x00038838 File Offset: 0x00036A38
|
||||
void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int index)
|
||||
{
|
||||
this.CopyTo(array, index);
|
||||
}
|
||||
|
||||
// Token: 0x06000C87 RID: 3207 RVA: 0x00038844 File Offset: 0x00036A44
|
||||
bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> keyValuePair)
|
||||
{
|
||||
return this.ContainsKeyValuePair(keyValuePair) && this.Remove(keyValuePair.Key);
|
||||
}
|
||||
|
||||
/// <summary>Copies the elements of the <see cref="T:System.Collections.Generic.ICollection`1" /> to an array, starting at the specified array index.</summary>
|
||||
/// <param name="array">The one-dimensional array that is the destination of the elements copied from <see cref="T:System.Collections.Generic.ICollection`1" />. The 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 0.</exception>
|
||||
/// <exception cref="T:System.ArgumentException">
|
||||
/// <paramref name="array" /> is multidimensional.-or-<paramref name="array" /> does not have zero-based indexing.-or-The number of elements in the source <see cref="T:System.Collections.Generic.ICollection`1" /> is greater than the available space from <paramref name="index" /> to the end of the destination <paramref name="array" />.-or-The type of the source <see cref="T:System.Collections.Generic.ICollection`1" /> cannot be cast automatically to the type of the destination <paramref name="array" />.</exception>
|
||||
// Token: 0x06000C88 RID: 3208 RVA: 0x00038864 File Offset: 0x00036A64
|
||||
void ICollection.CopyTo(Array array, int index)
|
||||
{
|
||||
KeyValuePair<TKey, TValue>[] array2 = array as KeyValuePair<TKey, TValue>[];
|
||||
if (array2 != null)
|
||||
{
|
||||
this.CopyTo(array2, index);
|
||||
return;
|
||||
}
|
||||
this.CopyToCheck(array, index);
|
||||
DictionaryEntry[] array3 = array as DictionaryEntry[];
|
||||
if (array3 != null)
|
||||
{
|
||||
this.Do_CopyTo<DictionaryEntry, DictionaryEntry>(array3, index, (TKey key, TValue value) => new DictionaryEntry(key, value));
|
||||
return;
|
||||
}
|
||||
this.Do_ICollectionCopyTo<KeyValuePair<TKey, TValue>>(array, index, new Dictionary<TKey, TValue>.Transform<KeyValuePair<TKey, TValue>>(Dictionary<TKey, TValue>.make_pair));
|
||||
}
|
||||
|
||||
/// <summary>Returns an enumerator that iterates through the collection.</summary>
|
||||
/// <returns>An <see cref="T:System.Collections.IEnumerator" /> that can be used to iterate through the collection.</returns>
|
||||
// Token: 0x06000C89 RID: 3209 RVA: 0x000388D8 File Offset: 0x00036AD8
|
||||
IEnumerator IEnumerable.GetEnumerator()
|
||||
{
|
||||
return new Dictionary<TKey, TValue>.Enumerator(this);
|
||||
}
|
||||
|
||||
// Token: 0x06000C8A RID: 3210 RVA: 0x000388E8 File Offset: 0x00036AE8
|
||||
IEnumerator<KeyValuePair<TKey, TValue>> IEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator()
|
||||
{
|
||||
return new Dictionary<TKey, TValue>.Enumerator(this);
|
||||
}
|
||||
|
||||
/// <summary>Returns an <see cref="T:System.Collections.IDictionaryEnumerator" /> for the <see cref="T:System.Collections.IDictionary" />.</summary>
|
||||
/// <returns>An <see cref="T:System.Collections.IDictionaryEnumerator" /> for the <see cref="T:System.Collections.IDictionary" />.</returns>
|
||||
// Token: 0x06000C8B RID: 3211 RVA: 0x000388F8 File Offset: 0x00036AF8
|
||||
IDictionaryEnumerator IDictionary.GetEnumerator()
|
||||
{
|
||||
return new Dictionary<TKey, TValue>.ShimEnumerator(this);
|
||||
}
|
||||
|
||||
/// <summary>Gets the number of key/value pairs contained in the <see cref="T:System.Collections.Generic.Dictionary`2" />.</summary>
|
||||
/// <returns>The number of key/value pairs contained in the <see cref="T:System.Collections.Generic.Dictionary`2" />.</returns>
|
||||
// Token: 0x170001D2 RID: 466
|
||||
// (get) Token: 0x06000C8C RID: 3212 RVA: 0x00038900 File Offset: 0x00036B00
|
||||
public int Count
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.count;
|
||||
}
|
||||
}
|
||||
|
||||
/// <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, a get operation throws a <see cref="T:System.Collections.Generic.KeyNotFoundException" />, and a set operation creates a new element with the specified key.</returns>
|
||||
/// <param name="key">The key of the value to get or set.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="key" /> is null.</exception>
|
||||
/// <exception cref="T:System.Collections.Generic.KeyNotFoundException">The property is retrieved and <paramref name="key" /> does not exist in the collection.</exception>
|
||||
// Token: 0x170001D3 RID: 467
|
||||
public TValue this[TKey key]
|
||||
{
|
||||
get
|
||||
{
|
||||
if (key == null)
|
||||
{
|
||||
throw new ArgumentNullException("key");
|
||||
}
|
||||
int num = this.hcp.GetHashCode(key) | int.MinValue;
|
||||
for (int num2 = this.table[(num & int.MaxValue) % this.table.Length] - 1; num2 != -1; num2 = this.linkSlots[num2].Next)
|
||||
{
|
||||
if (this.linkSlots[num2].HashCode == num && this.hcp.Equals(this.keySlots[num2], key))
|
||||
{
|
||||
return this.valueSlots[num2];
|
||||
}
|
||||
}
|
||||
throw new KeyNotFoundException();
|
||||
}
|
||||
set
|
||||
{
|
||||
if (key == null)
|
||||
{
|
||||
throw new ArgumentNullException("key");
|
||||
}
|
||||
int num = this.hcp.GetHashCode(key) | int.MinValue;
|
||||
int num2 = (num & int.MaxValue) % this.table.Length;
|
||||
int num3 = this.table[num2] - 1;
|
||||
int num4 = -1;
|
||||
if (num3 != -1)
|
||||
{
|
||||
while (this.linkSlots[num3].HashCode != num || !this.hcp.Equals(this.keySlots[num3], key))
|
||||
{
|
||||
num4 = num3;
|
||||
num3 = this.linkSlots[num3].Next;
|
||||
if (num3 == -1)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (num3 == -1)
|
||||
{
|
||||
if (++this.count > this.threshold)
|
||||
{
|
||||
this.Resize();
|
||||
num2 = (num & int.MaxValue) % this.table.Length;
|
||||
}
|
||||
num3 = this.emptySlot;
|
||||
if (num3 == -1)
|
||||
{
|
||||
num3 = this.touchedSlots++;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.emptySlot = this.linkSlots[num3].Next;
|
||||
}
|
||||
this.linkSlots[num3].Next = this.table[num2] - 1;
|
||||
this.table[num2] = num3 + 1;
|
||||
this.linkSlots[num3].HashCode = num;
|
||||
this.keySlots[num3] = key;
|
||||
}
|
||||
else if (num4 != -1)
|
||||
{
|
||||
this.linkSlots[num4].Next = this.linkSlots[num3].Next;
|
||||
this.linkSlots[num3].Next = this.table[num2] - 1;
|
||||
this.table[num2] = num3 + 1;
|
||||
}
|
||||
this.valueSlots[num3] = value;
|
||||
this.generation++;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000C8F RID: 3215 RVA: 0x00038B9C File Offset: 0x00036D9C
|
||||
private void Init(int capacity, IEqualityComparer<TKey> hcp)
|
||||
{
|
||||
if (capacity < 0)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException("capacity");
|
||||
}
|
||||
this.hcp = ((hcp == null) ? EqualityComparer<TKey>.Default : hcp);
|
||||
if (capacity == 0)
|
||||
{
|
||||
capacity = 10;
|
||||
}
|
||||
capacity = (int)((float)capacity / 0.9f) + 1;
|
||||
this.InitArrays(capacity);
|
||||
this.generation = 0;
|
||||
}
|
||||
|
||||
// Token: 0x06000C90 RID: 3216 RVA: 0x00038BFC File Offset: 0x00036DFC
|
||||
private void InitArrays(int size)
|
||||
{
|
||||
this.table = new int[size];
|
||||
this.linkSlots = new Link[size];
|
||||
this.emptySlot = -1;
|
||||
this.keySlots = new TKey[size];
|
||||
this.valueSlots = new TValue[size];
|
||||
this.touchedSlots = 0;
|
||||
this.threshold = (int)((float)this.table.Length * 0.9f);
|
||||
if (this.threshold == 0 && this.table.Length > 0)
|
||||
{
|
||||
this.threshold = 1;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000C91 RID: 3217 RVA: 0x00038C80 File Offset: 0x00036E80
|
||||
private void CopyToCheck(Array array, int index)
|
||||
{
|
||||
if (array == null)
|
||||
{
|
||||
throw new ArgumentNullException("array");
|
||||
}
|
||||
if (index < 0)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException("index");
|
||||
}
|
||||
if (index > array.Length)
|
||||
{
|
||||
throw new ArgumentException("index larger than largest valid index of array");
|
||||
}
|
||||
if (array.Length - index < this.Count)
|
||||
{
|
||||
throw new ArgumentException("Destination array cannot hold the requested elements!");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000C92 RID: 3218 RVA: 0x00038CE8 File Offset: 0x00036EE8
|
||||
private void Do_CopyTo<TRet, TElem>(TElem[] array, int index, Dictionary<TKey, TValue>.Transform<TRet> transform) where TRet : TElem
|
||||
{
|
||||
for (int i = 0; i < this.touchedSlots; i++)
|
||||
{
|
||||
if ((this.linkSlots[i].HashCode & -2147483648) != 0)
|
||||
{
|
||||
array[index++] = (TElem)((object)transform(this.keySlots[i], this.valueSlots[i]));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000C93 RID: 3219 RVA: 0x00038D5C File Offset: 0x00036F5C
|
||||
private static KeyValuePair<TKey, TValue> make_pair(TKey key, TValue value)
|
||||
{
|
||||
return new KeyValuePair<TKey, TValue>(key, value);
|
||||
}
|
||||
|
||||
// Token: 0x06000C94 RID: 3220 RVA: 0x00038D68 File Offset: 0x00036F68
|
||||
private static TKey pick_key(TKey key, TValue value)
|
||||
{
|
||||
return key;
|
||||
}
|
||||
|
||||
// Token: 0x06000C95 RID: 3221 RVA: 0x00038D6C File Offset: 0x00036F6C
|
||||
private static TValue pick_value(TKey key, TValue value)
|
||||
{
|
||||
return value;
|
||||
}
|
||||
|
||||
// Token: 0x06000C96 RID: 3222 RVA: 0x00038D70 File Offset: 0x00036F70
|
||||
private void CopyTo(KeyValuePair<TKey, TValue>[] array, int index)
|
||||
{
|
||||
this.CopyToCheck(array, index);
|
||||
this.Do_CopyTo<KeyValuePair<TKey, TValue>, KeyValuePair<TKey, TValue>>(array, index, new Dictionary<TKey, TValue>.Transform<KeyValuePair<TKey, TValue>>(Dictionary<TKey, TValue>.make_pair));
|
||||
}
|
||||
|
||||
// Token: 0x06000C97 RID: 3223 RVA: 0x00038D9C File Offset: 0x00036F9C
|
||||
private void Do_ICollectionCopyTo<TRet>(Array array, int index, Dictionary<TKey, TValue>.Transform<TRet> transform)
|
||||
{
|
||||
Type typeFromHandle = typeof(TRet);
|
||||
Type elementType = array.GetType().GetElementType();
|
||||
try
|
||||
{
|
||||
if ((typeFromHandle.IsPrimitive || elementType.IsPrimitive) && !elementType.IsAssignableFrom(typeFromHandle))
|
||||
{
|
||||
throw new Exception();
|
||||
}
|
||||
this.Do_CopyTo<TRet, object>((object[])array, index, transform);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
throw new ArgumentException("Cannot copy source collection elements to destination array", "array", ex);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000C98 RID: 3224 RVA: 0x00038E30 File Offset: 0x00037030
|
||||
private void Resize()
|
||||
{
|
||||
int num = Hashtable.ToPrime((this.table.Length << 1) | 1);
|
||||
int[] array = new int[num];
|
||||
Link[] array2 = new Link[num];
|
||||
for (int i = 0; i < this.table.Length; i++)
|
||||
{
|
||||
for (int num2 = this.table[i] - 1; num2 != -1; num2 = this.linkSlots[num2].Next)
|
||||
{
|
||||
int num3 = (array2[num2].HashCode = this.hcp.GetHashCode(this.keySlots[num2]) | int.MinValue);
|
||||
int num4 = (num3 & int.MaxValue) % num;
|
||||
array2[num2].Next = array[num4] - 1;
|
||||
array[num4] = num2 + 1;
|
||||
}
|
||||
}
|
||||
this.table = array;
|
||||
this.linkSlots = array2;
|
||||
TKey[] array3 = new TKey[num];
|
||||
TValue[] array4 = new TValue[num];
|
||||
Array.Copy(this.keySlots, 0, array3, 0, this.touchedSlots);
|
||||
Array.Copy(this.valueSlots, 0, array4, 0, this.touchedSlots);
|
||||
this.keySlots = array3;
|
||||
this.valueSlots = array4;
|
||||
this.threshold = (int)((float)num * 0.9f);
|
||||
}
|
||||
|
||||
/// <summary>Adds the specified key and value to the dictionary.</summary>
|
||||
/// <param name="key">The key of the element to add.</param>
|
||||
/// <param name="value">The value of the element to add. The value can be null for reference types.</param>
|
||||
/// <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.Generic.Dictionary`2" />.</exception>
|
||||
// Token: 0x06000C99 RID: 3225 RVA: 0x00038F64 File Offset: 0x00037164
|
||||
public void Add(TKey key, TValue value)
|
||||
{
|
||||
if (key == null)
|
||||
{
|
||||
throw new ArgumentNullException("key");
|
||||
}
|
||||
int num = this.hcp.GetHashCode(key) | int.MinValue;
|
||||
int num2 = (num & int.MaxValue) % this.table.Length;
|
||||
int num3;
|
||||
for (num3 = this.table[num2] - 1; num3 != -1; num3 = this.linkSlots[num3].Next)
|
||||
{
|
||||
if (this.linkSlots[num3].HashCode == num && this.hcp.Equals(this.keySlots[num3], key))
|
||||
{
|
||||
throw new ArgumentException("An element with the same key already exists in the dictionary.");
|
||||
}
|
||||
}
|
||||
if (++this.count > this.threshold)
|
||||
{
|
||||
this.Resize();
|
||||
num2 = (num & int.MaxValue) % this.table.Length;
|
||||
}
|
||||
num3 = this.emptySlot;
|
||||
if (num3 == -1)
|
||||
{
|
||||
num3 = this.touchedSlots++;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.emptySlot = this.linkSlots[num3].Next;
|
||||
}
|
||||
this.linkSlots[num3].HashCode = num;
|
||||
this.linkSlots[num3].Next = this.table[num2] - 1;
|
||||
this.table[num2] = num3 + 1;
|
||||
this.keySlots[num3] = key;
|
||||
this.valueSlots[num3] = value;
|
||||
this.generation++;
|
||||
}
|
||||
|
||||
/// <summary>Gets the <see cref="T:System.Collections.Generic.IEqualityComparer`1" /> that is used to determine equality of keys for the dictionary. </summary>
|
||||
/// <returns>The <see cref="T:System.Collections.Generic.IEqualityComparer`1" /> generic interface implementation that is used to determine equality of keys for the current <see cref="T:System.Collections.Generic.Dictionary`2" /> and to provide hash values for the keys.</returns>
|
||||
// Token: 0x170001D4 RID: 468
|
||||
// (get) Token: 0x06000C9A RID: 3226 RVA: 0x000390E4 File Offset: 0x000372E4
|
||||
public IEqualityComparer<TKey> Comparer
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.hcp;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Removes all keys and values from the <see cref="T:System.Collections.Generic.Dictionary`2" />.</summary>
|
||||
// Token: 0x06000C9B RID: 3227 RVA: 0x000390EC File Offset: 0x000372EC
|
||||
public void Clear()
|
||||
{
|
||||
this.count = 0;
|
||||
Array.Clear(this.table, 0, this.table.Length);
|
||||
Array.Clear(this.keySlots, 0, this.keySlots.Length);
|
||||
Array.Clear(this.valueSlots, 0, this.valueSlots.Length);
|
||||
Array.Clear(this.linkSlots, 0, this.linkSlots.Length);
|
||||
this.emptySlot = -1;
|
||||
this.touchedSlots = 0;
|
||||
this.generation++;
|
||||
}
|
||||
|
||||
/// <summary>Determines whether the <see cref="T:System.Collections.Generic.Dictionary`2" /> contains the specified key.</summary>
|
||||
/// <returns>true if the <see cref="T:System.Collections.Generic.Dictionary`2" /> contains an element with the specified key; otherwise, false.</returns>
|
||||
/// <param name="key">The key to locate in the <see cref="T:System.Collections.Generic.Dictionary`2" />.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="key" /> is null.</exception>
|
||||
// Token: 0x06000C9C RID: 3228 RVA: 0x0003916C File Offset: 0x0003736C
|
||||
public bool ContainsKey(TKey key)
|
||||
{
|
||||
if (key == null)
|
||||
{
|
||||
throw new ArgumentNullException("key");
|
||||
}
|
||||
int num = this.hcp.GetHashCode(key) | int.MinValue;
|
||||
for (int num2 = this.table[(num & int.MaxValue) % this.table.Length] - 1; num2 != -1; num2 = this.linkSlots[num2].Next)
|
||||
{
|
||||
if (this.linkSlots[num2].HashCode == num && this.hcp.Equals(this.keySlots[num2], key))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/// <summary>Determines whether the <see cref="T:System.Collections.Generic.Dictionary`2" /> contains a specific value.</summary>
|
||||
/// <returns>true if the <see cref="T:System.Collections.Generic.Dictionary`2" /> contains an element with the specified value; otherwise, false.</returns>
|
||||
/// <param name="value">The value to locate in the <see cref="T:System.Collections.Generic.Dictionary`2" />. The value can be null for reference types.</param>
|
||||
// Token: 0x06000C9D RID: 3229 RVA: 0x00039214 File Offset: 0x00037414
|
||||
public bool ContainsValue(TValue value)
|
||||
{
|
||||
IEqualityComparer<TValue> @default = EqualityComparer<TValue>.Default;
|
||||
for (int i = 0; i < this.table.Length; i++)
|
||||
{
|
||||
for (int num = this.table[i] - 1; num != -1; num = this.linkSlots[num].Next)
|
||||
{
|
||||
if (@default.Equals(this.valueSlots[num], value))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/// <summary>Implements the <see cref="T:System.Runtime.Serialization.ISerializable" /> interface and returns the data needed to serialize the <see cref="T:System.Collections.Generic.Dictionary`2" /> 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.Generic.Dictionary`2" /> instance.</param>
|
||||
/// <param name="context">A <see cref="T:System.Runtime.Serialization.StreamingContext" /> structure that contains the source and destination of the serialized stream associated with the <see cref="T:System.Collections.Generic.Dictionary`2" /> instance.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="info" /> is null.</exception>
|
||||
// Token: 0x06000C9E RID: 3230 RVA: 0x00039284 File Offset: 0x00037484
|
||||
public virtual void GetObjectData(SerializationInfo info, StreamingContext context)
|
||||
{
|
||||
if (info == null)
|
||||
{
|
||||
throw new ArgumentNullException("info");
|
||||
}
|
||||
info.AddValue("Version", this.generation);
|
||||
info.AddValue("Comparer", this.hcp);
|
||||
KeyValuePair<TKey, TValue>[] array = null;
|
||||
if (this.count > 0)
|
||||
{
|
||||
array = new KeyValuePair<TKey, TValue>[this.count];
|
||||
this.CopyTo(array, 0);
|
||||
}
|
||||
info.AddValue("HashSize", this.table.Length);
|
||||
info.AddValue("KeyValuePairs", array);
|
||||
}
|
||||
|
||||
/// <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.Generic.Dictionary`2" /> instance is invalid.</exception>
|
||||
// Token: 0x06000C9F RID: 3231 RVA: 0x00039308 File Offset: 0x00037508
|
||||
public virtual void OnDeserialization(object sender)
|
||||
{
|
||||
if (this.serialization_info == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
this.generation = this.serialization_info.GetInt32("Version");
|
||||
this.hcp = (IEqualityComparer<TKey>)this.serialization_info.GetValue("Comparer", typeof(IEqualityComparer<TKey>));
|
||||
int num = this.serialization_info.GetInt32("HashSize");
|
||||
KeyValuePair<TKey, TValue>[] array = (KeyValuePair<TKey, TValue>[])this.serialization_info.GetValue("KeyValuePairs", typeof(KeyValuePair<TKey, TValue>[]));
|
||||
if (num < 10)
|
||||
{
|
||||
num = 10;
|
||||
}
|
||||
this.InitArrays(num);
|
||||
this.count = 0;
|
||||
if (array != null)
|
||||
{
|
||||
for (int i = 0; i < array.Length; i++)
|
||||
{
|
||||
this.Add(array[i].Key, array[i].Value);
|
||||
}
|
||||
}
|
||||
this.generation++;
|
||||
this.serialization_info = null;
|
||||
}
|
||||
|
||||
/// <summary>Removes the value with the specified key from the <see cref="T:System.Collections.Generic.Dictionary`2" />.</summary>
|
||||
/// <returns>true if the element is successfully found and removed; otherwise, false. This method returns false if <paramref name="key" /> is not found in the <see cref="T:System.Collections.Generic.Dictionary`2" />.</returns>
|
||||
/// <param name="key">The key of the element to remove.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="key" /> is null.</exception>
|
||||
// Token: 0x06000CA0 RID: 3232 RVA: 0x000393F4 File Offset: 0x000375F4
|
||||
public bool Remove(TKey key)
|
||||
{
|
||||
if (key == null)
|
||||
{
|
||||
throw new ArgumentNullException("key");
|
||||
}
|
||||
int num = this.hcp.GetHashCode(key) | int.MinValue;
|
||||
int num2 = (num & int.MaxValue) % this.table.Length;
|
||||
int num3 = this.table[num2] - 1;
|
||||
if (num3 == -1)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
int num4 = -1;
|
||||
while (this.linkSlots[num3].HashCode != num || !this.hcp.Equals(this.keySlots[num3], key))
|
||||
{
|
||||
num4 = num3;
|
||||
num3 = this.linkSlots[num3].Next;
|
||||
if (num3 == -1)
|
||||
{
|
||||
IL_A4:
|
||||
if (num3 == -1)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
this.count--;
|
||||
if (num4 == -1)
|
||||
{
|
||||
this.table[num2] = this.linkSlots[num3].Next + 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.linkSlots[num4].Next = this.linkSlots[num3].Next;
|
||||
}
|
||||
this.linkSlots[num3].Next = this.emptySlot;
|
||||
this.emptySlot = num3;
|
||||
this.linkSlots[num3].HashCode = 0;
|
||||
this.keySlots[num3] = default(TKey);
|
||||
this.valueSlots[num3] = default(TValue);
|
||||
this.generation++;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
goto IL_A4;
|
||||
}
|
||||
|
||||
/// <summary>Gets the value associated with the specified key.</summary>
|
||||
/// <returns>true if the <see cref="T:System.Collections.Generic.Dictionary`2" /> contains an element with the specified key; otherwise, false.</returns>
|
||||
/// <param name="key">The key of the value to get.</param>
|
||||
/// <param name="value">When this method returns, contains the value associated with the specified key, if the key is found; otherwise, the default value for the type of the <paramref name="value" /> parameter. This parameter is passed uninitialized.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="key" /> is null.</exception>
|
||||
// Token: 0x06000CA1 RID: 3233 RVA: 0x00039570 File Offset: 0x00037770
|
||||
public bool TryGetValue(TKey key, out TValue value)
|
||||
{
|
||||
if (key == null)
|
||||
{
|
||||
throw new ArgumentNullException("key");
|
||||
}
|
||||
int num = this.hcp.GetHashCode(key) | int.MinValue;
|
||||
for (int num2 = this.table[(num & int.MaxValue) % this.table.Length] - 1; num2 != -1; num2 = this.linkSlots[num2].Next)
|
||||
{
|
||||
if (this.linkSlots[num2].HashCode == num && this.hcp.Equals(this.keySlots[num2], key))
|
||||
{
|
||||
value = this.valueSlots[num2];
|
||||
return true;
|
||||
}
|
||||
}
|
||||
value = default(TValue);
|
||||
return false;
|
||||
}
|
||||
|
||||
/// <summary>Gets a collection containing the keys in the <see cref="T:System.Collections.Generic.Dictionary`2" />.</summary>
|
||||
/// <returns>A <see cref="T:System.Collections.Generic.Dictionary`2.KeyCollection" /> containing the keys in the <see cref="T:System.Collections.Generic.Dictionary`2" />.</returns>
|
||||
// Token: 0x170001D5 RID: 469
|
||||
// (get) Token: 0x06000CA2 RID: 3234 RVA: 0x00039638 File Offset: 0x00037838
|
||||
public Dictionary<TKey, TValue>.KeyCollection Keys
|
||||
{
|
||||
get
|
||||
{
|
||||
return new Dictionary<TKey, TValue>.KeyCollection(this);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a collection containing the values in the <see cref="T:System.Collections.Generic.Dictionary`2" />.</summary>
|
||||
/// <returns>A <see cref="T:System.Collections.Generic.Dictionary`2.ValueCollection" /> containing the values in the <see cref="T:System.Collections.Generic.Dictionary`2" />.</returns>
|
||||
// Token: 0x170001D6 RID: 470
|
||||
// (get) Token: 0x06000CA3 RID: 3235 RVA: 0x00039640 File Offset: 0x00037840
|
||||
public Dictionary<TKey, TValue>.ValueCollection Values
|
||||
{
|
||||
get
|
||||
{
|
||||
return new Dictionary<TKey, TValue>.ValueCollection(this);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000CA4 RID: 3236 RVA: 0x00039648 File Offset: 0x00037848
|
||||
private TKey ToTKey(object key)
|
||||
{
|
||||
if (key == null)
|
||||
{
|
||||
throw new ArgumentNullException("key");
|
||||
}
|
||||
if (!(key is TKey))
|
||||
{
|
||||
throw new ArgumentException("not of type: " + typeof(TKey).ToString(), "key");
|
||||
}
|
||||
return (TKey)((object)key);
|
||||
}
|
||||
|
||||
// Token: 0x06000CA5 RID: 3237 RVA: 0x0003969C File Offset: 0x0003789C
|
||||
private TValue ToTValue(object value)
|
||||
{
|
||||
if (value == null && !typeof(TValue).IsValueType)
|
||||
{
|
||||
return default(TValue);
|
||||
}
|
||||
if (!(value is TValue))
|
||||
{
|
||||
throw new ArgumentException("not of type: " + typeof(TValue).ToString(), "value");
|
||||
}
|
||||
return (TValue)((object)value);
|
||||
}
|
||||
|
||||
// Token: 0x06000CA6 RID: 3238 RVA: 0x00039704 File Offset: 0x00037904
|
||||
private bool ContainsKeyValuePair(KeyValuePair<TKey, TValue> pair)
|
||||
{
|
||||
TValue tvalue;
|
||||
return this.TryGetValue(pair.Key, out tvalue) && EqualityComparer<TValue>.Default.Equals(pair.Value, tvalue);
|
||||
}
|
||||
|
||||
/// <summary>Returns an enumerator that iterates through the <see cref="T:System.Collections.Generic.Dictionary`2" />.</summary>
|
||||
/// <returns>A <see cref="T:System.Collections.Generic.Dictionary`2.Enumerator" /> structure for the <see cref="T:System.Collections.Generic.Dictionary`2" />.</returns>
|
||||
// Token: 0x06000CA7 RID: 3239 RVA: 0x0003973C File Offset: 0x0003793C
|
||||
public Dictionary<TKey, TValue>.Enumerator GetEnumerator()
|
||||
{
|
||||
return new Dictionary<TKey, TValue>.Enumerator(this);
|
||||
}
|
||||
|
||||
// Token: 0x04000362 RID: 866
|
||||
private const int INITIAL_SIZE = 10;
|
||||
|
||||
// Token: 0x04000363 RID: 867
|
||||
private const float DEFAULT_LOAD_FACTOR = 0.9f;
|
||||
|
||||
// Token: 0x04000364 RID: 868
|
||||
private const int NO_SLOT = -1;
|
||||
|
||||
// Token: 0x04000365 RID: 869
|
||||
private const int HASH_FLAG = -2147483648;
|
||||
|
||||
// Token: 0x04000366 RID: 870
|
||||
private int[] table;
|
||||
|
||||
// Token: 0x04000367 RID: 871
|
||||
private Link[] linkSlots;
|
||||
|
||||
// Token: 0x04000368 RID: 872
|
||||
private TKey[] keySlots;
|
||||
|
||||
// Token: 0x04000369 RID: 873
|
||||
private TValue[] valueSlots;
|
||||
|
||||
// Token: 0x0400036A RID: 874
|
||||
private int touchedSlots;
|
||||
|
||||
// Token: 0x0400036B RID: 875
|
||||
private int emptySlot;
|
||||
|
||||
// Token: 0x0400036C RID: 876
|
||||
private int count;
|
||||
|
||||
// Token: 0x0400036D RID: 877
|
||||
private int threshold;
|
||||
|
||||
// Token: 0x0400036E RID: 878
|
||||
private IEqualityComparer<TKey> hcp;
|
||||
|
||||
// Token: 0x0400036F RID: 879
|
||||
private SerializationInfo serialization_info;
|
||||
|
||||
// Token: 0x04000370 RID: 880
|
||||
private int generation;
|
||||
|
||||
// Token: 0x02000100 RID: 256
|
||||
[Serializable]
|
||||
private class ShimEnumerator : IEnumerator, IDictionaryEnumerator
|
||||
{
|
||||
// Token: 0x06000CA9 RID: 3241 RVA: 0x00039758 File Offset: 0x00037958
|
||||
public ShimEnumerator(Dictionary<TKey, TValue> host)
|
||||
{
|
||||
this.host_enumerator = host.GetEnumerator();
|
||||
}
|
||||
|
||||
// Token: 0x06000CAA RID: 3242 RVA: 0x0003976C File Offset: 0x0003796C
|
||||
public void Dispose()
|
||||
{
|
||||
this.host_enumerator.Dispose();
|
||||
}
|
||||
|
||||
// Token: 0x06000CAB RID: 3243 RVA: 0x0003977C File Offset: 0x0003797C
|
||||
public bool MoveNext()
|
||||
{
|
||||
return this.host_enumerator.MoveNext();
|
||||
}
|
||||
|
||||
// Token: 0x170001D7 RID: 471
|
||||
// (get) Token: 0x06000CAC RID: 3244 RVA: 0x0003978C File Offset: 0x0003798C
|
||||
public DictionaryEntry Entry
|
||||
{
|
||||
get
|
||||
{
|
||||
return ((IDictionaryEnumerator)this.host_enumerator).Entry;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170001D8 RID: 472
|
||||
// (get) Token: 0x06000CAD RID: 3245 RVA: 0x000397A0 File Offset: 0x000379A0
|
||||
public object Key
|
||||
{
|
||||
get
|
||||
{
|
||||
KeyValuePair<TKey, TValue> keyValuePair = this.host_enumerator.Current;
|
||||
return keyValuePair.Key;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170001D9 RID: 473
|
||||
// (get) Token: 0x06000CAE RID: 3246 RVA: 0x000397C8 File Offset: 0x000379C8
|
||||
public object Value
|
||||
{
|
||||
get
|
||||
{
|
||||
KeyValuePair<TKey, TValue> keyValuePair = this.host_enumerator.Current;
|
||||
return keyValuePair.Value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170001DA RID: 474
|
||||
// (get) Token: 0x06000CAF RID: 3247 RVA: 0x000397F0 File Offset: 0x000379F0
|
||||
public object Current
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Entry;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000CB0 RID: 3248 RVA: 0x00039800 File Offset: 0x00037A00
|
||||
public void Reset()
|
||||
{
|
||||
this.host_enumerator.Reset();
|
||||
}
|
||||
|
||||
// Token: 0x04000372 RID: 882
|
||||
private Dictionary<TKey, TValue>.Enumerator host_enumerator;
|
||||
}
|
||||
|
||||
/// <summary>Enumerates the elements of a <see cref="T:System.Collections.Generic.Dictionary`2" />.</summary>
|
||||
// Token: 0x02000101 RID: 257
|
||||
[Serializable]
|
||||
public struct Enumerator : IEnumerator, IDisposable, IEnumerator<KeyValuePair<TKey, TValue>>, IDictionaryEnumerator
|
||||
{
|
||||
// Token: 0x06000CB1 RID: 3249 RVA: 0x00039810 File Offset: 0x00037A10
|
||||
internal Enumerator(Dictionary<TKey, TValue> dictionary)
|
||||
{
|
||||
this.dictionary = dictionary;
|
||||
this.stamp = dictionary.generation;
|
||||
}
|
||||
|
||||
/// <summary>Gets the element at the current position of the enumerator.</summary>
|
||||
/// <returns>The element in the collection at the current position of the enumerator, as an <see cref="T:System.Object" />.</returns>
|
||||
/// <exception cref="T:System.InvalidOperationException">The enumerator is positioned before the first element of the collection or after the last element. </exception>
|
||||
// Token: 0x170001DB RID: 475
|
||||
// (get) Token: 0x06000CB2 RID: 3250 RVA: 0x00039828 File Offset: 0x00037A28
|
||||
object IEnumerator.Current
|
||||
{
|
||||
get
|
||||
{
|
||||
this.VerifyCurrent();
|
||||
return this.current;
|
||||
}
|
||||
}
|
||||
|
||||
/// <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: 0x06000CB3 RID: 3251 RVA: 0x0003983C File Offset: 0x00037A3C
|
||||
void IEnumerator.Reset()
|
||||
{
|
||||
this.Reset();
|
||||
}
|
||||
|
||||
/// <summary>Gets the element at the current position of the enumerator.</summary>
|
||||
/// <returns>The element in the dictionary at the current position of the enumerator, as a <see cref="T:System.Collections.DictionaryEntry" />.</returns>
|
||||
/// <exception cref="T:System.InvalidOperationException">The enumerator is positioned before the first element of the collection or after the last element. </exception>
|
||||
// Token: 0x170001DC RID: 476
|
||||
// (get) Token: 0x06000CB4 RID: 3252 RVA: 0x00039844 File Offset: 0x00037A44
|
||||
DictionaryEntry IDictionaryEnumerator.Entry
|
||||
{
|
||||
get
|
||||
{
|
||||
this.VerifyCurrent();
|
||||
return new DictionaryEntry(this.current.Key, this.current.Value);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets the key of the element at the current position of the enumerator.</summary>
|
||||
/// <returns>The key of the element in the dictionary at the current position of the enumerator.</returns>
|
||||
/// <exception cref="T:System.InvalidOperationException">The enumerator is positioned before the first element of the collection or after the last element. </exception>
|
||||
// Token: 0x170001DD RID: 477
|
||||
// (get) Token: 0x06000CB5 RID: 3253 RVA: 0x0003987C File Offset: 0x00037A7C
|
||||
object IDictionaryEnumerator.Key
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.CurrentKey;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets the value of the element at the current position of the enumerator.</summary>
|
||||
/// <returns>The value of the element in the dictionary at the current position of the enumerator.</returns>
|
||||
/// <exception cref="T:System.InvalidOperationException">The enumerator is positioned before the first element of the collection or after the last element. </exception>
|
||||
// Token: 0x170001DE RID: 478
|
||||
// (get) Token: 0x06000CB6 RID: 3254 RVA: 0x0003988C File Offset: 0x00037A8C
|
||||
object IDictionaryEnumerator.Value
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.CurrentValue;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Advances the enumerator to the next element of the <see cref="T:System.Collections.Generic.Dictionary`2" />.</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: 0x06000CB7 RID: 3255 RVA: 0x0003989C File Offset: 0x00037A9C
|
||||
public bool MoveNext()
|
||||
{
|
||||
this.VerifyState();
|
||||
if (this.next < 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
while (this.next < this.dictionary.touchedSlots)
|
||||
{
|
||||
int num = this.next++;
|
||||
if ((this.dictionary.linkSlots[num].HashCode & -2147483648) != 0)
|
||||
{
|
||||
this.current = new KeyValuePair<TKey, TValue>(this.dictionary.keySlots[num], this.dictionary.valueSlots[num]);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
this.next = -1;
|
||||
return false;
|
||||
}
|
||||
|
||||
/// <summary>Gets the element at the current position of the enumerator.</summary>
|
||||
/// <returns>The element in the <see cref="T:System.Collections.Generic.Dictionary`2" /> at the current position of the enumerator.</returns>
|
||||
// Token: 0x170001DF RID: 479
|
||||
// (get) Token: 0x06000CB8 RID: 3256 RVA: 0x00039944 File Offset: 0x00037B44
|
||||
public KeyValuePair<TKey, TValue> Current
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.current;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170001E0 RID: 480
|
||||
// (get) Token: 0x06000CB9 RID: 3257 RVA: 0x0003994C File Offset: 0x00037B4C
|
||||
internal TKey CurrentKey
|
||||
{
|
||||
get
|
||||
{
|
||||
this.VerifyCurrent();
|
||||
return this.current.Key;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170001E1 RID: 481
|
||||
// (get) Token: 0x06000CBA RID: 3258 RVA: 0x00039960 File Offset: 0x00037B60
|
||||
internal TValue CurrentValue
|
||||
{
|
||||
get
|
||||
{
|
||||
this.VerifyCurrent();
|
||||
return this.current.Value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000CBB RID: 3259 RVA: 0x00039974 File Offset: 0x00037B74
|
||||
internal void Reset()
|
||||
{
|
||||
this.VerifyState();
|
||||
this.next = 0;
|
||||
}
|
||||
|
||||
// Token: 0x06000CBC RID: 3260 RVA: 0x00039984 File Offset: 0x00037B84
|
||||
private void VerifyState()
|
||||
{
|
||||
if (this.dictionary == null)
|
||||
{
|
||||
throw new ObjectDisposedException(null);
|
||||
}
|
||||
if (this.dictionary.generation != this.stamp)
|
||||
{
|
||||
throw new InvalidOperationException("out of sync");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000CBD RID: 3261 RVA: 0x000399BC File Offset: 0x00037BBC
|
||||
private void VerifyCurrent()
|
||||
{
|
||||
this.VerifyState();
|
||||
if (this.next <= 0)
|
||||
{
|
||||
throw new InvalidOperationException("Current is not valid");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Releases all resources used by the <see cref="T:System.Collections.Generic.Dictionary`2.Enumerator" />.</summary>
|
||||
// Token: 0x06000CBE RID: 3262 RVA: 0x000399DC File Offset: 0x00037BDC
|
||||
public void Dispose()
|
||||
{
|
||||
this.dictionary = null;
|
||||
}
|
||||
|
||||
// Token: 0x04000373 RID: 883
|
||||
private Dictionary<TKey, TValue> dictionary;
|
||||
|
||||
// Token: 0x04000374 RID: 884
|
||||
private int next;
|
||||
|
||||
// Token: 0x04000375 RID: 885
|
||||
private int stamp;
|
||||
|
||||
// Token: 0x04000376 RID: 886
|
||||
internal KeyValuePair<TKey, TValue> current;
|
||||
}
|
||||
|
||||
/// <summary>Represents the collection of keys in a <see cref="T:System.Collections.Generic.Dictionary`2" />. This class cannot be inherited. </summary>
|
||||
// Token: 0x02000102 RID: 258
|
||||
[DebuggerDisplay("Count={Count}")]
|
||||
[DebuggerTypeProxy(typeof(CollectionDebuggerView<, >))]
|
||||
[Serializable]
|
||||
public sealed class KeyCollection : IEnumerable, ICollection, ICollection<TKey>, IEnumerable<TKey>
|
||||
{
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.Generic.Dictionary`2.KeyCollection" /> class that reflects the keys in the specified <see cref="T:System.Collections.Generic.Dictionary`2" />.</summary>
|
||||
/// <param name="dictionary">The <see cref="T:System.Collections.Generic.Dictionary`2" /> whose keys are reflected in the new <see cref="T:System.Collections.Generic.Dictionary`2.KeyCollection" />.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="dictionary" /> is null.</exception>
|
||||
// Token: 0x06000CBF RID: 3263 RVA: 0x000399E8 File Offset: 0x00037BE8
|
||||
public KeyCollection(Dictionary<TKey, TValue> dictionary)
|
||||
{
|
||||
if (dictionary == null)
|
||||
{
|
||||
throw new ArgumentNullException("dictionary");
|
||||
}
|
||||
this.dictionary = dictionary;
|
||||
}
|
||||
|
||||
// Token: 0x06000CC0 RID: 3264 RVA: 0x00039A08 File Offset: 0x00037C08
|
||||
void ICollection<TKey>.Add(TKey item)
|
||||
{
|
||||
throw new NotSupportedException("this is a read-only collection");
|
||||
}
|
||||
|
||||
// Token: 0x06000CC1 RID: 3265 RVA: 0x00039A14 File Offset: 0x00037C14
|
||||
void ICollection<TKey>.Clear()
|
||||
{
|
||||
throw new NotSupportedException("this is a read-only collection");
|
||||
}
|
||||
|
||||
// Token: 0x06000CC2 RID: 3266 RVA: 0x00039A20 File Offset: 0x00037C20
|
||||
bool ICollection<TKey>.Contains(TKey item)
|
||||
{
|
||||
return this.dictionary.ContainsKey(item);
|
||||
}
|
||||
|
||||
// Token: 0x06000CC3 RID: 3267 RVA: 0x00039A30 File Offset: 0x00037C30
|
||||
bool ICollection<TKey>.Remove(TKey item)
|
||||
{
|
||||
throw new NotSupportedException("this is a read-only collection");
|
||||
}
|
||||
|
||||
// Token: 0x06000CC4 RID: 3268 RVA: 0x00039A3C File Offset: 0x00037C3C
|
||||
IEnumerator<TKey> IEnumerable<TKey>.GetEnumerator()
|
||||
{
|
||||
return this.GetEnumerator();
|
||||
}
|
||||
|
||||
/// <summary>Copies the elements of the <see cref="T:System.Collections.ICollection" /> to an <see cref="T:System.Array" />, starting at a particular <see cref="T:System.Array" /> index.</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.ICollection" />. 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-<paramref name="array" /> does not have zero-based indexing.-or-The number of elements in the source <see cref="T:System.Collections.ICollection" /> is greater than the available space from <paramref name="index" /> to the end of the destination <paramref name="array" />.-or-The type of the source <see cref="T:System.Collections.ICollection" /> cannot be cast automatically to the type of the destination <paramref name="array" />.</exception>
|
||||
// Token: 0x06000CC5 RID: 3269 RVA: 0x00039A4C File Offset: 0x00037C4C
|
||||
void ICollection.CopyTo(Array array, int index)
|
||||
{
|
||||
TKey[] array2 = array as TKey[];
|
||||
if (array2 != null)
|
||||
{
|
||||
this.CopyTo(array2, index);
|
||||
return;
|
||||
}
|
||||
this.dictionary.CopyToCheck(array, index);
|
||||
this.dictionary.Do_ICollectionCopyTo<TKey>(array, index, new Dictionary<TKey, TValue>.Transform<TKey>(Dictionary<TKey, TValue>.pick_key));
|
||||
}
|
||||
|
||||
/// <summary>Returns an enumerator that iterates through a collection.</summary>
|
||||
/// <returns>An <see cref="T:System.Collections.IEnumerator" /> that can be used to iterate through the collection.</returns>
|
||||
// Token: 0x06000CC6 RID: 3270 RVA: 0x00039A98 File Offset: 0x00037C98
|
||||
IEnumerator IEnumerable.GetEnumerator()
|
||||
{
|
||||
return this.GetEnumerator();
|
||||
}
|
||||
|
||||
// Token: 0x170001E2 RID: 482
|
||||
// (get) Token: 0x06000CC7 RID: 3271 RVA: 0x00039AA8 File Offset: 0x00037CA8
|
||||
bool ICollection<TKey>.IsReadOnly
|
||||
{
|
||||
get
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a value indicating whether access to the <see cref="T:System.Collections.ICollection" /> is synchronized (thread safe).</summary>
|
||||
/// <returns>true if access to the <see cref="T:System.Collections.ICollection" /> is synchronized (thread safe); otherwise, false. In the default implementation of <see cref="T:System.Collections.Generic.Dictionary`2.KeyCollection" />, this property always returns false.</returns>
|
||||
// Token: 0x170001E3 RID: 483
|
||||
// (get) Token: 0x06000CC8 RID: 3272 RVA: 0x00039AAC File Offset: 0x00037CAC
|
||||
bool ICollection.IsSynchronized
|
||||
{
|
||||
get
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets an object that can be used to synchronize access to the <see cref="T:System.Collections.ICollection" />.</summary>
|
||||
/// <returns>An object that can be used to synchronize access to the <see cref="T:System.Collections.ICollection" />. In the default implementation of <see cref="T:System.Collections.Generic.Dictionary`2.KeyCollection" />, this property always returns the current instance.</returns>
|
||||
// Token: 0x170001E4 RID: 484
|
||||
// (get) Token: 0x06000CC9 RID: 3273 RVA: 0x00039AB0 File Offset: 0x00037CB0
|
||||
object ICollection.SyncRoot
|
||||
{
|
||||
get
|
||||
{
|
||||
return ((ICollection)this.dictionary).SyncRoot;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Copies the <see cref="T:System.Collections.Generic.Dictionary`2.KeyCollection" /> elements to an existing one-dimensional <see cref="T:System.Array" />, starting at the specified array index.</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.Generic.Dictionary`2.KeyCollection" />. 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">The number of elements in the source <see cref="T:System.Collections.Generic.Dictionary`2.KeyCollection" /> is greater than the available space from <paramref name="index" /> to the end of the destination <paramref name="array" />.</exception>
|
||||
// Token: 0x06000CCA RID: 3274 RVA: 0x00039AC0 File Offset: 0x00037CC0
|
||||
public void CopyTo(TKey[] array, int index)
|
||||
{
|
||||
this.dictionary.CopyToCheck(array, index);
|
||||
this.dictionary.Do_CopyTo<TKey, TKey>(array, index, new Dictionary<TKey, TValue>.Transform<TKey>(Dictionary<TKey, TValue>.pick_key));
|
||||
}
|
||||
|
||||
/// <summary>Returns an enumerator that iterates through the <see cref="T:System.Collections.Generic.Dictionary`2.KeyCollection" />.</summary>
|
||||
/// <returns>A <see cref="T:System.Collections.Generic.Dictionary`2.KeyCollection.Enumerator" /> for the <see cref="T:System.Collections.Generic.Dictionary`2.KeyCollection" />.</returns>
|
||||
// Token: 0x06000CCB RID: 3275 RVA: 0x00039AF4 File Offset: 0x00037CF4
|
||||
public Dictionary<TKey, TValue>.KeyCollection.Enumerator GetEnumerator()
|
||||
{
|
||||
return new Dictionary<TKey, TValue>.KeyCollection.Enumerator(this.dictionary);
|
||||
}
|
||||
|
||||
/// <summary>Gets the number of elements contained in the <see cref="T:System.Collections.Generic.Dictionary`2.KeyCollection" />.</summary>
|
||||
/// <returns>The number of elements contained in the <see cref="T:System.Collections.Generic.Dictionary`2.KeyCollection" />.Retrieving the value of this property is an O(1) operation.</returns>
|
||||
// Token: 0x170001E5 RID: 485
|
||||
// (get) Token: 0x06000CCC RID: 3276 RVA: 0x00039B04 File Offset: 0x00037D04
|
||||
public int Count
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.dictionary.Count;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04000377 RID: 887
|
||||
private Dictionary<TKey, TValue> dictionary;
|
||||
|
||||
/// <summary>Enumerates the elements of a <see cref="T:System.Collections.Generic.Dictionary`2.KeyCollection" />.</summary>
|
||||
// Token: 0x02000103 RID: 259
|
||||
[Serializable]
|
||||
public struct Enumerator : IEnumerator, IDisposable, IEnumerator<TKey>
|
||||
{
|
||||
// Token: 0x06000CCD RID: 3277 RVA: 0x00039B14 File Offset: 0x00037D14
|
||||
internal Enumerator(Dictionary<TKey, TValue> host)
|
||||
{
|
||||
this.host_enumerator = host.GetEnumerator();
|
||||
}
|
||||
|
||||
/// <summary>Gets the element at the current position of the enumerator.</summary>
|
||||
/// <returns>The element in the collection at the current position of the enumerator.</returns>
|
||||
/// <exception cref="T:System.InvalidOperationException">The enumerator is positioned before the first element of the collection or after the last element. </exception>
|
||||
// Token: 0x170001E6 RID: 486
|
||||
// (get) Token: 0x06000CCE RID: 3278 RVA: 0x00039B24 File Offset: 0x00037D24
|
||||
object IEnumerator.Current
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.host_enumerator.CurrentKey;
|
||||
}
|
||||
}
|
||||
|
||||
/// <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: 0x06000CCF RID: 3279 RVA: 0x00039B38 File Offset: 0x00037D38
|
||||
void IEnumerator.Reset()
|
||||
{
|
||||
this.host_enumerator.Reset();
|
||||
}
|
||||
|
||||
/// <summary>Releases all resources used by the <see cref="T:System.Collections.Generic.Dictionary`2.KeyCollection.Enumerator" />.</summary>
|
||||
// Token: 0x06000CD0 RID: 3280 RVA: 0x00039B48 File Offset: 0x00037D48
|
||||
public void Dispose()
|
||||
{
|
||||
this.host_enumerator.Dispose();
|
||||
}
|
||||
|
||||
/// <summary>Advances the enumerator to the next element of the <see cref="T:System.Collections.Generic.Dictionary`2.KeyCollection" />.</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: 0x06000CD1 RID: 3281 RVA: 0x00039B58 File Offset: 0x00037D58
|
||||
public bool MoveNext()
|
||||
{
|
||||
return this.host_enumerator.MoveNext();
|
||||
}
|
||||
|
||||
/// <summary>Gets the element at the current position of the enumerator.</summary>
|
||||
/// <returns>The element in the <see cref="T:System.Collections.Generic.Dictionary`2.KeyCollection" /> at the current position of the enumerator.</returns>
|
||||
// Token: 0x170001E7 RID: 487
|
||||
// (get) Token: 0x06000CD2 RID: 3282 RVA: 0x00039B68 File Offset: 0x00037D68
|
||||
public TKey Current
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.host_enumerator.current.Key;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04000378 RID: 888
|
||||
private Dictionary<TKey, TValue>.Enumerator host_enumerator;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Represents the collection of values in a <see cref="T:System.Collections.Generic.Dictionary`2" />. This class cannot be inherited. </summary>
|
||||
// Token: 0x02000104 RID: 260
|
||||
[DebuggerTypeProxy(typeof(CollectionDebuggerView<, >))]
|
||||
[DebuggerDisplay("Count={Count}")]
|
||||
[Serializable]
|
||||
public sealed class ValueCollection : IEnumerable, ICollection, ICollection<TValue>, IEnumerable<TValue>
|
||||
{
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.Generic.Dictionary`2.ValueCollection" /> class that reflects the values in the specified <see cref="T:System.Collections.Generic.Dictionary`2" />.</summary>
|
||||
/// <param name="dictionary">The <see cref="T:System.Collections.Generic.Dictionary`2" /> whose values are reflected in the new <see cref="T:System.Collections.Generic.Dictionary`2.ValueCollection" />.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="dictionary" /> is null.</exception>
|
||||
// Token: 0x06000CD3 RID: 3283 RVA: 0x00039B7C File Offset: 0x00037D7C
|
||||
public ValueCollection(Dictionary<TKey, TValue> dictionary)
|
||||
{
|
||||
if (dictionary == null)
|
||||
{
|
||||
throw new ArgumentNullException("dictionary");
|
||||
}
|
||||
this.dictionary = dictionary;
|
||||
}
|
||||
|
||||
// Token: 0x06000CD4 RID: 3284 RVA: 0x00039B9C File Offset: 0x00037D9C
|
||||
void ICollection<TValue>.Add(TValue item)
|
||||
{
|
||||
throw new NotSupportedException("this is a read-only collection");
|
||||
}
|
||||
|
||||
// Token: 0x06000CD5 RID: 3285 RVA: 0x00039BA8 File Offset: 0x00037DA8
|
||||
void ICollection<TValue>.Clear()
|
||||
{
|
||||
throw new NotSupportedException("this is a read-only collection");
|
||||
}
|
||||
|
||||
// Token: 0x06000CD6 RID: 3286 RVA: 0x00039BB4 File Offset: 0x00037DB4
|
||||
bool ICollection<TValue>.Contains(TValue item)
|
||||
{
|
||||
return this.dictionary.ContainsValue(item);
|
||||
}
|
||||
|
||||
// Token: 0x06000CD7 RID: 3287 RVA: 0x00039BC4 File Offset: 0x00037DC4
|
||||
bool ICollection<TValue>.Remove(TValue item)
|
||||
{
|
||||
throw new NotSupportedException("this is a read-only collection");
|
||||
}
|
||||
|
||||
// Token: 0x06000CD8 RID: 3288 RVA: 0x00039BD0 File Offset: 0x00037DD0
|
||||
IEnumerator<TValue> IEnumerable<TValue>.GetEnumerator()
|
||||
{
|
||||
return this.GetEnumerator();
|
||||
}
|
||||
|
||||
/// <summary>Copies the elements of the <see cref="T:System.Collections.ICollection" /> to an <see cref="T:System.Array" />, starting at a particular <see cref="T:System.Array" /> index.</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.ICollection" />. 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-<paramref name="array" /> does not have zero-based indexing.-or-The number of elements in the source <see cref="T:System.Collections.ICollection" /> is greater than the available space from <paramref name="index" /> to the end of the destination <paramref name="array" />.-or-The type of the source <see cref="T:System.Collections.ICollection" /> cannot be cast automatically to the type of the destination <paramref name="array" />.</exception>
|
||||
// Token: 0x06000CD9 RID: 3289 RVA: 0x00039BE0 File Offset: 0x00037DE0
|
||||
void ICollection.CopyTo(Array array, int index)
|
||||
{
|
||||
TValue[] array2 = array as TValue[];
|
||||
if (array2 != null)
|
||||
{
|
||||
this.CopyTo(array2, index);
|
||||
return;
|
||||
}
|
||||
this.dictionary.CopyToCheck(array, index);
|
||||
this.dictionary.Do_ICollectionCopyTo<TValue>(array, index, new Dictionary<TKey, TValue>.Transform<TValue>(Dictionary<TKey, TValue>.pick_value));
|
||||
}
|
||||
|
||||
/// <summary>Returns an enumerator that iterates through a collection.</summary>
|
||||
/// <returns>An <see cref="T:System.Collections.IEnumerator" /> that can be used to iterate through the collection.</returns>
|
||||
// Token: 0x06000CDA RID: 3290 RVA: 0x00039C2C File Offset: 0x00037E2C
|
||||
IEnumerator IEnumerable.GetEnumerator()
|
||||
{
|
||||
return this.GetEnumerator();
|
||||
}
|
||||
|
||||
// Token: 0x170001E8 RID: 488
|
||||
// (get) Token: 0x06000CDB RID: 3291 RVA: 0x00039C3C File Offset: 0x00037E3C
|
||||
bool ICollection<TValue>.IsReadOnly
|
||||
{
|
||||
get
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a value indicating whether access to the <see cref="T:System.Collections.ICollection" /> is synchronized (thread safe).</summary>
|
||||
/// <returns>true if access to the <see cref="T:System.Collections.ICollection" /> is synchronized (thread safe); otherwise, false. In the default implementation of <see cref="T:System.Collections.Generic.Dictionary`2.ValueCollection" />, this property always returns false.</returns>
|
||||
// Token: 0x170001E9 RID: 489
|
||||
// (get) Token: 0x06000CDC RID: 3292 RVA: 0x00039C40 File Offset: 0x00037E40
|
||||
bool ICollection.IsSynchronized
|
||||
{
|
||||
get
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets an object that can be used to synchronize access to the <see cref="T:System.Collections.ICollection" />.</summary>
|
||||
/// <returns>An object that can be used to synchronize access to the <see cref="T:System.Collections.ICollection" />. In the default implementation of <see cref="T:System.Collections.Generic.Dictionary`2.ValueCollection" />, this property always returns the current instance.</returns>
|
||||
// Token: 0x170001EA RID: 490
|
||||
// (get) Token: 0x06000CDD RID: 3293 RVA: 0x00039C44 File Offset: 0x00037E44
|
||||
object ICollection.SyncRoot
|
||||
{
|
||||
get
|
||||
{
|
||||
return ((ICollection)this.dictionary).SyncRoot;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Copies the <see cref="T:System.Collections.Generic.Dictionary`2.ValueCollection" /> elements to an existing one-dimensional <see cref="T:System.Array" />, starting at the specified array index.</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.Generic.Dictionary`2.ValueCollection" />. 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">The number of elements in the source <see cref="T:System.Collections.Generic.Dictionary`2.ValueCollection" /> is greater than the available space from <paramref name="index" /> to the end of the destination <paramref name="array" />.</exception>
|
||||
// Token: 0x06000CDE RID: 3294 RVA: 0x00039C54 File Offset: 0x00037E54
|
||||
public void CopyTo(TValue[] array, int index)
|
||||
{
|
||||
this.dictionary.CopyToCheck(array, index);
|
||||
this.dictionary.Do_CopyTo<TValue, TValue>(array, index, new Dictionary<TKey, TValue>.Transform<TValue>(Dictionary<TKey, TValue>.pick_value));
|
||||
}
|
||||
|
||||
/// <summary>Returns an enumerator that iterates through the <see cref="T:System.Collections.Generic.Dictionary`2.ValueCollection" />.</summary>
|
||||
/// <returns>A <see cref="T:System.Collections.Generic.Dictionary`2.ValueCollection.Enumerator" /> for the <see cref="T:System.Collections.Generic.Dictionary`2.ValueCollection" />.</returns>
|
||||
// Token: 0x06000CDF RID: 3295 RVA: 0x00039C88 File Offset: 0x00037E88
|
||||
public Dictionary<TKey, TValue>.ValueCollection.Enumerator GetEnumerator()
|
||||
{
|
||||
return new Dictionary<TKey, TValue>.ValueCollection.Enumerator(this.dictionary);
|
||||
}
|
||||
|
||||
/// <summary>Gets the number of elements contained in the <see cref="T:System.Collections.Generic.Dictionary`2.ValueCollection" />.</summary>
|
||||
/// <returns>The number of elements contained in the <see cref="T:System.Collections.Generic.Dictionary`2.ValueCollection" />.</returns>
|
||||
// Token: 0x170001EB RID: 491
|
||||
// (get) Token: 0x06000CE0 RID: 3296 RVA: 0x00039C98 File Offset: 0x00037E98
|
||||
public int Count
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.dictionary.Count;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04000379 RID: 889
|
||||
private Dictionary<TKey, TValue> dictionary;
|
||||
|
||||
/// <summary>Enumerates the elements of a <see cref="T:System.Collections.Generic.Dictionary`2.ValueCollection" />.</summary>
|
||||
// Token: 0x02000105 RID: 261
|
||||
[Serializable]
|
||||
public struct Enumerator : IEnumerator, IDisposable, IEnumerator<TValue>
|
||||
{
|
||||
// Token: 0x06000CE1 RID: 3297 RVA: 0x00039CA8 File Offset: 0x00037EA8
|
||||
internal Enumerator(Dictionary<TKey, TValue> host)
|
||||
{
|
||||
this.host_enumerator = host.GetEnumerator();
|
||||
}
|
||||
|
||||
/// <summary>Gets the element at the current position of the enumerator.</summary>
|
||||
/// <returns>The element in the collection at the current position of the enumerator.</returns>
|
||||
/// <exception cref="T:System.InvalidOperationException">The enumerator is positioned before the first element of the collection or after the last element. </exception>
|
||||
// Token: 0x170001EC RID: 492
|
||||
// (get) Token: 0x06000CE2 RID: 3298 RVA: 0x00039CB8 File Offset: 0x00037EB8
|
||||
object IEnumerator.Current
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.host_enumerator.CurrentValue;
|
||||
}
|
||||
}
|
||||
|
||||
/// <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: 0x06000CE3 RID: 3299 RVA: 0x00039CCC File Offset: 0x00037ECC
|
||||
void IEnumerator.Reset()
|
||||
{
|
||||
this.host_enumerator.Reset();
|
||||
}
|
||||
|
||||
/// <summary>Releases all resources used by the <see cref="T:System.Collections.Generic.Dictionary`2.ValueCollection.Enumerator" />.</summary>
|
||||
// Token: 0x06000CE4 RID: 3300 RVA: 0x00039CDC File Offset: 0x00037EDC
|
||||
public void Dispose()
|
||||
{
|
||||
this.host_enumerator.Dispose();
|
||||
}
|
||||
|
||||
/// <summary>Advances the enumerator to the next element of the <see cref="T:System.Collections.Generic.Dictionary`2.ValueCollection" />.</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: 0x06000CE5 RID: 3301 RVA: 0x00039CEC File Offset: 0x00037EEC
|
||||
public bool MoveNext()
|
||||
{
|
||||
return this.host_enumerator.MoveNext();
|
||||
}
|
||||
|
||||
/// <summary>Gets the element at the current position of the enumerator.</summary>
|
||||
/// <returns>The element in the <see cref="T:System.Collections.Generic.Dictionary`2.ValueCollection" /> at the current position of the enumerator.</returns>
|
||||
// Token: 0x170001ED RID: 493
|
||||
// (get) Token: 0x06000CE6 RID: 3302 RVA: 0x00039CFC File Offset: 0x00037EFC
|
||||
public TValue Current
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.host_enumerator.current.Value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0400037A RID: 890
|
||||
private Dictionary<TKey, TValue>.Enumerator host_enumerator;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x020006C6 RID: 1734
|
||||
// (Invoke) Token: 0x060041A0 RID: 16800
|
||||
private delegate TRet Transform<TRet>(TKey key, TValue value);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,100 @@
|
||||
using System;
|
||||
|
||||
namespace System.Collections.Generic
|
||||
{
|
||||
/// <summary>Provides a base class for implementations of the <see cref="T:System.Collections.Generic.IEqualityComparer`1" /> generic interface.</summary>
|
||||
/// <typeparam name="T">The type of objects to compare.</typeparam>
|
||||
// Token: 0x02000106 RID: 262
|
||||
[Serializable]
|
||||
public abstract class EqualityComparer<T> : IEqualityComparer<T>, IEqualityComparer
|
||||
{
|
||||
// Token: 0x06000CE8 RID: 3304 RVA: 0x00039D18 File Offset: 0x00037F18
|
||||
static EqualityComparer()
|
||||
{
|
||||
if (typeof(IEquatable<T>).IsAssignableFrom(typeof(T)))
|
||||
{
|
||||
EqualityComparer<T>._default = (EqualityComparer<T>)Activator.CreateInstance(typeof(GenericEqualityComparer<>).MakeGenericType(new Type[] { typeof(T) }));
|
||||
}
|
||||
else
|
||||
{
|
||||
EqualityComparer<T>._default = new EqualityComparer<T>.DefaultComparer();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Returns a hash code for the specified object.</summary>
|
||||
/// <returns>A hash code for the specified object.</returns>
|
||||
/// <param name="obj">The <see cref="T:System.Object" /> for which a hash code is to be returned.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">The type of <paramref name="obj" /> is a reference type and <paramref name="obj" /> is null.-or-<paramref name="obj" /> is of a type that cannot be cast to type <paramref name="T" />.</exception>
|
||||
// Token: 0x06000CE9 RID: 3305 RVA: 0x00039D84 File Offset: 0x00037F84
|
||||
int IEqualityComparer.GetHashCode(object obj)
|
||||
{
|
||||
return this.GetHashCode((T)((object)obj));
|
||||
}
|
||||
|
||||
/// <summary>Determines whether the specified objects are equal.</summary>
|
||||
/// <returns>true if the specified objects are equal; otherwise, false.</returns>
|
||||
/// <param name="x">The first object to compare.</param>
|
||||
/// <param name="y">The second object to compare.</param>
|
||||
/// <exception cref="T:System.ArgumentException">
|
||||
/// <paramref name="x" /> or <paramref name="y" /> is of a type that cannot be cast to type <paramref name="T" />.</exception>
|
||||
// Token: 0x06000CEA RID: 3306 RVA: 0x00039D94 File Offset: 0x00037F94
|
||||
bool IEqualityComparer.Equals(object x, object y)
|
||||
{
|
||||
return this.Equals((T)((object)x), (T)((object)y));
|
||||
}
|
||||
|
||||
/// <summary>When overridden in a derived class, serves as a hash function for the specified object for hashing algorithms and data structures, such as a hash table.</summary>
|
||||
/// <returns>A hash code for the specified object.</returns>
|
||||
/// <param name="obj">The object for which to get a hash code.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">The type of <paramref name="obj" /> is a reference type and <paramref name="obj" /> is null.</exception>
|
||||
// Token: 0x06000CEB RID: 3307
|
||||
public abstract int GetHashCode(T obj);
|
||||
|
||||
/// <summary>When overridden in a derived class, determines whether two objects of type <paramref name="T" /> are equal.</summary>
|
||||
/// <returns>true if the specified objects are equal; otherwise, false.</returns>
|
||||
/// <param name="x">The first object to compare.</param>
|
||||
/// <param name="y">The second object to compare.</param>
|
||||
// Token: 0x06000CEC RID: 3308
|
||||
public abstract bool Equals(T x, T y);
|
||||
|
||||
/// <summary>Returns a default equality comparer for the type specified by the generic argument.</summary>
|
||||
/// <returns>The default instance of the <see cref="T:System.Collections.Generic.EqualityComparer`1" /> class for type <paramref name="T" />.</returns>
|
||||
// Token: 0x170001EE RID: 494
|
||||
// (get) Token: 0x06000CED RID: 3309 RVA: 0x00039DA8 File Offset: 0x00037FA8
|
||||
public static EqualityComparer<T> Default
|
||||
{
|
||||
get
|
||||
{
|
||||
return EqualityComparer<T>._default;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0400037B RID: 891
|
||||
private static readonly EqualityComparer<T> _default;
|
||||
|
||||
// Token: 0x02000107 RID: 263
|
||||
[Serializable]
|
||||
private sealed class DefaultComparer : EqualityComparer<T>
|
||||
{
|
||||
// Token: 0x06000CEF RID: 3311 RVA: 0x00039DB8 File Offset: 0x00037FB8
|
||||
public override int GetHashCode(T obj)
|
||||
{
|
||||
if (obj == null)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
return obj.GetHashCode();
|
||||
}
|
||||
|
||||
// Token: 0x06000CF0 RID: 3312 RVA: 0x00039DD4 File Offset: 0x00037FD4
|
||||
public override bool Equals(T x, T y)
|
||||
{
|
||||
if (x == null)
|
||||
{
|
||||
return y == null;
|
||||
}
|
||||
return x.Equals(y);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
using System;
|
||||
|
||||
namespace System.Collections.Generic
|
||||
{
|
||||
// Token: 0x020000FD RID: 253
|
||||
[Serializable]
|
||||
internal sealed class GenericComparer<T> : Comparer<T> where T : IComparable<T>
|
||||
{
|
||||
// Token: 0x06000C6E RID: 3182 RVA: 0x000385D8 File Offset: 0x000367D8
|
||||
public override int Compare(T x, T y)
|
||||
{
|
||||
if (x == null)
|
||||
{
|
||||
return (y != null) ? (-1) : 0;
|
||||
}
|
||||
if (y == null)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
return x.CompareTo(y);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
using System;
|
||||
|
||||
namespace System.Collections.Generic
|
||||
{
|
||||
// Token: 0x02000108 RID: 264
|
||||
[Serializable]
|
||||
internal sealed class GenericEqualityComparer<T> : EqualityComparer<T> where T : IEquatable<T>
|
||||
{
|
||||
// Token: 0x06000CF2 RID: 3314 RVA: 0x00039E14 File Offset: 0x00038014
|
||||
public override int GetHashCode(T obj)
|
||||
{
|
||||
if (obj == null)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
return obj.GetHashCode();
|
||||
}
|
||||
|
||||
// Token: 0x06000CF3 RID: 3315 RVA: 0x00039E30 File Offset: 0x00038030
|
||||
public override bool Equals(T x, T y)
|
||||
{
|
||||
if (x == null)
|
||||
{
|
||||
return y == null;
|
||||
}
|
||||
return x.Equals(y);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
using System;
|
||||
|
||||
namespace System.Collections.Generic
|
||||
{
|
||||
/// <summary>Defines methods to manipulate generic collections.</summary>
|
||||
/// <typeparam name="T">The type of the elements in the collection.</typeparam>
|
||||
/// <filterpriority>1</filterpriority>
|
||||
// Token: 0x02000030 RID: 48
|
||||
public interface ICollection<T> : IEnumerable, IEnumerable<T>
|
||||
{
|
||||
/// <summary>Gets the number of elements contained in the <see cref="T:System.Collections.Generic.ICollection`1" />.</summary>
|
||||
/// <returns>The number of elements contained in the <see cref="T:System.Collections.Generic.ICollection`1" />.</returns>
|
||||
// Token: 0x17000026 RID: 38
|
||||
// (get) Token: 0x060004B2 RID: 1202
|
||||
int Count { get; }
|
||||
|
||||
/// <summary>Gets a value indicating whether the <see cref="T:System.Collections.Generic.ICollection`1" /> is read-only.</summary>
|
||||
/// <returns>true if the <see cref="T:System.Collections.Generic.ICollection`1" /> is read-only; otherwise, false.</returns>
|
||||
// Token: 0x17000027 RID: 39
|
||||
// (get) Token: 0x060004B3 RID: 1203
|
||||
bool IsReadOnly { get; }
|
||||
|
||||
/// <summary>Adds an item to the <see cref="T:System.Collections.Generic.ICollection`1" />.</summary>
|
||||
/// <param name="item">The object to add to the <see cref="T:System.Collections.Generic.ICollection`1" />.</param>
|
||||
/// <exception cref="T:System.NotSupportedException">The <see cref="T:System.Collections.Generic.ICollection`1" /> is read-only.</exception>
|
||||
// Token: 0x060004B4 RID: 1204
|
||||
void Add(T item);
|
||||
|
||||
/// <summary>Removes all items from the <see cref="T:System.Collections.Generic.ICollection`1" />.</summary>
|
||||
/// <exception cref="T:System.NotSupportedException">The <see cref="T:System.Collections.Generic.ICollection`1" /> is read-only. </exception>
|
||||
// Token: 0x060004B5 RID: 1205
|
||||
void Clear();
|
||||
|
||||
/// <summary>Determines whether the <see cref="T:System.Collections.Generic.ICollection`1" /> contains a specific value.</summary>
|
||||
/// <returns>true if <paramref name="item" /> is found in the <see cref="T:System.Collections.Generic.ICollection`1" />; otherwise, false.</returns>
|
||||
/// <param name="item">The object to locate in the <see cref="T:System.Collections.Generic.ICollection`1" />.</param>
|
||||
// Token: 0x060004B6 RID: 1206
|
||||
bool Contains(T item);
|
||||
|
||||
/// <summary>Copies the elements of the <see cref="T:System.Collections.Generic.ICollection`1" /> to an <see cref="T:System.Array" />, starting at a particular <see cref="T:System.Array" /> index.</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.Generic.ICollection`1" />. The <see cref="T:System.Array" /> must have zero-based indexing.</param>
|
||||
/// <param name="arrayIndex">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="arrayIndex" /> is less than 0.</exception>
|
||||
/// <exception cref="T:System.ArgumentException">The number of elements in the source <see cref="T:System.Collections.Generic.ICollection`1" /> is greater than the available space from <paramref name="arrayIndex" /> to the end of the destination <paramref name="array" />.</exception>
|
||||
// Token: 0x060004B7 RID: 1207
|
||||
void CopyTo(T[] array, int arrayIndex);
|
||||
|
||||
/// <summary>Removes the first occurrence of a specific object from the <see cref="T:System.Collections.Generic.ICollection`1" />.</summary>
|
||||
/// <returns>true if <paramref name="item" /> was successfully removed from the <see cref="T:System.Collections.Generic.ICollection`1" />; otherwise, false. This method also returns false if <paramref name="item" /> is not found in the original <see cref="T:System.Collections.Generic.ICollection`1" />.</returns>
|
||||
/// <param name="item">The object to remove from the <see cref="T:System.Collections.Generic.ICollection`1" />.</param>
|
||||
/// <exception cref="T:System.NotSupportedException">The <see cref="T:System.Collections.Generic.ICollection`1" /> is read-only.</exception>
|
||||
// Token: 0x060004B8 RID: 1208
|
||||
bool Remove(T item);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
|
||||
namespace System.Collections.Generic
|
||||
{
|
||||
/// <summary>Defines a method that a type implements to compare two objects.</summary>
|
||||
/// <typeparam name="T">The type of objects to compare.</typeparam>
|
||||
/// <filterpriority>1</filterpriority>
|
||||
// Token: 0x02000109 RID: 265
|
||||
public interface IComparer<T>
|
||||
{
|
||||
/// <summary>Compares two objects and returns a value indicating whether one is less than, equal to, or greater than the other.</summary>
|
||||
/// <returns>Value Condition Less than zero<paramref name="x" /> is less than <paramref name="y" />.Zero<paramref name="x" /> equals <paramref name="y" />.Greater than zero<paramref name="x" /> is greater than <paramref name="y" />.</returns>
|
||||
/// <param name="x">The first object to compare.</param>
|
||||
/// <param name="y">The second object to compare.</param>
|
||||
// Token: 0x06000CF4 RID: 3316
|
||||
int Compare(T x, T y);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
using System;
|
||||
|
||||
namespace System.Collections.Generic
|
||||
{
|
||||
/// <summary>Represents a generic collection of key/value pairs.</summary>
|
||||
/// <typeparam name="TKey">The type of keys in the dictionary.</typeparam>
|
||||
/// <typeparam name="TValue">The type of values in the dictionary.</typeparam>
|
||||
/// <filterpriority>1</filterpriority>
|
||||
// Token: 0x0200010A RID: 266
|
||||
public interface IDictionary<TKey, TValue> : IEnumerable, ICollection<KeyValuePair<TKey, TValue>>, IEnumerable<KeyValuePair<TKey, TValue>>
|
||||
{
|
||||
/// <summary>Adds an element with the provided key and value to the <see cref="T:System.Collections.Generic.IDictionary`2" />.</summary>
|
||||
/// <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.</param>
|
||||
/// <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.Generic.IDictionary`2" />.</exception>
|
||||
/// <exception cref="T:System.NotSupportedException">The <see cref="T:System.Collections.Generic.IDictionary`2" /> is read-only.</exception>
|
||||
// Token: 0x06000CF5 RID: 3317
|
||||
void Add(TKey key, TValue value);
|
||||
|
||||
/// <summary>Determines whether the <see cref="T:System.Collections.Generic.IDictionary`2" /> contains an element with the specified key.</summary>
|
||||
/// <returns>true if the <see cref="T:System.Collections.Generic.IDictionary`2" /> contains an element with the key; otherwise, false.</returns>
|
||||
/// <param name="key">The key to locate in the <see cref="T:System.Collections.Generic.IDictionary`2" />.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="key" /> is null.</exception>
|
||||
// Token: 0x06000CF6 RID: 3318
|
||||
bool ContainsKey(TKey key);
|
||||
|
||||
/// <summary>Removes the element with the specified key from the <see cref="T:System.Collections.Generic.IDictionary`2" />.</summary>
|
||||
/// <returns>true if the element is successfully removed; otherwise, false. This method also returns false if <paramref name="key" /> was not found in the original <see cref="T:System.Collections.Generic.IDictionary`2" />.</returns>
|
||||
/// <param name="key">The key of the element to remove.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="key" /> is null.</exception>
|
||||
/// <exception cref="T:System.NotSupportedException">The <see cref="T:System.Collections.Generic.IDictionary`2" /> is read-only.</exception>
|
||||
// Token: 0x06000CF7 RID: 3319
|
||||
bool Remove(TKey key);
|
||||
|
||||
/// <summary>Gets the value associated with the specified key.</summary>
|
||||
/// <returns>true if the object that implements <see cref="T:System.Collections.Generic.IDictionary`2" /> contains an element with the specified key; otherwise, false.</returns>
|
||||
/// <param name="key">The key whose value to get.</param>
|
||||
/// <param name="value">When this method returns, the value associated with the specified key, if the key is found; otherwise, the default value for the type of the <paramref name="value" /> parameter. This parameter is passed uninitialized.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="key" /> is null.</exception>
|
||||
// Token: 0x06000CF8 RID: 3320
|
||||
bool TryGetValue(TKey key, out TValue value);
|
||||
|
||||
/// <summary>Gets or sets the element with the specified key.</summary>
|
||||
/// <returns>The element with the specified key.</returns>
|
||||
/// <param name="key">The key of the element to get or set.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="key" /> is null.</exception>
|
||||
/// <exception cref="T:System.Collections.Generic.KeyNotFoundException">The property is retrieved and <paramref name="key" /> is not found.</exception>
|
||||
/// <exception cref="T:System.NotSupportedException">The property is set and the <see cref="T:System.Collections.Generic.IDictionary`2" /> is read-only.</exception>
|
||||
// Token: 0x170001EF RID: 495
|
||||
TValue this[TKey key] { get; set; }
|
||||
|
||||
/// <summary>Gets an <see cref="T:System.Collections.Generic.ICollection`1" /> containing the keys of the <see cref="T:System.Collections.Generic.IDictionary`2" />.</summary>
|
||||
/// <returns>An <see cref="T:System.Collections.Generic.ICollection`1" /> containing the keys of the object that implements <see cref="T:System.Collections.Generic.IDictionary`2" />.</returns>
|
||||
// Token: 0x170001F0 RID: 496
|
||||
// (get) Token: 0x06000CFB RID: 3323
|
||||
ICollection<TKey> Keys { get; }
|
||||
|
||||
/// <summary>Gets an <see cref="T:System.Collections.Generic.ICollection`1" /> containing the values in the <see cref="T:System.Collections.Generic.IDictionary`2" />.</summary>
|
||||
/// <returns>An <see cref="T:System.Collections.Generic.ICollection`1" /> containing the values in the object that implements <see cref="T:System.Collections.Generic.IDictionary`2" />.</returns>
|
||||
// Token: 0x170001F1 RID: 497
|
||||
// (get) Token: 0x06000CFC RID: 3324
|
||||
ICollection<TValue> Values { get; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
using System;
|
||||
|
||||
namespace System.Collections.Generic
|
||||
{
|
||||
/// <summary>Exposes the enumerator, which supports a simple iteration over a collection of a specified type.</summary>
|
||||
/// <typeparam name="T">The type of objects to enumerate.</typeparam>
|
||||
/// <filterpriority>1</filterpriority>
|
||||
// Token: 0x0200001E RID: 30
|
||||
public interface IEnumerable<T> : IEnumerable
|
||||
{
|
||||
/// <summary>Returns an enumerator that iterates through the collection.</summary>
|
||||
/// <returns>A <see cref="T:System.Collections.Generic.IEnumerator`1" /> that can be used to iterate through the collection.</returns>
|
||||
/// <filterpriority>1</filterpriority>
|
||||
// Token: 0x0600027C RID: 636
|
||||
IEnumerator<T> GetEnumerator();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
using System;
|
||||
|
||||
namespace System.Collections.Generic
|
||||
{
|
||||
/// <summary>Supports a simple iteration over a generic collection.</summary>
|
||||
/// <typeparam name="T">The type of objects to enumerate.</typeparam>
|
||||
/// <filterpriority>1</filterpriority>
|
||||
// Token: 0x0200001A RID: 26
|
||||
public interface IEnumerator<T> : IEnumerator, IDisposable
|
||||
{
|
||||
/// <summary>Gets the element in the collection at the current position of the enumerator.</summary>
|
||||
/// <returns>The element in the collection at the current position of the enumerator.</returns>
|
||||
// Token: 0x17000008 RID: 8
|
||||
// (get) Token: 0x06000174 RID: 372
|
||||
T Current { get; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
using System;
|
||||
|
||||
namespace System.Collections.Generic
|
||||
{
|
||||
/// <summary>Defines methods to support the comparison of objects for equality.</summary>
|
||||
/// <typeparam name="T">The type of objects to compare.</typeparam>
|
||||
// Token: 0x0200010B RID: 267
|
||||
public interface IEqualityComparer<T>
|
||||
{
|
||||
/// <summary>Determines whether the specified objects are equal.</summary>
|
||||
/// <returns>true if the specified objects are equal; otherwise, false.</returns>
|
||||
/// <param name="x">The first object of type <paramref name="T" /> to compare.</param>
|
||||
/// <param name="y">The second object of type <paramref name="T" /> to compare.</param>
|
||||
// Token: 0x06000CFD RID: 3325
|
||||
bool Equals(T x, T y);
|
||||
|
||||
/// <summary>Returns a hash code for the specified object.</summary>
|
||||
/// <returns>A hash code for the specified object.</returns>
|
||||
/// <param name="obj">The <see cref="T:System.Object" /> for which a hash code is to be returned.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">The type of <paramref name="obj" /> is a reference type and <paramref name="obj" /> is null.</exception>
|
||||
// Token: 0x06000CFE RID: 3326
|
||||
int GetHashCode(T obj);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
using System;
|
||||
|
||||
namespace System.Collections.Generic
|
||||
{
|
||||
/// <summary>Represents a collection of objects that can be individually accessed by index.</summary>
|
||||
/// <typeparam name="T">The type of elements in the list.</typeparam>
|
||||
/// <filterpriority>1</filterpriority>
|
||||
// Token: 0x0200002F RID: 47
|
||||
public interface IList<T> : IEnumerable, ICollection<T>, IEnumerable<T>
|
||||
{
|
||||
/// <summary>Determines the index of a specific item in the <see cref="T:System.Collections.Generic.IList`1" />.</summary>
|
||||
/// <returns>The index of <paramref name="item" /> if found in the list; otherwise, -1.</returns>
|
||||
/// <param name="item">The object to locate in the <see cref="T:System.Collections.Generic.IList`1" />.</param>
|
||||
// Token: 0x060004AD RID: 1197
|
||||
int IndexOf(T item);
|
||||
|
||||
/// <summary>Inserts an item to the <see cref="T:System.Collections.Generic.IList`1" /> at the specified index.</summary>
|
||||
/// <param name="index">The zero-based index at which <paramref name="item" /> should be inserted.</param>
|
||||
/// <param name="item">The object to insert into the <see cref="T:System.Collections.Generic.IList`1" />.</param>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="index" /> is not a valid index in the <see cref="T:System.Collections.Generic.IList`1" />.</exception>
|
||||
/// <exception cref="T:System.NotSupportedException">The <see cref="T:System.Collections.Generic.IList`1" /> is read-only.</exception>
|
||||
// Token: 0x060004AE RID: 1198
|
||||
void Insert(int index, T item);
|
||||
|
||||
/// <summary>Removes the <see cref="T:System.Collections.Generic.IList`1" /> item at the specified index.</summary>
|
||||
/// <param name="index">The zero-based index of the item to remove.</param>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="index" /> is not a valid index in the <see cref="T:System.Collections.Generic.IList`1" />.</exception>
|
||||
/// <exception cref="T:System.NotSupportedException">The <see cref="T:System.Collections.Generic.IList`1" /> is read-only.</exception>
|
||||
// Token: 0x060004AF RID: 1199
|
||||
void RemoveAt(int index);
|
||||
|
||||
/// <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 not a valid index in the <see cref="T:System.Collections.Generic.IList`1" />.</exception>
|
||||
/// <exception cref="T:System.NotSupportedException">The property is set and the <see cref="T:System.Collections.Generic.IList`1" /> is read-only.</exception>
|
||||
// Token: 0x17000025 RID: 37
|
||||
T this[int index] { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
namespace System.Collections.Generic
|
||||
{
|
||||
/// <summary>The exception that is thrown when the key specified for accessing an element in a collection does not match any key in the collection.</summary>
|
||||
/// <filterpriority>1</filterpriority>
|
||||
// Token: 0x0200010C RID: 268
|
||||
[ComVisible(true)]
|
||||
[Serializable]
|
||||
public class KeyNotFoundException : SystemException, ISerializable
|
||||
{
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.Generic.KeyNotFoundException" /> class using default property values.</summary>
|
||||
// Token: 0x06000CFF RID: 3327 RVA: 0x00039E58 File Offset: 0x00038058
|
||||
public KeyNotFoundException()
|
||||
: base("The given key was not present in the dictionary.")
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.Generic.KeyNotFoundException" /> class with the specified error message.</summary>
|
||||
/// <param name="message">The message that describes the error.</param>
|
||||
// Token: 0x06000D00 RID: 3328 RVA: 0x00039E68 File Offset: 0x00038068
|
||||
public KeyNotFoundException(string message)
|
||||
: base(message)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.Generic.KeyNotFoundException" /> class with the specified error message and a reference to the inner exception that is the cause of this exception.</summary>
|
||||
/// <param name="message">The error message that explains the reason for the exception.</param>
|
||||
/// <param name="innerException">The exception that is the cause of the current exception. If the <paramref name="innerException" /> parameter is not null, the current exception is raised in a catch block that handles the inner exception.</param>
|
||||
// Token: 0x06000D01 RID: 3329 RVA: 0x00039E74 File Offset: 0x00038074
|
||||
public KeyNotFoundException(string message, Exception innerException)
|
||||
: base(message, innerException)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.Generic.KeyNotFoundException" /> class with serialized data.</summary>
|
||||
/// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo" /> that holds the serialized object data about the exception being thrown.</param>
|
||||
/// <param name="context">The <see cref="T:System.Runtime.Serialization.StreamingContext" /> that contains contextual information about the source or destination.</param>
|
||||
// Token: 0x06000D02 RID: 3330 RVA: 0x00039E80 File Offset: 0x00038080
|
||||
protected KeyNotFoundException(SerializationInfo info, StreamingContext context)
|
||||
: base(info, context)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,101 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace System.Collections.Generic
|
||||
{
|
||||
/// <summary>Defines a key/value pair that can be set or retrieved.</summary>
|
||||
/// <typeparam name="TKey">The type of the key.</typeparam>
|
||||
/// <typeparam name="TValue">The type of the value.</typeparam>
|
||||
/// <filterpriority>1</filterpriority>
|
||||
// Token: 0x0200010D RID: 269
|
||||
[DebuggerDisplay("{value}", Name = "[{key}]")]
|
||||
[Serializable]
|
||||
public struct KeyValuePair<TKey, TValue>
|
||||
{
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.Generic.KeyValuePair`2" /> structure with the specified key and value.</summary>
|
||||
/// <param name="key">The object defined in each key/value pair.</param>
|
||||
/// <param name="value">The definition associated with <paramref name="key" />.</param>
|
||||
// Token: 0x06000D03 RID: 3331 RVA: 0x00039E8C File Offset: 0x0003808C
|
||||
public KeyValuePair(TKey key, TValue value)
|
||||
{
|
||||
this.Key = key;
|
||||
this.Value = value;
|
||||
}
|
||||
|
||||
/// <summary>Gets the key in the key/value pair.</summary>
|
||||
/// <returns>A <paramref name="TKey" /> that is the key of the <see cref="T:System.Collections.Generic.KeyValuePair`2" />. </returns>
|
||||
// Token: 0x170001F2 RID: 498
|
||||
// (get) Token: 0x06000D04 RID: 3332 RVA: 0x00039E9C File Offset: 0x0003809C
|
||||
// (set) Token: 0x06000D05 RID: 3333 RVA: 0x00039EA4 File Offset: 0x000380A4
|
||||
public TKey Key
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.key;
|
||||
}
|
||||
private set
|
||||
{
|
||||
this.key = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets the value in the key/value pair.</summary>
|
||||
/// <returns>A <paramref name="TValue" /> that is the value of the <see cref="T:System.Collections.Generic.KeyValuePair`2" />. </returns>
|
||||
// Token: 0x170001F3 RID: 499
|
||||
// (get) Token: 0x06000D06 RID: 3334 RVA: 0x00039EB0 File Offset: 0x000380B0
|
||||
// (set) Token: 0x06000D07 RID: 3335 RVA: 0x00039EB8 File Offset: 0x000380B8
|
||||
public TValue Value
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.value;
|
||||
}
|
||||
private set
|
||||
{
|
||||
this.value = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Returns a string representation of the <see cref="T:System.Collections.Generic.KeyValuePair`2" />, using the string representations of the key and value.</summary>
|
||||
/// <returns>A string representation of the <see cref="T:System.Collections.Generic.KeyValuePair`2" />, which includes the string representations of the key and value.</returns>
|
||||
// Token: 0x06000D08 RID: 3336 RVA: 0x00039EC4 File Offset: 0x000380C4
|
||||
public override string ToString()
|
||||
{
|
||||
string[] array = new string[5];
|
||||
array[0] = "[";
|
||||
int num = 1;
|
||||
string text;
|
||||
if (this.Key != null)
|
||||
{
|
||||
TKey tkey = this.Key;
|
||||
text = tkey.ToString();
|
||||
}
|
||||
else
|
||||
{
|
||||
text = string.Empty;
|
||||
}
|
||||
array[num] = text;
|
||||
array[2] = ", ";
|
||||
int num2 = 3;
|
||||
string text2;
|
||||
if (this.Value != null)
|
||||
{
|
||||
TValue tvalue = this.Value;
|
||||
text2 = tvalue.ToString();
|
||||
}
|
||||
else
|
||||
{
|
||||
text2 = string.Empty;
|
||||
}
|
||||
array[num2] = text2;
|
||||
array[4] = "]";
|
||||
return string.Concat(array);
|
||||
}
|
||||
|
||||
// Token: 0x0400037C RID: 892
|
||||
private TKey key;
|
||||
|
||||
// Token: 0x0400037D RID: 893
|
||||
private TValue value;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
using System;
|
||||
|
||||
namespace System.Collections.Generic
|
||||
{
|
||||
// Token: 0x020000FE RID: 254
|
||||
internal struct Link
|
||||
{
|
||||
// Token: 0x04000360 RID: 864
|
||||
public int HashCode;
|
||||
|
||||
// Token: 0x04000361 RID: 865
|
||||
public int Next;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,1370 @@
|
||||
using System;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace System.Collections.Generic
|
||||
{
|
||||
/// <summary>Represents a strongly typed list of objects that can be accessed by index. Provides methods to search, sort, and manipulate lists.</summary>
|
||||
/// <typeparam name="T">The type of elements in the list.</typeparam>
|
||||
/// <filterpriority>1</filterpriority>
|
||||
// Token: 0x0200010E RID: 270
|
||||
[DebuggerTypeProxy(typeof(CollectionDebuggerView<>))]
|
||||
[DebuggerDisplay("Count={Count}")]
|
||||
[Serializable]
|
||||
public class List<T> : IEnumerable, ICollection, IList, ICollection<T>, IEnumerable<T>, IList<T>
|
||||
{
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.Generic.List`1" /> class that is empty and has the default initial capacity.</summary>
|
||||
// Token: 0x06000D09 RID: 3337 RVA: 0x00039F58 File Offset: 0x00038158
|
||||
public List()
|
||||
{
|
||||
this._items = List<T>.EmptyArray;
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.Generic.List`1" /> class that contains elements copied from the specified collection and has sufficient capacity to accommodate the number of elements copied.</summary>
|
||||
/// <param name="collection">The collection whose elements are copied to the new list.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="collection" /> is null.</exception>
|
||||
// Token: 0x06000D0A RID: 3338 RVA: 0x00039F6C File Offset: 0x0003816C
|
||||
public List(IEnumerable<T> collection)
|
||||
{
|
||||
this.CheckCollection(collection);
|
||||
ICollection<T> collection2 = collection as ICollection<T>;
|
||||
if (collection2 == null)
|
||||
{
|
||||
this._items = List<T>.EmptyArray;
|
||||
this.AddEnumerable(collection);
|
||||
}
|
||||
else
|
||||
{
|
||||
this._items = new T[collection2.Count];
|
||||
this.AddCollection(collection2);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.Generic.List`1" /> class that is empty and has the specified initial capacity.</summary>
|
||||
/// <param name="capacity">The number of elements that the new list can initially store.</param>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="capacity" /> is less than 0. </exception>
|
||||
// Token: 0x06000D0B RID: 3339 RVA: 0x00039FC4 File Offset: 0x000381C4
|
||||
public List(int capacity)
|
||||
{
|
||||
if (capacity < 0)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException("capacity");
|
||||
}
|
||||
this._items = new T[capacity];
|
||||
}
|
||||
|
||||
// Token: 0x06000D0C RID: 3340 RVA: 0x00039FF8 File Offset: 0x000381F8
|
||||
internal List(T[] data, int size)
|
||||
{
|
||||
this._items = data;
|
||||
this._size = size;
|
||||
}
|
||||
|
||||
// Token: 0x06000D0E RID: 3342 RVA: 0x0003A020 File Offset: 0x00038220
|
||||
IEnumerator<T> IEnumerable<T>.GetEnumerator()
|
||||
{
|
||||
return this.GetEnumerator();
|
||||
}
|
||||
|
||||
/// <summary>Copies the elements of the <see cref="T:System.Collections.ICollection" /> to an <see cref="T:System.Array" />, starting at a particular <see cref="T:System.Array" /> index.</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.ICollection" />. The <see cref="T:System.Array" /> must have zero-based indexing.</param>
|
||||
/// <param name="arrayIndex">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="arrayIndex" /> is less than 0.</exception>
|
||||
/// <exception cref="T:System.ArgumentException">
|
||||
/// <paramref name="array" /> is multidimensional.-or-<paramref name="array" /> does not have zero-based indexing.-or-The number of elements in the source <see cref="T:System.Collections.ICollection" /> is greater than the available space from <paramref name="arrayIndex" /> to the end of the destination <paramref name="array" />.-or-The type of the source <see cref="T:System.Collections.ICollection" /> cannot be cast automatically to the type of the destination <paramref name="array" />.</exception>
|
||||
// Token: 0x06000D0F RID: 3343 RVA: 0x0003A030 File Offset: 0x00038230
|
||||
void ICollection.CopyTo(Array array, int arrayIndex)
|
||||
{
|
||||
Array.Copy(this._items, 0, array, arrayIndex, this._size);
|
||||
}
|
||||
|
||||
/// <summary>Returns an enumerator that iterates through a collection.</summary>
|
||||
/// <returns>An <see cref="T:System.Collections.IEnumerator" /> that can be used to iterate through the collection.</returns>
|
||||
// Token: 0x06000D10 RID: 3344 RVA: 0x0003A048 File Offset: 0x00038248
|
||||
IEnumerator IEnumerable.GetEnumerator()
|
||||
{
|
||||
return this.GetEnumerator();
|
||||
}
|
||||
|
||||
/// <summary>Adds an item to the <see cref="T:System.Collections.IList" />.</summary>
|
||||
/// <returns>The position into which the new element was inserted.</returns>
|
||||
/// <param name="item">The <see cref="T:System.Object" /> to add to the <see cref="T:System.Collections.IList" />.</param>
|
||||
/// <exception cref="T:System.ArgumentException">
|
||||
/// <paramref name="item" /> is of a type that is not assignable to the <see cref="T:System.Collections.IList" />.</exception>
|
||||
// Token: 0x06000D11 RID: 3345 RVA: 0x0003A058 File Offset: 0x00038258
|
||||
int IList.Add(object item)
|
||||
{
|
||||
try
|
||||
{
|
||||
this.Add((T)((object)item));
|
||||
return this._size - 1;
|
||||
}
|
||||
catch (NullReferenceException)
|
||||
{
|
||||
}
|
||||
catch (InvalidCastException)
|
||||
{
|
||||
}
|
||||
throw new ArgumentException("item");
|
||||
}
|
||||
|
||||
/// <summary>Determines whether the <see cref="T:System.Collections.IList" /> contains a specific value.</summary>
|
||||
/// <returns>true if <paramref name="item" /> is found in the <see cref="T:System.Collections.IList" />; otherwise, false.</returns>
|
||||
/// <param name="item">The <see cref="T:System.Object" /> to locate in the <see cref="T:System.Collections.IList" />.</param>
|
||||
// Token: 0x06000D12 RID: 3346 RVA: 0x0003A0D0 File Offset: 0x000382D0
|
||||
bool IList.Contains(object item)
|
||||
{
|
||||
try
|
||||
{
|
||||
return this.Contains((T)((object)item));
|
||||
}
|
||||
catch (NullReferenceException)
|
||||
{
|
||||
}
|
||||
catch (InvalidCastException)
|
||||
{
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/// <summary>Determines the index of a specific item in the <see cref="T:System.Collections.IList" />.</summary>
|
||||
/// <returns>The index of <paramref name="item" /> if found in the list; otherwise, –1.</returns>
|
||||
/// <param name="item">The object to locate in the <see cref="T:System.Collections.IList" />.</param>
|
||||
/// <exception cref="T:System.ArgumentException">
|
||||
/// <paramref name="item" /> is of a type that is not assignable to the <see cref="T:System.Collections.IList" />.</exception>
|
||||
// Token: 0x06000D13 RID: 3347 RVA: 0x0003A138 File Offset: 0x00038338
|
||||
int IList.IndexOf(object item)
|
||||
{
|
||||
try
|
||||
{
|
||||
return this.IndexOf((T)((object)item));
|
||||
}
|
||||
catch (NullReferenceException)
|
||||
{
|
||||
}
|
||||
catch (InvalidCastException)
|
||||
{
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
/// <summary>Inserts an item to the <see cref="T:System.Collections.IList" /> at the specified index.</summary>
|
||||
/// <param name="index">The zero-based index at which <paramref name="item" /> should be inserted.</param>
|
||||
/// <param name="item">The object to insert into the <see cref="T:System.Collections.IList" />.</param>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="index" /> is not a valid index in the <see cref="T:System.Collections.IList" />. </exception>
|
||||
/// <exception cref="T:System.ArgumentException">
|
||||
/// <paramref name="item" /> is of a type that is not assignable to the <see cref="T:System.Collections.IList" />.</exception>
|
||||
// Token: 0x06000D14 RID: 3348 RVA: 0x0003A1A0 File Offset: 0x000383A0
|
||||
void IList.Insert(int index, object item)
|
||||
{
|
||||
this.CheckIndex(index);
|
||||
try
|
||||
{
|
||||
this.Insert(index, (T)((object)item));
|
||||
return;
|
||||
}
|
||||
catch (NullReferenceException)
|
||||
{
|
||||
}
|
||||
catch (InvalidCastException)
|
||||
{
|
||||
}
|
||||
throw new ArgumentException("item");
|
||||
}
|
||||
|
||||
/// <summary>Removes the first occurrence of a specific object from the <see cref="T:System.Collections.IList" />.</summary>
|
||||
/// <param name="item">The object to remove from the <see cref="T:System.Collections.IList" />.</param>
|
||||
/// <exception cref="T:System.ArgumentException">
|
||||
/// <paramref name="item" /> is of a type that is not assignable to the <see cref="T:System.Collections.IList" />.</exception>
|
||||
// Token: 0x06000D15 RID: 3349 RVA: 0x0003A218 File Offset: 0x00038418
|
||||
void IList.Remove(object item)
|
||||
{
|
||||
try
|
||||
{
|
||||
this.Remove((T)((object)item));
|
||||
}
|
||||
catch (NullReferenceException)
|
||||
{
|
||||
}
|
||||
catch (InvalidCastException)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170001F4 RID: 500
|
||||
// (get) Token: 0x06000D16 RID: 3350 RVA: 0x0003A27C File Offset: 0x0003847C
|
||||
bool ICollection<T>.IsReadOnly
|
||||
{
|
||||
get
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a value indicating whether access to the <see cref="T:System.Collections.ICollection" /> is synchronized (thread safe).</summary>
|
||||
/// <returns>true if access to the <see cref="T:System.Collections.ICollection" /> is synchronized (thread safe); otherwise, false. In the default implementation of <see cref="T:System.Collections.Generic.List`1" />, this property always returns false.</returns>
|
||||
// Token: 0x170001F5 RID: 501
|
||||
// (get) Token: 0x06000D17 RID: 3351 RVA: 0x0003A280 File Offset: 0x00038480
|
||||
bool ICollection.IsSynchronized
|
||||
{
|
||||
get
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets an object that can be used to synchronize access to the <see cref="T:System.Collections.ICollection" />.</summary>
|
||||
/// <returns>An object that can be used to synchronize access to the <see cref="T:System.Collections.ICollection" />. In the default implementation of <see cref="T:System.Collections.Generic.List`1" />, this property always returns the current instance.</returns>
|
||||
// Token: 0x170001F6 RID: 502
|
||||
// (get) Token: 0x06000D18 RID: 3352 RVA: 0x0003A284 File Offset: 0x00038484
|
||||
object ICollection.SyncRoot
|
||||
{
|
||||
get
|
||||
{
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a value indicating whether the <see cref="T:System.Collections.IList" /> has a fixed size.</summary>
|
||||
/// <returns>true if the <see cref="T:System.Collections.IList" /> has a fixed size; otherwise, false. In the default implementation of <see cref="T:System.Collections.Generic.List`1" />, this property always returns false.</returns>
|
||||
// Token: 0x170001F7 RID: 503
|
||||
// (get) Token: 0x06000D19 RID: 3353 RVA: 0x0003A288 File Offset: 0x00038488
|
||||
bool IList.IsFixedSize
|
||||
{
|
||||
get
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a value indicating whether the <see cref="T:System.Collections.IList" /> is read-only.</summary>
|
||||
/// <returns>true if the <see cref="T:System.Collections.IList" /> is read-only; otherwise, false. In the default implementation of <see cref="T:System.Collections.Generic.List`1" />, this property always returns false.</returns>
|
||||
// Token: 0x170001F8 RID: 504
|
||||
// (get) Token: 0x06000D1A RID: 3354 RVA: 0x0003A28C File Offset: 0x0003848C
|
||||
bool IList.IsReadOnly
|
||||
{
|
||||
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 not a valid index in the <see cref="T:System.Collections.IList" />.</exception>
|
||||
/// <exception cref="T:System.ArgumentException">The property is set and <paramref name="value" /> is of a type that is not assignable to the <see cref="T:System.Collections.IList" />.</exception>
|
||||
// Token: 0x170001F9 RID: 505
|
||||
object IList.this[int index]
|
||||
{
|
||||
get
|
||||
{
|
||||
return this[index];
|
||||
}
|
||||
set
|
||||
{
|
||||
try
|
||||
{
|
||||
this[index] = (T)((object)value);
|
||||
return;
|
||||
}
|
||||
catch (NullReferenceException)
|
||||
{
|
||||
}
|
||||
catch (InvalidCastException)
|
||||
{
|
||||
}
|
||||
throw new ArgumentException("value");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Adds an object to the end of the <see cref="T:System.Collections.Generic.List`1" />.</summary>
|
||||
/// <param name="item">The object to be added to the end of the <see cref="T:System.Collections.Generic.List`1" />. The value can be null for reference types.</param>
|
||||
// Token: 0x06000D1D RID: 3357 RVA: 0x0003A310 File Offset: 0x00038510
|
||||
public void Add(T item)
|
||||
{
|
||||
if (this._size == this._items.Length)
|
||||
{
|
||||
this.GrowIfNeeded(1);
|
||||
}
|
||||
this._items[this._size++] = item;
|
||||
this._version++;
|
||||
}
|
||||
|
||||
// Token: 0x06000D1E RID: 3358 RVA: 0x0003A364 File Offset: 0x00038564
|
||||
private void GrowIfNeeded(int newCount)
|
||||
{
|
||||
int num = this._size + newCount;
|
||||
if (num > this._items.Length)
|
||||
{
|
||||
this.Capacity = Math.Max(Math.Max(this.Capacity * 2, 4), num);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000D1F RID: 3359 RVA: 0x0003A3A4 File Offset: 0x000385A4
|
||||
private void CheckRange(int idx, int count)
|
||||
{
|
||||
if (idx < 0)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException("index");
|
||||
}
|
||||
if (count < 0)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException("count");
|
||||
}
|
||||
if (idx + count > this._size)
|
||||
{
|
||||
throw new ArgumentException("index and count exceed length of list");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000D20 RID: 3360 RVA: 0x0003A3E4 File Offset: 0x000385E4
|
||||
private void AddCollection(ICollection<T> collection)
|
||||
{
|
||||
int count = collection.Count;
|
||||
if (count == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
this.GrowIfNeeded(count);
|
||||
collection.CopyTo(this._items, this._size);
|
||||
this._size += count;
|
||||
}
|
||||
|
||||
// Token: 0x06000D21 RID: 3361 RVA: 0x0003A428 File Offset: 0x00038628
|
||||
private void AddEnumerable(IEnumerable<T> enumerable)
|
||||
{
|
||||
foreach (T t in enumerable)
|
||||
{
|
||||
this.Add(t);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Adds the elements of the specified collection to the end of the <see cref="T:System.Collections.Generic.List`1" />.</summary>
|
||||
/// <param name="collection">The collection whose elements should be added to the end of the <see cref="T:System.Collections.Generic.List`1" />. The collection itself cannot be null, but it can contain elements that are null, if type <paramref name="T" /> is a reference type.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="collection" /> is null.</exception>
|
||||
// Token: 0x06000D22 RID: 3362 RVA: 0x0003A488 File Offset: 0x00038688
|
||||
public void AddRange(IEnumerable<T> collection)
|
||||
{
|
||||
this.CheckCollection(collection);
|
||||
ICollection<T> collection2 = collection as ICollection<T>;
|
||||
if (collection2 != null)
|
||||
{
|
||||
this.AddCollection(collection2);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.AddEnumerable(collection);
|
||||
}
|
||||
this._version++;
|
||||
}
|
||||
|
||||
/// <summary>Returns a read-only <see cref="T:System.Collections.Generic.IList`1" /> wrapper for the current collection.</summary>
|
||||
/// <returns>A <see cref="T:System.Collections.ObjectModel.ReadOnlyCollection`1" /> that acts as a read-only wrapper around the current <see cref="T:System.Collections.Generic.List`1" />.</returns>
|
||||
// Token: 0x06000D23 RID: 3363 RVA: 0x0003A4CC File Offset: 0x000386CC
|
||||
public ReadOnlyCollection<T> AsReadOnly()
|
||||
{
|
||||
return new ReadOnlyCollection<T>(this);
|
||||
}
|
||||
|
||||
/// <summary>Searches the entire sorted <see cref="T:System.Collections.Generic.List`1" /> for an element using the default comparer and returns the zero-based index of the element.</summary>
|
||||
/// <returns>The zero-based index of <paramref name="item" /> in the sorted <see cref="T:System.Collections.Generic.List`1" />, if <paramref name="item" /> is found; otherwise, a negative number that is the bitwise complement of the index of the next element that is larger than <paramref name="item" /> or, if there is no larger element, the bitwise complement of <see cref="P:System.Collections.Generic.List`1.Count" />.</returns>
|
||||
/// <param name="item">The object to locate. The value can be null for reference types.</param>
|
||||
/// <exception cref="T:System.InvalidOperationException">The default comparer <see cref="P:System.Collections.Generic.Comparer`1.Default" /> cannot find an implementation of the <see cref="T:System.IComparable`1" /> generic interface or the <see cref="T:System.IComparable" /> interface for type <paramref name="T" />.</exception>
|
||||
// Token: 0x06000D24 RID: 3364 RVA: 0x0003A4D4 File Offset: 0x000386D4
|
||||
public int BinarySearch(T item)
|
||||
{
|
||||
return Array.BinarySearch<T>(this._items, 0, this._size, item);
|
||||
}
|
||||
|
||||
/// <summary>Searches the entire sorted <see cref="T:System.Collections.Generic.List`1" /> for an element using the specified comparer and returns the zero-based index of the element.</summary>
|
||||
/// <returns>The zero-based index of <paramref name="item" /> in the sorted <see cref="T:System.Collections.Generic.List`1" />, if <paramref name="item" /> is found; otherwise, a negative number that is the bitwise complement of the index of the next element that is larger than <paramref name="item" /> or, if there is no larger element, the bitwise complement of <see cref="P:System.Collections.Generic.List`1.Count" />.</returns>
|
||||
/// <param name="item">The object to locate. The value can be null for reference types.</param>
|
||||
/// <param name="comparer">The <see cref="T:System.Collections.Generic.IComparer`1" /> implementation to use when comparing elements.-or-null to use the default comparer <see cref="P:System.Collections.Generic.Comparer`1.Default" />.</param>
|
||||
/// <exception cref="T:System.InvalidOperationException">
|
||||
/// <paramref name="comparer" /> is null, and the default comparer <see cref="P:System.Collections.Generic.Comparer`1.Default" /> cannot find an implementation of the <see cref="T:System.IComparable`1" /> generic interface or the <see cref="T:System.IComparable" /> interface for type <paramref name="T" />.</exception>
|
||||
// Token: 0x06000D25 RID: 3365 RVA: 0x0003A4EC File Offset: 0x000386EC
|
||||
public int BinarySearch(T item, IComparer<T> comparer)
|
||||
{
|
||||
return Array.BinarySearch<T>(this._items, 0, this._size, item, comparer);
|
||||
}
|
||||
|
||||
/// <summary>Searches a range of elements in the sorted <see cref="T:System.Collections.Generic.List`1" /> for an element using the specified comparer and returns the zero-based index of the element.</summary>
|
||||
/// <returns>The zero-based index of <paramref name="item" /> in the sorted <see cref="T:System.Collections.Generic.List`1" />, if <paramref name="item" /> is found; otherwise, a negative number that is the bitwise complement of the index of the next element that is larger than <paramref name="item" /> or, if there is no larger element, the bitwise complement of <see cref="P:System.Collections.Generic.List`1.Count" />.</returns>
|
||||
/// <param name="index">The zero-based starting index of the range to search.</param>
|
||||
/// <param name="count">The length of the range to search.</param>
|
||||
/// <param name="item">The object to locate. The value can be null for reference types.</param>
|
||||
/// <param name="comparer">The <see cref="T:System.Collections.Generic.IComparer`1" /> implementation to use when comparing elements, or null to use the default comparer <see cref="P:System.Collections.Generic.Comparer`1.Default" />.</param>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="index" /> is less than 0.-or-<paramref name="count" /> is less than 0. </exception>
|
||||
/// <exception cref="T:System.ArgumentException">
|
||||
/// <paramref name="index" /> and <paramref name="count" /> do not denote a valid range in the <see cref="T:System.Collections.Generic.List`1" />.</exception>
|
||||
/// <exception cref="T:System.InvalidOperationException">
|
||||
/// <paramref name="comparer" /> is null, and the default comparer <see cref="P:System.Collections.Generic.Comparer`1.Default" /> cannot find an implementation of the <see cref="T:System.IComparable`1" /> generic interface or the <see cref="T:System.IComparable" /> interface for type <paramref name="T" />.</exception>
|
||||
// Token: 0x06000D26 RID: 3366 RVA: 0x0003A504 File Offset: 0x00038704
|
||||
public int BinarySearch(int index, int count, T item, IComparer<T> comparer)
|
||||
{
|
||||
this.CheckRange(index, count);
|
||||
return Array.BinarySearch<T>(this._items, index, count, item, comparer);
|
||||
}
|
||||
|
||||
/// <summary>Removes all elements from the <see cref="T:System.Collections.Generic.List`1" />.</summary>
|
||||
// Token: 0x06000D27 RID: 3367 RVA: 0x0003A52C File Offset: 0x0003872C
|
||||
public void Clear()
|
||||
{
|
||||
Array.Clear(this._items, 0, this._items.Length);
|
||||
this._size = 0;
|
||||
this._version++;
|
||||
}
|
||||
|
||||
/// <summary>Determines whether an element is in the <see cref="T:System.Collections.Generic.List`1" />.</summary>
|
||||
/// <returns>true if <paramref name="item" /> is found in the <see cref="T:System.Collections.Generic.List`1" />; otherwise, false.</returns>
|
||||
/// <param name="item">The object to locate in the <see cref="T:System.Collections.Generic.List`1" />. The value can be null for reference types.</param>
|
||||
// Token: 0x06000D28 RID: 3368 RVA: 0x0003A558 File Offset: 0x00038758
|
||||
public bool Contains(T item)
|
||||
{
|
||||
return Array.IndexOf<T>(this._items, item, 0, this._size) != -1;
|
||||
}
|
||||
|
||||
/// <summary>Converts the elements in the current <see cref="T:System.Collections.Generic.List`1" /> to another type, and returns a list containing the converted elements.</summary>
|
||||
/// <returns>A <see cref="T:System.Collections.Generic.List`1" /> of the target type containing the converted elements from the current <see cref="T:System.Collections.Generic.List`1" />.</returns>
|
||||
/// <param name="converter">A <see cref="T:System.Converter`2" /> delegate that converts each element from one type to another type.</param>
|
||||
/// <typeparam name="TOutput">The type of the elements of the target array.</typeparam>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="converter" /> is null.</exception>
|
||||
// Token: 0x06000D29 RID: 3369 RVA: 0x0003A574 File Offset: 0x00038774
|
||||
public List<TOutput> ConvertAll<TOutput>(Converter<T, TOutput> converter)
|
||||
{
|
||||
if (converter == null)
|
||||
{
|
||||
throw new ArgumentNullException("converter");
|
||||
}
|
||||
List<TOutput> list = new List<TOutput>(this._size);
|
||||
for (int i = 0; i < this._size; i++)
|
||||
{
|
||||
list._items[i] = converter(this._items[i]);
|
||||
}
|
||||
list._size = this._size;
|
||||
return list;
|
||||
}
|
||||
|
||||
/// <summary>Copies the entire <see cref="T:System.Collections.Generic.List`1" /> to a compatible one-dimensional array, starting at the beginning 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.Generic.List`1" />. The <see cref="T:System.Array" /> must have zero-based indexing.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="array" /> is null.</exception>
|
||||
/// <exception cref="T:System.ArgumentException">The number of elements in the source <see cref="T:System.Collections.Generic.List`1" /> is greater than the number of elements that the destination <paramref name="array" /> can contain.</exception>
|
||||
// Token: 0x06000D2A RID: 3370 RVA: 0x0003A5E0 File Offset: 0x000387E0
|
||||
public void CopyTo(T[] array)
|
||||
{
|
||||
Array.Copy(this._items, 0, array, 0, this._size);
|
||||
}
|
||||
|
||||
/// <summary>Copies the entire <see cref="T:System.Collections.Generic.List`1" /> to a compatible one-dimensional 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.Generic.List`1" />. The <see cref="T:System.Array" /> must have zero-based indexing.</param>
|
||||
/// <param name="arrayIndex">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="arrayIndex" /> is less than 0.</exception>
|
||||
/// <exception cref="T:System.ArgumentException">The number of elements in the source <see cref="T:System.Collections.Generic.List`1" /> is greater than the available space from <paramref name="arrayIndex" /> to the end of the destination <paramref name="array" />.</exception>
|
||||
// Token: 0x06000D2B RID: 3371 RVA: 0x0003A5F8 File Offset: 0x000387F8
|
||||
public void CopyTo(T[] array, int arrayIndex)
|
||||
{
|
||||
Array.Copy(this._items, 0, array, arrayIndex, this._size);
|
||||
}
|
||||
|
||||
/// <summary>Copies a range of elements from the <see cref="T:System.Collections.Generic.List`1" /> to a compatible one-dimensional array, starting at the specified index of the target array.</summary>
|
||||
/// <param name="index">The zero-based index in the source <see cref="T:System.Collections.Generic.List`1" /> at which copying begins.</param>
|
||||
/// <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.Generic.List`1" />. The <see cref="T:System.Array" /> must have zero-based indexing.</param>
|
||||
/// <param name="arrayIndex">The zero-based index in <paramref name="array" /> at which copying begins.</param>
|
||||
/// <param name="count">The number of elements to copy.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="array" /> is null. </exception>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="index" /> is less than 0.-or-<paramref name="arrayIndex" /> is less than 0.-or-<paramref name="count" /> is less than 0. </exception>
|
||||
/// <exception cref="T:System.ArgumentException">
|
||||
/// <paramref name="index" /> is equal to or greater than the <see cref="P:System.Collections.Generic.List`1.Count" /> of the source <see cref="T:System.Collections.Generic.List`1" />.-or-The number of elements from <paramref name="index" /> to the end of the source <see cref="T:System.Collections.Generic.List`1" /> is greater than the available space from <paramref name="arrayIndex" /> to the end of the destination <paramref name="array" />. </exception>
|
||||
// Token: 0x06000D2C RID: 3372 RVA: 0x0003A610 File Offset: 0x00038810
|
||||
public void CopyTo(int index, T[] array, int arrayIndex, int count)
|
||||
{
|
||||
this.CheckRange(index, count);
|
||||
Array.Copy(this._items, index, array, arrayIndex, count);
|
||||
}
|
||||
|
||||
/// <summary>Determines whether the <see cref="T:System.Collections.Generic.List`1" /> contains elements that match the conditions defined by the specified predicate.</summary>
|
||||
/// <returns>true if the <see cref="T:System.Collections.Generic.List`1" /> contains one or more elements that match the conditions defined by the specified predicate; otherwise, false.</returns>
|
||||
/// <param name="match">The <see cref="T:System.Predicate`1" /> delegate that defines the conditions of the elements to search for.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="match" /> is null.</exception>
|
||||
// Token: 0x06000D2D RID: 3373 RVA: 0x0003A638 File Offset: 0x00038838
|
||||
public bool Exists(Predicate<T> match)
|
||||
{
|
||||
List<T>.CheckMatch(match);
|
||||
return this.GetIndex(0, this._size, match) != -1;
|
||||
}
|
||||
|
||||
/// <summary>Searches for an element that matches the conditions defined by the specified predicate, and returns the first occurrence within the entire <see cref="T:System.Collections.Generic.List`1" />.</summary>
|
||||
/// <returns>The first element that matches the conditions defined by the specified predicate, if found; otherwise, the default value for type <paramref name="T" />.</returns>
|
||||
/// <param name="match">The <see cref="T:System.Predicate`1" /> delegate that defines the conditions of the element to search for.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="match" /> is null.</exception>
|
||||
// Token: 0x06000D2E RID: 3374 RVA: 0x0003A654 File Offset: 0x00038854
|
||||
public T Find(Predicate<T> match)
|
||||
{
|
||||
List<T>.CheckMatch(match);
|
||||
int index = this.GetIndex(0, this._size, match);
|
||||
return (index == -1) ? default(T) : this._items[index];
|
||||
}
|
||||
|
||||
// Token: 0x06000D2F RID: 3375 RVA: 0x0003A698 File Offset: 0x00038898
|
||||
private static void CheckMatch(Predicate<T> match)
|
||||
{
|
||||
if (match == null)
|
||||
{
|
||||
throw new ArgumentNullException("match");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Retrieves all the elements that match the conditions defined by the specified predicate.</summary>
|
||||
/// <returns>A <see cref="T:System.Collections.Generic.List`1" /> containing all the elements that match the conditions defined by the specified predicate, if found; otherwise, an empty <see cref="T:System.Collections.Generic.List`1" />.</returns>
|
||||
/// <param name="match">The <see cref="T:System.Predicate`1" /> delegate that defines the conditions of the elements to search for.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="match" /> is null.</exception>
|
||||
// Token: 0x06000D30 RID: 3376 RVA: 0x0003A6AC File Offset: 0x000388AC
|
||||
public List<T> FindAll(Predicate<T> match)
|
||||
{
|
||||
List<T>.CheckMatch(match);
|
||||
if (this._size <= 65536)
|
||||
{
|
||||
return this.FindAllStackBits(match);
|
||||
}
|
||||
return this.FindAllList(match);
|
||||
}
|
||||
|
||||
// Token: 0x06000D31 RID: 3377 RVA: 0x0003A6D4 File Offset: 0x000388D4
|
||||
private unsafe List<T> FindAllStackBits(Predicate<T> match)
|
||||
{
|
||||
uint* ptr;
|
||||
uint* ptr2;
|
||||
int num;
|
||||
uint num2;
|
||||
checked
|
||||
{
|
||||
ptr = stackalloc uint[unchecked(this._size / 32 + 1) * 4];
|
||||
ptr2 = ptr;
|
||||
num = 0;
|
||||
num2 = 2147483648U;
|
||||
}
|
||||
for (int i = 0; i < this._size; i++)
|
||||
{
|
||||
if (match(this._items[i]))
|
||||
{
|
||||
*ptr2 |= num2;
|
||||
num++;
|
||||
}
|
||||
num2 >>= 1;
|
||||
if (num2 == 0U)
|
||||
{
|
||||
ptr2++;
|
||||
num2 = 2147483648U;
|
||||
}
|
||||
}
|
||||
T[] array = new T[num];
|
||||
num2 = 2147483648U;
|
||||
ptr2 = ptr;
|
||||
int num3 = 0;
|
||||
int num4 = 0;
|
||||
while (num4 < this._size && num3 < num)
|
||||
{
|
||||
if ((*ptr2 & num2) == num2)
|
||||
{
|
||||
array[num3++] = this._items[num4];
|
||||
}
|
||||
num2 >>= 1;
|
||||
if (num2 == 0U)
|
||||
{
|
||||
ptr2++;
|
||||
num2 = 2147483648U;
|
||||
}
|
||||
num4++;
|
||||
}
|
||||
return new List<T>(array, num);
|
||||
}
|
||||
|
||||
// Token: 0x06000D32 RID: 3378 RVA: 0x0003A7C8 File Offset: 0x000389C8
|
||||
private List<T> FindAllList(Predicate<T> match)
|
||||
{
|
||||
List<T> list = new List<T>();
|
||||
for (int i = 0; i < this._size; i++)
|
||||
{
|
||||
if (match(this._items[i]))
|
||||
{
|
||||
list.Add(this._items[i]);
|
||||
}
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
/// <summary>Searches for an element that matches the conditions defined by the specified predicate, and returns the zero-based index of the first occurrence within the entire <see cref="T:System.Collections.Generic.List`1" />.</summary>
|
||||
/// <returns>The zero-based index of the first occurrence of an element that matches the conditions defined by <paramref name="match" />, if found; otherwise, –1.</returns>
|
||||
/// <param name="match">The <see cref="T:System.Predicate`1" /> delegate that defines the conditions of the element to search for.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="match" /> is null.</exception>
|
||||
// Token: 0x06000D33 RID: 3379 RVA: 0x0003A81C File Offset: 0x00038A1C
|
||||
public int FindIndex(Predicate<T> match)
|
||||
{
|
||||
List<T>.CheckMatch(match);
|
||||
return this.GetIndex(0, this._size, match);
|
||||
}
|
||||
|
||||
/// <summary>Searches for an element that matches the conditions defined by the specified predicate, and returns the zero-based index of the first occurrence within the range of elements in the <see cref="T:System.Collections.Generic.List`1" /> that extends from the specified index to the last element.</summary>
|
||||
/// <returns>The zero-based index of the first occurrence of an element that matches the conditions defined by <paramref name="match" />, if found; otherwise, –1.</returns>
|
||||
/// <param name="startIndex">The zero-based starting index of the search.</param>
|
||||
/// <param name="match">The <see cref="T:System.Predicate`1" /> delegate that defines the conditions of the element to search for.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="match" /> is null.</exception>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="startIndex" /> is outside the range of valid indexes for the <see cref="T:System.Collections.Generic.List`1" />.</exception>
|
||||
// Token: 0x06000D34 RID: 3380 RVA: 0x0003A834 File Offset: 0x00038A34
|
||||
public int FindIndex(int startIndex, Predicate<T> match)
|
||||
{
|
||||
List<T>.CheckMatch(match);
|
||||
this.CheckIndex(startIndex);
|
||||
return this.GetIndex(startIndex, this._size - startIndex, match);
|
||||
}
|
||||
|
||||
/// <summary>Searches for an element that matches the conditions defined by the specified predicate, and returns the zero-based index of the first occurrence within the range of elements in the <see cref="T:System.Collections.Generic.List`1" /> that starts at the specified index and contains the specified number of elements.</summary>
|
||||
/// <returns>The zero-based index of the first occurrence of an element that matches the conditions defined by <paramref name="match" />, if found; otherwise, –1.</returns>
|
||||
/// <param name="startIndex">The zero-based starting index of the search.</param>
|
||||
/// <param name="count">The number of elements in the section to search.</param>
|
||||
/// <param name="match">The <see cref="T:System.Predicate`1" /> delegate that defines the conditions of the element to search for.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="match" /> is null.</exception>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="startIndex" /> is outside the range of valid indexes for the <see cref="T:System.Collections.Generic.List`1" />.-or-<paramref name="count" /> is less than 0.-or-<paramref name="startIndex" /> and <paramref name="count" /> do not specify a valid section in the <see cref="T:System.Collections.Generic.List`1" />.</exception>
|
||||
// Token: 0x06000D35 RID: 3381 RVA: 0x0003A860 File Offset: 0x00038A60
|
||||
public int FindIndex(int startIndex, int count, Predicate<T> match)
|
||||
{
|
||||
List<T>.CheckMatch(match);
|
||||
this.CheckRange(startIndex, count);
|
||||
return this.GetIndex(startIndex, count, match);
|
||||
}
|
||||
|
||||
// Token: 0x06000D36 RID: 3382 RVA: 0x0003A884 File Offset: 0x00038A84
|
||||
private int GetIndex(int startIndex, int count, Predicate<T> match)
|
||||
{
|
||||
int num = startIndex + count;
|
||||
for (int i = startIndex; i < num; i++)
|
||||
{
|
||||
if (match(this._items[i]))
|
||||
{
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
/// <summary>Searches for an element that matches the conditions defined by the specified predicate, and returns the last occurrence within the entire <see cref="T:System.Collections.Generic.List`1" />.</summary>
|
||||
/// <returns>The last element that matches the conditions defined by the specified predicate, if found; otherwise, the default value for type <paramref name="T" />.</returns>
|
||||
/// <param name="match">The <see cref="T:System.Predicate`1" /> delegate that defines the conditions of the element to search for.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="match" /> is null.</exception>
|
||||
// Token: 0x06000D37 RID: 3383 RVA: 0x0003A8C4 File Offset: 0x00038AC4
|
||||
public T FindLast(Predicate<T> match)
|
||||
{
|
||||
List<T>.CheckMatch(match);
|
||||
int lastIndex = this.GetLastIndex(0, this._size, match);
|
||||
return (lastIndex != -1) ? this[lastIndex] : default(T);
|
||||
}
|
||||
|
||||
/// <summary>Searches for an element that matches the conditions defined by the specified predicate, and returns the zero-based index of the last occurrence within the entire <see cref="T:System.Collections.Generic.List`1" />.</summary>
|
||||
/// <returns>The zero-based index of the last occurrence of an element that matches the conditions defined by <paramref name="match" />, if found; otherwise, –1.</returns>
|
||||
/// <param name="match">The <see cref="T:System.Predicate`1" /> delegate that defines the conditions of the element to search for.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="match" /> is null.</exception>
|
||||
// Token: 0x06000D38 RID: 3384 RVA: 0x0003A904 File Offset: 0x00038B04
|
||||
public int FindLastIndex(Predicate<T> match)
|
||||
{
|
||||
List<T>.CheckMatch(match);
|
||||
return this.GetLastIndex(0, this._size, match);
|
||||
}
|
||||
|
||||
/// <summary>Searches for an element that matches the conditions defined by the specified predicate, and returns the zero-based index of the last occurrence within the range of elements in the <see cref="T:System.Collections.Generic.List`1" /> that extends from the first element to the specified index.</summary>
|
||||
/// <returns>The zero-based index of the last occurrence of an element that matches the conditions defined by <paramref name="match" />, if found; otherwise, –1.</returns>
|
||||
/// <param name="startIndex">The zero-based starting index of the backward search.</param>
|
||||
/// <param name="match">The <see cref="T:System.Predicate`1" /> delegate that defines the conditions of the element to search for.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="match" /> is null.</exception>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="startIndex" /> is outside the range of valid indexes for the <see cref="T:System.Collections.Generic.List`1" />.</exception>
|
||||
// Token: 0x06000D39 RID: 3385 RVA: 0x0003A91C File Offset: 0x00038B1C
|
||||
public int FindLastIndex(int startIndex, Predicate<T> match)
|
||||
{
|
||||
List<T>.CheckMatch(match);
|
||||
this.CheckIndex(startIndex);
|
||||
return this.GetLastIndex(0, startIndex + 1, match);
|
||||
}
|
||||
|
||||
/// <summary>Searches for an element that matches the conditions defined by the specified predicate, and returns the zero-based index of the last occurrence within the range of elements in the <see cref="T:System.Collections.Generic.List`1" /> that contains the specified number of elements and ends at the specified index.</summary>
|
||||
/// <returns>The zero-based index of the last occurrence of an element that matches the conditions defined by <paramref name="match" />, if found; otherwise, –1.</returns>
|
||||
/// <param name="startIndex">The zero-based starting index of the backward search.</param>
|
||||
/// <param name="count">The number of elements in the section to search.</param>
|
||||
/// <param name="match">The <see cref="T:System.Predicate`1" /> delegate that defines the conditions of the element to search for.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="match" /> is null.</exception>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="startIndex" /> is outside the range of valid indexes for the <see cref="T:System.Collections.Generic.List`1" />.-or-<paramref name="count" /> is less than 0.-or-<paramref name="startIndex" /> and <paramref name="count" /> do not specify a valid section in the <see cref="T:System.Collections.Generic.List`1" />.</exception>
|
||||
// Token: 0x06000D3A RID: 3386 RVA: 0x0003A944 File Offset: 0x00038B44
|
||||
public int FindLastIndex(int startIndex, int count, Predicate<T> match)
|
||||
{
|
||||
List<T>.CheckMatch(match);
|
||||
int num = startIndex - count + 1;
|
||||
this.CheckRange(num, count);
|
||||
return this.GetLastIndex(num, count, match);
|
||||
}
|
||||
|
||||
// Token: 0x06000D3B RID: 3387 RVA: 0x0003A970 File Offset: 0x00038B70
|
||||
private int GetLastIndex(int startIndex, int count, Predicate<T> match)
|
||||
{
|
||||
int num = startIndex + count;
|
||||
while (num != startIndex)
|
||||
{
|
||||
if (match(this._items[--num]))
|
||||
{
|
||||
return num;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
/// <summary>Performs the specified action on each element of the <see cref="T:System.Collections.Generic.List`1" />.</summary>
|
||||
/// <param name="action">The <see cref="T:System.Action`1" /> delegate to perform on each element of the <see cref="T:System.Collections.Generic.List`1" />.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="action" /> is null.</exception>
|
||||
// Token: 0x06000D3C RID: 3388 RVA: 0x0003A9AC File Offset: 0x00038BAC
|
||||
public void ForEach(Action<T> action)
|
||||
{
|
||||
if (action == null)
|
||||
{
|
||||
throw new ArgumentNullException("action");
|
||||
}
|
||||
for (int i = 0; i < this._size; i++)
|
||||
{
|
||||
action(this._items[i]);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Returns an enumerator that iterates through the <see cref="T:System.Collections.Generic.List`1" />.</summary>
|
||||
/// <returns>A <see cref="T:System.Collections.Generic.List`1.Enumerator" /> for the <see cref="T:System.Collections.Generic.List`1" />.</returns>
|
||||
// Token: 0x06000D3D RID: 3389 RVA: 0x0003A9F4 File Offset: 0x00038BF4
|
||||
public List<T>.Enumerator GetEnumerator()
|
||||
{
|
||||
return new List<T>.Enumerator(this);
|
||||
}
|
||||
|
||||
/// <summary>Creates a shallow copy of a range of elements in the source <see cref="T:System.Collections.Generic.List`1" />.</summary>
|
||||
/// <returns>A shallow copy of a range of elements in the source <see cref="T:System.Collections.Generic.List`1" />.</returns>
|
||||
/// <param name="index">The zero-based <see cref="T:System.Collections.Generic.List`1" /> index at which the range starts.</param>
|
||||
/// <param name="count">The number of elements in the range.</param>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="index" /> is less than 0.-or-<paramref name="count" /> is less than 0.</exception>
|
||||
/// <exception cref="T:System.ArgumentException">
|
||||
/// <paramref name="index" /> and <paramref name="count" /> do not denote a valid range of elements in the <see cref="T:System.Collections.Generic.List`1" />.</exception>
|
||||
// Token: 0x06000D3E RID: 3390 RVA: 0x0003A9FC File Offset: 0x00038BFC
|
||||
public List<T> GetRange(int index, int count)
|
||||
{
|
||||
this.CheckRange(index, count);
|
||||
T[] array = new T[count];
|
||||
Array.Copy(this._items, index, array, 0, count);
|
||||
return new List<T>(array, count);
|
||||
}
|
||||
|
||||
/// <summary>Searches for the specified object and returns the zero-based index of the first occurrence within the entire <see cref="T:System.Collections.Generic.List`1" />.</summary>
|
||||
/// <returns>The zero-based index of the first occurrence of <paramref name="item" /> within the entire <see cref="T:System.Collections.Generic.List`1" />, if found; otherwise, –1.</returns>
|
||||
/// <param name="item">The object to locate in the <see cref="T:System.Collections.Generic.List`1" />. The value can be null for reference types.</param>
|
||||
// Token: 0x06000D3F RID: 3391 RVA: 0x0003AA30 File Offset: 0x00038C30
|
||||
public int IndexOf(T item)
|
||||
{
|
||||
return Array.IndexOf<T>(this._items, item, 0, this._size);
|
||||
}
|
||||
|
||||
/// <summary>Searches for the specified object and returns the zero-based index of the first occurrence within the range of elements in the <see cref="T:System.Collections.Generic.List`1" /> that extends from the specified index to the last element.</summary>
|
||||
/// <returns>The zero-based index of the first occurrence of <paramref name="item" /> within the range of elements in the <see cref="T:System.Collections.Generic.List`1" /> that extends from <paramref name="index" /> to the last element, if found; otherwise, –1.</returns>
|
||||
/// <param name="item">The object to locate in the <see cref="T:System.Collections.Generic.List`1" />. The value can be null for reference types.</param>
|
||||
/// <param name="index">The zero-based starting index of the search. 0 (zero) is valid in an empty list.</param>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="index" /> is outside the range of valid indexes for the <see cref="T:System.Collections.Generic.List`1" />.</exception>
|
||||
// Token: 0x06000D40 RID: 3392 RVA: 0x0003AA48 File Offset: 0x00038C48
|
||||
public int IndexOf(T item, int index)
|
||||
{
|
||||
this.CheckIndex(index);
|
||||
return Array.IndexOf<T>(this._items, item, index, this._size - index);
|
||||
}
|
||||
|
||||
/// <summary>Searches for the specified object and returns the zero-based index of the first occurrence within the range of elements in the <see cref="T:System.Collections.Generic.List`1" /> that starts at the specified index and contains the specified number of elements.</summary>
|
||||
/// <returns>The zero-based index of the first occurrence of <paramref name="item" /> within the range of elements in the <see cref="T:System.Collections.Generic.List`1" /> that starts at <paramref name="index" /> and contains <paramref name="count" /> number of elements, if found; otherwise, –1.</returns>
|
||||
/// <param name="item">The object to locate in the <see cref="T:System.Collections.Generic.List`1" />. The value can be null for reference types.</param>
|
||||
/// <param name="index">The zero-based starting index of the search. 0 (zero) is valid in an empty list.</param>
|
||||
/// <param name="count">The number of elements in the section to search.</param>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="index" /> is outside the range of valid indexes for the <see cref="T:System.Collections.Generic.List`1" />.-or-<paramref name="count" /> is less than 0.-or-<paramref name="index" /> and <paramref name="count" /> do not specify a valid section in the <see cref="T:System.Collections.Generic.List`1" />.</exception>
|
||||
// Token: 0x06000D41 RID: 3393 RVA: 0x0003AA74 File Offset: 0x00038C74
|
||||
public int IndexOf(T item, int index, int count)
|
||||
{
|
||||
if (index < 0)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException("index");
|
||||
}
|
||||
if (count < 0)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException("count");
|
||||
}
|
||||
if (index + count > this._size)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException("index and count exceed length of list");
|
||||
}
|
||||
return Array.IndexOf<T>(this._items, item, index, count);
|
||||
}
|
||||
|
||||
// Token: 0x06000D42 RID: 3394 RVA: 0x0003AACC File Offset: 0x00038CCC
|
||||
private void Shift(int start, int delta)
|
||||
{
|
||||
if (delta < 0)
|
||||
{
|
||||
start -= delta;
|
||||
}
|
||||
if (start < this._size)
|
||||
{
|
||||
Array.Copy(this._items, start, this._items, start + delta, this._size - start);
|
||||
}
|
||||
this._size += delta;
|
||||
if (delta < 0)
|
||||
{
|
||||
Array.Clear(this._items, this._size, -delta);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000D43 RID: 3395 RVA: 0x0003AB38 File Offset: 0x00038D38
|
||||
private void CheckIndex(int index)
|
||||
{
|
||||
if (index < 0 || index > this._size)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException("index");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Inserts an element into the <see cref="T:System.Collections.Generic.List`1" /> at the specified index.</summary>
|
||||
/// <param name="index">The zero-based index at which <paramref name="item" /> should be inserted.</param>
|
||||
/// <param name="item">The object to insert. The value can be null for reference types.</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.Generic.List`1.Count" />.</exception>
|
||||
// Token: 0x06000D44 RID: 3396 RVA: 0x0003AB58 File Offset: 0x00038D58
|
||||
public void Insert(int index, T item)
|
||||
{
|
||||
this.CheckIndex(index);
|
||||
if (this._size == this._items.Length)
|
||||
{
|
||||
this.GrowIfNeeded(1);
|
||||
}
|
||||
this.Shift(index, 1);
|
||||
this._items[index] = item;
|
||||
this._version++;
|
||||
}
|
||||
|
||||
// Token: 0x06000D45 RID: 3397 RVA: 0x0003ABAC File Offset: 0x00038DAC
|
||||
private void CheckCollection(IEnumerable<T> collection)
|
||||
{
|
||||
if (collection == null)
|
||||
{
|
||||
throw new ArgumentNullException("collection");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Inserts the elements of a collection into the <see cref="T:System.Collections.Generic.List`1" /> at the specified index.</summary>
|
||||
/// <param name="index">The zero-based index at which the new elements should be inserted.</param>
|
||||
/// <param name="collection">The collection whose elements should be inserted into the <see cref="T:System.Collections.Generic.List`1" />. The collection itself cannot be null, but it can contain elements that are null, if type <paramref name="T" /> is a reference type.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="collection" /> is null.</exception>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="index" /> is less than 0.-or-<paramref name="index" /> is greater than <see cref="P:System.Collections.Generic.List`1.Count" />.</exception>
|
||||
// Token: 0x06000D46 RID: 3398 RVA: 0x0003ABC0 File Offset: 0x00038DC0
|
||||
public void InsertRange(int index, IEnumerable<T> collection)
|
||||
{
|
||||
this.CheckCollection(collection);
|
||||
this.CheckIndex(index);
|
||||
if (collection == this)
|
||||
{
|
||||
T[] array = new T[this._size];
|
||||
this.CopyTo(array, 0);
|
||||
this.GrowIfNeeded(this._size);
|
||||
this.Shift(index, array.Length);
|
||||
Array.Copy(array, 0, this._items, index, array.Length);
|
||||
}
|
||||
else
|
||||
{
|
||||
ICollection<T> collection2 = collection as ICollection<T>;
|
||||
if (collection2 != null)
|
||||
{
|
||||
this.InsertCollection(index, collection2);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.InsertEnumeration(index, collection);
|
||||
}
|
||||
}
|
||||
this._version++;
|
||||
}
|
||||
|
||||
// Token: 0x06000D47 RID: 3399 RVA: 0x0003AC54 File Offset: 0x00038E54
|
||||
private void InsertCollection(int index, ICollection<T> collection)
|
||||
{
|
||||
int count = collection.Count;
|
||||
this.GrowIfNeeded(count);
|
||||
this.Shift(index, count);
|
||||
collection.CopyTo(this._items, index);
|
||||
}
|
||||
|
||||
// Token: 0x06000D48 RID: 3400 RVA: 0x0003AC84 File Offset: 0x00038E84
|
||||
private void InsertEnumeration(int index, IEnumerable<T> enumerable)
|
||||
{
|
||||
foreach (T t in enumerable)
|
||||
{
|
||||
this.Insert(index++, t);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Searches for the specified object and returns the zero-based index of the last occurrence within the entire <see cref="T:System.Collections.Generic.List`1" />.</summary>
|
||||
/// <returns>The zero-based index of the last occurrence of <paramref name="item" /> within the entire the <see cref="T:System.Collections.Generic.List`1" />, if found; otherwise, –1.</returns>
|
||||
/// <param name="item">The object to locate in the <see cref="T:System.Collections.Generic.List`1" />. The value can be null for reference types.</param>
|
||||
// Token: 0x06000D49 RID: 3401 RVA: 0x0003ACE8 File Offset: 0x00038EE8
|
||||
public int LastIndexOf(T item)
|
||||
{
|
||||
return Array.LastIndexOf<T>(this._items, item, this._size - 1, this._size);
|
||||
}
|
||||
|
||||
/// <summary>Searches for the specified object and returns the zero-based index of the last occurrence within the range of elements in the <see cref="T:System.Collections.Generic.List`1" /> that extends from the first element to the specified index.</summary>
|
||||
/// <returns>The zero-based index of the last occurrence of <paramref name="item" /> within the range of elements in the <see cref="T:System.Collections.Generic.List`1" /> that extends from the first element to <paramref name="index" />, if found; otherwise, –1.</returns>
|
||||
/// <param name="item">The object to locate in the <see cref="T:System.Collections.Generic.List`1" />. The value can be null for reference types.</param>
|
||||
/// <param name="index">The zero-based starting index of the backward search.</param>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="index" /> is outside the range of valid indexes for the <see cref="T:System.Collections.Generic.List`1" />. </exception>
|
||||
// Token: 0x06000D4A RID: 3402 RVA: 0x0003AD04 File Offset: 0x00038F04
|
||||
public int LastIndexOf(T item, int index)
|
||||
{
|
||||
this.CheckIndex(index);
|
||||
return Array.LastIndexOf<T>(this._items, item, index, index + 1);
|
||||
}
|
||||
|
||||
/// <summary>Searches for the specified object and returns the zero-based index of the last occurrence within the range of elements in the <see cref="T:System.Collections.Generic.List`1" /> that contains the specified number of elements and ends at the specified index.</summary>
|
||||
/// <returns>The zero-based index of the last occurrence of <paramref name="item" /> within the range of elements in the <see cref="T:System.Collections.Generic.List`1" /> that contains <paramref name="count" /> number of elements and ends at <paramref name="index" />, if found; otherwise, –1.</returns>
|
||||
/// <param name="item">The object to locate in the <see cref="T:System.Collections.Generic.List`1" />. The value can be null for reference types.</param>
|
||||
/// <param name="index">The zero-based starting index of the backward search.</param>
|
||||
/// <param name="count">The number of elements in the section to search.</param>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="index" /> is outside the range of valid indexes for the <see cref="T:System.Collections.Generic.List`1" />.-or-<paramref name="count" /> is less than 0.-or-<paramref name="index" /> and <paramref name="count" /> do not specify a valid section in the <see cref="T:System.Collections.Generic.List`1" />. </exception>
|
||||
// Token: 0x06000D4B RID: 3403 RVA: 0x0003AD28 File Offset: 0x00038F28
|
||||
public int LastIndexOf(T item, int index, int count)
|
||||
{
|
||||
if (index < 0)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException("index", index, "index is negative");
|
||||
}
|
||||
if (count < 0)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException("count", count, "count is negative");
|
||||
}
|
||||
if (index - count + 1 < 0)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException("cound", count, "count is too large");
|
||||
}
|
||||
return Array.LastIndexOf<T>(this._items, item, index, count);
|
||||
}
|
||||
|
||||
/// <summary>Removes the first occurrence of a specific object from the <see cref="T:System.Collections.Generic.List`1" />.</summary>
|
||||
/// <returns>true if <paramref name="item" /> is successfully removed; otherwise, false. This method also returns false if <paramref name="item" /> was not found in the <see cref="T:System.Collections.Generic.List`1" />.</returns>
|
||||
/// <param name="item">The object to remove from the <see cref="T:System.Collections.Generic.List`1" />. The value can be null for reference types.</param>
|
||||
// Token: 0x06000D4C RID: 3404 RVA: 0x0003ADA0 File Offset: 0x00038FA0
|
||||
public bool Remove(T item)
|
||||
{
|
||||
int num = this.IndexOf(item);
|
||||
if (num != -1)
|
||||
{
|
||||
this.RemoveAt(num);
|
||||
}
|
||||
return num != -1;
|
||||
}
|
||||
|
||||
/// <summary>Removes all the elements that match the conditions defined by the specified predicate.</summary>
|
||||
/// <returns>The number of elements removed from the <see cref="T:System.Collections.Generic.List`1" /> .</returns>
|
||||
/// <param name="match">The <see cref="T:System.Predicate`1" /> delegate that defines the conditions of the elements to remove.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="match" /> is null.</exception>
|
||||
// Token: 0x06000D4D RID: 3405 RVA: 0x0003ADCC File Offset: 0x00038FCC
|
||||
public int RemoveAll(Predicate<T> match)
|
||||
{
|
||||
List<T>.CheckMatch(match);
|
||||
int i;
|
||||
for (i = 0; i < this._size; i++)
|
||||
{
|
||||
if (match(this._items[i]))
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (i == this._size)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
this._version++;
|
||||
int j;
|
||||
for (j = i + 1; j < this._size; j++)
|
||||
{
|
||||
if (!match(this._items[j]))
|
||||
{
|
||||
this._items[i++] = this._items[j];
|
||||
}
|
||||
}
|
||||
if (j - i > 0)
|
||||
{
|
||||
Array.Clear(this._items, i, j - i);
|
||||
}
|
||||
this._size = i;
|
||||
return j - i;
|
||||
}
|
||||
|
||||
/// <summary>Removes the element at the specified index of the <see cref="T:System.Collections.Generic.List`1" />.</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.Generic.List`1.Count" />.</exception>
|
||||
// Token: 0x06000D4E RID: 3406 RVA: 0x0003AEA0 File Offset: 0x000390A0
|
||||
public void RemoveAt(int index)
|
||||
{
|
||||
if (index < 0 || index >= this._size)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException("index");
|
||||
}
|
||||
this.Shift(index, -1);
|
||||
Array.Clear(this._items, this._size, 1);
|
||||
this._version++;
|
||||
}
|
||||
|
||||
/// <summary>Removes a range of elements from the <see cref="T:System.Collections.Generic.List`1" />.</summary>
|
||||
/// <param name="index">The zero-based starting index of the range of elements to remove.</param>
|
||||
/// <param name="count">The number of elements to remove.</param>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="index" /> is less than 0.-or-<paramref name="count" /> is less than 0.</exception>
|
||||
/// <exception cref="T:System.ArgumentException">
|
||||
/// <paramref name="index" /> and <paramref name="count" /> do not denote a valid range of elements in the <see cref="T:System.Collections.Generic.List`1" />.</exception>
|
||||
// Token: 0x06000D4F RID: 3407 RVA: 0x0003AEF4 File Offset: 0x000390F4
|
||||
public void RemoveRange(int index, int count)
|
||||
{
|
||||
this.CheckRange(index, count);
|
||||
if (count > 0)
|
||||
{
|
||||
this.Shift(index, -count);
|
||||
Array.Clear(this._items, this._size, count);
|
||||
this._version++;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Reverses the order of the elements in the entire <see cref="T:System.Collections.Generic.List`1" />.</summary>
|
||||
// Token: 0x06000D50 RID: 3408 RVA: 0x0003AF3C File Offset: 0x0003913C
|
||||
public void Reverse()
|
||||
{
|
||||
Array.Reverse(this._items, 0, this._size);
|
||||
this._version++;
|
||||
}
|
||||
|
||||
/// <summary>Reverses the order of the elements in the specified range.</summary>
|
||||
/// <param name="index">The zero-based starting index of the range to reverse.</param>
|
||||
/// <param name="count">The number of elements in the range to reverse.</param>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="index" /> is less than 0.-or-<paramref name="count" /> is less than 0. </exception>
|
||||
/// <exception cref="T:System.ArgumentException">
|
||||
/// <paramref name="index" /> and <paramref name="count" /> do not denote a valid range of elements in the <see cref="T:System.Collections.Generic.List`1" />. </exception>
|
||||
// Token: 0x06000D51 RID: 3409 RVA: 0x0003AF6C File Offset: 0x0003916C
|
||||
public void Reverse(int index, int count)
|
||||
{
|
||||
this.CheckRange(index, count);
|
||||
Array.Reverse(this._items, index, count);
|
||||
this._version++;
|
||||
}
|
||||
|
||||
/// <summary>Sorts the elements in the entire <see cref="T:System.Collections.Generic.List`1" /> using the default comparer.</summary>
|
||||
/// <exception cref="T:System.InvalidOperationException">The default comparer <see cref="P:System.Collections.Generic.Comparer`1.Default" /> cannot find an implementation of the <see cref="T:System.IComparable`1" /> generic interface or the <see cref="T:System.IComparable" /> interface for type <paramref name="T" />.</exception>
|
||||
// Token: 0x06000D52 RID: 3410 RVA: 0x0003AF9C File Offset: 0x0003919C
|
||||
public void Sort()
|
||||
{
|
||||
Array.Sort<T>(this._items, 0, this._size, Comparer<T>.Default);
|
||||
this._version++;
|
||||
}
|
||||
|
||||
/// <summary>Sorts the elements in the entire <see cref="T:System.Collections.Generic.List`1" /> using the specified comparer.</summary>
|
||||
/// <param name="comparer">The <see cref="T:System.Collections.Generic.IComparer`1" /> implementation to use when comparing elements, or null to use the default comparer <see cref="P:System.Collections.Generic.Comparer`1.Default" />.</param>
|
||||
/// <exception cref="T:System.InvalidOperationException">
|
||||
/// <paramref name="comparer" /> is null, and the default comparer <see cref="P:System.Collections.Generic.Comparer`1.Default" /> cannot find implementation of the <see cref="T:System.IComparable`1" /> generic interface or the <see cref="T:System.IComparable" /> interface for type <paramref name="T" />.</exception>
|
||||
/// <exception cref="T:System.ArgumentException">The implementation of <paramref name="comparer" /> caused an error during the sort. For example, <paramref name="comparer" /> might not return 0 when comparing an item with itself.</exception>
|
||||
// Token: 0x06000D53 RID: 3411 RVA: 0x0003AFC4 File Offset: 0x000391C4
|
||||
public void Sort(IComparer<T> comparer)
|
||||
{
|
||||
Array.Sort<T>(this._items, 0, this._size, comparer);
|
||||
this._version++;
|
||||
}
|
||||
|
||||
/// <summary>Sorts the elements in the entire <see cref="T:System.Collections.Generic.List`1" /> using the specified <see cref="T:System.Comparison`1" />.</summary>
|
||||
/// <param name="comparison">The <see cref="T:System.Comparison`1" /> to use when comparing elements.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="comparison" /> is null.</exception>
|
||||
/// <exception cref="T:System.ArgumentException">The implementation of <paramref name="comparison" /> caused an error during the sort. For example, <paramref name="comparison" /> might not return 0 when comparing an item with itself.</exception>
|
||||
// Token: 0x06000D54 RID: 3412 RVA: 0x0003AFE8 File Offset: 0x000391E8
|
||||
public void Sort(Comparison<T> comparison)
|
||||
{
|
||||
Array.Sort<T>(this._items, this._size, comparison);
|
||||
this._version++;
|
||||
}
|
||||
|
||||
/// <summary>Sorts the elements in a range of elements in <see cref="T:System.Collections.Generic.List`1" /> using the specified comparer.</summary>
|
||||
/// <param name="index">The zero-based starting index of the range to sort.</param>
|
||||
/// <param name="count">The length of the range to sort.</param>
|
||||
/// <param name="comparer">The <see cref="T:System.Collections.Generic.IComparer`1" /> implementation to use when comparing elements, or null to use the default comparer <see cref="P:System.Collections.Generic.Comparer`1.Default" />.</param>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="index" /> is less than 0.-or-<paramref name="count" /> is less than 0.</exception>
|
||||
/// <exception cref="T:System.ArgumentException">
|
||||
/// <paramref name="index" /> and <paramref name="count" /> do not specify a valid range in the <see cref="T:System.Collections.Generic.List`1" />.-or-The implementation of <paramref name="comparer" /> caused an error during the sort. For example, <paramref name="comparer" /> might not return 0 when comparing an item with itself.</exception>
|
||||
/// <exception cref="T:System.InvalidOperationException">
|
||||
/// <paramref name="comparer" /> is null, and the default comparer <see cref="P:System.Collections.Generic.Comparer`1.Default" /> cannot find implementation of the <see cref="T:System.IComparable`1" /> generic interface or the <see cref="T:System.IComparable" /> interface for type <paramref name="T" />.</exception>
|
||||
// Token: 0x06000D55 RID: 3413 RVA: 0x0003B018 File Offset: 0x00039218
|
||||
public void Sort(int index, int count, IComparer<T> comparer)
|
||||
{
|
||||
this.CheckRange(index, count);
|
||||
Array.Sort<T>(this._items, index, count, comparer);
|
||||
this._version++;
|
||||
}
|
||||
|
||||
/// <summary>Copies the elements of the <see cref="T:System.Collections.Generic.List`1" /> to a new array.</summary>
|
||||
/// <returns>An array containing copies of the elements of the <see cref="T:System.Collections.Generic.List`1" />.</returns>
|
||||
// Token: 0x06000D56 RID: 3414 RVA: 0x0003B04C File Offset: 0x0003924C
|
||||
public T[] ToArray()
|
||||
{
|
||||
T[] array = new T[this._size];
|
||||
Array.Copy(this._items, array, this._size);
|
||||
return array;
|
||||
}
|
||||
|
||||
/// <summary>Sets the capacity to the actual number of elements in the <see cref="T:System.Collections.Generic.List`1" />, if that number is less than a threshold value.</summary>
|
||||
// Token: 0x06000D57 RID: 3415 RVA: 0x0003B078 File Offset: 0x00039278
|
||||
public void TrimExcess()
|
||||
{
|
||||
this.Capacity = this._size;
|
||||
}
|
||||
|
||||
/// <summary>Determines whether every element in the <see cref="T:System.Collections.Generic.List`1" /> matches the conditions defined by the specified predicate.</summary>
|
||||
/// <returns>true if every element in the <see cref="T:System.Collections.Generic.List`1" /> matches the conditions defined by the specified predicate; otherwise, false. If the list has no elements, the return value is true.</returns>
|
||||
/// <param name="match">The <see cref="T:System.Predicate`1" /> delegate that defines the conditions to check against the elements.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="match" /> is null.</exception>
|
||||
// Token: 0x06000D58 RID: 3416 RVA: 0x0003B088 File Offset: 0x00039288
|
||||
public bool TrueForAll(Predicate<T> match)
|
||||
{
|
||||
List<T>.CheckMatch(match);
|
||||
for (int i = 0; i < this._size; i++)
|
||||
{
|
||||
if (!match(this._items[i]))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>Gets or sets the total number of elements the internal data structure can hold without resizing.</summary>
|
||||
/// <returns>The number of elements that the <see cref="T:System.Collections.Generic.List`1" /> can contain before resizing is required.</returns>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <see cref="P:System.Collections.Generic.List`1.Capacity" /> is set to a value that is less than <see cref="P:System.Collections.Generic.List`1.Count" />. </exception>
|
||||
/// <exception cref="T:System.OutOfMemoryException">There is not enough memory available on the system.</exception>
|
||||
// Token: 0x170001FA RID: 506
|
||||
// (get) Token: 0x06000D59 RID: 3417 RVA: 0x0003B0CC File Offset: 0x000392CC
|
||||
// (set) Token: 0x06000D5A RID: 3418 RVA: 0x0003B0D8 File Offset: 0x000392D8
|
||||
public int Capacity
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._items.Length;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (value < this._size)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException();
|
||||
}
|
||||
Array.Resize<T>(ref this._items, value);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets the number of elements actually contained in the <see cref="T:System.Collections.Generic.List`1" />.</summary>
|
||||
/// <returns>The number of elements actually contained in the <see cref="T:System.Collections.Generic.List`1" />.</returns>
|
||||
// Token: 0x170001FB RID: 507
|
||||
// (get) Token: 0x06000D5B RID: 3419 RVA: 0x0003B0F8 File Offset: 0x000392F8
|
||||
public int Count
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._size;
|
||||
}
|
||||
}
|
||||
|
||||
/// <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.Generic.List`1.Count" />. </exception>
|
||||
// Token: 0x170001FC RID: 508
|
||||
public T this[int index]
|
||||
{
|
||||
get
|
||||
{
|
||||
if (index >= this._size)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException("index");
|
||||
}
|
||||
return this._items[index];
|
||||
}
|
||||
set
|
||||
{
|
||||
this.CheckIndex(index);
|
||||
if (index == this._size)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException("index");
|
||||
}
|
||||
this._items[index] = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0400037E RID: 894
|
||||
private const int DefaultCapacity = 4;
|
||||
|
||||
// Token: 0x0400037F RID: 895
|
||||
private T[] _items;
|
||||
|
||||
// Token: 0x04000380 RID: 896
|
||||
private int _size;
|
||||
|
||||
// Token: 0x04000381 RID: 897
|
||||
private int _version;
|
||||
|
||||
// Token: 0x04000382 RID: 898
|
||||
private static readonly T[] EmptyArray = new T[0];
|
||||
|
||||
/// <summary>Enumerates the elements of a <see cref="T:System.Collections.Generic.List`1" />.</summary>
|
||||
// Token: 0x0200010F RID: 271
|
||||
[Serializable]
|
||||
public struct Enumerator : IEnumerator, IDisposable, IEnumerator<T>
|
||||
{
|
||||
// Token: 0x06000D5E RID: 3422 RVA: 0x0003B158 File Offset: 0x00039358
|
||||
internal Enumerator(List<T> l)
|
||||
{
|
||||
this.l = l;
|
||||
this.ver = l._version;
|
||||
}
|
||||
|
||||
/// <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: 0x06000D5F RID: 3423 RVA: 0x0003B170 File Offset: 0x00039370
|
||||
void IEnumerator.Reset()
|
||||
{
|
||||
this.VerifyState();
|
||||
this.next = 0;
|
||||
}
|
||||
|
||||
/// <summary>Gets the element at the current position of the enumerator.</summary>
|
||||
/// <returns>The element in the <see cref="T:System.Collections.Generic.List`1" /> at the current position of the enumerator.</returns>
|
||||
/// <exception cref="T:System.InvalidOperationException">The enumerator is positioned before the first element of the collection or after the last element. </exception>
|
||||
// Token: 0x170001FD RID: 509
|
||||
// (get) Token: 0x06000D60 RID: 3424 RVA: 0x0003B180 File Offset: 0x00039380
|
||||
object IEnumerator.Current
|
||||
{
|
||||
get
|
||||
{
|
||||
this.VerifyState();
|
||||
if (this.next <= 0)
|
||||
{
|
||||
throw new InvalidOperationException();
|
||||
}
|
||||
return this.current;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Releases all resources used by the <see cref="T:System.Collections.Generic.List`1.Enumerator" />.</summary>
|
||||
// Token: 0x06000D61 RID: 3425 RVA: 0x0003B1A8 File Offset: 0x000393A8
|
||||
public void Dispose()
|
||||
{
|
||||
this.l = null;
|
||||
}
|
||||
|
||||
// Token: 0x06000D62 RID: 3426 RVA: 0x0003B1B4 File Offset: 0x000393B4
|
||||
private void VerifyState()
|
||||
{
|
||||
if (this.l == null)
|
||||
{
|
||||
throw new ObjectDisposedException(base.GetType().FullName);
|
||||
}
|
||||
if (this.ver != this.l._version)
|
||||
{
|
||||
throw new InvalidOperationException("Collection was modified; enumeration operation may not execute.");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Advances the enumerator to the next element of the <see cref="T:System.Collections.Generic.List`1" />.</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: 0x06000D63 RID: 3427 RVA: 0x0003B208 File Offset: 0x00039408
|
||||
public bool MoveNext()
|
||||
{
|
||||
this.VerifyState();
|
||||
if (this.next < 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (this.next < this.l._size)
|
||||
{
|
||||
this.current = this.l._items[this.next++];
|
||||
return true;
|
||||
}
|
||||
this.next = -1;
|
||||
return false;
|
||||
}
|
||||
|
||||
/// <summary>Gets the element at the current position of the enumerator.</summary>
|
||||
/// <returns>The element in the <see cref="T:System.Collections.Generic.List`1" /> at the current position of the enumerator.</returns>
|
||||
// Token: 0x170001FE RID: 510
|
||||
// (get) Token: 0x06000D64 RID: 3428 RVA: 0x0003B270 File Offset: 0x00039470
|
||||
public T Current
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.current;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04000383 RID: 899
|
||||
private List<T> l;
|
||||
|
||||
// Token: 0x04000384 RID: 900
|
||||
private int next;
|
||||
|
||||
// Token: 0x04000385 RID: 901
|
||||
private int ver;
|
||||
|
||||
// Token: 0x04000386 RID: 902
|
||||
private T current;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,1587 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Runtime.ConstrainedExecution;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
namespace System.Collections
|
||||
{
|
||||
/// <summary>Represents a collection of key/value pairs that are organized based on the hash code of the key.</summary>
|
||||
/// <filterpriority>1</filterpriority>
|
||||
// Token: 0x0200012A RID: 298
|
||||
[DebuggerDisplay("Count={Count}")]
|
||||
[ComVisible(true)]
|
||||
[DebuggerTypeProxy(typeof(CollectionDebuggerView))]
|
||||
[Serializable]
|
||||
public class Hashtable : IEnumerable, ICloneable, ISerializable, ICollection, IDictionary, IDeserializationCallback
|
||||
{
|
||||
/// <summary>Initializes a new, empty instance of the <see cref="T:System.Collections.Hashtable" /> class using the default initial capacity, load factor, hash code provider, and comparer.</summary>
|
||||
// Token: 0x06000F79 RID: 3961 RVA: 0x00040A50 File Offset: 0x0003EC50
|
||||
public Hashtable()
|
||||
: this(0, 1f)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new, empty instance of the <see cref="T:System.Collections.Hashtable" /> class using the specified initial capacity, load factor, hash code provider, and comparer.</summary>
|
||||
/// <param name="capacity">The approximate number of elements that the <see cref="T:System.Collections.Hashtable" /> object can initially contain. </param>
|
||||
/// <param name="loadFactor">A number in the range from 0.1 through 1.0 that is multiplied by the default value which provides the best performance. The result is the maximum ratio of elements to buckets.</param>
|
||||
/// <param name="hcp">The <see cref="T:System.Collections.IHashCodeProvider" /> object that supplies the hash codes for all keys in the <see cref="T:System.Collections.Hashtable" />.-or- null to use the default hash code provider, which is each key's implementation of <see cref="M:System.Object.GetHashCode" />. </param>
|
||||
/// <param name="comparer">The <see cref="T:System.Collections.IComparer" /> object 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>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="capacity" /> is less than zero.-or- <paramref name="loadFactor" /> is less than 0.1.-or- <paramref name="loadFactor" /> is greater than 1.0. </exception>
|
||||
// Token: 0x06000F7A RID: 3962 RVA: 0x00040A60 File Offset: 0x0003EC60
|
||||
[Obsolete("Please use Hashtable(int, float, IEqualityComparer) instead")]
|
||||
public Hashtable(int capacity, float loadFactor, IHashCodeProvider hcp, IComparer comparer)
|
||||
{
|
||||
if (capacity < 0)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException("capacity", "negative capacity");
|
||||
}
|
||||
if (loadFactor < 0.1f || loadFactor > 1f || float.IsNaN(loadFactor))
|
||||
{
|
||||
throw new ArgumentOutOfRangeException("loadFactor", "load factor");
|
||||
}
|
||||
if (capacity == 0)
|
||||
{
|
||||
capacity++;
|
||||
}
|
||||
this.loadFactor = 0.75f * loadFactor;
|
||||
double num = (double)((float)capacity / this.loadFactor);
|
||||
if (num > 2147483647.0)
|
||||
{
|
||||
throw new ArgumentException("Size is too big");
|
||||
}
|
||||
int num2 = (int)num;
|
||||
num2 = Hashtable.ToPrime(num2);
|
||||
this.SetTable(new Hashtable.Slot[num2], new int[num2]);
|
||||
this.hcp = hcp;
|
||||
this.comparer = comparer;
|
||||
this.inUse = 0;
|
||||
this.modificationCount = 0;
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new, empty instance of the <see cref="T:System.Collections.Hashtable" /> class using the specified initial capacity and load factor, and the default hash code provider and comparer.</summary>
|
||||
/// <param name="capacity">The approximate number of elements that the <see cref="T:System.Collections.Hashtable" /> object can initially contain. </param>
|
||||
/// <param name="loadFactor">A number in the range from 0.1 through 1.0 that is multiplied by the default value which provides the best performance. The result is the maximum ratio of elements to buckets. </param>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="capacity" /> is less than zero.-or- <paramref name="loadFactor" /> is less than 0.1.-or- <paramref name="loadFactor" /> is greater than 1.0. </exception>
|
||||
/// <exception cref="T:System.ArgumentException">
|
||||
/// <paramref name="capacity" /> is causing an overflow.</exception>
|
||||
// Token: 0x06000F7B RID: 3963 RVA: 0x00040B34 File Offset: 0x0003ED34
|
||||
public Hashtable(int capacity, float loadFactor)
|
||||
: this(capacity, loadFactor, null, null)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new, empty instance of the <see cref="T:System.Collections.Hashtable" /> class using the specified initial capacity, and the default load factor, hash code provider, and comparer.</summary>
|
||||
/// <param name="capacity">The approximate number of elements that the <see cref="T:System.Collections.Hashtable" /> object can initially contain. </param>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="capacity" /> is less than zero. </exception>
|
||||
// Token: 0x06000F7C RID: 3964 RVA: 0x00040B40 File Offset: 0x0003ED40
|
||||
public Hashtable(int capacity)
|
||||
: this(capacity, 1f)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x06000F7D RID: 3965 RVA: 0x00040B50 File Offset: 0x0003ED50
|
||||
internal Hashtable(Hashtable source)
|
||||
{
|
||||
this.inUse = source.inUse;
|
||||
this.loadFactor = source.loadFactor;
|
||||
this.table = (Hashtable.Slot[])source.table.Clone();
|
||||
this.hashes = (int[])source.hashes.Clone();
|
||||
this.threshold = source.threshold;
|
||||
this.hcpRef = source.hcpRef;
|
||||
this.comparerRef = source.comparerRef;
|
||||
this.equalityComparer = source.equalityComparer;
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new, empty instance of the <see cref="T:System.Collections.Hashtable" /> class using the specified initial capacity, hash code provider, comparer, and the default load factor.</summary>
|
||||
/// <param name="capacity">The approximate number of elements that the <see cref="T:System.Collections.Hashtable" /> object can initially contain. </param>
|
||||
/// <param name="hcp">The <see cref="T:System.Collections.IHashCodeProvider" /> object that supplies the hash codes for all keys in the <see cref="T:System.Collections.Hashtable" />.-or- null to use the default hash code provider, which is each key's implementation of <see cref="M:System.Object.GetHashCode" />. </param>
|
||||
/// <param name="comparer">The <see cref="T:System.Collections.IComparer" /> object 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>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="capacity" /> is less than zero. </exception>
|
||||
// Token: 0x06000F7E RID: 3966 RVA: 0x00040BD8 File Offset: 0x0003EDD8
|
||||
[Obsolete("Please use Hashtable(int, IEqualityComparer) instead")]
|
||||
public Hashtable(int capacity, IHashCodeProvider hcp, IComparer comparer)
|
||||
: this(capacity, 1f, hcp, comparer)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.Hashtable" /> class by copying the elements from the specified dictionary to the new <see cref="T:System.Collections.Hashtable" /> object. The new <see cref="T:System.Collections.Hashtable" /> object has an initial capacity equal to the number of elements copied, and uses the specified load factor, hash code provider, and comparer.</summary>
|
||||
/// <param name="d">The <see cref="T:System.Collections.IDictionary" /> object to copy to a new <see cref="T:System.Collections.Hashtable" /> object.</param>
|
||||
/// <param name="loadFactor">A number in the range from 0.1 through 1.0 that is multiplied by the default value which provides the best performance. The result is the maximum ratio of elements to buckets.</param>
|
||||
/// <param name="hcp">The <see cref="T:System.Collections.IHashCodeProvider" /> object that supplies the hash codes for all keys in the <see cref="T:System.Collections.Hashtable" />.-or- null to use the default hash code provider, which is each key's implementation of <see cref="M:System.Object.GetHashCode" />. </param>
|
||||
/// <param name="comparer">The <see cref="T:System.Collections.IComparer" /> object 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>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="d" /> is null. </exception>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="loadFactor" /> is less than 0.1.-or- <paramref name="loadFactor" /> is greater than 1.0. </exception>
|
||||
// Token: 0x06000F7F RID: 3967 RVA: 0x00040BE8 File Offset: 0x0003EDE8
|
||||
[Obsolete("Please use Hashtable(IDictionary, float, IEqualityComparer) instead")]
|
||||
public Hashtable(IDictionary d, float loadFactor, IHashCodeProvider hcp, IComparer comparer)
|
||||
: this((d == null) ? 0 : d.Count, loadFactor, hcp, comparer)
|
||||
{
|
||||
if (d == null)
|
||||
{
|
||||
throw new ArgumentNullException("dictionary");
|
||||
}
|
||||
IDictionaryEnumerator enumerator = d.GetEnumerator();
|
||||
while (enumerator.MoveNext())
|
||||
{
|
||||
this.Add(enumerator.Key, enumerator.Value);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.Hashtable" /> class by copying the elements from the specified dictionary to the new <see cref="T:System.Collections.Hashtable" /> object. The new <see cref="T:System.Collections.Hashtable" /> object has an initial capacity equal to the number of elements copied, and uses the specified load factor, and the default hash code provider and comparer.</summary>
|
||||
/// <param name="d">The <see cref="T:System.Collections.IDictionary" /> object to copy to a new <see cref="T:System.Collections.Hashtable" /> object.</param>
|
||||
/// <param name="loadFactor">A number in the range from 0.1 through 1.0 that is multiplied by the default value which provides the best performance. The result is the maximum ratio of elements to buckets.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="d" /> is null. </exception>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="loadFactor" /> is less than 0.1.-or- <paramref name="loadFactor" /> is greater than 1.0. </exception>
|
||||
// Token: 0x06000F80 RID: 3968 RVA: 0x00040C4C File Offset: 0x0003EE4C
|
||||
public Hashtable(IDictionary d, float loadFactor)
|
||||
: this(d, loadFactor, null, null)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.Hashtable" /> class by copying the elements from the specified dictionary to the new <see cref="T:System.Collections.Hashtable" /> object. The new <see cref="T:System.Collections.Hashtable" /> object has an initial capacity equal to the number of elements copied, and uses the default load factor, hash code provider, and comparer.</summary>
|
||||
/// <param name="d">The <see cref="T:System.Collections.IDictionary" /> object to copy to a new <see cref="T:System.Collections.Hashtable" /> object. </param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="d" /> is null. </exception>
|
||||
// Token: 0x06000F81 RID: 3969 RVA: 0x00040C58 File Offset: 0x0003EE58
|
||||
public Hashtable(IDictionary d)
|
||||
: this(d, 1f)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.Hashtable" /> class by copying the elements from the specified dictionary to the new <see cref="T:System.Collections.Hashtable" /> object. The new <see cref="T:System.Collections.Hashtable" /> object has an initial capacity equal to the number of elements copied, and uses the default load factor, and the specified hash code provider and comparer.</summary>
|
||||
/// <param name="d">The <see cref="T:System.Collections.IDictionary" /> object to copy to a new <see cref="T:System.Collections.Hashtable" /> object.</param>
|
||||
/// <param name="hcp">The <see cref="T:System.Collections.IHashCodeProvider" /> object that supplies the hash codes for all keys in the <see cref="T:System.Collections.Hashtable" />.-or- null to use the default hash code provider, which is each key's implementation of <see cref="M:System.Object.GetHashCode" />. </param>
|
||||
/// <param name="comparer">The <see cref="T:System.Collections.IComparer" /> object 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>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="d" /> is null. </exception>
|
||||
// Token: 0x06000F82 RID: 3970 RVA: 0x00040C68 File Offset: 0x0003EE68
|
||||
[Obsolete("Please use Hashtable(IDictionary, IEqualityComparer) instead")]
|
||||
public Hashtable(IDictionary d, IHashCodeProvider hcp, IComparer comparer)
|
||||
: this(d, 1f, hcp, comparer)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new, empty instance of the <see cref="T:System.Collections.Hashtable" /> class using the default initial capacity and load factor, and the specified hash code provider and comparer.</summary>
|
||||
/// <param name="hcp">The <see cref="T:System.Collections.IHashCodeProvider" /> object that supplies the hash codes for all keys in the <see cref="T:System.Collections.Hashtable" /> object.-or- null to use the default hash code provider, which is each key's implementation of <see cref="M:System.Object.GetHashCode" />.</param>
|
||||
/// <param name="comparer">The <see cref="T:System.Collections.IComparer" /> object 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: 0x06000F83 RID: 3971 RVA: 0x00040C78 File Offset: 0x0003EE78
|
||||
[Obsolete("Please use Hashtable(IEqualityComparer) instead")]
|
||||
public Hashtable(IHashCodeProvider hcp, IComparer comparer)
|
||||
: this(1, 1f, hcp, comparer)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new, empty instance of the <see cref="T:System.Collections.Hashtable" /> 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.Hashtable" /> object.</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.Hashtable" />. </param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="info" /> is null. </exception>
|
||||
// Token: 0x06000F84 RID: 3972 RVA: 0x00040C88 File Offset: 0x0003EE88
|
||||
public Hashtable(SerializationInfo info, StreamingContext context)
|
||||
{
|
||||
this.serializationInfo = info;
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.Hashtable" /> class by copying the elements from the specified dictionary to a new <see cref="T:System.Collections.Hashtable" /> object. The new <see cref="T:System.Collections.Hashtable" /> object has an initial capacity equal to the number of elements copied, and uses the default load factor and the specified <see cref="T:System.Collections.IEqualityComparer" /> object.</summary>
|
||||
/// <param name="d">The <see cref="T:System.Collections.IDictionary" /> object to copy to a new <see cref="T:System.Collections.Hashtable" /> object.</param>
|
||||
/// <param name="equalityComparer">The <see cref="T:System.Collections.IEqualityComparer" /> object that defines the hash code provider and the comparer to use with the <see cref="T:System.Collections.Hashtable" />.-or- null to use the default hash code provider and the default comparer. The default hash code provider is each key's implementation of <see cref="M:System.Object.GetHashCode" /> and the default comparer is each key's implementation of <see cref="M:System.Object.Equals(System.Object)" />. </param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="d" /> is null. </exception>
|
||||
// Token: 0x06000F85 RID: 3973 RVA: 0x00040C98 File Offset: 0x0003EE98
|
||||
public Hashtable(IDictionary d, IEqualityComparer equalityComparer)
|
||||
: this(d, 1f, equalityComparer)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.Hashtable" /> class by copying the elements from the specified dictionary to the new <see cref="T:System.Collections.Hashtable" /> object. The new <see cref="T:System.Collections.Hashtable" /> object has an initial capacity equal to the number of elements copied, and uses the specified load factor and <see cref="T:System.Collections.IEqualityComparer" /> object.</summary>
|
||||
/// <param name="d">The <see cref="T:System.Collections.IDictionary" /> object to copy to a new <see cref="T:System.Collections.Hashtable" /> object.</param>
|
||||
/// <param name="loadFactor">A number in the range from 0.1 through 1.0 that is multiplied by the default value which provides the best performance. The result is the maximum ratio of elements to buckets.</param>
|
||||
/// <param name="equalityComparer">The <see cref="T:System.Collections.IEqualityComparer" /> object that defines the hash code provider and the comparer to use with the <see cref="T:System.Collections.Hashtable" />.-or- null to use the default hash code provider and the default comparer. The default hash code provider is each key's implementation of <see cref="M:System.Object.GetHashCode" /> and the default comparer is each key's implementation of <see cref="M:System.Object.Equals(System.Object)" />. </param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="d" /> is null. </exception>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="loadFactor" /> is less than 0.1.-or- <paramref name="loadFactor" /> is greater than 1.0. </exception>
|
||||
// Token: 0x06000F86 RID: 3974 RVA: 0x00040CA8 File Offset: 0x0003EEA8
|
||||
public Hashtable(IDictionary d, float loadFactor, IEqualityComparer equalityComparer)
|
||||
: this(d, loadFactor)
|
||||
{
|
||||
this.equalityComparer = equalityComparer;
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new, empty instance of the <see cref="T:System.Collections.Hashtable" /> class using the default initial capacity and load factor, and the specified <see cref="T:System.Collections.IEqualityComparer" /> object.</summary>
|
||||
/// <param name="equalityComparer">The <see cref="T:System.Collections.IEqualityComparer" /> object that defines the hash code provider and the comparer to use with the <see cref="T:System.Collections.Hashtable" /> object.-or- null to use the default hash code provider and the default comparer. The default hash code provider is each key's implementation of <see cref="M:System.Object.GetHashCode" /> and the default comparer is each key's implementation of <see cref="M:System.Object.Equals(System.Object)" />. </param>
|
||||
// Token: 0x06000F87 RID: 3975 RVA: 0x00040CBC File Offset: 0x0003EEBC
|
||||
public Hashtable(IEqualityComparer equalityComparer)
|
||||
: this(1, 1f, equalityComparer)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new, empty instance of the <see cref="T:System.Collections.Hashtable" /> class using the specified initial capacity and <see cref="T:System.Collections.IEqualityComparer" />, and the default load factor.</summary>
|
||||
/// <param name="capacity">The approximate number of elements that the <see cref="T:System.Collections.Hashtable" /> object can initially contain. </param>
|
||||
/// <param name="equalityComparer">The <see cref="T:System.Collections.IEqualityComparer" /> object that defines the hash code provider and the comparer to use with the <see cref="T:System.Collections.Hashtable" />.-or- null to use the default hash code provider and the default comparer. The default hash code provider is each key's implementation of <see cref="M:System.Object.GetHashCode" /> and the default comparer is each key's implementation of <see cref="M:System.Object.Equals(System.Object)" />. </param>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="capacity" /> is less than zero. </exception>
|
||||
// Token: 0x06000F88 RID: 3976 RVA: 0x00040CCC File Offset: 0x0003EECC
|
||||
public Hashtable(int capacity, IEqualityComparer equalityComparer)
|
||||
: this(capacity, 1f, equalityComparer)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new, empty instance of the <see cref="T:System.Collections.Hashtable" /> class using the specified initial capacity, load factor, and <see cref="T:System.Collections.IEqualityComparer" /> object.</summary>
|
||||
/// <param name="capacity">The approximate number of elements that the <see cref="T:System.Collections.Hashtable" /> object can initially contain. </param>
|
||||
/// <param name="loadFactor">A number in the range from 0.1 through 1.0 that is multiplied by the default value which provides the best performance. The result is the maximum ratio of elements to buckets.</param>
|
||||
/// <param name="equalityComparer">The <see cref="T:System.Collections.IEqualityComparer" /> object that defines the hash code provider and the comparer to use with the <see cref="T:System.Collections.Hashtable" />.-or- null to use the default hash code provider and the default comparer. The default hash code provider is each key's implementation of <see cref="M:System.Object.GetHashCode" /> and the default comparer is each key's implementation of <see cref="M:System.Object.Equals(System.Object)" />. </param>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="capacity" /> is less than zero.-or- <paramref name="loadFactor" /> is less than 0.1.-or- <paramref name="loadFactor" /> is greater than 1.0. </exception>
|
||||
// Token: 0x06000F89 RID: 3977 RVA: 0x00040CDC File Offset: 0x0003EEDC
|
||||
public Hashtable(int capacity, float loadFactor, IEqualityComparer equalityComparer)
|
||||
: this(capacity, loadFactor)
|
||||
{
|
||||
this.equalityComparer = equalityComparer;
|
||||
}
|
||||
|
||||
/// <summary>Returns an enumerator that iterates through a collection.</summary>
|
||||
/// <returns>An <see cref="T:System.Collections.IEnumerator" /> that can be used to iterate through the collection.</returns>
|
||||
// Token: 0x06000F8B RID: 3979 RVA: 0x00040D0C File Offset: 0x0003EF0C
|
||||
IEnumerator IEnumerable.GetEnumerator()
|
||||
{
|
||||
return new Hashtable.Enumerator(this, Hashtable.EnumeratorMode.ENTRY_MODE);
|
||||
}
|
||||
|
||||
/// <summary>Gets or sets the <see cref="T:System.Collections.IComparer" /> to use for the <see cref="T:System.Collections.Hashtable" />.</summary>
|
||||
/// <returns>The <see cref="T:System.Collections.IComparer" /> to use for the <see cref="T:System.Collections.Hashtable" />.</returns>
|
||||
/// <exception cref="T:System.ArgumentException">The property is set to a value, but the hash table was created using an <see cref="T:System.Collections.IEqualityComparer" />. </exception>
|
||||
// Token: 0x17000270 RID: 624
|
||||
// (get) Token: 0x06000F8D RID: 3981 RVA: 0x00040D24 File Offset: 0x0003EF24
|
||||
// (set) Token: 0x06000F8C RID: 3980 RVA: 0x00040D18 File Offset: 0x0003EF18
|
||||
[Obsolete("Please use EqualityComparer property.")]
|
||||
protected IComparer comparer
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.comparerRef;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.comparerRef = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets or sets the object that can dispense hash codes.</summary>
|
||||
/// <returns>The object that can dispense hash codes.</returns>
|
||||
/// <exception cref="T:System.ArgumentException">The property is set to a value, but the hash table was created using an <see cref="T:System.Collections.IEqualityComparer" />. </exception>
|
||||
// Token: 0x17000271 RID: 625
|
||||
// (get) Token: 0x06000F8F RID: 3983 RVA: 0x00040D38 File Offset: 0x0003EF38
|
||||
// (set) Token: 0x06000F8E RID: 3982 RVA: 0x00040D2C File Offset: 0x0003EF2C
|
||||
[Obsolete("Please use EqualityComparer property.")]
|
||||
protected IHashCodeProvider hcp
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.hcpRef;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.hcpRef = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets the <see cref="T:System.Collections.IEqualityComparer" /> to use for the <see cref="T:System.Collections.Hashtable" />.</summary>
|
||||
/// <returns>The <see cref="T:System.Collections.IEqualityComparer" /> to use for the <see cref="T:System.Collections.Hashtable" />.</returns>
|
||||
/// <exception cref="T:System.ArgumentException">The property is set to a value, but the hash table was created using an <see cref="T:System.Collections.IHashCodeProvider" /> and an <see cref="T:System.Collections.IComparer" />. </exception>
|
||||
// Token: 0x17000272 RID: 626
|
||||
// (get) Token: 0x06000F90 RID: 3984 RVA: 0x00040D40 File Offset: 0x0003EF40
|
||||
protected IEqualityComparer EqualityComparer
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.equalityComparer;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets the number of key/value pairs contained in the <see cref="T:System.Collections.Hashtable" />.</summary>
|
||||
/// <returns>The number of key/value pairs contained in the <see cref="T:System.Collections.Hashtable" />.</returns>
|
||||
/// <filterpriority>1</filterpriority>
|
||||
// Token: 0x17000273 RID: 627
|
||||
// (get) Token: 0x06000F91 RID: 3985 RVA: 0x00040D48 File Offset: 0x0003EF48
|
||||
public virtual int Count
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.inUse;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a value indicating whether access to the <see cref="T:System.Collections.Hashtable" /> is synchronized (thread safe).</summary>
|
||||
/// <returns>true if access to the <see cref="T:System.Collections.Hashtable" /> is synchronized (thread safe); otherwise, false. The default is false.</returns>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x17000274 RID: 628
|
||||
// (get) Token: 0x06000F92 RID: 3986 RVA: 0x00040D50 File Offset: 0x0003EF50
|
||||
public virtual bool IsSynchronized
|
||||
{
|
||||
get
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets an object that can be used to synchronize access to the <see cref="T:System.Collections.Hashtable" />.</summary>
|
||||
/// <returns>An object that can be used to synchronize access to the <see cref="T:System.Collections.Hashtable" />.</returns>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x17000275 RID: 629
|
||||
// (get) Token: 0x06000F93 RID: 3987 RVA: 0x00040D54 File Offset: 0x0003EF54
|
||||
public virtual object SyncRoot
|
||||
{
|
||||
get
|
||||
{
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a value indicating whether the <see cref="T:System.Collections.Hashtable" /> has a fixed size.</summary>
|
||||
/// <returns>true if the <see cref="T:System.Collections.Hashtable" /> has a fixed size; otherwise, false. The default is false.</returns>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x17000276 RID: 630
|
||||
// (get) Token: 0x06000F94 RID: 3988 RVA: 0x00040D58 File Offset: 0x0003EF58
|
||||
public virtual bool IsFixedSize
|
||||
{
|
||||
get
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a value indicating whether the <see cref="T:System.Collections.Hashtable" /> is read-only.</summary>
|
||||
/// <returns>true if the <see cref="T:System.Collections.Hashtable" /> is read-only; otherwise, false. The default is false.</returns>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x17000277 RID: 631
|
||||
// (get) Token: 0x06000F95 RID: 3989 RVA: 0x00040D5C File Offset: 0x0003EF5C
|
||||
public virtual bool IsReadOnly
|
||||
{
|
||||
get
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets an <see cref="T:System.Collections.ICollection" /> containing the keys in the <see cref="T:System.Collections.Hashtable" />.</summary>
|
||||
/// <returns>An <see cref="T:System.Collections.ICollection" /> containing the keys in the <see cref="T:System.Collections.Hashtable" />.</returns>
|
||||
/// <filterpriority>1</filterpriority>
|
||||
// Token: 0x17000278 RID: 632
|
||||
// (get) Token: 0x06000F96 RID: 3990 RVA: 0x00040D60 File Offset: 0x0003EF60
|
||||
public virtual ICollection Keys
|
||||
{
|
||||
get
|
||||
{
|
||||
if (this.hashKeys == null)
|
||||
{
|
||||
this.hashKeys = new Hashtable.HashKeys(this);
|
||||
}
|
||||
return this.hashKeys;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets an <see cref="T:System.Collections.ICollection" /> containing the values in the <see cref="T:System.Collections.Hashtable" />.</summary>
|
||||
/// <returns>An <see cref="T:System.Collections.ICollection" /> containing the values in the <see cref="T:System.Collections.Hashtable" />.</returns>
|
||||
/// <filterpriority>1</filterpriority>
|
||||
// Token: 0x17000279 RID: 633
|
||||
// (get) Token: 0x06000F97 RID: 3991 RVA: 0x00040D80 File Offset: 0x0003EF80
|
||||
public virtual ICollection Values
|
||||
{
|
||||
get
|
||||
{
|
||||
if (this.hashValues == null)
|
||||
{
|
||||
this.hashValues = new Hashtable.HashValues(this);
|
||||
}
|
||||
return this.hashValues;
|
||||
}
|
||||
}
|
||||
|
||||
/// <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 element 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>
|
||||
/// <exception cref="T:System.NotSupportedException">The property is set and the <see cref="T:System.Collections.Hashtable" /> is read-only.-or- The property is set, <paramref name="key" /> does not exist in the collection, and the <see cref="T:System.Collections.Hashtable" /> has a fixed size. </exception>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x1700027A RID: 634
|
||||
public virtual object this[object key]
|
||||
{
|
||||
get
|
||||
{
|
||||
if (key == null)
|
||||
{
|
||||
throw new ArgumentNullException("key", "null key");
|
||||
}
|
||||
Hashtable.Slot[] array = this.table;
|
||||
int[] array2 = this.hashes;
|
||||
uint num = (uint)array.Length;
|
||||
int num2 = this.GetHash(key) & int.MaxValue;
|
||||
uint num3 = (uint)num2;
|
||||
uint num4 = (uint)(((num2 >> 5) + 1) % (int)(num - 1U) + 1);
|
||||
for (uint num5 = num; num5 > 0U; num5 -= 1U)
|
||||
{
|
||||
num3 %= num;
|
||||
Hashtable.Slot slot = array[(int)((UIntPtr)num3)];
|
||||
int num6 = array2[(int)((UIntPtr)num3)];
|
||||
object key2 = slot.key;
|
||||
if (key2 == null)
|
||||
{
|
||||
break;
|
||||
}
|
||||
if (key2 == key || ((num6 & 2147483647) == num2 && this.KeyEquals(key, key2)))
|
||||
{
|
||||
return slot.value;
|
||||
}
|
||||
if ((num6 & -2147483648) == 0)
|
||||
{
|
||||
break;
|
||||
}
|
||||
num3 += num4;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.PutImpl(key, value, true);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Copies the <see cref="T:System.Collections.Hashtable" /> elements 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.Hashtable" />. The <see cref="T:System.Array" /> must have zero-based indexing. </param>
|
||||
/// <param name="arrayIndex">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="arrayIndex" /> 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.Hashtable" /> is greater than the available space from <paramref name="arrayIndex" /> 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.Hashtable" /> cannot be cast automatically to the type of the destination <paramref name="array" />. </exception>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x06000F9A RID: 3994 RVA: 0x00040E90 File Offset: 0x0003F090
|
||||
public virtual void CopyTo(Array array, int arrayIndex)
|
||||
{
|
||||
if (array == null)
|
||||
{
|
||||
throw new ArgumentNullException("array");
|
||||
}
|
||||
if (arrayIndex < 0)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException("arrayIndex");
|
||||
}
|
||||
if (array.Rank > 1)
|
||||
{
|
||||
throw new ArgumentException("array is multidimensional");
|
||||
}
|
||||
if (array.Length > 0 && arrayIndex >= array.Length)
|
||||
{
|
||||
throw new ArgumentException("arrayIndex is equal to or greater than array.Length");
|
||||
}
|
||||
if (arrayIndex + this.inUse > array.Length)
|
||||
{
|
||||
throw new ArgumentException("Not enough room from arrayIndex to end of array for this Hashtable");
|
||||
}
|
||||
IDictionaryEnumerator enumerator = this.GetEnumerator();
|
||||
int num = arrayIndex;
|
||||
while (enumerator.MoveNext())
|
||||
{
|
||||
array.SetValue(enumerator.Entry, num++);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Adds an element with the specified key and value into the <see cref="T:System.Collections.Hashtable" />.</summary>
|
||||
/// <param name="key">The key of the element to add. </param>
|
||||
/// <param name="value">The value of the element 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 element with the same key already exists in the <see cref="T:System.Collections.Hashtable" />. </exception>
|
||||
/// <exception cref="T:System.NotSupportedException">The <see cref="T:System.Collections.Hashtable" /> is read-only.-or- The <see cref="T:System.Collections.Hashtable" /> has a fixed size. </exception>
|
||||
/// <filterpriority>1</filterpriority>
|
||||
// Token: 0x06000F9B RID: 3995 RVA: 0x00040F48 File Offset: 0x0003F148
|
||||
public virtual void Add(object key, object value)
|
||||
{
|
||||
this.PutImpl(key, value, false);
|
||||
}
|
||||
|
||||
/// <summary>Removes all elements from the <see cref="T:System.Collections.Hashtable" />.</summary>
|
||||
/// <exception cref="T:System.NotSupportedException">The <see cref="T:System.Collections.Hashtable" /> is read-only. </exception>
|
||||
/// <filterpriority>1</filterpriority>
|
||||
// Token: 0x06000F9C RID: 3996 RVA: 0x00040F54 File Offset: 0x0003F154
|
||||
[ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
|
||||
public virtual void Clear()
|
||||
{
|
||||
for (int i = 0; i < this.table.Length; i++)
|
||||
{
|
||||
this.table[i].key = null;
|
||||
this.table[i].value = null;
|
||||
this.hashes[i] = 0;
|
||||
}
|
||||
this.inUse = 0;
|
||||
this.modificationCount++;
|
||||
}
|
||||
|
||||
/// <summary>Determines whether the <see cref="T:System.Collections.Hashtable" /> contains a specific key.</summary>
|
||||
/// <returns>true if the <see cref="T:System.Collections.Hashtable" /> contains an element with the specified key; otherwise, false.</returns>
|
||||
/// <param name="key">The key to locate in the <see cref="T:System.Collections.Hashtable" />. </param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="key" /> is null. </exception>
|
||||
/// <filterpriority>1</filterpriority>
|
||||
// Token: 0x06000F9D RID: 3997 RVA: 0x00040FBC File Offset: 0x0003F1BC
|
||||
public virtual bool Contains(object key)
|
||||
{
|
||||
return this.Find(key) >= 0;
|
||||
}
|
||||
|
||||
/// <summary>Returns an <see cref="T:System.Collections.IDictionaryEnumerator" /> that iterates through the <see cref="T:System.Collections.Hashtable" />.</summary>
|
||||
/// <returns>An <see cref="T:System.Collections.IDictionaryEnumerator" /> for the <see cref="T:System.Collections.Hashtable" />.</returns>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x06000F9E RID: 3998 RVA: 0x00040FCC File Offset: 0x0003F1CC
|
||||
public virtual IDictionaryEnumerator GetEnumerator()
|
||||
{
|
||||
return new Hashtable.Enumerator(this, Hashtable.EnumeratorMode.ENTRY_MODE);
|
||||
}
|
||||
|
||||
/// <summary>Removes the element with the specified key from the <see cref="T:System.Collections.Hashtable" />.</summary>
|
||||
/// <param name="key">The key of the element to remove. </param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="key" /> is null. </exception>
|
||||
/// <exception cref="T:System.NotSupportedException">The <see cref="T:System.Collections.Hashtable" /> is read-only.-or- The <see cref="T:System.Collections.Hashtable" /> has a fixed size. </exception>
|
||||
/// <filterpriority>1</filterpriority>
|
||||
// Token: 0x06000F9F RID: 3999 RVA: 0x00040FD8 File Offset: 0x0003F1D8
|
||||
[ReliabilityContract(Consistency.WillNotCorruptState, Cer.MayFail)]
|
||||
public virtual void Remove(object key)
|
||||
{
|
||||
int num = this.Find(key);
|
||||
if (num >= 0)
|
||||
{
|
||||
Hashtable.Slot[] array = this.table;
|
||||
int num2 = this.hashes[num];
|
||||
num2 &= int.MinValue;
|
||||
this.hashes[num] = num2;
|
||||
array[num].key = ((num2 == 0) ? null : Hashtable.KeyMarker.Removed);
|
||||
array[num].value = null;
|
||||
this.inUse--;
|
||||
this.modificationCount++;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Determines whether the <see cref="T:System.Collections.Hashtable" /> contains a specific key.</summary>
|
||||
/// <returns>true if the <see cref="T:System.Collections.Hashtable" /> contains an element with the specified key; otherwise, false.</returns>
|
||||
/// <param name="key">The key to locate in the <see cref="T:System.Collections.Hashtable" />. </param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="key" /> is null. </exception>
|
||||
/// <filterpriority>1</filterpriority>
|
||||
// Token: 0x06000FA0 RID: 4000 RVA: 0x0004105C File Offset: 0x0003F25C
|
||||
public virtual bool ContainsKey(object key)
|
||||
{
|
||||
return this.Contains(key);
|
||||
}
|
||||
|
||||
/// <summary>Determines whether the <see cref="T:System.Collections.Hashtable" /> contains a specific value.</summary>
|
||||
/// <returns>true if the <see cref="T:System.Collections.Hashtable" /> contains an element with the specified <paramref name="value" />; otherwise, false.</returns>
|
||||
/// <param name="value">The value to locate in the <see cref="T:System.Collections.Hashtable" />. The value can be null. </param>
|
||||
/// <filterpriority>1</filterpriority>
|
||||
// Token: 0x06000FA1 RID: 4001 RVA: 0x00041068 File Offset: 0x0003F268
|
||||
public virtual bool ContainsValue(object value)
|
||||
{
|
||||
int num = this.table.Length;
|
||||
Hashtable.Slot[] array = this.table;
|
||||
if (value == null)
|
||||
{
|
||||
for (int i = 0; i < num; i++)
|
||||
{
|
||||
Hashtable.Slot slot = array[i];
|
||||
if (slot.key != null && slot.key != Hashtable.KeyMarker.Removed && slot.value == null)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int j = 0; j < num; j++)
|
||||
{
|
||||
Hashtable.Slot slot2 = array[j];
|
||||
if (slot2.key != null && slot2.key != Hashtable.KeyMarker.Removed && value.Equals(slot2.value))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/// <summary>Creates a shallow copy of the <see cref="T:System.Collections.Hashtable" />.</summary>
|
||||
/// <returns>A shallow copy of the <see cref="T:System.Collections.Hashtable" />.</returns>
|
||||
/// <filterpriority>1</filterpriority>
|
||||
// Token: 0x06000FA2 RID: 4002 RVA: 0x00041134 File Offset: 0x0003F334
|
||||
public virtual object Clone()
|
||||
{
|
||||
return new Hashtable(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.Hashtable" />.</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.Hashtable" />. </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.Hashtable" />. </param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="info" /> is null. </exception>
|
||||
/// <exception cref="T:System.InvalidOperationException">The collection was modified.</exception>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x06000FA3 RID: 4003 RVA: 0x0004113C File Offset: 0x0003F33C
|
||||
public virtual void GetObjectData(SerializationInfo info, StreamingContext context)
|
||||
{
|
||||
if (info == null)
|
||||
{
|
||||
throw new ArgumentNullException("info");
|
||||
}
|
||||
info.AddValue("LoadFactor", this.loadFactor);
|
||||
info.AddValue("Version", this.modificationCount);
|
||||
if (this.equalityComparer != null)
|
||||
{
|
||||
info.AddValue("KeyComparer", this.equalityComparer);
|
||||
}
|
||||
else
|
||||
{
|
||||
info.AddValue("Comparer", this.comparerRef);
|
||||
}
|
||||
if (this.hcpRef != null)
|
||||
{
|
||||
info.AddValue("HashCodeProvider", this.hcpRef);
|
||||
}
|
||||
info.AddValue("HashSize", this.table.Length);
|
||||
object[] array = new object[this.inUse];
|
||||
this.CopyToArray(array, 0, Hashtable.EnumeratorMode.KEY_MODE);
|
||||
object[] array2 = new object[this.inUse];
|
||||
this.CopyToArray(array2, 0, Hashtable.EnumeratorMode.VALUE_MODE);
|
||||
info.AddValue("Keys", array);
|
||||
info.AddValue("Values", array2);
|
||||
info.AddValue("equalityComparer", this.equalityComparer);
|
||||
}
|
||||
|
||||
/// <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.Hashtable" /> is invalid. </exception>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x06000FA4 RID: 4004 RVA: 0x00041230 File Offset: 0x0003F430
|
||||
[MonoTODO("Serialize equalityComparer")]
|
||||
public virtual void OnDeserialization(object sender)
|
||||
{
|
||||
if (this.serializationInfo == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
this.loadFactor = (float)this.serializationInfo.GetValue("LoadFactor", typeof(float));
|
||||
this.modificationCount = (int)this.serializationInfo.GetValue("Version", typeof(int));
|
||||
try
|
||||
{
|
||||
this.equalityComparer = (IEqualityComparer)this.serializationInfo.GetValue("KeyComparer", typeof(object));
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
if (this.equalityComparer == null)
|
||||
{
|
||||
this.comparerRef = (IComparer)this.serializationInfo.GetValue("Comparer", typeof(object));
|
||||
}
|
||||
try
|
||||
{
|
||||
this.hcpRef = (IHashCodeProvider)this.serializationInfo.GetValue("HashCodeProvider", typeof(object));
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
int num = (int)this.serializationInfo.GetValue("HashSize", typeof(int));
|
||||
object[] array = (object[])this.serializationInfo.GetValue("Keys", typeof(object[]));
|
||||
object[] array2 = (object[])this.serializationInfo.GetValue("Values", typeof(object[]));
|
||||
if (array.Length != array2.Length)
|
||||
{
|
||||
throw new SerializationException("Keys and values of uneven size");
|
||||
}
|
||||
num = Hashtable.ToPrime(num);
|
||||
this.SetTable(new Hashtable.Slot[num], new int[num]);
|
||||
for (int i = 0; i < array.Length; i++)
|
||||
{
|
||||
this.Add(array[i], array2[i]);
|
||||
}
|
||||
this.AdjustThreshold();
|
||||
this.serializationInfo = null;
|
||||
}
|
||||
|
||||
/// <summary>Returns a synchronized (thread safe) wrapper for the <see cref="T:System.Collections.Hashtable" />.</summary>
|
||||
/// <returns>A synchronized (thread safe) wrapper for the <see cref="T:System.Collections.Hashtable" />.</returns>
|
||||
/// <param name="table">The <see cref="T:System.Collections.Hashtable" /> to synchronize. </param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="table" /> is null. </exception>
|
||||
/// <filterpriority>1</filterpriority>
|
||||
// Token: 0x06000FA5 RID: 4005 RVA: 0x00041414 File Offset: 0x0003F614
|
||||
public static Hashtable Synchronized(Hashtable table)
|
||||
{
|
||||
if (table == null)
|
||||
{
|
||||
throw new ArgumentNullException("table");
|
||||
}
|
||||
return new Hashtable.SyncHashtable(table);
|
||||
}
|
||||
|
||||
/// <summary>Returns the hash code for the specified key.</summary>
|
||||
/// <returns>The hash code for <paramref name="key" />.</returns>
|
||||
/// <param name="key">The <see cref="T:System.Object" /> for which a hash code is to be returned. </param>
|
||||
/// <exception cref="T:System.NullReferenceException">
|
||||
/// <paramref name="key" /> is null. </exception>
|
||||
// Token: 0x06000FA6 RID: 4006 RVA: 0x00041430 File Offset: 0x0003F630
|
||||
protected virtual int GetHash(object key)
|
||||
{
|
||||
if (this.equalityComparer != null)
|
||||
{
|
||||
return this.equalityComparer.GetHashCode(key);
|
||||
}
|
||||
if (this.hcpRef == null)
|
||||
{
|
||||
return key.GetHashCode();
|
||||
}
|
||||
return this.hcpRef.GetHashCode(key);
|
||||
}
|
||||
|
||||
/// <summary>Compares a specific <see cref="T:System.Object" /> with a specific key in the <see cref="T:System.Collections.Hashtable" />.</summary>
|
||||
/// <returns>true if <paramref name="item" /> and <paramref name="key" /> are equal; otherwise, false.</returns>
|
||||
/// <param name="item">The <see cref="T:System.Object" /> to compare with <paramref name="key" />. </param>
|
||||
/// <param name="key">The key in the <see cref="T:System.Collections.Hashtable" /> to compare with <paramref name="item" />. </param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="item" /> is null.-or- <paramref name="key" /> is null. </exception>
|
||||
// Token: 0x06000FA7 RID: 4007 RVA: 0x00041474 File Offset: 0x0003F674
|
||||
protected virtual bool KeyEquals(object item, object key)
|
||||
{
|
||||
if (key == Hashtable.KeyMarker.Removed)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (this.equalityComparer != null)
|
||||
{
|
||||
return this.equalityComparer.Equals(item, key);
|
||||
}
|
||||
if (this.comparerRef == null)
|
||||
{
|
||||
return item.Equals(key);
|
||||
}
|
||||
return this.comparerRef.Compare(item, key) == 0;
|
||||
}
|
||||
|
||||
// Token: 0x06000FA8 RID: 4008 RVA: 0x000414CC File Offset: 0x0003F6CC
|
||||
private void AdjustThreshold()
|
||||
{
|
||||
int num = this.table.Length;
|
||||
this.threshold = (int)((float)num * this.loadFactor);
|
||||
if (this.threshold >= num)
|
||||
{
|
||||
this.threshold = num - 1;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000FA9 RID: 4009 RVA: 0x00041508 File Offset: 0x0003F708
|
||||
private void SetTable(Hashtable.Slot[] table, int[] hashes)
|
||||
{
|
||||
if (table == null)
|
||||
{
|
||||
throw new ArgumentNullException("table");
|
||||
}
|
||||
this.table = table;
|
||||
this.hashes = hashes;
|
||||
this.AdjustThreshold();
|
||||
}
|
||||
|
||||
// Token: 0x06000FAA RID: 4010 RVA: 0x00041530 File Offset: 0x0003F730
|
||||
private int Find(object key)
|
||||
{
|
||||
if (key == null)
|
||||
{
|
||||
throw new ArgumentNullException("key", "null key");
|
||||
}
|
||||
Hashtable.Slot[] array = this.table;
|
||||
int[] array2 = this.hashes;
|
||||
uint num = (uint)array.Length;
|
||||
int num2 = this.GetHash(key) & int.MaxValue;
|
||||
uint num3 = (uint)num2;
|
||||
uint num4 = (uint)(((num2 >> 5) + 1) % (int)(num - 1U) + 1);
|
||||
for (uint num5 = num; num5 > 0U; num5 -= 1U)
|
||||
{
|
||||
num3 %= num;
|
||||
Hashtable.Slot slot = array[(int)((UIntPtr)num3)];
|
||||
int num6 = array2[(int)((UIntPtr)num3)];
|
||||
object key2 = slot.key;
|
||||
if (key2 == null)
|
||||
{
|
||||
break;
|
||||
}
|
||||
if (key2 == key || ((num6 & 2147483647) == num2 && this.KeyEquals(key, key2)))
|
||||
{
|
||||
return (int)num3;
|
||||
}
|
||||
if ((num6 & -2147483648) == 0)
|
||||
{
|
||||
break;
|
||||
}
|
||||
num3 += num4;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
// Token: 0x06000FAB RID: 4011 RVA: 0x0004160C File Offset: 0x0003F80C
|
||||
private void Rehash()
|
||||
{
|
||||
int num = this.table.Length;
|
||||
uint num2 = (uint)Hashtable.ToPrime((num << 1) | 1);
|
||||
Hashtable.Slot[] array = new Hashtable.Slot[num2];
|
||||
Hashtable.Slot[] array2 = this.table;
|
||||
int[] array3 = new int[num2];
|
||||
int[] array4 = this.hashes;
|
||||
for (int i = 0; i < num; i++)
|
||||
{
|
||||
Hashtable.Slot slot = array2[i];
|
||||
if (slot.key != null)
|
||||
{
|
||||
int num3 = array4[i] & int.MaxValue;
|
||||
uint num4 = (uint)num3;
|
||||
uint num5 = (uint)(((num3 >> 5) + 1) % (int)(num2 - 1U) + 1);
|
||||
uint num6 = num4 % num2;
|
||||
while (array[(int)((UIntPtr)num6)].key != null)
|
||||
{
|
||||
array3[(int)((UIntPtr)num6)] |= int.MinValue;
|
||||
num4 += num5;
|
||||
num6 = num4 % num2;
|
||||
}
|
||||
array[(int)((UIntPtr)num6)].key = slot.key;
|
||||
array[(int)((UIntPtr)num6)].value = slot.value;
|
||||
array3[(int)((UIntPtr)num6)] |= num3;
|
||||
}
|
||||
}
|
||||
this.modificationCount++;
|
||||
this.SetTable(array, array3);
|
||||
}
|
||||
|
||||
// Token: 0x06000FAC RID: 4012 RVA: 0x00041738 File Offset: 0x0003F938
|
||||
private void PutImpl(object key, object value, bool overwrite)
|
||||
{
|
||||
if (key == null)
|
||||
{
|
||||
throw new ArgumentNullException("key", "null key");
|
||||
}
|
||||
if (this.inUse >= this.threshold)
|
||||
{
|
||||
this.Rehash();
|
||||
}
|
||||
uint num = (uint)this.table.Length;
|
||||
int num2 = this.GetHash(key) & int.MaxValue;
|
||||
uint num3 = (uint)num2;
|
||||
uint num4 = ((num3 >> 5) + 1U) % (num - 1U) + 1U;
|
||||
Hashtable.Slot[] array = this.table;
|
||||
int[] array2 = this.hashes;
|
||||
int num5 = -1;
|
||||
int num6 = 0;
|
||||
while ((long)num6 < (long)((ulong)num))
|
||||
{
|
||||
int num7 = (int)(num3 % num);
|
||||
Hashtable.Slot slot = array[num7];
|
||||
int num8 = array2[num7];
|
||||
if (num5 == -1 && slot.key == Hashtable.KeyMarker.Removed && (num8 & -2147483648) != 0)
|
||||
{
|
||||
num5 = num7;
|
||||
}
|
||||
if (slot.key == null || (slot.key == Hashtable.KeyMarker.Removed && (num8 & -2147483648) == 0))
|
||||
{
|
||||
if (num5 == -1)
|
||||
{
|
||||
num5 = num7;
|
||||
}
|
||||
break;
|
||||
}
|
||||
if ((num8 & 2147483647) == num2 && this.KeyEquals(key, slot.key))
|
||||
{
|
||||
if (overwrite)
|
||||
{
|
||||
array[num7].value = value;
|
||||
this.modificationCount++;
|
||||
return;
|
||||
}
|
||||
throw new ArgumentException("Key duplication when adding: " + key);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (num5 == -1)
|
||||
{
|
||||
array2[num7] |= int.MinValue;
|
||||
}
|
||||
num3 += num4;
|
||||
num6++;
|
||||
}
|
||||
}
|
||||
if (num5 != -1)
|
||||
{
|
||||
array[num5].key = key;
|
||||
array[num5].value = value;
|
||||
array2[num5] |= num2;
|
||||
this.inUse++;
|
||||
this.modificationCount++;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000FAD RID: 4013 RVA: 0x0004190C File Offset: 0x0003FB0C
|
||||
private void CopyToArray(Array arr, int i, Hashtable.EnumeratorMode mode)
|
||||
{
|
||||
IEnumerator enumerator = new Hashtable.Enumerator(this, mode);
|
||||
while (enumerator.MoveNext())
|
||||
{
|
||||
object obj = enumerator.Current;
|
||||
arr.SetValue(obj, i++);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000FAE RID: 4014 RVA: 0x00041944 File Offset: 0x0003FB44
|
||||
internal static bool TestPrime(int x)
|
||||
{
|
||||
if ((x & 1) != 0)
|
||||
{
|
||||
int num = (int)Math.Sqrt((double)x);
|
||||
for (int i = 3; i < num; i += 2)
|
||||
{
|
||||
if (x % i == 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return x == 2;
|
||||
}
|
||||
|
||||
// Token: 0x06000FAF RID: 4015 RVA: 0x00041984 File Offset: 0x0003FB84
|
||||
internal static int CalcPrime(int x)
|
||||
{
|
||||
for (int i = (x & -2) - 1; i < 2147483647; i += 2)
|
||||
{
|
||||
if (Hashtable.TestPrime(i))
|
||||
{
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return x;
|
||||
}
|
||||
|
||||
// Token: 0x06000FB0 RID: 4016 RVA: 0x000419BC File Offset: 0x0003FBBC
|
||||
internal static int ToPrime(int x)
|
||||
{
|
||||
for (int i = 0; i < Hashtable.primeTbl.Length; i++)
|
||||
{
|
||||
if (x <= Hashtable.primeTbl[i])
|
||||
{
|
||||
return Hashtable.primeTbl[i];
|
||||
}
|
||||
}
|
||||
return Hashtable.CalcPrime(x);
|
||||
}
|
||||
|
||||
// Token: 0x040003BF RID: 959
|
||||
private const int CHAIN_MARKER = -2147483648;
|
||||
|
||||
// Token: 0x040003C0 RID: 960
|
||||
private int inUse;
|
||||
|
||||
// Token: 0x040003C1 RID: 961
|
||||
private int modificationCount;
|
||||
|
||||
// Token: 0x040003C2 RID: 962
|
||||
private float loadFactor;
|
||||
|
||||
// Token: 0x040003C3 RID: 963
|
||||
private Hashtable.Slot[] table;
|
||||
|
||||
// Token: 0x040003C4 RID: 964
|
||||
private int[] hashes;
|
||||
|
||||
// Token: 0x040003C5 RID: 965
|
||||
private int threshold;
|
||||
|
||||
// Token: 0x040003C6 RID: 966
|
||||
private Hashtable.HashKeys hashKeys;
|
||||
|
||||
// Token: 0x040003C7 RID: 967
|
||||
private Hashtable.HashValues hashValues;
|
||||
|
||||
// Token: 0x040003C8 RID: 968
|
||||
private IHashCodeProvider hcpRef;
|
||||
|
||||
// Token: 0x040003C9 RID: 969
|
||||
private IComparer comparerRef;
|
||||
|
||||
// Token: 0x040003CA RID: 970
|
||||
private SerializationInfo serializationInfo;
|
||||
|
||||
// Token: 0x040003CB RID: 971
|
||||
private IEqualityComparer equalityComparer;
|
||||
|
||||
// Token: 0x040003CC RID: 972
|
||||
private static readonly int[] primeTbl = new int[]
|
||||
{
|
||||
11, 19, 37, 73, 109, 163, 251, 367, 557, 823,
|
||||
1237, 1861, 2777, 4177, 6247, 9371, 14057, 21089, 31627, 47431,
|
||||
71143, 106721, 160073, 240101, 360163, 540217, 810343, 1215497, 1823231, 2734867,
|
||||
4102283, 6153409, 9230113, 13845163
|
||||
};
|
||||
|
||||
// Token: 0x0200012B RID: 299
|
||||
[Serializable]
|
||||
internal struct Slot
|
||||
{
|
||||
// Token: 0x040003CD RID: 973
|
||||
internal object key;
|
||||
|
||||
// Token: 0x040003CE RID: 974
|
||||
internal object value;
|
||||
}
|
||||
|
||||
// Token: 0x0200012C RID: 300
|
||||
[Serializable]
|
||||
internal class KeyMarker
|
||||
{
|
||||
// Token: 0x040003CF RID: 975
|
||||
public static readonly Hashtable.KeyMarker Removed = new Hashtable.KeyMarker();
|
||||
}
|
||||
|
||||
// Token: 0x0200012D RID: 301
|
||||
private enum EnumeratorMode
|
||||
{
|
||||
// Token: 0x040003D1 RID: 977
|
||||
KEY_MODE,
|
||||
// Token: 0x040003D2 RID: 978
|
||||
VALUE_MODE,
|
||||
// Token: 0x040003D3 RID: 979
|
||||
ENTRY_MODE
|
||||
}
|
||||
|
||||
// Token: 0x0200012E RID: 302
|
||||
[Serializable]
|
||||
private sealed class Enumerator : IEnumerator, IDictionaryEnumerator
|
||||
{
|
||||
// Token: 0x06000FB3 RID: 4019 RVA: 0x00041A10 File Offset: 0x0003FC10
|
||||
public Enumerator(Hashtable host, Hashtable.EnumeratorMode mode)
|
||||
{
|
||||
this.host = host;
|
||||
this.stamp = host.modificationCount;
|
||||
this.size = host.table.Length;
|
||||
this.mode = mode;
|
||||
this.Reset();
|
||||
}
|
||||
|
||||
// Token: 0x06000FB4 RID: 4020 RVA: 0x00041A54 File Offset: 0x0003FC54
|
||||
public Enumerator(Hashtable host)
|
||||
: this(host, Hashtable.EnumeratorMode.KEY_MODE)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x06000FB6 RID: 4022 RVA: 0x00041A6C File Offset: 0x0003FC6C
|
||||
private void FailFast()
|
||||
{
|
||||
if (this.host.modificationCount != this.stamp)
|
||||
{
|
||||
throw new InvalidOperationException(Hashtable.Enumerator.xstr);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000FB7 RID: 4023 RVA: 0x00041A90 File Offset: 0x0003FC90
|
||||
public void Reset()
|
||||
{
|
||||
this.FailFast();
|
||||
this.pos = -1;
|
||||
this.currentKey = null;
|
||||
this.currentValue = null;
|
||||
}
|
||||
|
||||
// Token: 0x06000FB8 RID: 4024 RVA: 0x00041AB0 File Offset: 0x0003FCB0
|
||||
public bool MoveNext()
|
||||
{
|
||||
this.FailFast();
|
||||
if (this.pos < this.size)
|
||||
{
|
||||
while (++this.pos < this.size)
|
||||
{
|
||||
Hashtable.Slot slot = this.host.table[this.pos];
|
||||
if (slot.key != null && slot.key != Hashtable.KeyMarker.Removed)
|
||||
{
|
||||
this.currentKey = slot.key;
|
||||
this.currentValue = slot.value;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
this.currentKey = null;
|
||||
this.currentValue = null;
|
||||
return false;
|
||||
}
|
||||
|
||||
// Token: 0x1700027B RID: 635
|
||||
// (get) Token: 0x06000FB9 RID: 4025 RVA: 0x00041B5C File Offset: 0x0003FD5C
|
||||
public DictionaryEntry Entry
|
||||
{
|
||||
get
|
||||
{
|
||||
if (this.currentKey == null)
|
||||
{
|
||||
throw new InvalidOperationException();
|
||||
}
|
||||
this.FailFast();
|
||||
return new DictionaryEntry(this.currentKey, this.currentValue);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700027C RID: 636
|
||||
// (get) Token: 0x06000FBA RID: 4026 RVA: 0x00041B94 File Offset: 0x0003FD94
|
||||
public object Key
|
||||
{
|
||||
get
|
||||
{
|
||||
if (this.currentKey == null)
|
||||
{
|
||||
throw new InvalidOperationException();
|
||||
}
|
||||
this.FailFast();
|
||||
return this.currentKey;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700027D RID: 637
|
||||
// (get) Token: 0x06000FBB RID: 4027 RVA: 0x00041BB4 File Offset: 0x0003FDB4
|
||||
public object Value
|
||||
{
|
||||
get
|
||||
{
|
||||
if (this.currentKey == null)
|
||||
{
|
||||
throw new InvalidOperationException();
|
||||
}
|
||||
this.FailFast();
|
||||
return this.currentValue;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700027E RID: 638
|
||||
// (get) Token: 0x06000FBC RID: 4028 RVA: 0x00041BD4 File Offset: 0x0003FDD4
|
||||
public object Current
|
||||
{
|
||||
get
|
||||
{
|
||||
if (this.currentKey == null)
|
||||
{
|
||||
throw new InvalidOperationException();
|
||||
}
|
||||
switch (this.mode)
|
||||
{
|
||||
case Hashtable.EnumeratorMode.KEY_MODE:
|
||||
return this.currentKey;
|
||||
case Hashtable.EnumeratorMode.VALUE_MODE:
|
||||
return this.currentValue;
|
||||
case Hashtable.EnumeratorMode.ENTRY_MODE:
|
||||
return new DictionaryEntry(this.currentKey, this.currentValue);
|
||||
default:
|
||||
throw new Exception("should never happen");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x040003D4 RID: 980
|
||||
private Hashtable host;
|
||||
|
||||
// Token: 0x040003D5 RID: 981
|
||||
private int stamp;
|
||||
|
||||
// Token: 0x040003D6 RID: 982
|
||||
private int pos;
|
||||
|
||||
// Token: 0x040003D7 RID: 983
|
||||
private int size;
|
||||
|
||||
// Token: 0x040003D8 RID: 984
|
||||
private Hashtable.EnumeratorMode mode;
|
||||
|
||||
// Token: 0x040003D9 RID: 985
|
||||
private object currentKey;
|
||||
|
||||
// Token: 0x040003DA RID: 986
|
||||
private object currentValue;
|
||||
|
||||
// Token: 0x040003DB RID: 987
|
||||
private static readonly string xstr = "Hashtable.Enumerator: snapshot out of sync.";
|
||||
}
|
||||
|
||||
// Token: 0x0200012F RID: 303
|
||||
[DebuggerTypeProxy(typeof(CollectionDebuggerView))]
|
||||
[DebuggerDisplay("Count={Count}")]
|
||||
[Serializable]
|
||||
private class HashKeys : IEnumerable, ICollection
|
||||
{
|
||||
// Token: 0x06000FBD RID: 4029 RVA: 0x00041C40 File Offset: 0x0003FE40
|
||||
public HashKeys(Hashtable host)
|
||||
{
|
||||
if (host == null)
|
||||
{
|
||||
throw new ArgumentNullException();
|
||||
}
|
||||
this.host = host;
|
||||
}
|
||||
|
||||
// Token: 0x1700027F RID: 639
|
||||
// (get) Token: 0x06000FBE RID: 4030 RVA: 0x00041C5C File Offset: 0x0003FE5C
|
||||
public virtual int Count
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.host.Count;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000280 RID: 640
|
||||
// (get) Token: 0x06000FBF RID: 4031 RVA: 0x00041C6C File Offset: 0x0003FE6C
|
||||
public virtual bool IsSynchronized
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.host.IsSynchronized;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000281 RID: 641
|
||||
// (get) Token: 0x06000FC0 RID: 4032 RVA: 0x00041C7C File Offset: 0x0003FE7C
|
||||
public virtual object SyncRoot
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.host.SyncRoot;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000FC1 RID: 4033 RVA: 0x00041C8C File Offset: 0x0003FE8C
|
||||
public virtual void CopyTo(Array array, int arrayIndex)
|
||||
{
|
||||
if (array == null)
|
||||
{
|
||||
throw new ArgumentNullException("array");
|
||||
}
|
||||
if (array.Rank != 1)
|
||||
{
|
||||
throw new ArgumentException("array");
|
||||
}
|
||||
if (arrayIndex < 0)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException("arrayIndex");
|
||||
}
|
||||
if (array.Length - arrayIndex < this.Count)
|
||||
{
|
||||
throw new ArgumentException("not enough space");
|
||||
}
|
||||
this.host.CopyToArray(array, arrayIndex, Hashtable.EnumeratorMode.KEY_MODE);
|
||||
}
|
||||
|
||||
// Token: 0x06000FC2 RID: 4034 RVA: 0x00041D00 File Offset: 0x0003FF00
|
||||
public virtual IEnumerator GetEnumerator()
|
||||
{
|
||||
return new Hashtable.Enumerator(this.host, Hashtable.EnumeratorMode.KEY_MODE);
|
||||
}
|
||||
|
||||
// Token: 0x040003DC RID: 988
|
||||
private Hashtable host;
|
||||
}
|
||||
|
||||
// Token: 0x02000130 RID: 304
|
||||
[DebuggerTypeProxy(typeof(CollectionDebuggerView))]
|
||||
[DebuggerDisplay("Count={Count}")]
|
||||
[Serializable]
|
||||
private class HashValues : IEnumerable, ICollection
|
||||
{
|
||||
// Token: 0x06000FC3 RID: 4035 RVA: 0x00041D10 File Offset: 0x0003FF10
|
||||
public HashValues(Hashtable host)
|
||||
{
|
||||
if (host == null)
|
||||
{
|
||||
throw new ArgumentNullException();
|
||||
}
|
||||
this.host = host;
|
||||
}
|
||||
|
||||
// Token: 0x17000282 RID: 642
|
||||
// (get) Token: 0x06000FC4 RID: 4036 RVA: 0x00041D2C File Offset: 0x0003FF2C
|
||||
public virtual int Count
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.host.Count;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000283 RID: 643
|
||||
// (get) Token: 0x06000FC5 RID: 4037 RVA: 0x00041D3C File Offset: 0x0003FF3C
|
||||
public virtual bool IsSynchronized
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.host.IsSynchronized;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000284 RID: 644
|
||||
// (get) Token: 0x06000FC6 RID: 4038 RVA: 0x00041D4C File Offset: 0x0003FF4C
|
||||
public virtual object SyncRoot
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.host.SyncRoot;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000FC7 RID: 4039 RVA: 0x00041D5C File Offset: 0x0003FF5C
|
||||
public virtual void CopyTo(Array array, int arrayIndex)
|
||||
{
|
||||
if (array == null)
|
||||
{
|
||||
throw new ArgumentNullException("array");
|
||||
}
|
||||
if (array.Rank != 1)
|
||||
{
|
||||
throw new ArgumentException("array");
|
||||
}
|
||||
if (arrayIndex < 0)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException("arrayIndex");
|
||||
}
|
||||
if (array.Length - arrayIndex < this.Count)
|
||||
{
|
||||
throw new ArgumentException("not enough space");
|
||||
}
|
||||
this.host.CopyToArray(array, arrayIndex, Hashtable.EnumeratorMode.VALUE_MODE);
|
||||
}
|
||||
|
||||
// Token: 0x06000FC8 RID: 4040 RVA: 0x00041DD0 File Offset: 0x0003FFD0
|
||||
public virtual IEnumerator GetEnumerator()
|
||||
{
|
||||
return new Hashtable.Enumerator(this.host, Hashtable.EnumeratorMode.VALUE_MODE);
|
||||
}
|
||||
|
||||
// Token: 0x040003DD RID: 989
|
||||
private Hashtable host;
|
||||
}
|
||||
|
||||
// Token: 0x02000131 RID: 305
|
||||
[Serializable]
|
||||
private class SyncHashtable : Hashtable, IEnumerable
|
||||
{
|
||||
// Token: 0x06000FC9 RID: 4041 RVA: 0x00041DE0 File Offset: 0x0003FFE0
|
||||
public SyncHashtable(Hashtable host)
|
||||
{
|
||||
if (host == null)
|
||||
{
|
||||
throw new ArgumentNullException();
|
||||
}
|
||||
this.host = host;
|
||||
}
|
||||
|
||||
// Token: 0x06000FCA RID: 4042 RVA: 0x00041DFC File Offset: 0x0003FFFC
|
||||
internal SyncHashtable(SerializationInfo info, StreamingContext context)
|
||||
{
|
||||
this.host = (Hashtable)info.GetValue("ParentTable", typeof(Hashtable));
|
||||
}
|
||||
|
||||
// Token: 0x06000FCB RID: 4043 RVA: 0x00041E30 File Offset: 0x00040030
|
||||
IEnumerator IEnumerable.GetEnumerator()
|
||||
{
|
||||
return new Hashtable.Enumerator(this.host, Hashtable.EnumeratorMode.ENTRY_MODE);
|
||||
}
|
||||
|
||||
// Token: 0x06000FCC RID: 4044 RVA: 0x00041E40 File Offset: 0x00040040
|
||||
public override void GetObjectData(SerializationInfo info, StreamingContext context)
|
||||
{
|
||||
info.AddValue("ParentTable", this.host);
|
||||
}
|
||||
|
||||
// Token: 0x17000285 RID: 645
|
||||
// (get) Token: 0x06000FCD RID: 4045 RVA: 0x00041E54 File Offset: 0x00040054
|
||||
public override int Count
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.host.Count;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000286 RID: 646
|
||||
// (get) Token: 0x06000FCE RID: 4046 RVA: 0x00041E64 File Offset: 0x00040064
|
||||
public override bool IsSynchronized
|
||||
{
|
||||
get
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000287 RID: 647
|
||||
// (get) Token: 0x06000FCF RID: 4047 RVA: 0x00041E68 File Offset: 0x00040068
|
||||
public override object SyncRoot
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.host.SyncRoot;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000288 RID: 648
|
||||
// (get) Token: 0x06000FD0 RID: 4048 RVA: 0x00041E78 File Offset: 0x00040078
|
||||
public override bool IsFixedSize
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.host.IsFixedSize;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000289 RID: 649
|
||||
// (get) Token: 0x06000FD1 RID: 4049 RVA: 0x00041E88 File Offset: 0x00040088
|
||||
public override bool IsReadOnly
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.host.IsReadOnly;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700028A RID: 650
|
||||
// (get) Token: 0x06000FD2 RID: 4050 RVA: 0x00041E98 File Offset: 0x00040098
|
||||
public override ICollection Keys
|
||||
{
|
||||
get
|
||||
{
|
||||
ICollection collection = null;
|
||||
object syncRoot = this.host.SyncRoot;
|
||||
lock (syncRoot)
|
||||
{
|
||||
collection = this.host.Keys;
|
||||
}
|
||||
return collection;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700028B RID: 651
|
||||
// (get) Token: 0x06000FD3 RID: 4051 RVA: 0x00041EF0 File Offset: 0x000400F0
|
||||
public override ICollection Values
|
||||
{
|
||||
get
|
||||
{
|
||||
ICollection collection = null;
|
||||
object syncRoot = this.host.SyncRoot;
|
||||
lock (syncRoot)
|
||||
{
|
||||
collection = this.host.Values;
|
||||
}
|
||||
return collection;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700028C RID: 652
|
||||
public override object this[object key]
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.host[key];
|
||||
}
|
||||
set
|
||||
{
|
||||
object syncRoot = this.host.SyncRoot;
|
||||
lock (syncRoot)
|
||||
{
|
||||
this.host[key] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000FD6 RID: 4054 RVA: 0x00041FAC File Offset: 0x000401AC
|
||||
public override void CopyTo(Array array, int arrayIndex)
|
||||
{
|
||||
this.host.CopyTo(array, arrayIndex);
|
||||
}
|
||||
|
||||
// Token: 0x06000FD7 RID: 4055 RVA: 0x00041FBC File Offset: 0x000401BC
|
||||
public override void Add(object key, object value)
|
||||
{
|
||||
object syncRoot = this.host.SyncRoot;
|
||||
lock (syncRoot)
|
||||
{
|
||||
this.host.Add(key, value);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000FD8 RID: 4056 RVA: 0x00042010 File Offset: 0x00040210
|
||||
public override void Clear()
|
||||
{
|
||||
object syncRoot = this.host.SyncRoot;
|
||||
lock (syncRoot)
|
||||
{
|
||||
this.host.Clear();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000FD9 RID: 4057 RVA: 0x00042064 File Offset: 0x00040264
|
||||
public override bool Contains(object key)
|
||||
{
|
||||
return this.host.Find(key) >= 0;
|
||||
}
|
||||
|
||||
// Token: 0x06000FDA RID: 4058 RVA: 0x00042078 File Offset: 0x00040278
|
||||
public override IDictionaryEnumerator GetEnumerator()
|
||||
{
|
||||
return new Hashtable.Enumerator(this.host, Hashtable.EnumeratorMode.ENTRY_MODE);
|
||||
}
|
||||
|
||||
// Token: 0x06000FDB RID: 4059 RVA: 0x00042088 File Offset: 0x00040288
|
||||
public override void Remove(object key)
|
||||
{
|
||||
object syncRoot = this.host.SyncRoot;
|
||||
lock (syncRoot)
|
||||
{
|
||||
this.host.Remove(key);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000FDC RID: 4060 RVA: 0x000420DC File Offset: 0x000402DC
|
||||
public override bool ContainsKey(object key)
|
||||
{
|
||||
return this.host.Contains(key);
|
||||
}
|
||||
|
||||
// Token: 0x06000FDD RID: 4061 RVA: 0x000420EC File Offset: 0x000402EC
|
||||
public override bool ContainsValue(object value)
|
||||
{
|
||||
return this.host.ContainsValue(value);
|
||||
}
|
||||
|
||||
// Token: 0x06000FDE RID: 4062 RVA: 0x000420FC File Offset: 0x000402FC
|
||||
public override object Clone()
|
||||
{
|
||||
object syncRoot = this.host.SyncRoot;
|
||||
object obj;
|
||||
lock (syncRoot)
|
||||
{
|
||||
obj = new Hashtable.SyncHashtable((Hashtable)this.host.Clone());
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
// Token: 0x040003DE RID: 990
|
||||
private Hashtable host;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.Collections
|
||||
{
|
||||
/// <summary>Defines size, enumerators, and synchronization methods for all nongeneric collections. </summary>
|
||||
/// <filterpriority>1</filterpriority>
|
||||
// Token: 0x0200002D RID: 45
|
||||
[ComVisible(true)]
|
||||
public interface ICollection : IEnumerable
|
||||
{
|
||||
/// <summary>Gets the number of elements contained in the <see cref="T:System.Collections.ICollection" />.</summary>
|
||||
/// <returns>The number of elements contained in the <see cref="T:System.Collections.ICollection" />.</returns>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x1700001F RID: 31
|
||||
// (get) Token: 0x0600049E RID: 1182
|
||||
int Count { get; }
|
||||
|
||||
/// <summary>Gets a value indicating whether access to the <see cref="T:System.Collections.ICollection" /> is synchronized (thread safe).</summary>
|
||||
/// <returns>true if access to the <see cref="T:System.Collections.ICollection" /> is synchronized (thread safe); otherwise, false.</returns>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x17000020 RID: 32
|
||||
// (get) Token: 0x0600049F RID: 1183
|
||||
bool IsSynchronized { get; }
|
||||
|
||||
/// <summary>Gets an object that can be used to synchronize access to the <see cref="T:System.Collections.ICollection" />.</summary>
|
||||
/// <returns>An object that can be used to synchronize access to the <see cref="T:System.Collections.ICollection" />.</returns>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x17000021 RID: 33
|
||||
// (get) Token: 0x060004A0 RID: 1184
|
||||
object SyncRoot { get; }
|
||||
|
||||
/// <summary>Copies the elements of the <see cref="T:System.Collections.ICollection" /> to an <see cref="T:System.Array" />, starting at a particular <see cref="T:System.Array" /> index.</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.ICollection" />. 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.ICollection" /> is greater than the available space from <paramref name="index" /> to the end of the destination <paramref name="array" />.-or- The type of the source <see cref="T:System.Collections.ICollection" /> cannot be cast automatically to the type of the destination <paramref name="array." /></exception>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x060004A1 RID: 1185
|
||||
void CopyTo(Array array, int index);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.Collections
|
||||
{
|
||||
/// <summary>Exposes a method that compares two objects.</summary>
|
||||
/// <filterpriority>1</filterpriority>
|
||||
// Token: 0x02000132 RID: 306
|
||||
[ComVisible(true)]
|
||||
public interface IComparer
|
||||
{
|
||||
/// <summary>Compares two objects and returns a value indicating whether one is less than, equal to, or greater than the other.</summary>
|
||||
/// <returns>Value Condition Less than zero <paramref name="x" /> is less than <paramref name="y" />. Zero <paramref name="x" /> equals <paramref name="y" />. Greater than zero <paramref name="x" /> is greater than <paramref name="y" />. </returns>
|
||||
/// <param name="x">The first object to compare. </param>
|
||||
/// <param name="y">The second object to compare. </param>
|
||||
/// <exception cref="T:System.ArgumentException">Neither <paramref name="x" /> nor <paramref name="y" /> implements the <see cref="T:System.IComparable" /> interface.-or- <paramref name="x" /> and <paramref name="y" /> are of different types and neither one can handle comparisons with the other. </exception>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x06000FDF RID: 4063
|
||||
int Compare(object x, object y);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,91 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.Collections
|
||||
{
|
||||
/// <summary>Represents a nongeneric collection of key/value pairs.</summary>
|
||||
/// <filterpriority>1</filterpriority>
|
||||
// Token: 0x02000133 RID: 307
|
||||
[ComVisible(true)]
|
||||
public interface IDictionary : IEnumerable, ICollection
|
||||
{
|
||||
/// <summary>Gets a value indicating whether the <see cref="T:System.Collections.IDictionary" /> object has a fixed size.</summary>
|
||||
/// <returns>true if the <see cref="T:System.Collections.IDictionary" /> object has a fixed size; otherwise, false.</returns>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x1700028D RID: 653
|
||||
// (get) Token: 0x06000FE0 RID: 4064
|
||||
bool IsFixedSize { get; }
|
||||
|
||||
/// <summary>Gets a value indicating whether the <see cref="T:System.Collections.IDictionary" /> object is read-only.</summary>
|
||||
/// <returns>true if the <see cref="T:System.Collections.IDictionary" /> object is read-only; otherwise, false.</returns>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x1700028E RID: 654
|
||||
// (get) Token: 0x06000FE1 RID: 4065
|
||||
bool IsReadOnly { get; }
|
||||
|
||||
/// <summary>Gets or sets the element with the specified key.</summary>
|
||||
/// <returns>The element with the specified key.</returns>
|
||||
/// <param name="key">The key of the element to get or set. </param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="key" /> is null. </exception>
|
||||
/// <exception cref="T:System.NotSupportedException">The property is set and the <see cref="T:System.Collections.IDictionary" /> object is read-only.-or- The property is set, <paramref name="key" /> does not exist in the collection, and the <see cref="T:System.Collections.IDictionary" /> has a fixed size. </exception>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x1700028F RID: 655
|
||||
object this[object key] { get; set; }
|
||||
|
||||
/// <summary>Gets an <see cref="T:System.Collections.ICollection" /> object containing the keys of the <see cref="T:System.Collections.IDictionary" /> object.</summary>
|
||||
/// <returns>An <see cref="T:System.Collections.ICollection" /> object containing the keys of the <see cref="T:System.Collections.IDictionary" /> object.</returns>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x17000290 RID: 656
|
||||
// (get) Token: 0x06000FE4 RID: 4068
|
||||
ICollection Keys { get; }
|
||||
|
||||
/// <summary>Gets an <see cref="T:System.Collections.ICollection" /> object containing the values in the <see cref="T:System.Collections.IDictionary" /> object.</summary>
|
||||
/// <returns>An <see cref="T:System.Collections.ICollection" /> object containing the values in the <see cref="T:System.Collections.IDictionary" /> object.</returns>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x17000291 RID: 657
|
||||
// (get) Token: 0x06000FE5 RID: 4069
|
||||
ICollection Values { get; }
|
||||
|
||||
/// <summary>Adds an element with the provided key and value to the <see cref="T:System.Collections.IDictionary" /> object.</summary>
|
||||
/// <param name="key">The <see cref="T:System.Object" /> to use as the key of the element to add. </param>
|
||||
/// <param name="value">The <see cref="T:System.Object" /> to use as the value of the element to add. </param>
|
||||
/// <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.IDictionary" /> object. </exception>
|
||||
/// <exception cref="T:System.NotSupportedException">The <see cref="T:System.Collections.IDictionary" /> is read-only.-or- The <see cref="T:System.Collections.IDictionary" /> has a fixed size. </exception>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x06000FE6 RID: 4070
|
||||
void Add(object key, object value);
|
||||
|
||||
/// <summary>Removes all elements from the <see cref="T:System.Collections.IDictionary" /> object.</summary>
|
||||
/// <exception cref="T:System.NotSupportedException">The <see cref="T:System.Collections.IDictionary" /> object is read-only. </exception>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x06000FE7 RID: 4071
|
||||
void Clear();
|
||||
|
||||
/// <summary>Determines whether the <see cref="T:System.Collections.IDictionary" /> object contains an element with the specified key.</summary>
|
||||
/// <returns>true if the <see cref="T:System.Collections.IDictionary" /> contains an element with the key; otherwise, false.</returns>
|
||||
/// <param name="key">The key to locate in the <see cref="T:System.Collections.IDictionary" /> object.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="key" /> is null. </exception>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x06000FE8 RID: 4072
|
||||
bool Contains(object key);
|
||||
|
||||
/// <summary>Returns an <see cref="T:System.Collections.IDictionaryEnumerator" /> object for the <see cref="T:System.Collections.IDictionary" /> object.</summary>
|
||||
/// <returns>An <see cref="T:System.Collections.IDictionaryEnumerator" /> object for the <see cref="T:System.Collections.IDictionary" /> object.</returns>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x06000FE9 RID: 4073
|
||||
IDictionaryEnumerator GetEnumerator();
|
||||
|
||||
/// <summary>Removes the element with the specified key from the <see cref="T:System.Collections.IDictionary" /> object.</summary>
|
||||
/// <param name="key">The key of the element to remove. </param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="key" /> is null. </exception>
|
||||
/// <exception cref="T:System.NotSupportedException">The <see cref="T:System.Collections.IDictionary" /> object is read-only.-or- The <see cref="T:System.Collections.IDictionary" /> has a fixed size. </exception>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x06000FEA RID: 4074
|
||||
void Remove(object key);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.Collections
|
||||
{
|
||||
/// <summary>Enumerates the elements of a nongeneric dictionary.</summary>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x02000134 RID: 308
|
||||
[ComVisible(true)]
|
||||
public interface IDictionaryEnumerator : IEnumerator
|
||||
{
|
||||
/// <summary>Gets both the key and the value of the current dictionary entry.</summary>
|
||||
/// <returns>A <see cref="T:System.Collections.DictionaryEntry" /> containing both the key and the value of the current dictionary entry.</returns>
|
||||
/// <exception cref="T:System.InvalidOperationException">The <see cref="T:System.Collections.IDictionaryEnumerator" /> is positioned before the first entry of the dictionary or after the last entry. </exception>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x17000292 RID: 658
|
||||
// (get) Token: 0x06000FEB RID: 4075
|
||||
DictionaryEntry Entry { get; }
|
||||
|
||||
/// <summary>Gets the key of the current dictionary entry.</summary>
|
||||
/// <returns>The key of the current element of the enumeration.</returns>
|
||||
/// <exception cref="T:System.InvalidOperationException">The <see cref="T:System.Collections.IDictionaryEnumerator" /> is positioned before the first entry of the dictionary or after the last entry. </exception>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x17000293 RID: 659
|
||||
// (get) Token: 0x06000FEC RID: 4076
|
||||
object Key { get; }
|
||||
|
||||
/// <summary>Gets the value of the current dictionary entry.</summary>
|
||||
/// <returns>The value of the current element of the enumeration.</returns>
|
||||
/// <exception cref="T:System.InvalidOperationException">The <see cref="T:System.Collections.IDictionaryEnumerator" /> is positioned before the first entry of the dictionary or after the last entry. </exception>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x17000294 RID: 660
|
||||
// (get) Token: 0x06000FED RID: 4077
|
||||
object Value { get; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.Collections
|
||||
{
|
||||
/// <summary>Exposes the enumerator, which supports a simple iteration over a non-generic collection.</summary>
|
||||
/// <filterpriority>1</filterpriority>
|
||||
// Token: 0x02000018 RID: 24
|
||||
[ComVisible(true)]
|
||||
[Guid("496B0ABE-CDEE-11d3-88E8-00902754C43A")]
|
||||
public interface IEnumerable
|
||||
{
|
||||
/// <summary>Returns an enumerator that iterates through a collection.</summary>
|
||||
/// <returns>An <see cref="T:System.Collections.IEnumerator" /> object that can be used to iterate through the collection.</returns>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x06000172 RID: 370
|
||||
[DispId(-4)]
|
||||
IEnumerator GetEnumerator();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.Collections
|
||||
{
|
||||
/// <summary>Supports a simple iteration over a nongeneric collection.</summary>
|
||||
/// <filterpriority>1</filterpriority>
|
||||
// Token: 0x02000017 RID: 23
|
||||
[ComVisible(true)]
|
||||
[Guid("496B0ABF-CDEE-11D3-88E8-00902754C43A")]
|
||||
public interface IEnumerator
|
||||
{
|
||||
/// <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>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x17000007 RID: 7
|
||||
// (get) Token: 0x0600016F RID: 367
|
||||
object Current { get; }
|
||||
|
||||
/// <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>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x06000170 RID: 368
|
||||
bool 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>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x06000171 RID: 369
|
||||
void Reset();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.Collections
|
||||
{
|
||||
/// <summary>Defines methods to support the comparison of objects for equality.</summary>
|
||||
// Token: 0x02000135 RID: 309
|
||||
[ComVisible(true)]
|
||||
public interface IEqualityComparer
|
||||
{
|
||||
/// <summary>Determines whether the specified objects are equal.</summary>
|
||||
/// <returns>true if the specified objects are equal; otherwise, false.</returns>
|
||||
/// <param name="x">The first object to compare.</param>
|
||||
/// <param name="y">The second object to compare.</param>
|
||||
/// <exception cref="T:System.ArgumentException">
|
||||
/// <paramref name="x" /> and <paramref name="y" /> are of different types and neither one can handle comparisons with the other.</exception>
|
||||
// Token: 0x06000FEE RID: 4078
|
||||
bool Equals(object x, object y);
|
||||
|
||||
/// <summary>Returns a hash code for the specified object.</summary>
|
||||
/// <returns>A hash code for the specified object.</returns>
|
||||
/// <param name="obj">The <see cref="T:System.Object" /> for which a hash code is to be returned.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">The type of <paramref name="obj" /> is a reference type and <paramref name="obj" /> is null.</exception>
|
||||
// Token: 0x06000FEF RID: 4079
|
||||
int GetHashCode(object obj);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.Collections
|
||||
{
|
||||
/// <summary>Supplies a hash code for an object, using a custom hash function.</summary>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x02000136 RID: 310
|
||||
[Obsolete("Please use IEqualityComparer instead.")]
|
||||
[ComVisible(true)]
|
||||
public interface IHashCodeProvider
|
||||
{
|
||||
/// <summary>Returns a hash code for the specified object.</summary>
|
||||
/// <returns>A hash code for the specified object.</returns>
|
||||
/// <param name="obj">The <see cref="T:System.Object" /> for which a hash code is to be returned. </param>
|
||||
/// <exception cref="T:System.ArgumentNullException">The type of <paramref name="obj" /> is a reference type and <paramref name="obj" /> is null. </exception>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x06000FF0 RID: 4080
|
||||
int GetHashCode(object obj);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,92 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.Collections
|
||||
{
|
||||
/// <summary>Represents a non-generic collection of objects that can be individually accessed by index.</summary>
|
||||
/// <filterpriority>1</filterpriority>
|
||||
// Token: 0x0200002E RID: 46
|
||||
[ComVisible(true)]
|
||||
public interface IList : IEnumerable, ICollection
|
||||
{
|
||||
/// <summary>Gets a value indicating whether the <see cref="T:System.Collections.IList" /> has a fixed size.</summary>
|
||||
/// <returns>true if the <see cref="T:System.Collections.IList" /> has a fixed size; otherwise, false.</returns>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x17000022 RID: 34
|
||||
// (get) Token: 0x060004A2 RID: 1186
|
||||
bool IsFixedSize { get; }
|
||||
|
||||
/// <summary>Gets a value indicating whether the <see cref="T:System.Collections.IList" /> is read-only.</summary>
|
||||
/// <returns>true if the <see cref="T:System.Collections.IList" /> is read-only; otherwise, false.</returns>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x17000023 RID: 35
|
||||
// (get) Token: 0x060004A3 RID: 1187
|
||||
bool IsReadOnly { get; }
|
||||
|
||||
/// <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 not a valid index in the <see cref="T:System.Collections.IList" />. </exception>
|
||||
/// <exception cref="T:System.NotSupportedException">The property is set and the <see cref="T:System.Collections.IList" /> is read-only. </exception>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x17000024 RID: 36
|
||||
object this[int index] { get; set; }
|
||||
|
||||
/// <summary>Adds an item to the <see cref="T:System.Collections.IList" />.</summary>
|
||||
/// <returns>The position into which the new element was inserted.</returns>
|
||||
/// <param name="value">The <see cref="T:System.Object" /> to add to the <see cref="T:System.Collections.IList" />. </param>
|
||||
/// <exception cref="T:System.NotSupportedException">The <see cref="T:System.Collections.IList" /> is read-only.-or- The <see cref="T:System.Collections.IList" /> has a fixed size. </exception>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x060004A6 RID: 1190
|
||||
int Add(object value);
|
||||
|
||||
/// <summary>Removes all items from the <see cref="T:System.Collections.IList" />.</summary>
|
||||
/// <exception cref="T:System.NotSupportedException">The <see cref="T:System.Collections.IList" /> is read-only. </exception>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x060004A7 RID: 1191
|
||||
void Clear();
|
||||
|
||||
/// <summary>Determines whether the <see cref="T:System.Collections.IList" /> contains a specific value.</summary>
|
||||
/// <returns>true if the <see cref="T:System.Object" /> is found in the <see cref="T:System.Collections.IList" />; otherwise, false.</returns>
|
||||
/// <param name="value">The <see cref="T:System.Object" /> to locate in the <see cref="T:System.Collections.IList" />. </param>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x060004A8 RID: 1192
|
||||
bool Contains(object value);
|
||||
|
||||
/// <summary>Determines the index of a specific item in the <see cref="T:System.Collections.IList" />.</summary>
|
||||
/// <returns>The index of <paramref name="value" /> if found in the list; otherwise, -1.</returns>
|
||||
/// <param name="value">The <see cref="T:System.Object" /> to locate in the <see cref="T:System.Collections.IList" />. </param>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x060004A9 RID: 1193
|
||||
int IndexOf(object value);
|
||||
|
||||
/// <summary>Inserts an item to the <see cref="T:System.Collections.IList" /> 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 into the <see cref="T:System.Collections.IList" />. </param>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="index" /> is not a valid index in the <see cref="T:System.Collections.IList" />. </exception>
|
||||
/// <exception cref="T:System.NotSupportedException">The <see cref="T:System.Collections.IList" /> is read-only.-or- The <see cref="T:System.Collections.IList" /> has a fixed size. </exception>
|
||||
/// <exception cref="T:System.NullReferenceException">
|
||||
/// <paramref name="value" /> is null reference in the <see cref="T:System.Collections.IList" />.</exception>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x060004AA RID: 1194
|
||||
void Insert(int index, object value);
|
||||
|
||||
/// <summary>Removes the first occurrence of a specific object from the <see cref="T:System.Collections.IList" />.</summary>
|
||||
/// <param name="value">The <see cref="T:System.Object" /> to remove from the <see cref="T:System.Collections.IList" />. </param>
|
||||
/// <exception cref="T:System.NotSupportedException">The <see cref="T:System.Collections.IList" /> is read-only.-or- The <see cref="T:System.Collections.IList" /> has a fixed size. </exception>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x060004AB RID: 1195
|
||||
void Remove(object value);
|
||||
|
||||
/// <summary>Removes the <see cref="T:System.Collections.IList" /> item at the specified index.</summary>
|
||||
/// <param name="index">The zero-based index of the item to remove. </param>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="index" /> is not a valid index in the <see cref="T:System.Collections.IList" />. </exception>
|
||||
/// <exception cref="T:System.NotSupportedException">The <see cref="T:System.Collections.IList" /> is read-only.-or- The <see cref="T:System.Collections.IList" /> has a fixed size. </exception>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x060004AC RID: 1196
|
||||
void RemoveAt(int index);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,422 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.Collections.ObjectModel
|
||||
{
|
||||
/// <summary>Provides the base class for a generic collection.</summary>
|
||||
/// <typeparam name="T">The type of elements in the collection.</typeparam>
|
||||
// Token: 0x02000110 RID: 272
|
||||
[ComVisible(false)]
|
||||
[Serializable]
|
||||
public class Collection<T> : IEnumerable, ICollection, IList, ICollection<T>, IList<T>, IEnumerable<T>
|
||||
{
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.ObjectModel.Collection`1" /> class that is empty.</summary>
|
||||
// Token: 0x06000D65 RID: 3429 RVA: 0x0003B278 File Offset: 0x00039478
|
||||
public Collection()
|
||||
{
|
||||
List<T> list = new List<T>();
|
||||
IList list2 = list;
|
||||
this.syncRoot = list2.SyncRoot;
|
||||
this.list = list;
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.ObjectModel.Collection`1" /> class as a wrapper for the specified list.</summary>
|
||||
/// <param name="list">The list that is wrapped by the new collection.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="list" /> is null.</exception>
|
||||
// Token: 0x06000D66 RID: 3430 RVA: 0x0003B2A8 File Offset: 0x000394A8
|
||||
public Collection(IList<T> list)
|
||||
{
|
||||
if (list == null)
|
||||
{
|
||||
throw new ArgumentNullException("list");
|
||||
}
|
||||
this.list = list;
|
||||
ICollection collection = list as ICollection;
|
||||
this.syncRoot = ((collection == null) ? new object() : collection.SyncRoot);
|
||||
}
|
||||
|
||||
// Token: 0x170001FF RID: 511
|
||||
// (get) Token: 0x06000D67 RID: 3431 RVA: 0x0003B2F8 File Offset: 0x000394F8
|
||||
bool ICollection<T>.IsReadOnly
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.list.IsReadOnly;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Copies the elements of the <see cref="T:System.Collections.ICollection" /> to an <see cref="T:System.Array" />, starting at a particular <see cref="T:System.Array" /> index.</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.ICollection" />. 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-<paramref name="array" /> does not have zero-based indexing.-or-The number of elements in the source <see cref="T:System.Collections.ICollection" /> is greater than the available space from <paramref name="index" /> to the end of the destination <paramref name="array" />.-or-The type of the source <see cref="T:System.Collections.ICollection" /> cannot be cast automatically to the type of the destination <paramref name="array" />.</exception>
|
||||
// Token: 0x06000D68 RID: 3432 RVA: 0x0003B308 File Offset: 0x00039508
|
||||
void ICollection.CopyTo(Array array, int index)
|
||||
{
|
||||
((ICollection)this.list).CopyTo(array, index);
|
||||
}
|
||||
|
||||
/// <summary>Returns an enumerator that iterates through a collection.</summary>
|
||||
/// <returns>An <see cref="T:System.Collections.IEnumerator" /> that can be used to iterate through the collection.</returns>
|
||||
// Token: 0x06000D69 RID: 3433 RVA: 0x0003B31C File Offset: 0x0003951C
|
||||
IEnumerator IEnumerable.GetEnumerator()
|
||||
{
|
||||
return this.list.GetEnumerator();
|
||||
}
|
||||
|
||||
/// <summary>Adds an item to the <see cref="T:System.Collections.IList" />.</summary>
|
||||
/// <returns>The position into which the new element was inserted.</returns>
|
||||
/// <param name="value">The <see cref="T:System.Object" /> to add to the <see cref="T:System.Collections.IList" />.</param>
|
||||
/// <exception cref="T:System.ArgumentException">
|
||||
/// <paramref name="value" /> is of a type that is not assignable to the <see cref="T:System.Collections.IList" />.</exception>
|
||||
// Token: 0x06000D6A RID: 3434 RVA: 0x0003B32C File Offset: 0x0003952C
|
||||
int IList.Add(object value)
|
||||
{
|
||||
int count = this.list.Count;
|
||||
this.InsertItem(count, Collection<T>.ConvertItem(value));
|
||||
return count;
|
||||
}
|
||||
|
||||
/// <summary>Determines whether the <see cref="T:System.Collections.IList" /> contains a specific value.</summary>
|
||||
/// <returns>true if the <see cref="T:System.Object" /> is found in the <see cref="T:System.Collections.IList" />; otherwise, false.</returns>
|
||||
/// <param name="value">The <see cref="T:System.Object" /> to locate in the <see cref="T:System.Collections.IList" />.</param>
|
||||
/// <exception cref="T:System.ArgumentException">
|
||||
/// <paramref name="value" /> is of a type that is not assignable to the <see cref="T:System.Collections.IList" />.</exception>
|
||||
// Token: 0x06000D6B RID: 3435 RVA: 0x0003B354 File Offset: 0x00039554
|
||||
bool IList.Contains(object value)
|
||||
{
|
||||
return Collection<T>.IsValidItem(value) && this.list.Contains((T)((object)value));
|
||||
}
|
||||
|
||||
/// <summary>Determines the index of a specific item in the <see cref="T:System.Collections.IList" />.</summary>
|
||||
/// <returns>The index of <paramref name="value" /> if found in the list; otherwise, -1.</returns>
|
||||
/// <param name="value">The <see cref="T:System.Object" /> to locate in the <see cref="T:System.Collections.IList" />.</param>
|
||||
/// <exception cref="T:System.ArgumentException">
|
||||
/// <paramref name="value" /> is of a type that is not assignable to the <see cref="T:System.Collections.IList" />.</exception>
|
||||
// Token: 0x06000D6C RID: 3436 RVA: 0x0003B374 File Offset: 0x00039574
|
||||
int IList.IndexOf(object value)
|
||||
{
|
||||
if (Collection<T>.IsValidItem(value))
|
||||
{
|
||||
return this.list.IndexOf((T)((object)value));
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
/// <summary>Inserts an item into the <see cref="T:System.Collections.IList" /> 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 into the <see cref="T:System.Collections.IList" />.</param>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="index" /> is not a valid index in the <see cref="T:System.Collections.IList" />. </exception>
|
||||
/// <exception cref="T:System.ArgumentException">
|
||||
/// <paramref name="value" /> is of a type that is not assignable to the <see cref="T:System.Collections.IList" />.</exception>
|
||||
// Token: 0x06000D6D RID: 3437 RVA: 0x0003B394 File Offset: 0x00039594
|
||||
void IList.Insert(int index, object value)
|
||||
{
|
||||
this.InsertItem(index, Collection<T>.ConvertItem(value));
|
||||
}
|
||||
|
||||
/// <summary>Removes the first occurrence of a specific object from the <see cref="T:System.Collections.IList" />.</summary>
|
||||
/// <param name="value">The <see cref="T:System.Object" /> to remove from the <see cref="T:System.Collections.IList" />.</param>
|
||||
/// <exception cref="T:System.ArgumentException">
|
||||
/// <paramref name="value" /> is of a type that is not assignable to the <see cref="T:System.Collections.IList" />.</exception>
|
||||
// Token: 0x06000D6E RID: 3438 RVA: 0x0003B3A4 File Offset: 0x000395A4
|
||||
void IList.Remove(object value)
|
||||
{
|
||||
Collection<T>.CheckWritable(this.list);
|
||||
int num = this.IndexOf(Collection<T>.ConvertItem(value));
|
||||
this.RemoveItem(num);
|
||||
}
|
||||
|
||||
/// <summary>Gets a value indicating whether access to the <see cref="T:System.Collections.ICollection" /> is synchronized (thread safe).</summary>
|
||||
/// <returns>true if access to the <see cref="T:System.Collections.ICollection" /> is synchronized (thread safe); otherwise, false. In the default implementation of <see cref="T:System.Collections.ObjectModel.Collection`1" />, this property always returns false.</returns>
|
||||
// Token: 0x17000200 RID: 512
|
||||
// (get) Token: 0x06000D6F RID: 3439 RVA: 0x0003B3D0 File Offset: 0x000395D0
|
||||
bool ICollection.IsSynchronized
|
||||
{
|
||||
get
|
||||
{
|
||||
return Collection<T>.IsSynchronized(this.list);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets an object that can be used to synchronize access to the <see cref="T:System.Collections.ICollection" />.</summary>
|
||||
/// <returns>An object that can be used to synchronize access to the <see cref="T:System.Collections.ICollection" />. In the default implementation of <see cref="T:System.Collections.ObjectModel.Collection`1" />, this property always returns the current instance.</returns>
|
||||
// Token: 0x17000201 RID: 513
|
||||
// (get) Token: 0x06000D70 RID: 3440 RVA: 0x0003B3E0 File Offset: 0x000395E0
|
||||
object ICollection.SyncRoot
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.syncRoot;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a value indicating whether the <see cref="T:System.Collections.IList" /> has a fixed size.</summary>
|
||||
/// <returns>true if the <see cref="T:System.Collections.IList" /> has a fixed size; otherwise, false. In the default implementation of <see cref="T:System.Collections.ObjectModel.Collection`1" />, this property always returns false.</returns>
|
||||
// Token: 0x17000202 RID: 514
|
||||
// (get) Token: 0x06000D71 RID: 3441 RVA: 0x0003B3E8 File Offset: 0x000395E8
|
||||
bool IList.IsFixedSize
|
||||
{
|
||||
get
|
||||
{
|
||||
return Collection<T>.IsFixedSize(this.list);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a value indicating whether the <see cref="T:System.Collections.IList" /> is read-only.</summary>
|
||||
/// <returns>true if the <see cref="T:System.Collections.IList" /> is read-only; otherwise, false. In the default implementation of <see cref="T:System.Collections.ObjectModel.Collection`1" />, this property always returns false.</returns>
|
||||
// Token: 0x17000203 RID: 515
|
||||
// (get) Token: 0x06000D72 RID: 3442 RVA: 0x0003B3F8 File Offset: 0x000395F8
|
||||
bool IList.IsReadOnly
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.list.IsReadOnly;
|
||||
}
|
||||
}
|
||||
|
||||
/// <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 not a valid index in the <see cref="T:System.Collections.IList" />.</exception>
|
||||
/// <exception cref="T:System.ArgumentException">The property is set, and <paramref name="index" /> is of a type that is not assignable to the <see cref="T:System.Collections.IList" />.</exception>
|
||||
// Token: 0x17000204 RID: 516
|
||||
object IList.this[int index]
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.list[index];
|
||||
}
|
||||
set
|
||||
{
|
||||
this.SetItem(index, Collection<T>.ConvertItem(value));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Adds an object to the end of the <see cref="T:System.Collections.ObjectModel.Collection`1" />. </summary>
|
||||
/// <param name="item">The object to be added to the end of the <see cref="T:System.Collections.ObjectModel.Collection`1" />. The value can be null for reference types.</param>
|
||||
// Token: 0x06000D75 RID: 3445 RVA: 0x0003B42C File Offset: 0x0003962C
|
||||
public void Add(T item)
|
||||
{
|
||||
int count = this.list.Count;
|
||||
this.InsertItem(count, item);
|
||||
}
|
||||
|
||||
/// <summary>Removes all elements from the <see cref="T:System.Collections.ObjectModel.Collection`1" />.</summary>
|
||||
// Token: 0x06000D76 RID: 3446 RVA: 0x0003B450 File Offset: 0x00039650
|
||||
public void Clear()
|
||||
{
|
||||
this.ClearItems();
|
||||
}
|
||||
|
||||
/// <summary>Removes all elements from the <see cref="T:System.Collections.ObjectModel.Collection`1" />.</summary>
|
||||
// Token: 0x06000D77 RID: 3447 RVA: 0x0003B458 File Offset: 0x00039658
|
||||
protected virtual void ClearItems()
|
||||
{
|
||||
this.list.Clear();
|
||||
}
|
||||
|
||||
/// <summary>Determines whether an element is in the <see cref="T:System.Collections.ObjectModel.Collection`1" />.</summary>
|
||||
/// <returns>true if <paramref name="item" /> is found in the <see cref="T:System.Collections.ObjectModel.Collection`1" />; otherwise, false.</returns>
|
||||
/// <param name="item">The object to locate in the <see cref="T:System.Collections.ObjectModel.Collection`1" />. The value can be null for reference types.</param>
|
||||
// Token: 0x06000D78 RID: 3448 RVA: 0x0003B468 File Offset: 0x00039668
|
||||
public bool Contains(T item)
|
||||
{
|
||||
return this.list.Contains(item);
|
||||
}
|
||||
|
||||
/// <summary>Copies the entire <see cref="T:System.Collections.ObjectModel.Collection`1" /> 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.ObjectModel.Collection`1" />. 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">The number of elements in the source <see cref="T:System.Collections.ObjectModel.Collection`1" /> is greater than the available space from <paramref name="index" /> to the end of the destination <paramref name="array" />.</exception>
|
||||
// Token: 0x06000D79 RID: 3449 RVA: 0x0003B478 File Offset: 0x00039678
|
||||
public void CopyTo(T[] array, int index)
|
||||
{
|
||||
this.list.CopyTo(array, index);
|
||||
}
|
||||
|
||||
/// <summary>Returns an enumerator that iterates through the <see cref="T:System.Collections.ObjectModel.Collection`1" />.</summary>
|
||||
/// <returns>An <see cref="T:System.Collections.Generic.IEnumerator`1" /> for the <see cref="T:System.Collections.ObjectModel.Collection`1" />.</returns>
|
||||
// Token: 0x06000D7A RID: 3450 RVA: 0x0003B488 File Offset: 0x00039688
|
||||
public IEnumerator<T> GetEnumerator()
|
||||
{
|
||||
return this.list.GetEnumerator();
|
||||
}
|
||||
|
||||
/// <summary>Searches for the specified object and returns the zero-based index of the first occurrence within the entire <see cref="T:System.Collections.ObjectModel.Collection`1" />.</summary>
|
||||
/// <returns>The zero-based index of the first occurrence of <paramref name="item" /> within the entire <see cref="T:System.Collections.ObjectModel.Collection`1" />, if found; otherwise, -1.</returns>
|
||||
/// <param name="item">The object to locate in the <see cref="T:System.Collections.Generic.List`1" />. The value can be null for reference types.</param>
|
||||
// Token: 0x06000D7B RID: 3451 RVA: 0x0003B498 File Offset: 0x00039698
|
||||
public int IndexOf(T item)
|
||||
{
|
||||
return this.list.IndexOf(item);
|
||||
}
|
||||
|
||||
/// <summary>Inserts an element into the <see cref="T:System.Collections.ObjectModel.Collection`1" /> at the specified index.</summary>
|
||||
/// <param name="index">The zero-based index at which <paramref name="item" /> should be inserted.</param>
|
||||
/// <param name="item">The object to insert. The value can be null for reference types.</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.ObjectModel.Collection`1.Count" />.</exception>
|
||||
// Token: 0x06000D7C RID: 3452 RVA: 0x0003B4A8 File Offset: 0x000396A8
|
||||
public void Insert(int index, T item)
|
||||
{
|
||||
this.InsertItem(index, item);
|
||||
}
|
||||
|
||||
/// <summary>Inserts an element into the <see cref="T:System.Collections.ObjectModel.Collection`1" /> at the specified index.</summary>
|
||||
/// <param name="index">The zero-based index at which <paramref name="item" /> should be inserted.</param>
|
||||
/// <param name="item">The object to insert. The value can be null for reference types.</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.ObjectModel.Collection`1.Count" />.</exception>
|
||||
// Token: 0x06000D7D RID: 3453 RVA: 0x0003B4B4 File Offset: 0x000396B4
|
||||
protected virtual void InsertItem(int index, T item)
|
||||
{
|
||||
this.list.Insert(index, item);
|
||||
}
|
||||
|
||||
/// <summary>Gets a <see cref="T:System.Collections.Generic.IList`1" /> wrapper around the <see cref="T:System.Collections.ObjectModel.Collection`1" />.</summary>
|
||||
/// <returns>A <see cref="T:System.Collections.Generic.IList`1" /> wrapper around the <see cref="T:System.Collections.ObjectModel.Collection`1" />.</returns>
|
||||
// Token: 0x17000205 RID: 517
|
||||
// (get) Token: 0x06000D7E RID: 3454 RVA: 0x0003B4C4 File Offset: 0x000396C4
|
||||
protected IList<T> Items
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.list;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Removes the first occurrence of a specific object from the <see cref="T:System.Collections.ObjectModel.Collection`1" />.</summary>
|
||||
/// <returns>true if <paramref name="item" /> is successfully removed; otherwise, false. This method also returns false if <paramref name="item" /> was not found in the original <see cref="T:System.Collections.ObjectModel.Collection`1" />.</returns>
|
||||
/// <param name="item">The object to remove from the <see cref="T:System.Collections.ObjectModel.Collection`1" />. The value can be null for reference types.</param>
|
||||
// Token: 0x06000D7F RID: 3455 RVA: 0x0003B4CC File Offset: 0x000396CC
|
||||
public bool Remove(T item)
|
||||
{
|
||||
int num = this.IndexOf(item);
|
||||
if (num == -1)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
this.RemoveItem(num);
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>Removes the element at the specified index of the <see cref="T:System.Collections.ObjectModel.Collection`1" />.</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 zero.-or-<paramref name="index" /> is equal to or greater than <see cref="P:System.Collections.ObjectModel.Collection`1.Count" />.</exception>
|
||||
// Token: 0x06000D80 RID: 3456 RVA: 0x0003B4F4 File Offset: 0x000396F4
|
||||
public void RemoveAt(int index)
|
||||
{
|
||||
this.RemoveItem(index);
|
||||
}
|
||||
|
||||
/// <summary>Removes the element at the specified index of the <see cref="T:System.Collections.ObjectModel.Collection`1" />.</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 zero.-or-<paramref name="index" /> is equal to or greater than <see cref="P:System.Collections.ObjectModel.Collection`1.Count" />.</exception>
|
||||
// Token: 0x06000D81 RID: 3457 RVA: 0x0003B500 File Offset: 0x00039700
|
||||
protected virtual void RemoveItem(int index)
|
||||
{
|
||||
this.list.RemoveAt(index);
|
||||
}
|
||||
|
||||
/// <summary>Gets the number of elements actually contained in the <see cref="T:System.Collections.ObjectModel.Collection`1" />.</summary>
|
||||
/// <returns>The number of elements actually contained in the <see cref="T:System.Collections.ObjectModel.Collection`1" />.</returns>
|
||||
// Token: 0x17000206 RID: 518
|
||||
// (get) Token: 0x06000D82 RID: 3458 RVA: 0x0003B510 File Offset: 0x00039710
|
||||
public int Count
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.list.Count;
|
||||
}
|
||||
}
|
||||
|
||||
/// <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.ObjectModel.Collection`1.Count" />. </exception>
|
||||
// Token: 0x17000207 RID: 519
|
||||
public T this[int index]
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.list[index];
|
||||
}
|
||||
set
|
||||
{
|
||||
this.SetItem(index, value);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Replaces the element at the specified index.</summary>
|
||||
/// <param name="index">The zero-based index of the element to replace.</param>
|
||||
/// <param name="item">The new value for the element at the specified index. The value can be null for reference types.</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.ObjectModel.Collection`1.Count" />.</exception>
|
||||
// Token: 0x06000D85 RID: 3461 RVA: 0x0003B53C File Offset: 0x0003973C
|
||||
protected virtual void SetItem(int index, T item)
|
||||
{
|
||||
this.list[index] = item;
|
||||
}
|
||||
|
||||
// Token: 0x06000D86 RID: 3462 RVA: 0x0003B54C File Offset: 0x0003974C
|
||||
internal static bool IsValidItem(object item)
|
||||
{
|
||||
return item is T || (item == null && !typeof(T).IsValueType);
|
||||
}
|
||||
|
||||
// Token: 0x06000D87 RID: 3463 RVA: 0x0003B578 File Offset: 0x00039778
|
||||
internal static T ConvertItem(object item)
|
||||
{
|
||||
if (Collection<T>.IsValidItem(item))
|
||||
{
|
||||
return (T)((object)item);
|
||||
}
|
||||
throw new ArgumentException("item");
|
||||
}
|
||||
|
||||
// Token: 0x06000D88 RID: 3464 RVA: 0x0003B598 File Offset: 0x00039798
|
||||
internal static void CheckWritable(IList<T> list)
|
||||
{
|
||||
if (list.IsReadOnly)
|
||||
{
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000D89 RID: 3465 RVA: 0x0003B5AC File Offset: 0x000397AC
|
||||
internal static bool IsSynchronized(IList<T> list)
|
||||
{
|
||||
ICollection collection = list as ICollection;
|
||||
return collection != null && collection.IsSynchronized;
|
||||
}
|
||||
|
||||
// Token: 0x06000D8A RID: 3466 RVA: 0x0003B5D4 File Offset: 0x000397D4
|
||||
internal static bool IsFixedSize(IList<T> list)
|
||||
{
|
||||
IList list2 = list as IList;
|
||||
return list2 != null && list2.IsFixedSize;
|
||||
}
|
||||
|
||||
// Token: 0x04000387 RID: 903
|
||||
private IList<T> list;
|
||||
|
||||
// Token: 0x04000388 RID: 904
|
||||
private object syncRoot;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,281 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.Collections.ObjectModel
|
||||
{
|
||||
/// <summary>Provides the abstract base class for a collection whose keys are embedded in the values.</summary>
|
||||
/// <typeparam name="TKey">The type of keys in the collection.</typeparam>
|
||||
/// <typeparam name="TItem">The type of items in the collection.</typeparam>
|
||||
// Token: 0x02000111 RID: 273
|
||||
[ComVisible(false)]
|
||||
[Serializable]
|
||||
public abstract class KeyedCollection<TKey, TItem> : Collection<TItem>
|
||||
{
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.ObjectModel.KeyedCollection`2" /> class that uses the default equality comparer.</summary>
|
||||
// Token: 0x06000D8B RID: 3467 RVA: 0x0003B5FC File Offset: 0x000397FC
|
||||
protected KeyedCollection()
|
||||
: this(null, 0)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.ObjectModel.KeyedCollection`2" /> class that uses the specified equality comparer.</summary>
|
||||
/// <param name="comparer">The implementation of the <see cref="T:System.Collections.Generic.IEqualityComparer`1" /> generic interface to use when comparing keys, or null to use the default equality comparer for the type of the key, obtained from <see cref="P:System.Collections.Generic.EqualityComparer`1.Default" />.</param>
|
||||
// Token: 0x06000D8C RID: 3468 RVA: 0x0003B608 File Offset: 0x00039808
|
||||
protected KeyedCollection(IEqualityComparer<TKey> comparer)
|
||||
: this(comparer, 0)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.ObjectModel.KeyedCollection`2" /> class that uses the specified equality comparer and creates a lookup dictionary when the specified threshold is exceeded.</summary>
|
||||
/// <param name="comparer">The implementation of the <see cref="T:System.Collections.Generic.IEqualityComparer`1" /> generic interface to use when comparing keys, or null to use the default equality comparer for the type of the key, obtained from <see cref="P:System.Collections.Generic.EqualityComparer`1.Default" />.</param>
|
||||
/// <param name="dictionaryCreationThreshold">The number of elements the collection can hold without creating a lookup dictionary (0 creates the lookup dictionary when the first item is added), or –1 to specify that a lookup dictionary is never created.</param>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="dictionaryCreationThreshold" /> is less than –1.</exception>
|
||||
// Token: 0x06000D8D RID: 3469 RVA: 0x0003B614 File Offset: 0x00039814
|
||||
protected KeyedCollection(IEqualityComparer<TKey> comparer, int dictionaryCreationThreshold)
|
||||
{
|
||||
if (comparer != null)
|
||||
{
|
||||
this.comparer = comparer;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.comparer = EqualityComparer<TKey>.Default;
|
||||
}
|
||||
this.dictionaryCreationThreshold = dictionaryCreationThreshold;
|
||||
if (dictionaryCreationThreshold == 0)
|
||||
{
|
||||
this.dictionary = new Dictionary<TKey, TItem>(this.comparer);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Determines whether the collection contains an element with the specified key.</summary>
|
||||
/// <returns>true if the <see cref="T:System.Collections.ObjectModel.KeyedCollection`2" /> contains an element with the specified key; otherwise, false.</returns>
|
||||
/// <param name="key">The key to locate in the <see cref="T:System.Collections.ObjectModel.KeyedCollection`2" />.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="key" /> is null.</exception>
|
||||
// Token: 0x06000D8E RID: 3470 RVA: 0x0003B664 File Offset: 0x00039864
|
||||
public bool Contains(TKey key)
|
||||
{
|
||||
if (this.dictionary != null)
|
||||
{
|
||||
return this.dictionary.ContainsKey(key);
|
||||
}
|
||||
return this.IndexOfKey(key) >= 0;
|
||||
}
|
||||
|
||||
// Token: 0x06000D8F RID: 3471 RVA: 0x0003B68C File Offset: 0x0003988C
|
||||
private int IndexOfKey(TKey key)
|
||||
{
|
||||
for (int i = this.Count - 1; i >= 0; i--)
|
||||
{
|
||||
TKey keyForItem = this.GetKeyForItem(this[i]);
|
||||
if (this.comparer.Equals(key, keyForItem))
|
||||
{
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
/// <summary>Removes the element with the specified key from the <see cref="T:System.Collections.ObjectModel.KeyedCollection`2" />.</summary>
|
||||
/// <returns>true if the element is successfully removed; otherwise, false. This method also returns false if <paramref name="key" /> is not found in the <see cref="T:System.Collections.ObjectModel.KeyedCollection`2" />.</returns>
|
||||
/// <param name="key">The key of the element to remove.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="key" /> is null.</exception>
|
||||
// Token: 0x06000D90 RID: 3472 RVA: 0x0003B6D8 File Offset: 0x000398D8
|
||||
public bool Remove(TKey key)
|
||||
{
|
||||
if (this.dictionary != null)
|
||||
{
|
||||
TItem titem;
|
||||
return this.dictionary.TryGetValue(key, out titem) && base.Remove(titem);
|
||||
}
|
||||
int num = this.IndexOfKey(key);
|
||||
if (num == -1)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
this.RemoveAt(num);
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>Gets the generic equality comparer that is used to determine equality of keys in the collection.</summary>
|
||||
/// <returns>The implementation of the <see cref="T:System.Collections.Generic.IEqualityComparer`1" /> generic interface that is used to determine equality of keys in the collection.</returns>
|
||||
// Token: 0x17000208 RID: 520
|
||||
// (get) Token: 0x06000D91 RID: 3473 RVA: 0x0003B728 File Offset: 0x00039928
|
||||
public IEqualityComparer<TKey> Comparer
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.comparer;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets the element with the specified key. </summary>
|
||||
/// <returns>The element with the specified key. If an element with the specified key is not found, an exception is thrown.</returns>
|
||||
/// <param name="key">The key of the element to get.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="key" /> is null.</exception>
|
||||
/// <exception cref="T:System.Collections.Generic.KeyNotFoundException">An element with the specified key does not exist in the collection.</exception>
|
||||
// Token: 0x17000209 RID: 521
|
||||
public TItem this[TKey key]
|
||||
{
|
||||
get
|
||||
{
|
||||
if (this.dictionary != null)
|
||||
{
|
||||
return this.dictionary[key];
|
||||
}
|
||||
int num = this.IndexOfKey(key);
|
||||
if (num >= 0)
|
||||
{
|
||||
return base[num];
|
||||
}
|
||||
throw new KeyNotFoundException();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Changes the key associated with the specified element in the lookup dictionary.</summary>
|
||||
/// <param name="item">The element to change the key of.</param>
|
||||
/// <param name="newKey">The new key for <paramref name="item" />.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="item" /> is null.-or-<paramref name="key" /> is null.</exception>
|
||||
/// <exception cref="T:System.ArgumentException">
|
||||
/// <paramref name="item" /> is not found.-or-<paramref name="key" /> already exists in the <see cref="T:System.Collections.ObjectModel.KeyedCollection`2" />.</exception>
|
||||
// Token: 0x06000D93 RID: 3475 RVA: 0x0003B774 File Offset: 0x00039974
|
||||
protected void ChangeItemKey(TItem item, TKey newKey)
|
||||
{
|
||||
if (!this.Contains(item))
|
||||
{
|
||||
throw new ArgumentException();
|
||||
}
|
||||
TKey keyForItem = this.GetKeyForItem(item);
|
||||
if (this.comparer.Equals(keyForItem, newKey))
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (this.Contains(newKey))
|
||||
{
|
||||
throw new ArgumentException();
|
||||
}
|
||||
if (this.dictionary != null)
|
||||
{
|
||||
if (!this.dictionary.Remove(keyForItem))
|
||||
{
|
||||
throw new ArgumentException();
|
||||
}
|
||||
this.dictionary.Add(newKey, item);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Removes all elements from the <see cref="T:System.Collections.ObjectModel.KeyedCollection`2" />.</summary>
|
||||
// Token: 0x06000D94 RID: 3476 RVA: 0x0003B7F0 File Offset: 0x000399F0
|
||||
protected override void ClearItems()
|
||||
{
|
||||
if (this.dictionary != null)
|
||||
{
|
||||
this.dictionary.Clear();
|
||||
}
|
||||
base.ClearItems();
|
||||
}
|
||||
|
||||
/// <summary>When implemented in a derived class, extracts the key from the specified element.</summary>
|
||||
/// <returns>The key for the specified element.</returns>
|
||||
/// <param name="item">The element from which to extract the key.</param>
|
||||
// Token: 0x06000D95 RID: 3477
|
||||
protected abstract TKey GetKeyForItem(TItem item);
|
||||
|
||||
/// <summary>Inserts an element into the <see cref="T:System.Collections.ObjectModel.KeyedCollection`2" /> at the specified index.</summary>
|
||||
/// <param name="index">The zero-based index at which <paramref name="item" /> should be inserted.</param>
|
||||
/// <param name="item">The object to insert.</param>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="index" /> is less than 0.-or-<paramref name="index" /> is greater than <see cref="P:System.Collections.ObjectModel.Collection`1.Count" />.</exception>
|
||||
// Token: 0x06000D96 RID: 3478 RVA: 0x0003B810 File Offset: 0x00039A10
|
||||
protected override void InsertItem(int index, TItem item)
|
||||
{
|
||||
TKey keyForItem = this.GetKeyForItem(item);
|
||||
if (keyForItem == null)
|
||||
{
|
||||
throw new ArgumentNullException("GetKeyForItem(item)");
|
||||
}
|
||||
if (this.dictionary != null && this.dictionary.ContainsKey(keyForItem))
|
||||
{
|
||||
throw new ArgumentException("An element with the same key already exists in the dictionary.");
|
||||
}
|
||||
if (this.dictionary == null)
|
||||
{
|
||||
for (int i = 0; i < this.Count; i++)
|
||||
{
|
||||
if (this.comparer.Equals(keyForItem, this.GetKeyForItem(this[i])))
|
||||
{
|
||||
throw new ArgumentException("An element with the same key already exists in the dictionary.");
|
||||
}
|
||||
}
|
||||
}
|
||||
base.InsertItem(index, item);
|
||||
if (this.dictionary != null)
|
||||
{
|
||||
this.dictionary.Add(keyForItem, item);
|
||||
}
|
||||
else if (this.dictionaryCreationThreshold != -1 && this.Count > this.dictionaryCreationThreshold)
|
||||
{
|
||||
this.dictionary = new Dictionary<TKey, TItem>(this.comparer);
|
||||
for (int j = 0; j < this.Count; j++)
|
||||
{
|
||||
TItem titem = this[j];
|
||||
this.dictionary.Add(this.GetKeyForItem(titem), titem);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Removes the element at the specified index of the <see cref="T:System.Collections.ObjectModel.KeyedCollection`2" />.</summary>
|
||||
/// <param name="index">The index of the element to remove.</param>
|
||||
// Token: 0x06000D97 RID: 3479 RVA: 0x0003B934 File Offset: 0x00039B34
|
||||
protected override void RemoveItem(int index)
|
||||
{
|
||||
if (this.dictionary != null)
|
||||
{
|
||||
TKey keyForItem = this.GetKeyForItem(this[index]);
|
||||
this.dictionary.Remove(keyForItem);
|
||||
}
|
||||
base.RemoveItem(index);
|
||||
}
|
||||
|
||||
/// <summary>Replaces the item at the specified index with the specified item.</summary>
|
||||
/// <param name="index">The zero-based index of the item to be replaced.</param>
|
||||
/// <param name="item">The new item.</param>
|
||||
// Token: 0x06000D98 RID: 3480 RVA: 0x0003B970 File Offset: 0x00039B70
|
||||
protected override void SetItem(int index, TItem item)
|
||||
{
|
||||
if (this.dictionary != null)
|
||||
{
|
||||
this.dictionary.Remove(this.GetKeyForItem(this[index]));
|
||||
this.dictionary.Add(this.GetKeyForItem(item), item);
|
||||
}
|
||||
base.SetItem(index, item);
|
||||
}
|
||||
|
||||
/// <summary>Gets the lookup dictionary of the <see cref="T:System.Collections.ObjectModel.KeyedCollection`2" />.</summary>
|
||||
/// <returns>The lookup dictionary of the <see cref="T:System.Collections.ObjectModel.KeyedCollection`2" />, if it exists; otherwise, null.</returns>
|
||||
// Token: 0x1700020A RID: 522
|
||||
// (get) Token: 0x06000D99 RID: 3481 RVA: 0x0003B9BC File Offset: 0x00039BBC
|
||||
protected IDictionary<TKey, TItem> Dictionary
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.dictionary;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04000389 RID: 905
|
||||
private Dictionary<TKey, TItem> dictionary;
|
||||
|
||||
// Token: 0x0400038A RID: 906
|
||||
private IEqualityComparer<TKey> comparer;
|
||||
|
||||
// Token: 0x0400038B RID: 907
|
||||
private int dictionaryCreationThreshold;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,324 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.Collections.ObjectModel
|
||||
{
|
||||
/// <summary>Provides the base class for a generic read-only collection. </summary>
|
||||
/// <typeparam name="T">The type of elements in the collection.</typeparam>
|
||||
// Token: 0x02000112 RID: 274
|
||||
[ComVisible(false)]
|
||||
[Serializable]
|
||||
public class ReadOnlyCollection<T> : IEnumerable, ICollection, IList, ICollection<T>, IList<T>, IEnumerable<T>
|
||||
{
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.ObjectModel.ReadOnlyCollection`1" /> class that is a read-only wrapper around the specified list.</summary>
|
||||
/// <param name="list">The list to wrap.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="list" /> is null.</exception>
|
||||
// Token: 0x06000D9A RID: 3482 RVA: 0x0003B9C4 File Offset: 0x00039BC4
|
||||
public ReadOnlyCollection(IList<T> list)
|
||||
{
|
||||
if (list == null)
|
||||
{
|
||||
throw new ArgumentNullException("list");
|
||||
}
|
||||
this.list = list;
|
||||
}
|
||||
|
||||
// Token: 0x06000D9B RID: 3483 RVA: 0x0003B9E4 File Offset: 0x00039BE4
|
||||
void ICollection<T>.Add(T item)
|
||||
{
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
|
||||
// Token: 0x06000D9C RID: 3484 RVA: 0x0003B9EC File Offset: 0x00039BEC
|
||||
void ICollection<T>.Clear()
|
||||
{
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
|
||||
// Token: 0x06000D9D RID: 3485 RVA: 0x0003B9F4 File Offset: 0x00039BF4
|
||||
void IList<T>.Insert(int index, T item)
|
||||
{
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
|
||||
// Token: 0x06000D9E RID: 3486 RVA: 0x0003B9FC File Offset: 0x00039BFC
|
||||
bool ICollection<T>.Remove(T item)
|
||||
{
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
|
||||
// Token: 0x06000D9F RID: 3487 RVA: 0x0003BA04 File Offset: 0x00039C04
|
||||
void IList<T>.RemoveAt(int index)
|
||||
{
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
|
||||
// Token: 0x1700020B RID: 523
|
||||
T IList<T>.this[int index]
|
||||
{
|
||||
get
|
||||
{
|
||||
return this[index];
|
||||
}
|
||||
set
|
||||
{
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700020C RID: 524
|
||||
// (get) Token: 0x06000DA2 RID: 3490 RVA: 0x0003BA20 File Offset: 0x00039C20
|
||||
bool ICollection<T>.IsReadOnly
|
||||
{
|
||||
get
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Copies the elements of the <see cref="T:System.Collections.ICollection" /> to an <see cref="T:System.Array" />, starting at a particular <see cref="T:System.Array" /> index.</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.ICollection" />. 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-<paramref name="array" /> does not have zero-based indexing.-or-The number of elements in the source <see cref="T:System.Collections.ICollection" /> is greater than the available space from <paramref name="index" /> to the end of the destination <paramref name="array" />.-or-The type of the source <see cref="T:System.Collections.ICollection" /> cannot be cast automatically to the type of the destination <paramref name="array" />.</exception>
|
||||
// Token: 0x06000DA3 RID: 3491 RVA: 0x0003BA24 File Offset: 0x00039C24
|
||||
void ICollection.CopyTo(Array array, int index)
|
||||
{
|
||||
((ICollection)this.list).CopyTo(array, index);
|
||||
}
|
||||
|
||||
/// <summary>Returns an enumerator that iterates through a collection.</summary>
|
||||
/// <returns>An <see cref="T:System.Collections.IEnumerator" /> that can be used to iterate through the collection.</returns>
|
||||
// Token: 0x06000DA4 RID: 3492 RVA: 0x0003BA38 File Offset: 0x00039C38
|
||||
IEnumerator IEnumerable.GetEnumerator()
|
||||
{
|
||||
return this.list.GetEnumerator();
|
||||
}
|
||||
|
||||
/// <summary>Adds an item to the <see cref="T:System.Collections.IList" />. This implementation always throws <see cref="T:System.NotSupportedException" />.</summary>
|
||||
/// <returns>The position into which the new element was inserted.</returns>
|
||||
/// <param name="value">The <see cref="T:System.Object" /> to add to the <see cref="T:System.Collections.IList" />.</param>
|
||||
/// <exception cref="T:System.NotSupportedException">Always thrown.</exception>
|
||||
// Token: 0x06000DA5 RID: 3493 RVA: 0x0003BA48 File Offset: 0x00039C48
|
||||
int IList.Add(object value)
|
||||
{
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
|
||||
/// <summary>Removes all items from the <see cref="T:System.Collections.IList" />. This implementation always throws <see cref="T:System.NotSupportedException" />.</summary>
|
||||
/// <exception cref="T:System.NotSupportedException">Always thrown.</exception>
|
||||
// Token: 0x06000DA6 RID: 3494 RVA: 0x0003BA50 File Offset: 0x00039C50
|
||||
void IList.Clear()
|
||||
{
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
|
||||
/// <summary>Determines whether the <see cref="T:System.Collections.IList" /> contains a specific value.</summary>
|
||||
/// <returns>true if the <see cref="T:System.Object" /> is found in the <see cref="T:System.Collections.IList" />; otherwise, false.</returns>
|
||||
/// <param name="value">The <see cref="T:System.Object" /> to locate in the <see cref="T:System.Collections.IList" />.</param>
|
||||
/// <exception cref="T:System.ArgumentException">
|
||||
/// <paramref name="value" /> is not of the type specified for the generic type parameter <paramref name="T" />.</exception>
|
||||
// Token: 0x06000DA7 RID: 3495 RVA: 0x0003BA58 File Offset: 0x00039C58
|
||||
bool IList.Contains(object value)
|
||||
{
|
||||
return Collection<T>.IsValidItem(value) && this.list.Contains((T)((object)value));
|
||||
}
|
||||
|
||||
/// <summary>Determines the index of a specific item in the <see cref="T:System.Collections.IList" />.</summary>
|
||||
/// <returns>The index of <paramref name="value" /> if found in the list; otherwise, -1.</returns>
|
||||
/// <param name="value">The <see cref="T:System.Object" /> to locate in the <see cref="T:System.Collections.IList" />.</param>
|
||||
/// <exception cref="T:System.ArgumentException">
|
||||
/// <paramref name="value" /> is not of the type specified for the generic type parameter <paramref name="T" />.</exception>
|
||||
// Token: 0x06000DA8 RID: 3496 RVA: 0x0003BA78 File Offset: 0x00039C78
|
||||
int IList.IndexOf(object value)
|
||||
{
|
||||
if (Collection<T>.IsValidItem(value))
|
||||
{
|
||||
return this.list.IndexOf((T)((object)value));
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
/// <summary>Inserts an item to the <see cref="T:System.Collections.IList" /> at the specified index. This implementation always throws <see cref="T:System.NotSupportedException" />.</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 into the <see cref="T:System.Collections.IList" />.</param>
|
||||
/// <exception cref="T:System.NotSupportedException">Always thrown.</exception>
|
||||
// Token: 0x06000DA9 RID: 3497 RVA: 0x0003BA98 File Offset: 0x00039C98
|
||||
void IList.Insert(int index, object value)
|
||||
{
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
|
||||
/// <summary>Removes the first occurrence of a specific object from the <see cref="T:System.Collections.IList" />. This implementation always throws <see cref="T:System.NotSupportedException" />.</summary>
|
||||
/// <param name="value">The <see cref="T:System.Object" /> to remove from the <see cref="T:System.Collections.IList" />.</param>
|
||||
/// <exception cref="T:System.NotSupportedException">Always thrown.</exception>
|
||||
// Token: 0x06000DAA RID: 3498 RVA: 0x0003BAA0 File Offset: 0x00039CA0
|
||||
void IList.Remove(object value)
|
||||
{
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
|
||||
/// <summary>Removes the <see cref="T:System.Collections.IList" /> item at the specified index. This implementation always throws <see cref="T:System.NotSupportedException" />.</summary>
|
||||
/// <param name="index">The zero-based index of the item to remove.</param>
|
||||
/// <exception cref="T:System.NotSupportedException">Always thrown.</exception>
|
||||
// Token: 0x06000DAB RID: 3499 RVA: 0x0003BAA8 File Offset: 0x00039CA8
|
||||
void IList.RemoveAt(int index)
|
||||
{
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
|
||||
/// <summary>Gets a value indicating whether access to the <see cref="T:System.Collections.ICollection" /> is synchronized (thread safe).</summary>
|
||||
/// <returns>true if access to the <see cref="T:System.Collections.ICollection" /> is synchronized (thread safe); otherwise, false. In the default implementation of <see cref="T:System.Collections.ObjectModel.ReadOnlyCollection`1" />, this property always returns false.</returns>
|
||||
// Token: 0x1700020D RID: 525
|
||||
// (get) Token: 0x06000DAC RID: 3500 RVA: 0x0003BAB0 File Offset: 0x00039CB0
|
||||
bool ICollection.IsSynchronized
|
||||
{
|
||||
get
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets an object that can be used to synchronize access to the <see cref="T:System.Collections.ICollection" />.</summary>
|
||||
/// <returns>An object that can be used to synchronize access to the <see cref="T:System.Collections.ICollection" />. In the default implementation of <see cref="T:System.Collections.ObjectModel.ReadOnlyCollection`1" />, this property always returns the current instance.</returns>
|
||||
// Token: 0x1700020E RID: 526
|
||||
// (get) Token: 0x06000DAD RID: 3501 RVA: 0x0003BAB4 File Offset: 0x00039CB4
|
||||
object ICollection.SyncRoot
|
||||
{
|
||||
get
|
||||
{
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a value indicating whether the <see cref="T:System.Collections.IList" /> has a fixed size.</summary>
|
||||
/// <returns>true if the <see cref="T:System.Collections.IList" /> has a fixed size; otherwise, false. In the default implementation of <see cref="T:System.Collections.ObjectModel.ReadOnlyCollection`1" />, this property always returns true.</returns>
|
||||
// Token: 0x1700020F RID: 527
|
||||
// (get) Token: 0x06000DAE RID: 3502 RVA: 0x0003BAB8 File Offset: 0x00039CB8
|
||||
bool IList.IsFixedSize
|
||||
{
|
||||
get
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a value indicating whether the <see cref="T:System.Collections.IList" /> is read-only.</summary>
|
||||
/// <returns>true if the <see cref="T:System.Collections.IList" /> is read-only; otherwise, false. In the default implementation of <see cref="T:System.Collections.ObjectModel.ReadOnlyCollection`1" />, this property always returns true.</returns>
|
||||
// Token: 0x17000210 RID: 528
|
||||
// (get) Token: 0x06000DAF RID: 3503 RVA: 0x0003BABC File Offset: 0x00039CBC
|
||||
bool IList.IsReadOnly
|
||||
{
|
||||
get
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
/// <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.</param>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="index" /> is not a valid index in the <see cref="T:System.Collections.IList" />. </exception>
|
||||
/// <exception cref="T:System.NotSupportedException">Always thrown if the property is set.</exception>
|
||||
// Token: 0x17000211 RID: 529
|
||||
object IList.this[int index]
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.list[index];
|
||||
}
|
||||
set
|
||||
{
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Determines whether an element is in the <see cref="T:System.Collections.ObjectModel.ReadOnlyCollection`1" />.</summary>
|
||||
/// <returns>true if <paramref name="value" /> is found in the <see cref="T:System.Collections.ObjectModel.ReadOnlyCollection`1" />; otherwise, false.</returns>
|
||||
/// <param name="value">The object to locate in the <see cref="T:System.Collections.ObjectModel.ReadOnlyCollection`1" />. The value can be null for reference types.</param>
|
||||
// Token: 0x06000DB2 RID: 3506 RVA: 0x0003BADC File Offset: 0x00039CDC
|
||||
public bool Contains(T value)
|
||||
{
|
||||
return this.list.Contains(value);
|
||||
}
|
||||
|
||||
/// <summary>Copies the entire <see cref="T:System.Collections.ObjectModel.ReadOnlyCollection`1" /> 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.ObjectModel.ReadOnlyCollection`1" />. 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">The number of elements in the source <see cref="T:System.Collections.ObjectModel.ReadOnlyCollection`1" /> is greater than the available space from <paramref name="index" /> to the end of the destination <paramref name="array" />.</exception>
|
||||
// Token: 0x06000DB3 RID: 3507 RVA: 0x0003BAEC File Offset: 0x00039CEC
|
||||
public void CopyTo(T[] array, int index)
|
||||
{
|
||||
this.list.CopyTo(array, index);
|
||||
}
|
||||
|
||||
/// <summary>Returns an enumerator that iterates through the <see cref="T:System.Collections.ObjectModel.ReadOnlyCollection`1" />.</summary>
|
||||
/// <returns>An <see cref="T:System.Collections.Generic.IEnumerator`1" /> for the <see cref="T:System.Collections.ObjectModel.ReadOnlyCollection`1" />.</returns>
|
||||
// Token: 0x06000DB4 RID: 3508 RVA: 0x0003BAFC File Offset: 0x00039CFC
|
||||
public IEnumerator<T> GetEnumerator()
|
||||
{
|
||||
return this.list.GetEnumerator();
|
||||
}
|
||||
|
||||
/// <summary>Searches for the specified object and returns the zero-based index of the first occurrence within the entire <see cref="T:System.Collections.ObjectModel.ReadOnlyCollection`1" />.</summary>
|
||||
/// <returns>The zero-based index of the first occurrence of <paramref name="item" /> within the entire <see cref="T:System.Collections.ObjectModel.ReadOnlyCollection`1" />, if found; otherwise, -1.</returns>
|
||||
/// <param name="value">The object to locate in the <see cref="T:System.Collections.Generic.List`1" />. The value can be null for reference types.</param>
|
||||
// Token: 0x06000DB5 RID: 3509 RVA: 0x0003BB0C File Offset: 0x00039D0C
|
||||
public int IndexOf(T value)
|
||||
{
|
||||
return this.list.IndexOf(value);
|
||||
}
|
||||
|
||||
/// <summary>Gets the number of elements contained in the <see cref="T:System.Collections.ObjectModel.ReadOnlyCollection`1" /> instance.</summary>
|
||||
/// <returns>The number of elements contained in the <see cref="T:System.Collections.ObjectModel.ReadOnlyCollection`1" /> instance.</returns>
|
||||
// Token: 0x17000212 RID: 530
|
||||
// (get) Token: 0x06000DB6 RID: 3510 RVA: 0x0003BB1C File Offset: 0x00039D1C
|
||||
public int Count
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.list.Count;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Returns the <see cref="T:System.Collections.Generic.IList`1" /> that the <see cref="T:System.Collections.ObjectModel.ReadOnlyCollection`1" /> wraps.</summary>
|
||||
/// <returns>The <see cref="T:System.Collections.Generic.IList`1" /> that the <see cref="T:System.Collections.ObjectModel.ReadOnlyCollection`1" /> wraps.</returns>
|
||||
// Token: 0x17000213 RID: 531
|
||||
// (get) Token: 0x06000DB7 RID: 3511 RVA: 0x0003BB2C File Offset: 0x00039D2C
|
||||
protected IList<T> Items
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.list;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets 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.</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.ObjectModel.ReadOnlyCollection`1.Count" />. </exception>
|
||||
// Token: 0x17000214 RID: 532
|
||||
public T this[int index]
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.list[index];
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0400038C RID: 908
|
||||
private IList<T> list;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,571 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.Collections
|
||||
{
|
||||
/// <summary>Represents a first-in, first-out collection of objects.</summary>
|
||||
/// <filterpriority>1</filterpriority>
|
||||
// Token: 0x02000137 RID: 311
|
||||
[DebuggerDisplay("Count={Count}")]
|
||||
[ComVisible(true)]
|
||||
[DebuggerTypeProxy(typeof(CollectionDebuggerView))]
|
||||
[Serializable]
|
||||
public class Queue : IEnumerable, ICloneable, ICollection
|
||||
{
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.Queue" /> class that is empty, has the default initial capacity, and uses the default growth factor.</summary>
|
||||
// Token: 0x06000FF1 RID: 4081 RVA: 0x00042160 File Offset: 0x00040360
|
||||
public Queue()
|
||||
: this(32, 2f)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.Queue" /> class that is empty, has the specified initial capacity, and uses the default growth factor.</summary>
|
||||
/// <param name="capacity">The initial number of elements that the <see cref="T:System.Collections.Queue" /> can contain. </param>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="capacity" /> is less than zero. </exception>
|
||||
// Token: 0x06000FF2 RID: 4082 RVA: 0x00042170 File Offset: 0x00040370
|
||||
public Queue(int capacity)
|
||||
: this(capacity, 2f)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.Queue" /> class that contains elements copied from the specified collection, has the same initial capacity as the number of elements copied, and uses the default growth factor.</summary>
|
||||
/// <param name="col">The <see cref="T:System.Collections.ICollection" /> to copy elements from. </param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="col" /> is null. </exception>
|
||||
// Token: 0x06000FF3 RID: 4083 RVA: 0x00042180 File Offset: 0x00040380
|
||||
public Queue(ICollection col)
|
||||
: this((col != null) ? col.Count : 32)
|
||||
{
|
||||
if (col == null)
|
||||
{
|
||||
throw new ArgumentNullException("col");
|
||||
}
|
||||
foreach (object obj in col)
|
||||
{
|
||||
this.Enqueue(obj);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.Queue" /> class that is empty, has the specified initial capacity, and uses the specified growth factor.</summary>
|
||||
/// <param name="capacity">The initial number of elements that the <see cref="T:System.Collections.Queue" /> can contain. </param>
|
||||
/// <param name="growFactor">The factor by which the capacity of the <see cref="T:System.Collections.Queue" /> is expanded. </param>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="capacity" /> is less than zero.-or- <paramref name="growFactor" /> is less than 1.0 or greater than 10.0. </exception>
|
||||
// Token: 0x06000FF4 RID: 4084 RVA: 0x00042210 File Offset: 0x00040410
|
||||
public Queue(int capacity, float growFactor)
|
||||
{
|
||||
if (capacity < 0)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException("capacity", "Needs a non-negative number");
|
||||
}
|
||||
if (growFactor < 1f || growFactor > 10f)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException("growFactor", "Queue growth factor must be between 1.0 and 10.0, inclusive");
|
||||
}
|
||||
this._array = new object[capacity];
|
||||
this._growFactor = (int)(growFactor * 100f);
|
||||
}
|
||||
|
||||
/// <summary>Gets the number of elements contained in the <see cref="T:System.Collections.Queue" />.</summary>
|
||||
/// <returns>The number of elements contained in the <see cref="T:System.Collections.Queue" />.</returns>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x17000295 RID: 661
|
||||
// (get) Token: 0x06000FF5 RID: 4085 RVA: 0x0004227C File Offset: 0x0004047C
|
||||
public virtual int Count
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._size;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a value indicating whether access to the <see cref="T:System.Collections.Queue" /> is synchronized (thread safe).</summary>
|
||||
/// <returns>true if access to the <see cref="T:System.Collections.Queue" /> is synchronized (thread safe); otherwise, false. The default is false.</returns>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x17000296 RID: 662
|
||||
// (get) Token: 0x06000FF6 RID: 4086 RVA: 0x00042284 File Offset: 0x00040484
|
||||
public virtual bool IsSynchronized
|
||||
{
|
||||
get
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets an object that can be used to synchronize access to the <see cref="T:System.Collections.Queue" />.</summary>
|
||||
/// <returns>An object that can be used to synchronize access to the <see cref="T:System.Collections.Queue" />.</returns>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x17000297 RID: 663
|
||||
// (get) Token: 0x06000FF7 RID: 4087 RVA: 0x00042288 File Offset: 0x00040488
|
||||
public virtual object SyncRoot
|
||||
{
|
||||
get
|
||||
{
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Copies the <see cref="T:System.Collections.Queue" /> elements to an existing one-dimensional <see cref="T:System.Array" />, starting at the specified array index.</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.Queue" />. 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.Queue" /> is greater than the available space from <paramref name="index" /> to the end of the destination <paramref name="array" />. </exception>
|
||||
/// <exception cref="T:System.ArrayTypeMismatchException">The type of the source <see cref="T:System.Collections.Queue" /> cannot be cast automatically to the type of the destination <paramref name="array" />. </exception>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x06000FF8 RID: 4088 RVA: 0x0004228C File Offset: 0x0004048C
|
||||
public virtual void CopyTo(Array array, int index)
|
||||
{
|
||||
if (array == null)
|
||||
{
|
||||
throw new ArgumentNullException("array");
|
||||
}
|
||||
if (index < 0)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException("index");
|
||||
}
|
||||
if (array.Rank > 1 || (index != 0 && index >= array.Length) || this._size > array.Length - index)
|
||||
{
|
||||
throw new ArgumentException();
|
||||
}
|
||||
int num = this._array.Length;
|
||||
int num2 = num - this._head;
|
||||
Array.Copy(this._array, this._head, array, index, Math.Min(this._size, num2));
|
||||
if (this._size > num2)
|
||||
{
|
||||
Array.Copy(this._array, 0, array, index + num2, this._size - num2);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Returns an enumerator that iterates through the <see cref="T:System.Collections.Queue" />.</summary>
|
||||
/// <returns>An <see cref="T:System.Collections.IEnumerator" /> for the <see cref="T:System.Collections.Queue" />.</returns>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x06000FF9 RID: 4089 RVA: 0x00042348 File Offset: 0x00040548
|
||||
public virtual IEnumerator GetEnumerator()
|
||||
{
|
||||
return new Queue.QueueEnumerator(this);
|
||||
}
|
||||
|
||||
/// <summary>Creates a shallow copy of the <see cref="T:System.Collections.Queue" />.</summary>
|
||||
/// <returns>A shallow copy of the <see cref="T:System.Collections.Queue" />.</returns>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x06000FFA RID: 4090 RVA: 0x00042350 File Offset: 0x00040550
|
||||
public virtual object Clone()
|
||||
{
|
||||
Queue queue = new Queue(this._array.Length);
|
||||
queue._growFactor = this._growFactor;
|
||||
Array.Copy(this._array, 0, queue._array, 0, this._array.Length);
|
||||
queue._head = this._head;
|
||||
queue._size = this._size;
|
||||
queue._tail = this._tail;
|
||||
return queue;
|
||||
}
|
||||
|
||||
/// <summary>Removes all objects from the <see cref="T:System.Collections.Queue" />.</summary>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x06000FFB RID: 4091 RVA: 0x000423B8 File Offset: 0x000405B8
|
||||
public virtual void Clear()
|
||||
{
|
||||
this._version++;
|
||||
this._head = 0;
|
||||
this._size = 0;
|
||||
this._tail = 0;
|
||||
for (int i = this._array.Length - 1; i >= 0; i--)
|
||||
{
|
||||
this._array[i] = null;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Determines whether an element is in the <see cref="T:System.Collections.Queue" />.</summary>
|
||||
/// <returns>true if <paramref name="obj" /> is found in the <see cref="T:System.Collections.Queue" />; otherwise, false.</returns>
|
||||
/// <param name="obj">The <see cref="T:System.Object" /> to locate in the <see cref="T:System.Collections.Queue" />. The value can be null. </param>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x06000FFC RID: 4092 RVA: 0x0004240C File Offset: 0x0004060C
|
||||
public virtual bool Contains(object obj)
|
||||
{
|
||||
int num = this._head + this._size;
|
||||
if (obj == null)
|
||||
{
|
||||
for (int i = this._head; i < num; i++)
|
||||
{
|
||||
if (this._array[i % this._array.Length] == null)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int j = this._head; j < num; j++)
|
||||
{
|
||||
if (obj.Equals(this._array[j % this._array.Length]))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/// <summary>Removes and returns the object at the beginning of the <see cref="T:System.Collections.Queue" />.</summary>
|
||||
/// <returns>The object that is removed from the beginning of the <see cref="T:System.Collections.Queue" />.</returns>
|
||||
/// <exception cref="T:System.InvalidOperationException">The <see cref="T:System.Collections.Queue" /> is empty. </exception>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x06000FFD RID: 4093 RVA: 0x00042498 File Offset: 0x00040698
|
||||
public virtual object Dequeue()
|
||||
{
|
||||
this._version++;
|
||||
if (this._size < 1)
|
||||
{
|
||||
throw new InvalidOperationException();
|
||||
}
|
||||
object obj = this._array[this._head];
|
||||
this._array[this._head] = null;
|
||||
this._head = (this._head + 1) % this._array.Length;
|
||||
this._size--;
|
||||
return obj;
|
||||
}
|
||||
|
||||
/// <summary>Adds an object to the end of the <see cref="T:System.Collections.Queue" />.</summary>
|
||||
/// <param name="obj">The object to add to the <see cref="T:System.Collections.Queue" />. The value can be null. </param>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x06000FFE RID: 4094 RVA: 0x00042508 File Offset: 0x00040708
|
||||
public virtual void Enqueue(object obj)
|
||||
{
|
||||
this._version++;
|
||||
if (this._size == this._array.Length)
|
||||
{
|
||||
this.grow();
|
||||
}
|
||||
this._array[this._tail] = obj;
|
||||
this._tail = (this._tail + 1) % this._array.Length;
|
||||
this._size++;
|
||||
}
|
||||
|
||||
/// <summary>Returns the object at the beginning of the <see cref="T:System.Collections.Queue" /> without removing it.</summary>
|
||||
/// <returns>The object at the beginning of the <see cref="T:System.Collections.Queue" />.</returns>
|
||||
/// <exception cref="T:System.InvalidOperationException">The <see cref="T:System.Collections.Queue" /> is empty. </exception>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x06000FFF RID: 4095 RVA: 0x00042570 File Offset: 0x00040770
|
||||
public virtual object Peek()
|
||||
{
|
||||
if (this._size < 1)
|
||||
{
|
||||
throw new InvalidOperationException();
|
||||
}
|
||||
return this._array[this._head];
|
||||
}
|
||||
|
||||
/// <summary>Returns a <see cref="T:System.Collections.Queue" /> wrapper that is synchronized (thread safe).</summary>
|
||||
/// <returns>A <see cref="T:System.Collections.Queue" /> wrapper that is synchronized (thread safe).</returns>
|
||||
/// <param name="queue">The <see cref="T:System.Collections.Queue" /> to synchronize. </param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="queue" /> is null. </exception>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x06001000 RID: 4096 RVA: 0x00042594 File Offset: 0x00040794
|
||||
public static Queue Synchronized(Queue queue)
|
||||
{
|
||||
if (queue == null)
|
||||
{
|
||||
throw new ArgumentNullException("queue");
|
||||
}
|
||||
return new Queue.SyncQueue(queue);
|
||||
}
|
||||
|
||||
/// <summary>Copies the <see cref="T:System.Collections.Queue" /> elements to a new array.</summary>
|
||||
/// <returns>A new array containing elements copied from the <see cref="T:System.Collections.Queue" />.</returns>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x06001001 RID: 4097 RVA: 0x000425B0 File Offset: 0x000407B0
|
||||
public virtual object[] ToArray()
|
||||
{
|
||||
object[] array = new object[this._size];
|
||||
this.CopyTo(array, 0);
|
||||
return array;
|
||||
}
|
||||
|
||||
/// <summary>Sets the capacity to the actual number of elements in the <see cref="T:System.Collections.Queue" />.</summary>
|
||||
/// <exception cref="T:System.NotSupportedException">The <see cref="T:System.Collections.Queue" /> is read-only.</exception>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x06001002 RID: 4098 RVA: 0x000425D4 File Offset: 0x000407D4
|
||||
public virtual void TrimToSize()
|
||||
{
|
||||
this._version++;
|
||||
object[] array = new object[this._size];
|
||||
this.CopyTo(array, 0);
|
||||
this._array = array;
|
||||
this._head = 0;
|
||||
this._tail = 0;
|
||||
}
|
||||
|
||||
// Token: 0x06001003 RID: 4099 RVA: 0x00042618 File Offset: 0x00040818
|
||||
private void grow()
|
||||
{
|
||||
int num = this._array.Length * this._growFactor / 100;
|
||||
if (num < this._array.Length + 1)
|
||||
{
|
||||
num = this._array.Length + 1;
|
||||
}
|
||||
object[] array = new object[num];
|
||||
this.CopyTo(array, 0);
|
||||
this._array = array;
|
||||
this._head = 0;
|
||||
this._tail = this._head + this._size;
|
||||
}
|
||||
|
||||
// Token: 0x040003DF RID: 991
|
||||
private object[] _array;
|
||||
|
||||
// Token: 0x040003E0 RID: 992
|
||||
private int _head;
|
||||
|
||||
// Token: 0x040003E1 RID: 993
|
||||
private int _size;
|
||||
|
||||
// Token: 0x040003E2 RID: 994
|
||||
private int _tail;
|
||||
|
||||
// Token: 0x040003E3 RID: 995
|
||||
private int _growFactor;
|
||||
|
||||
// Token: 0x040003E4 RID: 996
|
||||
private int _version;
|
||||
|
||||
// Token: 0x02000138 RID: 312
|
||||
private class SyncQueue : Queue
|
||||
{
|
||||
// Token: 0x06001004 RID: 4100 RVA: 0x00042684 File Offset: 0x00040884
|
||||
internal SyncQueue(Queue queue)
|
||||
{
|
||||
this.queue = queue;
|
||||
}
|
||||
|
||||
// Token: 0x17000298 RID: 664
|
||||
// (get) Token: 0x06001005 RID: 4101 RVA: 0x00042694 File Offset: 0x00040894
|
||||
public override int Count
|
||||
{
|
||||
get
|
||||
{
|
||||
Queue queue = this.queue;
|
||||
int count;
|
||||
lock (queue)
|
||||
{
|
||||
count = this.queue.Count;
|
||||
}
|
||||
return count;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000299 RID: 665
|
||||
// (get) Token: 0x06001006 RID: 4102 RVA: 0x000426E8 File Offset: 0x000408E8
|
||||
public override bool IsSynchronized
|
||||
{
|
||||
get
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700029A RID: 666
|
||||
// (get) Token: 0x06001007 RID: 4103 RVA: 0x000426EC File Offset: 0x000408EC
|
||||
public override object SyncRoot
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.queue.SyncRoot;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06001008 RID: 4104 RVA: 0x000426FC File Offset: 0x000408FC
|
||||
public override void CopyTo(Array array, int index)
|
||||
{
|
||||
Queue queue = this.queue;
|
||||
lock (queue)
|
||||
{
|
||||
this.queue.CopyTo(array, index);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06001009 RID: 4105 RVA: 0x0004274C File Offset: 0x0004094C
|
||||
public override IEnumerator GetEnumerator()
|
||||
{
|
||||
Queue queue = this.queue;
|
||||
IEnumerator enumerator;
|
||||
lock (queue)
|
||||
{
|
||||
enumerator = this.queue.GetEnumerator();
|
||||
}
|
||||
return enumerator;
|
||||
}
|
||||
|
||||
// Token: 0x0600100A RID: 4106 RVA: 0x000427A0 File Offset: 0x000409A0
|
||||
public override object Clone()
|
||||
{
|
||||
Queue queue = this.queue;
|
||||
object obj;
|
||||
lock (queue)
|
||||
{
|
||||
obj = new Queue.SyncQueue((Queue)this.queue.Clone());
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
// Token: 0x0600100B RID: 4107 RVA: 0x00042800 File Offset: 0x00040A00
|
||||
public override void Clear()
|
||||
{
|
||||
Queue queue = this.queue;
|
||||
lock (queue)
|
||||
{
|
||||
this.queue.Clear();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600100C RID: 4108 RVA: 0x00042850 File Offset: 0x00040A50
|
||||
public override void TrimToSize()
|
||||
{
|
||||
Queue queue = this.queue;
|
||||
lock (queue)
|
||||
{
|
||||
this.queue.TrimToSize();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600100D RID: 4109 RVA: 0x000428A0 File Offset: 0x00040AA0
|
||||
public override bool Contains(object obj)
|
||||
{
|
||||
Queue queue = this.queue;
|
||||
bool flag;
|
||||
lock (queue)
|
||||
{
|
||||
flag = this.queue.Contains(obj);
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
// Token: 0x0600100E RID: 4110 RVA: 0x000428F8 File Offset: 0x00040AF8
|
||||
public override object Dequeue()
|
||||
{
|
||||
Queue queue = this.queue;
|
||||
object obj;
|
||||
lock (queue)
|
||||
{
|
||||
obj = this.queue.Dequeue();
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
// Token: 0x0600100F RID: 4111 RVA: 0x0004294C File Offset: 0x00040B4C
|
||||
public override void Enqueue(object obj)
|
||||
{
|
||||
Queue queue = this.queue;
|
||||
lock (queue)
|
||||
{
|
||||
this.queue.Enqueue(obj);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06001010 RID: 4112 RVA: 0x0004299C File Offset: 0x00040B9C
|
||||
public override object Peek()
|
||||
{
|
||||
Queue queue = this.queue;
|
||||
object obj;
|
||||
lock (queue)
|
||||
{
|
||||
obj = this.queue.Peek();
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
// Token: 0x06001011 RID: 4113 RVA: 0x000429F0 File Offset: 0x00040BF0
|
||||
public override object[] ToArray()
|
||||
{
|
||||
Queue queue = this.queue;
|
||||
object[] array;
|
||||
lock (queue)
|
||||
{
|
||||
array = this.queue.ToArray();
|
||||
}
|
||||
return array;
|
||||
}
|
||||
|
||||
// Token: 0x040003E5 RID: 997
|
||||
private Queue queue;
|
||||
}
|
||||
|
||||
// Token: 0x02000139 RID: 313
|
||||
[Serializable]
|
||||
private class QueueEnumerator : IEnumerator, ICloneable
|
||||
{
|
||||
// Token: 0x06001012 RID: 4114 RVA: 0x00042A44 File Offset: 0x00040C44
|
||||
internal QueueEnumerator(Queue q)
|
||||
{
|
||||
this.queue = q;
|
||||
this._version = q._version;
|
||||
this.current = -1;
|
||||
}
|
||||
|
||||
// Token: 0x06001013 RID: 4115 RVA: 0x00042A74 File Offset: 0x00040C74
|
||||
public object Clone()
|
||||
{
|
||||
return new Queue.QueueEnumerator(this.queue)
|
||||
{
|
||||
_version = this._version,
|
||||
current = this.current
|
||||
};
|
||||
}
|
||||
|
||||
// Token: 0x1700029B RID: 667
|
||||
// (get) Token: 0x06001014 RID: 4116 RVA: 0x00042AA8 File Offset: 0x00040CA8
|
||||
public virtual object Current
|
||||
{
|
||||
get
|
||||
{
|
||||
if (this._version != this.queue._version || this.current < 0 || this.current >= this.queue._size)
|
||||
{
|
||||
throw new InvalidOperationException();
|
||||
}
|
||||
return this.queue._array[(this.queue._head + this.current) % this.queue._array.Length];
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06001015 RID: 4117 RVA: 0x00042B20 File Offset: 0x00040D20
|
||||
public virtual bool MoveNext()
|
||||
{
|
||||
if (this._version != this.queue._version)
|
||||
{
|
||||
throw new InvalidOperationException();
|
||||
}
|
||||
if (this.current >= this.queue._size - 1)
|
||||
{
|
||||
this.current = int.MaxValue;
|
||||
return false;
|
||||
}
|
||||
this.current++;
|
||||
return true;
|
||||
}
|
||||
|
||||
// Token: 0x06001016 RID: 4118 RVA: 0x00042B80 File Offset: 0x00040D80
|
||||
public virtual void Reset()
|
||||
{
|
||||
if (this._version != this.queue._version)
|
||||
{
|
||||
throw new InvalidOperationException();
|
||||
}
|
||||
this.current = -1;
|
||||
}
|
||||
|
||||
// Token: 0x040003E6 RID: 998
|
||||
private Queue queue;
|
||||
|
||||
// Token: 0x040003E7 RID: 999
|
||||
private int _version;
|
||||
|
||||
// Token: 0x040003E8 RID: 1000
|
||||
private int current;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,107 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.Collections
|
||||
{
|
||||
/// <summary>Provides the abstract base class for a strongly typed non-generic read-only collection.</summary>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x0200013A RID: 314
|
||||
[ComVisible(true)]
|
||||
[Serializable]
|
||||
public abstract class ReadOnlyCollectionBase : IEnumerable, ICollection
|
||||
{
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.ReadOnlyCollectionBase" /> class.</summary>
|
||||
// Token: 0x06001017 RID: 4119 RVA: 0x00042BA8 File Offset: 0x00040DA8
|
||||
protected ReadOnlyCollectionBase()
|
||||
{
|
||||
this.list = new ArrayList();
|
||||
}
|
||||
|
||||
// Token: 0x06001018 RID: 4120 RVA: 0x00042BBC File Offset: 0x00040DBC
|
||||
IEnumerator IEnumerable.GetEnumerator()
|
||||
{
|
||||
return this.GetEnumerator();
|
||||
}
|
||||
|
||||
/// <summary>Copies the entire <see cref="T:System.Collections.ReadOnlyCollectionBase" /> 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.ReadOnlyCollectionBase" />. 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.ReadOnlyCollectionBase" /> 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.ReadOnlyCollectionBase" /> cannot be cast automatically to the type of the destination <paramref name="array" />. </exception>
|
||||
// Token: 0x06001019 RID: 4121 RVA: 0x00042BC4 File Offset: 0x00040DC4
|
||||
void ICollection.CopyTo(Array array, int index)
|
||||
{
|
||||
ArrayList innerList = this.InnerList;
|
||||
lock (innerList)
|
||||
{
|
||||
this.InnerList.CopyTo(array, index);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets an object that can be used to synchronize access to a <see cref="T:System.Collections.ReadOnlyCollectionBase" /> object.</summary>
|
||||
/// <returns>An object that can be used to synchronize access to the <see cref="T:System.Collections.ReadOnlyCollectionBase" /> object.</returns>
|
||||
// Token: 0x1700029C RID: 668
|
||||
// (get) Token: 0x0600101A RID: 4122 RVA: 0x00042C14 File Offset: 0x00040E14
|
||||
object ICollection.SyncRoot
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.InnerList.SyncRoot;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a value indicating whether access to a <see cref="T:System.Collections.ReadOnlyCollectionBase" /> object is synchronized (thread safe).</summary>
|
||||
/// <returns>true if access to the <see cref="T:System.Collections.ReadOnlyCollectionBase" /> object is synchronized (thread safe); otherwise, false. The default is false.</returns>
|
||||
// Token: 0x1700029D RID: 669
|
||||
// (get) Token: 0x0600101B RID: 4123 RVA: 0x00042C24 File Offset: 0x00040E24
|
||||
bool ICollection.IsSynchronized
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.InnerList.IsSynchronized;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets the number of elements contained in the <see cref="T:System.Collections.ReadOnlyCollectionBase" /> instance.</summary>
|
||||
/// <returns>The number of elements contained in the <see cref="T:System.Collections.ReadOnlyCollectionBase" /> instance.Retrieving the value of this property is an O(1) operation.</returns>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x1700029E RID: 670
|
||||
// (get) Token: 0x0600101C RID: 4124 RVA: 0x00042C34 File Offset: 0x00040E34
|
||||
public virtual int Count
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.InnerList.Count;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Returns an enumerator that iterates through the <see cref="T:System.Collections.ReadOnlyCollectionBase" /> instance.</summary>
|
||||
/// <returns>An <see cref="T:System.Collections.IEnumerator" /> for the <see cref="T:System.Collections.ReadOnlyCollectionBase" /> instance.</returns>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x0600101D RID: 4125 RVA: 0x00042C44 File Offset: 0x00040E44
|
||||
public virtual IEnumerator GetEnumerator()
|
||||
{
|
||||
return this.InnerList.GetEnumerator();
|
||||
}
|
||||
|
||||
/// <summary>Gets the list of elements contained in the <see cref="T:System.Collections.ReadOnlyCollectionBase" /> instance.</summary>
|
||||
/// <returns>An <see cref="T:System.Collections.ArrayList" /> representing the <see cref="T:System.Collections.ReadOnlyCollectionBase" /> instance itself.</returns>
|
||||
// Token: 0x1700029F RID: 671
|
||||
// (get) Token: 0x0600101E RID: 4126 RVA: 0x00042C54 File Offset: 0x00040E54
|
||||
protected ArrayList InnerList
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.list;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x040003E9 RID: 1001
|
||||
private ArrayList list;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,1627 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.Collections
|
||||
{
|
||||
/// <summary>Represents a collection of key/value pairs that are sorted by the keys and are accessible by key and by index.</summary>
|
||||
/// <filterpriority>1</filterpriority>
|
||||
// Token: 0x0200013B RID: 315
|
||||
[DebuggerDisplay("Count={Count}")]
|
||||
[ComVisible(true)]
|
||||
[Serializable]
|
||||
public class SortedList : IEnumerable, ICloneable, ICollection, IDictionary
|
||||
{
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.SortedList" /> class that is empty, has the default initial capacity, and is sorted according to the <see cref="T:System.IComparable" /> interface implemented by each key added to the <see cref="T:System.Collections.SortedList" /> object.</summary>
|
||||
// Token: 0x0600101F RID: 4127 RVA: 0x00042C5C File Offset: 0x00040E5C
|
||||
public SortedList()
|
||||
: this(null, SortedList.INITIAL_SIZE)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.SortedList" /> class that is empty, has the specified initial capacity, and is sorted according to the <see cref="T:System.IComparable" /> interface implemented by each key added to the <see cref="T:System.Collections.SortedList" /> object.</summary>
|
||||
/// <param name="initialCapacity">The initial number of elements that the <see cref="T:System.Collections.SortedList" /> object can contain. </param>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="initialCapacity" /> is less than zero. </exception>
|
||||
/// <exception cref="T:System.OutOfMemoryException">There is not enough available memory to create a <see cref="T:System.Collections.SortedList" /> object with the specified <paramref name="initialCapacity" />.</exception>
|
||||
// Token: 0x06001020 RID: 4128 RVA: 0x00042C6C File Offset: 0x00040E6C
|
||||
public SortedList(int initialCapacity)
|
||||
: this(null, initialCapacity)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.SortedList" /> class that is empty, has the specified initial capacity, and is sorted according to the specified <see cref="T:System.Collections.IComparer" /> interface.</summary>
|
||||
/// <param name="comparer">The <see cref="T:System.Collections.IComparer" /> implementation to use when comparing keys.-or- null to use the <see cref="T:System.IComparable" /> implementation of each key. </param>
|
||||
/// <param name="capacity">The initial number of elements that the <see cref="T:System.Collections.SortedList" /> object can contain. </param>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="capacity" /> is less than zero. </exception>
|
||||
/// <exception cref="T:System.OutOfMemoryException">There is not enough available memory to create a <see cref="T:System.Collections.SortedList" /> object with the specified <paramref name="capacity" />.</exception>
|
||||
// Token: 0x06001021 RID: 4129 RVA: 0x00042C78 File Offset: 0x00040E78
|
||||
public SortedList(IComparer comparer, int capacity)
|
||||
{
|
||||
if (capacity < 0)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException("capacity");
|
||||
}
|
||||
if (capacity == 0)
|
||||
{
|
||||
this.defaultCapacity = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.defaultCapacity = SortedList.INITIAL_SIZE;
|
||||
}
|
||||
this.comparer = comparer;
|
||||
this.InitTable(capacity, true);
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.SortedList" /> class that is empty, has the default initial capacity, and is sorted according to the specified <see cref="T:System.Collections.IComparer" /> interface.</summary>
|
||||
/// <param name="comparer">The <see cref="T:System.Collections.IComparer" /> implementation to use when comparing keys.-or- null to use the <see cref="T:System.IComparable" /> implementation of each key. </param>
|
||||
// Token: 0x06001022 RID: 4130 RVA: 0x00042CCC File Offset: 0x00040ECC
|
||||
public SortedList(IComparer comparer)
|
||||
{
|
||||
this.comparer = comparer;
|
||||
this.InitTable(SortedList.INITIAL_SIZE, true);
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.SortedList" /> class that contains elements copied from the specified dictionary, has the same initial capacity as the number of elements copied, and is sorted according to the <see cref="T:System.IComparable" /> interface implemented by each key.</summary>
|
||||
/// <param name="d">The <see cref="T:System.Collections.IDictionary" /> implementation to copy to a new <see cref="T:System.Collections.SortedList" /> object.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="d" /> is null. </exception>
|
||||
/// <exception cref="T:System.InvalidCastException">One or more elements in <paramref name="d" /> do not implement the <see cref="T:System.IComparable" /> interface. </exception>
|
||||
// Token: 0x06001023 RID: 4131 RVA: 0x00042CE8 File Offset: 0x00040EE8
|
||||
public SortedList(IDictionary d)
|
||||
: this(d, null)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.SortedList" /> class that contains elements copied from the specified dictionary, has the same initial capacity as the number of elements copied, and is sorted according to the specified <see cref="T:System.Collections.IComparer" /> interface.</summary>
|
||||
/// <param name="d">The <see cref="T:System.Collections.IDictionary" /> implementation to copy to a new <see cref="T:System.Collections.SortedList" /> object.</param>
|
||||
/// <param name="comparer">The <see cref="T:System.Collections.IComparer" /> implementation to use when comparing keys.-or- null to use the <see cref="T:System.IComparable" /> implementation of each key. </param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="d" /> is null. </exception>
|
||||
/// <exception cref="T:System.InvalidCastException">
|
||||
/// <paramref name="comparer" /> is null, and one or more elements in <paramref name="d" /> do not implement the <see cref="T:System.IComparable" /> interface. </exception>
|
||||
// Token: 0x06001024 RID: 4132 RVA: 0x00042CF4 File Offset: 0x00040EF4
|
||||
public SortedList(IDictionary d, IComparer comparer)
|
||||
{
|
||||
if (d == null)
|
||||
{
|
||||
throw new ArgumentNullException("dictionary");
|
||||
}
|
||||
this.InitTable(d.Count, true);
|
||||
this.comparer = comparer;
|
||||
IDictionaryEnumerator enumerator = d.GetEnumerator();
|
||||
while (enumerator.MoveNext())
|
||||
{
|
||||
this.Add(enumerator.Key, enumerator.Value);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Returns an <see cref="T:System.Collections.IEnumerator" /> that iterates through the <see cref="T:System.Collections.SortedList" />.</summary>
|
||||
/// <returns>An <see cref="T:System.Collections.IEnumerator" /> for the <see cref="T:System.Collections.SortedList" />.</returns>
|
||||
// Token: 0x06001026 RID: 4134 RVA: 0x00042D64 File Offset: 0x00040F64
|
||||
IEnumerator IEnumerable.GetEnumerator()
|
||||
{
|
||||
return new SortedList.Enumerator(this, SortedList.EnumeratorMode.ENTRY_MODE);
|
||||
}
|
||||
|
||||
/// <summary>Gets the number of elements contained in a <see cref="T:System.Collections.SortedList" /> object.</summary>
|
||||
/// <returns>The number of elements contained in the <see cref="T:System.Collections.SortedList" /> object.</returns>
|
||||
/// <filterpriority>1</filterpriority>
|
||||
// Token: 0x170002A0 RID: 672
|
||||
// (get) Token: 0x06001027 RID: 4135 RVA: 0x00042D70 File Offset: 0x00040F70
|
||||
public virtual int Count
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.inUse;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a value indicating whether access to a <see cref="T:System.Collections.SortedList" /> object is synchronized (thread safe).</summary>
|
||||
/// <returns>true if access to the <see cref="T:System.Collections.SortedList" /> object is synchronized (thread safe); otherwise, false. The default is false.</returns>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x170002A1 RID: 673
|
||||
// (get) Token: 0x06001028 RID: 4136 RVA: 0x00042D78 File Offset: 0x00040F78
|
||||
public virtual bool IsSynchronized
|
||||
{
|
||||
get
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets an object that can be used to synchronize access to a <see cref="T:System.Collections.SortedList" /> object.</summary>
|
||||
/// <returns>An object that can be used to synchronize access to the <see cref="T:System.Collections.SortedList" /> object.</returns>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x170002A2 RID: 674
|
||||
// (get) Token: 0x06001029 RID: 4137 RVA: 0x00042D7C File Offset: 0x00040F7C
|
||||
public virtual object SyncRoot
|
||||
{
|
||||
get
|
||||
{
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a value indicating whether a <see cref="T:System.Collections.SortedList" /> object has a fixed size.</summary>
|
||||
/// <returns>true if the <see cref="T:System.Collections.SortedList" /> object has a fixed size; otherwise, false. The default is false.</returns>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x170002A3 RID: 675
|
||||
// (get) Token: 0x0600102A RID: 4138 RVA: 0x00042D80 File Offset: 0x00040F80
|
||||
public virtual bool IsFixedSize
|
||||
{
|
||||
get
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a value indicating whether a <see cref="T:System.Collections.SortedList" /> object is read-only.</summary>
|
||||
/// <returns>true if the <see cref="T:System.Collections.SortedList" /> object is read-only; otherwise, false. The default is false.</returns>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x170002A4 RID: 676
|
||||
// (get) Token: 0x0600102B RID: 4139 RVA: 0x00042D84 File Offset: 0x00040F84
|
||||
public virtual bool IsReadOnly
|
||||
{
|
||||
get
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets the keys in a <see cref="T:System.Collections.SortedList" /> object.</summary>
|
||||
/// <returns>An <see cref="T:System.Collections.ICollection" /> object containing the keys in the <see cref="T:System.Collections.SortedList" /> object.</returns>
|
||||
/// <filterpriority>1</filterpriority>
|
||||
// Token: 0x170002A5 RID: 677
|
||||
// (get) Token: 0x0600102C RID: 4140 RVA: 0x00042D88 File Offset: 0x00040F88
|
||||
public virtual ICollection Keys
|
||||
{
|
||||
get
|
||||
{
|
||||
return new SortedList.ListKeys(this);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets the values in a <see cref="T:System.Collections.SortedList" /> object.</summary>
|
||||
/// <returns>An <see cref="T:System.Collections.ICollection" /> object containing the values in the <see cref="T:System.Collections.SortedList" /> object.</returns>
|
||||
/// <filterpriority>1</filterpriority>
|
||||
// Token: 0x170002A6 RID: 678
|
||||
// (get) Token: 0x0600102D RID: 4141 RVA: 0x00042D90 File Offset: 0x00040F90
|
||||
public virtual ICollection Values
|
||||
{
|
||||
get
|
||||
{
|
||||
return new SortedList.ListValues(this);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets and sets the value associated with a specific key in a <see cref="T:System.Collections.SortedList" /> object.</summary>
|
||||
/// <returns>The value associated with the <paramref name="key" /> parameter in the <see cref="T:System.Collections.SortedList" /> object, if <paramref name="key" /> is found; otherwise, null.</returns>
|
||||
/// <param name="key">The key associated with the value to get or set. </param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="key" /> is null. </exception>
|
||||
/// <exception cref="T:System.NotSupportedException">The property is set and the <see cref="T:System.Collections.SortedList" /> object is read-only.-or- The property is set, <paramref name="key" /> does not exist in the collection, and the <see cref="T:System.Collections.SortedList" /> has a fixed size. </exception>
|
||||
/// <exception cref="T:System.OutOfMemoryException">There is not enough available memory to add the element to the <see cref="T:System.Collections.SortedList" />.</exception>
|
||||
/// <exception cref="T:System.InvalidOperationException">The comparer throws an exception. </exception>
|
||||
/// <filterpriority>1</filterpriority>
|
||||
// Token: 0x170002A7 RID: 679
|
||||
public virtual object this[object key]
|
||||
{
|
||||
get
|
||||
{
|
||||
if (key == null)
|
||||
{
|
||||
throw new ArgumentNullException();
|
||||
}
|
||||
return this.GetImpl(key);
|
||||
}
|
||||
set
|
||||
{
|
||||
if (key == null)
|
||||
{
|
||||
throw new ArgumentNullException();
|
||||
}
|
||||
if (this.IsReadOnly)
|
||||
{
|
||||
throw new NotSupportedException("SortedList is Read Only.");
|
||||
}
|
||||
if (this.Find(key) < 0 && this.IsFixedSize)
|
||||
{
|
||||
throw new NotSupportedException("Key not found and SortedList is fixed size.");
|
||||
}
|
||||
this.PutImpl(key, value, true);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets or sets the capacity of a <see cref="T:System.Collections.SortedList" /> object.</summary>
|
||||
/// <returns>The number of elements that the <see cref="T:System.Collections.SortedList" /> object can contain.</returns>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">The value assigned is less than the current number of elements in the <see cref="T:System.Collections.SortedList" /> object.</exception>
|
||||
/// <exception cref="T:System.OutOfMemoryException">There is not enough memory available on the system.</exception>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x170002A8 RID: 680
|
||||
// (get) Token: 0x06001030 RID: 4144 RVA: 0x00042E0C File Offset: 0x0004100C
|
||||
// (set) Token: 0x06001031 RID: 4145 RVA: 0x00042E18 File Offset: 0x00041018
|
||||
public virtual int Capacity
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.table.Length;
|
||||
}
|
||||
set
|
||||
{
|
||||
int num = this.table.Length;
|
||||
if (this.inUse > value)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException("capacity too small");
|
||||
}
|
||||
if (value == 0)
|
||||
{
|
||||
SortedList.Slot[] array = new SortedList.Slot[this.defaultCapacity];
|
||||
Array.Copy(this.table, array, this.inUse);
|
||||
this.table = array;
|
||||
}
|
||||
else if (value > this.inUse)
|
||||
{
|
||||
SortedList.Slot[] array2 = new SortedList.Slot[value];
|
||||
Array.Copy(this.table, array2, this.inUse);
|
||||
this.table = array2;
|
||||
}
|
||||
else if (value > num)
|
||||
{
|
||||
SortedList.Slot[] array3 = new SortedList.Slot[value];
|
||||
Array.Copy(this.table, array3, num);
|
||||
this.table = array3;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Adds an element with the specified key and value to a <see cref="T:System.Collections.SortedList" /> object.</summary>
|
||||
/// <param name="key">The key of the element to add. </param>
|
||||
/// <param name="value">The value of the element 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 element with the specified <paramref name="key" /> already exists in the <see cref="T:System.Collections.SortedList" /> object.-or- The <see cref="T:System.Collections.SortedList" /> is set to use the <see cref="T:System.IComparable" /> interface, and <paramref name="key" /> does not implement the <see cref="T:System.IComparable" /> interface. </exception>
|
||||
/// <exception cref="T:System.NotSupportedException">The <see cref="T:System.Collections.SortedList" /> is read-only.-or- The <see cref="T:System.Collections.SortedList" /> has a fixed size. </exception>
|
||||
/// <exception cref="T:System.OutOfMemoryException">There is not enough available memory to add the element to the <see cref="T:System.Collections.SortedList" />.</exception>
|
||||
/// <exception cref="T:System.InvalidOperationException">The comparer throws an exception. </exception>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x06001032 RID: 4146 RVA: 0x00042EC8 File Offset: 0x000410C8
|
||||
public virtual void Add(object key, object value)
|
||||
{
|
||||
this.PutImpl(key, value, false);
|
||||
}
|
||||
|
||||
/// <summary>Removes all elements from a <see cref="T:System.Collections.SortedList" /> object.</summary>
|
||||
/// <exception cref="T:System.NotSupportedException">The <see cref="T:System.Collections.SortedList" /> object is read-only.-or- The <see cref="T:System.Collections.SortedList" /> has a fixed size. </exception>
|
||||
/// <filterpriority>1</filterpriority>
|
||||
// Token: 0x06001033 RID: 4147 RVA: 0x00042ED4 File Offset: 0x000410D4
|
||||
public virtual void Clear()
|
||||
{
|
||||
this.defaultCapacity = SortedList.INITIAL_SIZE;
|
||||
this.table = new SortedList.Slot[this.defaultCapacity];
|
||||
this.inUse = 0;
|
||||
this.modificationCount++;
|
||||
}
|
||||
|
||||
/// <summary>Determines whether a <see cref="T:System.Collections.SortedList" /> object contains a specific key.</summary>
|
||||
/// <returns>true if the <see cref="T:System.Collections.SortedList" /> object contains an element with the specified <paramref name="key" />; otherwise, false.</returns>
|
||||
/// <param name="key">The key to locate in the <see cref="T:System.Collections.SortedList" /> object. </param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="key" /> is null. </exception>
|
||||
/// <exception cref="T:System.InvalidOperationException">The comparer throws an exception. </exception>
|
||||
/// <filterpriority>1</filterpriority>
|
||||
// Token: 0x06001034 RID: 4148 RVA: 0x00042F08 File Offset: 0x00041108
|
||||
public virtual bool Contains(object key)
|
||||
{
|
||||
if (key == null)
|
||||
{
|
||||
throw new ArgumentNullException();
|
||||
}
|
||||
bool flag;
|
||||
try
|
||||
{
|
||||
flag = this.Find(key) >= 0;
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
throw new InvalidOperationException();
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/// <summary>Returns an <see cref="T:System.Collections.IDictionaryEnumerator" /> object that iterates through a <see cref="T:System.Collections.SortedList" /> object.</summary>
|
||||
/// <returns>An <see cref="T:System.Collections.IDictionaryEnumerator" /> object for the <see cref="T:System.Collections.SortedList" /> object.</returns>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x06001035 RID: 4149 RVA: 0x00042F64 File Offset: 0x00041164
|
||||
public virtual IDictionaryEnumerator GetEnumerator()
|
||||
{
|
||||
return new SortedList.Enumerator(this, SortedList.EnumeratorMode.ENTRY_MODE);
|
||||
}
|
||||
|
||||
/// <summary>Removes the element with the specified key from a <see cref="T:System.Collections.SortedList" /> object.</summary>
|
||||
/// <param name="key">The key of the element to remove. </param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="key" /> is null. </exception>
|
||||
/// <exception cref="T:System.NotSupportedException">The <see cref="T:System.Collections.SortedList" /> object is read-only.-or- The <see cref="T:System.Collections.SortedList" /> has a fixed size. </exception>
|
||||
/// <filterpriority>1</filterpriority>
|
||||
// Token: 0x06001036 RID: 4150 RVA: 0x00042F70 File Offset: 0x00041170
|
||||
public virtual void Remove(object key)
|
||||
{
|
||||
int num = this.IndexOfKey(key);
|
||||
if (num >= 0)
|
||||
{
|
||||
this.RemoveAt(num);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Copies <see cref="T:System.Collections.SortedList" /> elements to a one-dimensional <see cref="T:System.Array" /> object, starting at the specified index in the array.</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.SortedList" />. The <see cref="T:System.Array" /> must have zero-based indexing. </param>
|
||||
/// <param name="arrayIndex">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="arrayIndex" /> 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.SortedList" /> object is greater than the available space from <paramref name="arrayIndex" /> 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.SortedList" /> cannot be cast automatically to the type of the destination <paramref name="array" />. </exception>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x06001037 RID: 4151 RVA: 0x00042F94 File Offset: 0x00041194
|
||||
public virtual void CopyTo(Array array, int arrayIndex)
|
||||
{
|
||||
if (array == null)
|
||||
{
|
||||
throw new ArgumentNullException();
|
||||
}
|
||||
if (arrayIndex < 0)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException();
|
||||
}
|
||||
if (array.Rank > 1)
|
||||
{
|
||||
throw new ArgumentException("array is multi-dimensional");
|
||||
}
|
||||
if (arrayIndex >= array.Length)
|
||||
{
|
||||
throw new ArgumentNullException("arrayIndex is greater than or equal to array.Length");
|
||||
}
|
||||
if (this.Count > array.Length - arrayIndex)
|
||||
{
|
||||
throw new ArgumentNullException("Not enough space in array from arrayIndex to end of array");
|
||||
}
|
||||
IDictionaryEnumerator enumerator = this.GetEnumerator();
|
||||
int num = arrayIndex;
|
||||
while (enumerator.MoveNext())
|
||||
{
|
||||
array.SetValue(enumerator.Entry, num++);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Creates a shallow copy of a <see cref="T:System.Collections.SortedList" /> object.</summary>
|
||||
/// <returns>A shallow copy of the <see cref="T:System.Collections.SortedList" /> object.</returns>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
/// <PermissionSet>
|
||||
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="UnmanagedCode" />
|
||||
/// </PermissionSet>
|
||||
// Token: 0x06001038 RID: 4152 RVA: 0x00043038 File Offset: 0x00041238
|
||||
public virtual object Clone()
|
||||
{
|
||||
return new SortedList(this, this.comparer)
|
||||
{
|
||||
modificationCount = this.modificationCount
|
||||
};
|
||||
}
|
||||
|
||||
/// <summary>Gets the keys in a <see cref="T:System.Collections.SortedList" /> object.</summary>
|
||||
/// <returns>An <see cref="T:System.Collections.IList" /> object containing the keys in the <see cref="T:System.Collections.SortedList" /> object.</returns>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x06001039 RID: 4153 RVA: 0x00043060 File Offset: 0x00041260
|
||||
public virtual IList GetKeyList()
|
||||
{
|
||||
return new SortedList.ListKeys(this);
|
||||
}
|
||||
|
||||
/// <summary>Gets the values in a <see cref="T:System.Collections.SortedList" /> object.</summary>
|
||||
/// <returns>An <see cref="T:System.Collections.IList" /> object containing the values in the <see cref="T:System.Collections.SortedList" /> object.</returns>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x0600103A RID: 4154 RVA: 0x00043068 File Offset: 0x00041268
|
||||
public virtual IList GetValueList()
|
||||
{
|
||||
return new SortedList.ListValues(this);
|
||||
}
|
||||
|
||||
/// <summary>Removes the element at the specified index of a <see cref="T:System.Collections.SortedList" /> object.</summary>
|
||||
/// <param name="index">The zero-based index of the element to remove. </param>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="index" /> is outside the range of valid indexes for the <see cref="T:System.Collections.SortedList" /> object. </exception>
|
||||
/// <exception cref="T:System.NotSupportedException">The <see cref="T:System.Collections.SortedList" /> is read-only.-or- The <see cref="T:System.Collections.SortedList" /> has a fixed size. </exception>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x0600103B RID: 4155 RVA: 0x00043070 File Offset: 0x00041270
|
||||
public virtual void RemoveAt(int index)
|
||||
{
|
||||
SortedList.Slot[] array = this.table;
|
||||
int count = this.Count;
|
||||
if (index >= 0 && index < count)
|
||||
{
|
||||
if (index != count - 1)
|
||||
{
|
||||
Array.Copy(array, index + 1, array, index, count - 1 - index);
|
||||
}
|
||||
else
|
||||
{
|
||||
array[index].key = null;
|
||||
array[index].value = null;
|
||||
}
|
||||
this.inUse--;
|
||||
this.modificationCount++;
|
||||
return;
|
||||
}
|
||||
throw new ArgumentOutOfRangeException("index out of range");
|
||||
}
|
||||
|
||||
/// <summary>Returns the zero-based index of the specified key in a <see cref="T:System.Collections.SortedList" /> object.</summary>
|
||||
/// <returns>The zero-based index of the <paramref name="key" /> parameter, if <paramref name="key" /> is found in the <see cref="T:System.Collections.SortedList" /> object; otherwise, -1.</returns>
|
||||
/// <param name="key">The key to locate in the <see cref="T:System.Collections.SortedList" /> object. </param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="key" /> is null. </exception>
|
||||
/// <exception cref="T:System.InvalidOperationException">The comparer throws an exception. </exception>
|
||||
/// <filterpriority>1</filterpriority>
|
||||
// Token: 0x0600103C RID: 4156 RVA: 0x00043100 File Offset: 0x00041300
|
||||
public virtual int IndexOfKey(object key)
|
||||
{
|
||||
if (key == null)
|
||||
{
|
||||
throw new ArgumentNullException();
|
||||
}
|
||||
int num = 0;
|
||||
try
|
||||
{
|
||||
num = this.Find(key);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
throw new InvalidOperationException();
|
||||
}
|
||||
return num | (num >> 31);
|
||||
}
|
||||
|
||||
/// <summary>Returns the zero-based index of the first occurrence of the specified value in a <see cref="T:System.Collections.SortedList" /> object.</summary>
|
||||
/// <returns>The zero-based index of the first occurrence of the <paramref name="value" /> parameter, if <paramref name="value" /> is found in the <see cref="T:System.Collections.SortedList" /> object; otherwise, -1.</returns>
|
||||
/// <param name="value">The value to locate in the <see cref="T:System.Collections.SortedList" /> object. The value can be null. </param>
|
||||
/// <filterpriority>1</filterpriority>
|
||||
// Token: 0x0600103D RID: 4157 RVA: 0x00043158 File Offset: 0x00041358
|
||||
public virtual int IndexOfValue(object value)
|
||||
{
|
||||
if (this.inUse == 0)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
for (int i = 0; i < this.inUse; i++)
|
||||
{
|
||||
SortedList.Slot slot = this.table[i];
|
||||
if (object.Equals(value, slot.value))
|
||||
{
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
/// <summary>Determines whether a <see cref="T:System.Collections.SortedList" /> object contains a specific key.</summary>
|
||||
/// <returns>true if the <see cref="T:System.Collections.SortedList" /> object contains an element with the specified <paramref name="key" />; otherwise, false.</returns>
|
||||
/// <param name="key">The key to locate in the <see cref="T:System.Collections.SortedList" /> object.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="key" /> is null. </exception>
|
||||
/// <exception cref="T:System.InvalidOperationException">The comparer throws an exception. </exception>
|
||||
/// <filterpriority>1</filterpriority>
|
||||
// Token: 0x0600103E RID: 4158 RVA: 0x000431B0 File Offset: 0x000413B0
|
||||
public virtual bool ContainsKey(object key)
|
||||
{
|
||||
if (key == null)
|
||||
{
|
||||
throw new ArgumentNullException();
|
||||
}
|
||||
bool flag;
|
||||
try
|
||||
{
|
||||
flag = this.Contains(key);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
throw new InvalidOperationException();
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/// <summary>Determines whether a <see cref="T:System.Collections.SortedList" /> object contains a specific value.</summary>
|
||||
/// <returns>true if the <see cref="T:System.Collections.SortedList" /> object contains an element with the specified <paramref name="value" />; otherwise, false.</returns>
|
||||
/// <param name="value">The value to locate in the <see cref="T:System.Collections.SortedList" /> object. The value can be null. </param>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x0600103F RID: 4159 RVA: 0x00043204 File Offset: 0x00041404
|
||||
public virtual bool ContainsValue(object value)
|
||||
{
|
||||
return this.IndexOfValue(value) >= 0;
|
||||
}
|
||||
|
||||
/// <summary>Gets the value at the specified index of a <see cref="T:System.Collections.SortedList" /> object.</summary>
|
||||
/// <returns>The value at the specified index of the <see cref="T:System.Collections.SortedList" /> object.</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 range of valid indexes for the <see cref="T:System.Collections.SortedList" /> object. </exception>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x06001040 RID: 4160 RVA: 0x00043214 File Offset: 0x00041414
|
||||
public virtual object GetByIndex(int index)
|
||||
{
|
||||
if (index >= 0 && index < this.Count)
|
||||
{
|
||||
return this.table[index].value;
|
||||
}
|
||||
throw new ArgumentOutOfRangeException("index out of range");
|
||||
}
|
||||
|
||||
/// <summary>Replaces the value at a specific index in a <see cref="T:System.Collections.SortedList" /> object.</summary>
|
||||
/// <param name="index">The zero-based index at which to save <paramref name="value" />. </param>
|
||||
/// <param name="value">The <see cref="T:System.Object" /> to save into the <see cref="T:System.Collections.SortedList" /> object. The value can be null. </param>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="index" /> is outside the range of valid indexes for the <see cref="T:System.Collections.SortedList" /> object. </exception>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x06001041 RID: 4161 RVA: 0x00043248 File Offset: 0x00041448
|
||||
public virtual void SetByIndex(int index, object value)
|
||||
{
|
||||
if (index >= 0 && index < this.Count)
|
||||
{
|
||||
this.table[index].value = value;
|
||||
return;
|
||||
}
|
||||
throw new ArgumentOutOfRangeException("index out of range");
|
||||
}
|
||||
|
||||
/// <summary>Gets the key at the specified index of a <see cref="T:System.Collections.SortedList" /> object.</summary>
|
||||
/// <returns>The key at the specified index of the <see cref="T:System.Collections.SortedList" /> object.</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 range of valid indexes for the <see cref="T:System.Collections.SortedList" /> object.</exception>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x06001042 RID: 4162 RVA: 0x00043280 File Offset: 0x00041480
|
||||
public virtual object GetKey(int index)
|
||||
{
|
||||
if (index >= 0 && index < this.Count)
|
||||
{
|
||||
return this.table[index].key;
|
||||
}
|
||||
throw new ArgumentOutOfRangeException("index out of range");
|
||||
}
|
||||
|
||||
/// <summary>Returns a synchronized (thread-safe) wrapper for a <see cref="T:System.Collections.SortedList" /> object.</summary>
|
||||
/// <returns>A synchronized (thread-safe) wrapper for the <see cref="T:System.Collections.SortedList" /> object.</returns>
|
||||
/// <param name="list">The <see cref="T:System.Collections.SortedList" /> object to synchronize. </param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="list" /> is null. </exception>
|
||||
/// <filterpriority>1</filterpriority>
|
||||
/// <PermissionSet>
|
||||
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="UnmanagedCode" />
|
||||
/// </PermissionSet>
|
||||
// Token: 0x06001043 RID: 4163 RVA: 0x000432B4 File Offset: 0x000414B4
|
||||
public static SortedList Synchronized(SortedList list)
|
||||
{
|
||||
if (list == null)
|
||||
{
|
||||
throw new ArgumentNullException(Locale.GetText("Base list is null."));
|
||||
}
|
||||
return new SortedList.SynchedSortedList(list);
|
||||
}
|
||||
|
||||
/// <summary>Sets the capacity to the actual number of elements in a <see cref="T:System.Collections.SortedList" /> object.</summary>
|
||||
/// <exception cref="T:System.NotSupportedException">The <see cref="T:System.Collections.SortedList" /> object is read-only.-or- The <see cref="T:System.Collections.SortedList" /> has a fixed size. </exception>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x06001044 RID: 4164 RVA: 0x000432D4 File Offset: 0x000414D4
|
||||
public virtual void TrimToSize()
|
||||
{
|
||||
if (this.Count == 0)
|
||||
{
|
||||
this.Resize(this.defaultCapacity, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.Resize(this.Count, true);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06001045 RID: 4165 RVA: 0x0004330C File Offset: 0x0004150C
|
||||
private void Resize(int n, bool copy)
|
||||
{
|
||||
SortedList.Slot[] array = this.table;
|
||||
SortedList.Slot[] array2 = new SortedList.Slot[n];
|
||||
if (copy)
|
||||
{
|
||||
Array.Copy(array, 0, array2, 0, n);
|
||||
}
|
||||
this.table = array2;
|
||||
}
|
||||
|
||||
// Token: 0x06001046 RID: 4166 RVA: 0x00043340 File Offset: 0x00041540
|
||||
private void EnsureCapacity(int n, int free)
|
||||
{
|
||||
SortedList.Slot[] array = this.table;
|
||||
SortedList.Slot[] array2 = null;
|
||||
int capacity = this.Capacity;
|
||||
bool flag = free >= 0 && free < this.Count;
|
||||
if (n > capacity)
|
||||
{
|
||||
array2 = new SortedList.Slot[n << 1];
|
||||
}
|
||||
if (array2 != null)
|
||||
{
|
||||
if (flag)
|
||||
{
|
||||
if (free > 0)
|
||||
{
|
||||
Array.Copy(array, 0, array2, 0, free);
|
||||
}
|
||||
int num = this.Count - free;
|
||||
if (num > 0)
|
||||
{
|
||||
Array.Copy(array, free, array2, free + 1, num);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Array.Copy(array, array2, this.Count);
|
||||
}
|
||||
this.table = array2;
|
||||
}
|
||||
else if (flag)
|
||||
{
|
||||
Array.Copy(array, free, array, free + 1, this.Count - free);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06001047 RID: 4167 RVA: 0x000433FC File Offset: 0x000415FC
|
||||
private void PutImpl(object key, object value, bool overwrite)
|
||||
{
|
||||
if (key == null)
|
||||
{
|
||||
throw new ArgumentNullException("null key");
|
||||
}
|
||||
SortedList.Slot[] array = this.table;
|
||||
int num = -1;
|
||||
try
|
||||
{
|
||||
num = this.Find(key);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
throw new InvalidOperationException();
|
||||
}
|
||||
if (num >= 0)
|
||||
{
|
||||
if (!overwrite)
|
||||
{
|
||||
string text = Locale.GetText("Key '{0}' already exists in list.", new object[] { key });
|
||||
throw new ArgumentException(text);
|
||||
}
|
||||
array[num].value = value;
|
||||
this.modificationCount++;
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
num = ~num;
|
||||
if (num > this.Capacity + 1)
|
||||
{
|
||||
throw new Exception(string.Concat(new object[] { "SortedList::internal error (", key, ", ", value, ") at [", num, "]" }));
|
||||
}
|
||||
this.EnsureCapacity(this.Count + 1, num);
|
||||
array = this.table;
|
||||
array[num].key = key;
|
||||
array[num].value = value;
|
||||
this.inUse++;
|
||||
this.modificationCount++;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06001048 RID: 4168 RVA: 0x0004353C File Offset: 0x0004173C
|
||||
private object GetImpl(object key)
|
||||
{
|
||||
int num = this.Find(key);
|
||||
if (num >= 0)
|
||||
{
|
||||
return this.table[num].value;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
// Token: 0x06001049 RID: 4169 RVA: 0x0004356C File Offset: 0x0004176C
|
||||
private void InitTable(int capacity, bool forceSize)
|
||||
{
|
||||
if (!forceSize && capacity < this.defaultCapacity)
|
||||
{
|
||||
capacity = this.defaultCapacity;
|
||||
}
|
||||
this.table = new SortedList.Slot[capacity];
|
||||
this.inUse = 0;
|
||||
this.modificationCount = 0;
|
||||
}
|
||||
|
||||
// Token: 0x0600104A RID: 4170 RVA: 0x000435B0 File Offset: 0x000417B0
|
||||
private void CopyToArray(Array arr, int i, SortedList.EnumeratorMode mode)
|
||||
{
|
||||
if (arr == null)
|
||||
{
|
||||
throw new ArgumentNullException("arr");
|
||||
}
|
||||
if (i < 0 || i + this.Count > arr.Length)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException("i");
|
||||
}
|
||||
IEnumerator enumerator = new SortedList.Enumerator(this, mode);
|
||||
while (enumerator.MoveNext())
|
||||
{
|
||||
object obj = enumerator.Current;
|
||||
arr.SetValue(obj, i++);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600104B RID: 4171 RVA: 0x00043620 File Offset: 0x00041820
|
||||
private int Find(object key)
|
||||
{
|
||||
SortedList.Slot[] array = this.table;
|
||||
int count = this.Count;
|
||||
if (count == 0)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
IComparer comparer;
|
||||
if (this.comparer == null)
|
||||
{
|
||||
IComparer @default = Comparer.Default;
|
||||
comparer = @default;
|
||||
}
|
||||
else
|
||||
{
|
||||
comparer = this.comparer;
|
||||
}
|
||||
IComparer comparer2 = comparer;
|
||||
int i = 0;
|
||||
int num = count - 1;
|
||||
while (i <= num)
|
||||
{
|
||||
int num2 = i + num >> 1;
|
||||
int num3 = comparer2.Compare(array[num2].key, key);
|
||||
if (num3 == 0)
|
||||
{
|
||||
return num2;
|
||||
}
|
||||
if (num3 < 0)
|
||||
{
|
||||
i = num2 + 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
num = num2 - 1;
|
||||
}
|
||||
}
|
||||
return ~i;
|
||||
}
|
||||
|
||||
// Token: 0x040003EA RID: 1002
|
||||
private static readonly int INITIAL_SIZE = 16;
|
||||
|
||||
// Token: 0x040003EB RID: 1003
|
||||
private int inUse;
|
||||
|
||||
// Token: 0x040003EC RID: 1004
|
||||
private int modificationCount;
|
||||
|
||||
// Token: 0x040003ED RID: 1005
|
||||
private SortedList.Slot[] table;
|
||||
|
||||
// Token: 0x040003EE RID: 1006
|
||||
private IComparer comparer;
|
||||
|
||||
// Token: 0x040003EF RID: 1007
|
||||
private int defaultCapacity;
|
||||
|
||||
// Token: 0x0200013C RID: 316
|
||||
[Serializable]
|
||||
internal struct Slot
|
||||
{
|
||||
// Token: 0x040003F0 RID: 1008
|
||||
internal object key;
|
||||
|
||||
// Token: 0x040003F1 RID: 1009
|
||||
internal object value;
|
||||
}
|
||||
|
||||
// Token: 0x0200013D RID: 317
|
||||
private enum EnumeratorMode
|
||||
{
|
||||
// Token: 0x040003F3 RID: 1011
|
||||
KEY_MODE,
|
||||
// Token: 0x040003F4 RID: 1012
|
||||
VALUE_MODE,
|
||||
// Token: 0x040003F5 RID: 1013
|
||||
ENTRY_MODE
|
||||
}
|
||||
|
||||
// Token: 0x0200013E RID: 318
|
||||
private sealed class Enumerator : IEnumerator, ICloneable, IDictionaryEnumerator
|
||||
{
|
||||
// Token: 0x0600104C RID: 4172 RVA: 0x000436BC File Offset: 0x000418BC
|
||||
public Enumerator(SortedList host, SortedList.EnumeratorMode mode)
|
||||
{
|
||||
this.host = host;
|
||||
this.stamp = host.modificationCount;
|
||||
this.size = host.Count;
|
||||
this.mode = mode;
|
||||
this.Reset();
|
||||
}
|
||||
|
||||
// Token: 0x0600104D RID: 4173 RVA: 0x000436FC File Offset: 0x000418FC
|
||||
public Enumerator(SortedList host)
|
||||
: this(host, SortedList.EnumeratorMode.ENTRY_MODE)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x0600104F RID: 4175 RVA: 0x00043714 File Offset: 0x00041914
|
||||
public void Reset()
|
||||
{
|
||||
if (this.host.modificationCount != this.stamp || this.invalid)
|
||||
{
|
||||
throw new InvalidOperationException(SortedList.Enumerator.xstr);
|
||||
}
|
||||
this.pos = -1;
|
||||
this.currentKey = null;
|
||||
this.currentValue = null;
|
||||
}
|
||||
|
||||
// Token: 0x06001050 RID: 4176 RVA: 0x00043764 File Offset: 0x00041964
|
||||
public bool MoveNext()
|
||||
{
|
||||
if (this.host.modificationCount != this.stamp || this.invalid)
|
||||
{
|
||||
throw new InvalidOperationException(SortedList.Enumerator.xstr);
|
||||
}
|
||||
SortedList.Slot[] table = this.host.table;
|
||||
if (++this.pos < this.size)
|
||||
{
|
||||
SortedList.Slot slot = table[this.pos];
|
||||
this.currentKey = slot.key;
|
||||
this.currentValue = slot.value;
|
||||
return true;
|
||||
}
|
||||
this.currentKey = null;
|
||||
this.currentValue = null;
|
||||
return false;
|
||||
}
|
||||
|
||||
// Token: 0x170002A9 RID: 681
|
||||
// (get) Token: 0x06001051 RID: 4177 RVA: 0x00043804 File Offset: 0x00041A04
|
||||
public DictionaryEntry Entry
|
||||
{
|
||||
get
|
||||
{
|
||||
if (this.invalid || this.pos >= this.size || this.pos == -1)
|
||||
{
|
||||
throw new InvalidOperationException(SortedList.Enumerator.xstr);
|
||||
}
|
||||
return new DictionaryEntry(this.currentKey, this.currentValue);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170002AA RID: 682
|
||||
// (get) Token: 0x06001052 RID: 4178 RVA: 0x00043858 File Offset: 0x00041A58
|
||||
public object Key
|
||||
{
|
||||
get
|
||||
{
|
||||
if (this.invalid || this.pos >= this.size || this.pos == -1)
|
||||
{
|
||||
throw new InvalidOperationException(SortedList.Enumerator.xstr);
|
||||
}
|
||||
return this.currentKey;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170002AB RID: 683
|
||||
// (get) Token: 0x06001053 RID: 4179 RVA: 0x00043894 File Offset: 0x00041A94
|
||||
public object Value
|
||||
{
|
||||
get
|
||||
{
|
||||
if (this.invalid || this.pos >= this.size || this.pos == -1)
|
||||
{
|
||||
throw new InvalidOperationException(SortedList.Enumerator.xstr);
|
||||
}
|
||||
return this.currentValue;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170002AC RID: 684
|
||||
// (get) Token: 0x06001054 RID: 4180 RVA: 0x000438D0 File Offset: 0x00041AD0
|
||||
public object Current
|
||||
{
|
||||
get
|
||||
{
|
||||
if (this.invalid || this.pos >= this.size || this.pos == -1)
|
||||
{
|
||||
throw new InvalidOperationException(SortedList.Enumerator.xstr);
|
||||
}
|
||||
switch (this.mode)
|
||||
{
|
||||
case SortedList.EnumeratorMode.KEY_MODE:
|
||||
return this.currentKey;
|
||||
case SortedList.EnumeratorMode.VALUE_MODE:
|
||||
return this.currentValue;
|
||||
case SortedList.EnumeratorMode.ENTRY_MODE:
|
||||
return this.Entry;
|
||||
default:
|
||||
throw new NotSupportedException(this.mode + " is not a supported mode.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06001055 RID: 4181 RVA: 0x00043964 File Offset: 0x00041B64
|
||||
public object Clone()
|
||||
{
|
||||
return new SortedList.Enumerator(this.host, this.mode)
|
||||
{
|
||||
stamp = this.stamp,
|
||||
pos = this.pos,
|
||||
size = this.size,
|
||||
currentKey = this.currentKey,
|
||||
currentValue = this.currentValue,
|
||||
invalid = this.invalid
|
||||
};
|
||||
}
|
||||
|
||||
// Token: 0x040003F6 RID: 1014
|
||||
private SortedList host;
|
||||
|
||||
// Token: 0x040003F7 RID: 1015
|
||||
private int stamp;
|
||||
|
||||
// Token: 0x040003F8 RID: 1016
|
||||
private int pos;
|
||||
|
||||
// Token: 0x040003F9 RID: 1017
|
||||
private int size;
|
||||
|
||||
// Token: 0x040003FA RID: 1018
|
||||
private SortedList.EnumeratorMode mode;
|
||||
|
||||
// Token: 0x040003FB RID: 1019
|
||||
private object currentKey;
|
||||
|
||||
// Token: 0x040003FC RID: 1020
|
||||
private object currentValue;
|
||||
|
||||
// Token: 0x040003FD RID: 1021
|
||||
private bool invalid;
|
||||
|
||||
// Token: 0x040003FE RID: 1022
|
||||
private static readonly string xstr = "SortedList.Enumerator: snapshot out of sync.";
|
||||
}
|
||||
|
||||
// Token: 0x0200013F RID: 319
|
||||
[Serializable]
|
||||
private class ListKeys : IEnumerable, ICollection, IList
|
||||
{
|
||||
// Token: 0x06001056 RID: 4182 RVA: 0x000439CC File Offset: 0x00041BCC
|
||||
public ListKeys(SortedList host)
|
||||
{
|
||||
if (host == null)
|
||||
{
|
||||
throw new ArgumentNullException();
|
||||
}
|
||||
this.host = host;
|
||||
}
|
||||
|
||||
// Token: 0x170002AD RID: 685
|
||||
// (get) Token: 0x06001057 RID: 4183 RVA: 0x000439E8 File Offset: 0x00041BE8
|
||||
public virtual int Count
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.host.Count;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170002AE RID: 686
|
||||
// (get) Token: 0x06001058 RID: 4184 RVA: 0x000439F8 File Offset: 0x00041BF8
|
||||
public virtual bool IsSynchronized
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.host.IsSynchronized;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170002AF RID: 687
|
||||
// (get) Token: 0x06001059 RID: 4185 RVA: 0x00043A08 File Offset: 0x00041C08
|
||||
public virtual object SyncRoot
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.host.SyncRoot;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600105A RID: 4186 RVA: 0x00043A18 File Offset: 0x00041C18
|
||||
public virtual void CopyTo(Array array, int arrayIndex)
|
||||
{
|
||||
this.host.CopyToArray(array, arrayIndex, SortedList.EnumeratorMode.KEY_MODE);
|
||||
}
|
||||
|
||||
// Token: 0x170002B0 RID: 688
|
||||
// (get) Token: 0x0600105B RID: 4187 RVA: 0x00043A28 File Offset: 0x00041C28
|
||||
public virtual bool IsFixedSize
|
||||
{
|
||||
get
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170002B1 RID: 689
|
||||
// (get) Token: 0x0600105C RID: 4188 RVA: 0x00043A2C File Offset: 0x00041C2C
|
||||
public virtual bool IsReadOnly
|
||||
{
|
||||
get
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170002B2 RID: 690
|
||||
public virtual object this[int index]
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.host.GetKey(index);
|
||||
}
|
||||
set
|
||||
{
|
||||
throw new NotSupportedException("attempt to modify a key");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600105F RID: 4191 RVA: 0x00043A4C File Offset: 0x00041C4C
|
||||
public virtual int Add(object value)
|
||||
{
|
||||
throw new NotSupportedException("IList::Add not supported");
|
||||
}
|
||||
|
||||
// Token: 0x06001060 RID: 4192 RVA: 0x00043A58 File Offset: 0x00041C58
|
||||
public virtual void Clear()
|
||||
{
|
||||
throw new NotSupportedException("IList::Clear not supported");
|
||||
}
|
||||
|
||||
// Token: 0x06001061 RID: 4193 RVA: 0x00043A64 File Offset: 0x00041C64
|
||||
public virtual bool Contains(object key)
|
||||
{
|
||||
return this.host.Contains(key);
|
||||
}
|
||||
|
||||
// Token: 0x06001062 RID: 4194 RVA: 0x00043A74 File Offset: 0x00041C74
|
||||
public virtual int IndexOf(object key)
|
||||
{
|
||||
return this.host.IndexOfKey(key);
|
||||
}
|
||||
|
||||
// Token: 0x06001063 RID: 4195 RVA: 0x00043A84 File Offset: 0x00041C84
|
||||
public virtual void Insert(int index, object value)
|
||||
{
|
||||
throw new NotSupportedException("IList::Insert not supported");
|
||||
}
|
||||
|
||||
// Token: 0x06001064 RID: 4196 RVA: 0x00043A90 File Offset: 0x00041C90
|
||||
public virtual void Remove(object value)
|
||||
{
|
||||
throw new NotSupportedException("IList::Remove not supported");
|
||||
}
|
||||
|
||||
// Token: 0x06001065 RID: 4197 RVA: 0x00043A9C File Offset: 0x00041C9C
|
||||
public virtual void RemoveAt(int index)
|
||||
{
|
||||
throw new NotSupportedException("IList::RemoveAt not supported");
|
||||
}
|
||||
|
||||
// Token: 0x06001066 RID: 4198 RVA: 0x00043AA8 File Offset: 0x00041CA8
|
||||
public virtual IEnumerator GetEnumerator()
|
||||
{
|
||||
return new SortedList.Enumerator(this.host, SortedList.EnumeratorMode.KEY_MODE);
|
||||
}
|
||||
|
||||
// Token: 0x040003FF RID: 1023
|
||||
private SortedList host;
|
||||
}
|
||||
|
||||
// Token: 0x02000140 RID: 320
|
||||
[Serializable]
|
||||
private class ListValues : IEnumerable, ICollection, IList
|
||||
{
|
||||
// Token: 0x06001067 RID: 4199 RVA: 0x00043AB8 File Offset: 0x00041CB8
|
||||
public ListValues(SortedList host)
|
||||
{
|
||||
if (host == null)
|
||||
{
|
||||
throw new ArgumentNullException();
|
||||
}
|
||||
this.host = host;
|
||||
}
|
||||
|
||||
// Token: 0x170002B3 RID: 691
|
||||
// (get) Token: 0x06001068 RID: 4200 RVA: 0x00043AD4 File Offset: 0x00041CD4
|
||||
public virtual int Count
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.host.Count;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170002B4 RID: 692
|
||||
// (get) Token: 0x06001069 RID: 4201 RVA: 0x00043AE4 File Offset: 0x00041CE4
|
||||
public virtual bool IsSynchronized
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.host.IsSynchronized;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170002B5 RID: 693
|
||||
// (get) Token: 0x0600106A RID: 4202 RVA: 0x00043AF4 File Offset: 0x00041CF4
|
||||
public virtual object SyncRoot
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.host.SyncRoot;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600106B RID: 4203 RVA: 0x00043B04 File Offset: 0x00041D04
|
||||
public virtual void CopyTo(Array array, int arrayIndex)
|
||||
{
|
||||
this.host.CopyToArray(array, arrayIndex, SortedList.EnumeratorMode.VALUE_MODE);
|
||||
}
|
||||
|
||||
// Token: 0x170002B6 RID: 694
|
||||
// (get) Token: 0x0600106C RID: 4204 RVA: 0x00043B14 File Offset: 0x00041D14
|
||||
public virtual bool IsFixedSize
|
||||
{
|
||||
get
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170002B7 RID: 695
|
||||
// (get) Token: 0x0600106D RID: 4205 RVA: 0x00043B18 File Offset: 0x00041D18
|
||||
public virtual bool IsReadOnly
|
||||
{
|
||||
get
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170002B8 RID: 696
|
||||
public virtual object this[int index]
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.host.GetByIndex(index);
|
||||
}
|
||||
set
|
||||
{
|
||||
throw new NotSupportedException("This operation is not supported on GetValueList return");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06001070 RID: 4208 RVA: 0x00043B38 File Offset: 0x00041D38
|
||||
public virtual int Add(object value)
|
||||
{
|
||||
throw new NotSupportedException("IList::Add not supported");
|
||||
}
|
||||
|
||||
// Token: 0x06001071 RID: 4209 RVA: 0x00043B44 File Offset: 0x00041D44
|
||||
public virtual void Clear()
|
||||
{
|
||||
throw new NotSupportedException("IList::Clear not supported");
|
||||
}
|
||||
|
||||
// Token: 0x06001072 RID: 4210 RVA: 0x00043B50 File Offset: 0x00041D50
|
||||
public virtual bool Contains(object value)
|
||||
{
|
||||
return this.host.ContainsValue(value);
|
||||
}
|
||||
|
||||
// Token: 0x06001073 RID: 4211 RVA: 0x00043B60 File Offset: 0x00041D60
|
||||
public virtual int IndexOf(object value)
|
||||
{
|
||||
return this.host.IndexOfValue(value);
|
||||
}
|
||||
|
||||
// Token: 0x06001074 RID: 4212 RVA: 0x00043B70 File Offset: 0x00041D70
|
||||
public virtual void Insert(int index, object value)
|
||||
{
|
||||
throw new NotSupportedException("IList::Insert not supported");
|
||||
}
|
||||
|
||||
// Token: 0x06001075 RID: 4213 RVA: 0x00043B7C File Offset: 0x00041D7C
|
||||
public virtual void Remove(object value)
|
||||
{
|
||||
throw new NotSupportedException("IList::Remove not supported");
|
||||
}
|
||||
|
||||
// Token: 0x06001076 RID: 4214 RVA: 0x00043B88 File Offset: 0x00041D88
|
||||
public virtual void RemoveAt(int index)
|
||||
{
|
||||
throw new NotSupportedException("IList::RemoveAt not supported");
|
||||
}
|
||||
|
||||
// Token: 0x06001077 RID: 4215 RVA: 0x00043B94 File Offset: 0x00041D94
|
||||
public virtual IEnumerator GetEnumerator()
|
||||
{
|
||||
return new SortedList.Enumerator(this.host, SortedList.EnumeratorMode.VALUE_MODE);
|
||||
}
|
||||
|
||||
// Token: 0x04000400 RID: 1024
|
||||
private SortedList host;
|
||||
}
|
||||
|
||||
// Token: 0x02000141 RID: 321
|
||||
private class SynchedSortedList : SortedList
|
||||
{
|
||||
// Token: 0x06001078 RID: 4216 RVA: 0x00043BA4 File Offset: 0x00041DA4
|
||||
public SynchedSortedList(SortedList host)
|
||||
{
|
||||
if (host == null)
|
||||
{
|
||||
throw new ArgumentNullException();
|
||||
}
|
||||
this.host = host;
|
||||
}
|
||||
|
||||
// Token: 0x170002B9 RID: 697
|
||||
// (get) Token: 0x06001079 RID: 4217 RVA: 0x00043BC0 File Offset: 0x00041DC0
|
||||
// (set) Token: 0x0600107A RID: 4218 RVA: 0x00043C1C File Offset: 0x00041E1C
|
||||
public override int Capacity
|
||||
{
|
||||
get
|
||||
{
|
||||
object syncRoot = this.host.SyncRoot;
|
||||
int capacity;
|
||||
lock (syncRoot)
|
||||
{
|
||||
capacity = this.host.Capacity;
|
||||
}
|
||||
return capacity;
|
||||
}
|
||||
set
|
||||
{
|
||||
object syncRoot = this.host.SyncRoot;
|
||||
lock (syncRoot)
|
||||
{
|
||||
this.host.Capacity = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170002BA RID: 698
|
||||
// (get) Token: 0x0600107B RID: 4219 RVA: 0x00043C70 File Offset: 0x00041E70
|
||||
public override int Count
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.host.Count;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170002BB RID: 699
|
||||
// (get) Token: 0x0600107C RID: 4220 RVA: 0x00043C80 File Offset: 0x00041E80
|
||||
public override bool IsSynchronized
|
||||
{
|
||||
get
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170002BC RID: 700
|
||||
// (get) Token: 0x0600107D RID: 4221 RVA: 0x00043C84 File Offset: 0x00041E84
|
||||
public override object SyncRoot
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.host.SyncRoot;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170002BD RID: 701
|
||||
// (get) Token: 0x0600107E RID: 4222 RVA: 0x00043C94 File Offset: 0x00041E94
|
||||
public override bool IsFixedSize
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.host.IsFixedSize;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170002BE RID: 702
|
||||
// (get) Token: 0x0600107F RID: 4223 RVA: 0x00043CA4 File Offset: 0x00041EA4
|
||||
public override bool IsReadOnly
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.host.IsReadOnly;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170002BF RID: 703
|
||||
// (get) Token: 0x06001080 RID: 4224 RVA: 0x00043CB4 File Offset: 0x00041EB4
|
||||
public override ICollection Keys
|
||||
{
|
||||
get
|
||||
{
|
||||
ICollection collection = null;
|
||||
object syncRoot = this.host.SyncRoot;
|
||||
lock (syncRoot)
|
||||
{
|
||||
collection = this.host.Keys;
|
||||
}
|
||||
return collection;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170002C0 RID: 704
|
||||
// (get) Token: 0x06001081 RID: 4225 RVA: 0x00043D0C File Offset: 0x00041F0C
|
||||
public override ICollection Values
|
||||
{
|
||||
get
|
||||
{
|
||||
ICollection collection = null;
|
||||
object syncRoot = this.host.SyncRoot;
|
||||
lock (syncRoot)
|
||||
{
|
||||
collection = this.host.Values;
|
||||
}
|
||||
return collection;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170002C1 RID: 705
|
||||
public override object this[object key]
|
||||
{
|
||||
get
|
||||
{
|
||||
object syncRoot = this.host.SyncRoot;
|
||||
object impl;
|
||||
lock (syncRoot)
|
||||
{
|
||||
impl = this.host.GetImpl(key);
|
||||
}
|
||||
return impl;
|
||||
}
|
||||
set
|
||||
{
|
||||
object syncRoot = this.host.SyncRoot;
|
||||
lock (syncRoot)
|
||||
{
|
||||
this.host.PutImpl(key, value, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06001084 RID: 4228 RVA: 0x00043E18 File Offset: 0x00042018
|
||||
public override void CopyTo(Array array, int arrayIndex)
|
||||
{
|
||||
object syncRoot = this.host.SyncRoot;
|
||||
lock (syncRoot)
|
||||
{
|
||||
this.host.CopyTo(array, arrayIndex);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06001085 RID: 4229 RVA: 0x00043E6C File Offset: 0x0004206C
|
||||
public override void Add(object key, object value)
|
||||
{
|
||||
object syncRoot = this.host.SyncRoot;
|
||||
lock (syncRoot)
|
||||
{
|
||||
this.host.PutImpl(key, value, false);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06001086 RID: 4230 RVA: 0x00043EC4 File Offset: 0x000420C4
|
||||
public override void Clear()
|
||||
{
|
||||
object syncRoot = this.host.SyncRoot;
|
||||
lock (syncRoot)
|
||||
{
|
||||
this.host.Clear();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06001087 RID: 4231 RVA: 0x00043F18 File Offset: 0x00042118
|
||||
public override bool Contains(object key)
|
||||
{
|
||||
object syncRoot = this.host.SyncRoot;
|
||||
bool flag;
|
||||
lock (syncRoot)
|
||||
{
|
||||
flag = this.host.Find(key) >= 0;
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
// Token: 0x06001088 RID: 4232 RVA: 0x00043F78 File Offset: 0x00042178
|
||||
public override IDictionaryEnumerator GetEnumerator()
|
||||
{
|
||||
object syncRoot = this.host.SyncRoot;
|
||||
IDictionaryEnumerator enumerator;
|
||||
lock (syncRoot)
|
||||
{
|
||||
enumerator = this.host.GetEnumerator();
|
||||
}
|
||||
return enumerator;
|
||||
}
|
||||
|
||||
// Token: 0x06001089 RID: 4233 RVA: 0x00043FD4 File Offset: 0x000421D4
|
||||
public override void Remove(object key)
|
||||
{
|
||||
object syncRoot = this.host.SyncRoot;
|
||||
lock (syncRoot)
|
||||
{
|
||||
this.host.Remove(key);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600108A RID: 4234 RVA: 0x00044028 File Offset: 0x00042228
|
||||
public override bool ContainsKey(object key)
|
||||
{
|
||||
object syncRoot = this.host.SyncRoot;
|
||||
bool flag;
|
||||
lock (syncRoot)
|
||||
{
|
||||
flag = this.host.Contains(key);
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
// Token: 0x0600108B RID: 4235 RVA: 0x00044084 File Offset: 0x00042284
|
||||
public override bool ContainsValue(object value)
|
||||
{
|
||||
object syncRoot = this.host.SyncRoot;
|
||||
bool flag;
|
||||
lock (syncRoot)
|
||||
{
|
||||
flag = this.host.ContainsValue(value);
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
// Token: 0x0600108C RID: 4236 RVA: 0x000440E0 File Offset: 0x000422E0
|
||||
public override object Clone()
|
||||
{
|
||||
object syncRoot = this.host.SyncRoot;
|
||||
object obj;
|
||||
lock (syncRoot)
|
||||
{
|
||||
obj = this.host.Clone() as SortedList;
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
// Token: 0x0600108D RID: 4237 RVA: 0x00044140 File Offset: 0x00042340
|
||||
public override object GetByIndex(int index)
|
||||
{
|
||||
object syncRoot = this.host.SyncRoot;
|
||||
object byIndex;
|
||||
lock (syncRoot)
|
||||
{
|
||||
byIndex = this.host.GetByIndex(index);
|
||||
}
|
||||
return byIndex;
|
||||
}
|
||||
|
||||
// Token: 0x0600108E RID: 4238 RVA: 0x0004419C File Offset: 0x0004239C
|
||||
public override object GetKey(int index)
|
||||
{
|
||||
object syncRoot = this.host.SyncRoot;
|
||||
object key;
|
||||
lock (syncRoot)
|
||||
{
|
||||
key = this.host.GetKey(index);
|
||||
}
|
||||
return key;
|
||||
}
|
||||
|
||||
// Token: 0x0600108F RID: 4239 RVA: 0x000441F8 File Offset: 0x000423F8
|
||||
public override IList GetKeyList()
|
||||
{
|
||||
object syncRoot = this.host.SyncRoot;
|
||||
IList list;
|
||||
lock (syncRoot)
|
||||
{
|
||||
list = new SortedList.ListKeys(this.host);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
// Token: 0x06001090 RID: 4240 RVA: 0x00044254 File Offset: 0x00042454
|
||||
public override IList GetValueList()
|
||||
{
|
||||
object syncRoot = this.host.SyncRoot;
|
||||
IList list;
|
||||
lock (syncRoot)
|
||||
{
|
||||
list = new SortedList.ListValues(this.host);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
// Token: 0x06001091 RID: 4241 RVA: 0x000442B0 File Offset: 0x000424B0
|
||||
public override void RemoveAt(int index)
|
||||
{
|
||||
object syncRoot = this.host.SyncRoot;
|
||||
lock (syncRoot)
|
||||
{
|
||||
this.host.RemoveAt(index);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06001092 RID: 4242 RVA: 0x00044304 File Offset: 0x00042504
|
||||
public override int IndexOfKey(object key)
|
||||
{
|
||||
object syncRoot = this.host.SyncRoot;
|
||||
int num;
|
||||
lock (syncRoot)
|
||||
{
|
||||
num = this.host.IndexOfKey(key);
|
||||
}
|
||||
return num;
|
||||
}
|
||||
|
||||
// Token: 0x06001093 RID: 4243 RVA: 0x00044360 File Offset: 0x00042560
|
||||
public override int IndexOfValue(object val)
|
||||
{
|
||||
object syncRoot = this.host.SyncRoot;
|
||||
int num;
|
||||
lock (syncRoot)
|
||||
{
|
||||
num = this.host.IndexOfValue(val);
|
||||
}
|
||||
return num;
|
||||
}
|
||||
|
||||
// Token: 0x06001094 RID: 4244 RVA: 0x000443BC File Offset: 0x000425BC
|
||||
public override void SetByIndex(int index, object value)
|
||||
{
|
||||
object syncRoot = this.host.SyncRoot;
|
||||
lock (syncRoot)
|
||||
{
|
||||
this.host.SetByIndex(index, value);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06001095 RID: 4245 RVA: 0x00044410 File Offset: 0x00042610
|
||||
public override void TrimToSize()
|
||||
{
|
||||
object syncRoot = this.host.SyncRoot;
|
||||
lock (syncRoot)
|
||||
{
|
||||
this.host.TrimToSize();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04000401 RID: 1025
|
||||
private SortedList host;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,537 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.Collections
|
||||
{
|
||||
/// <summary>Represents a simple last-in-first-out (LIFO) non-generic collection of objects.</summary>
|
||||
/// <filterpriority>1</filterpriority>
|
||||
// Token: 0x02000142 RID: 322
|
||||
[DebuggerDisplay("Count={Count}")]
|
||||
[DebuggerTypeProxy(typeof(CollectionDebuggerView))]
|
||||
[ComVisible(true)]
|
||||
[Serializable]
|
||||
public class Stack : IEnumerable, ICloneable, ICollection
|
||||
{
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.Stack" /> class that is empty and has the default initial capacity.</summary>
|
||||
// Token: 0x06001096 RID: 4246 RVA: 0x00044464 File Offset: 0x00042664
|
||||
public Stack()
|
||||
{
|
||||
this.contents = new object[16];
|
||||
this.capacity = 16;
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.Stack" /> class that contains elements copied from the specified collection and has the same initial capacity as the number of elements copied.</summary>
|
||||
/// <param name="col">The <see cref="T:System.Collections.ICollection" /> to copy elements from. </param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="col" /> is null. </exception>
|
||||
// Token: 0x06001097 RID: 4247 RVA: 0x00044494 File Offset: 0x00042694
|
||||
public Stack(ICollection col)
|
||||
: this((col != null) ? col.Count : 16)
|
||||
{
|
||||
if (col == null)
|
||||
{
|
||||
throw new ArgumentNullException("col");
|
||||
}
|
||||
foreach (object obj in col)
|
||||
{
|
||||
this.Push(obj);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.Stack" /> class that is empty and has the specified initial capacity or the default initial capacity, whichever is greater.</summary>
|
||||
/// <param name="initialCapacity">The initial number of elements that the <see cref="T:System.Collections.Stack" /> can contain. </param>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="initialCapacity" /> is less than zero. </exception>
|
||||
// Token: 0x06001098 RID: 4248 RVA: 0x00044524 File Offset: 0x00042724
|
||||
public Stack(int initialCapacity)
|
||||
{
|
||||
if (initialCapacity < 0)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException("initialCapacity");
|
||||
}
|
||||
this.capacity = initialCapacity;
|
||||
this.contents = new object[this.capacity];
|
||||
}
|
||||
|
||||
// Token: 0x06001099 RID: 4249 RVA: 0x00044560 File Offset: 0x00042760
|
||||
private void Resize(int ncapacity)
|
||||
{
|
||||
ncapacity = Math.Max(ncapacity, 16);
|
||||
object[] array = new object[ncapacity];
|
||||
Array.Copy(this.contents, array, this.count);
|
||||
this.capacity = ncapacity;
|
||||
this.contents = array;
|
||||
}
|
||||
|
||||
/// <summary>Returns a synchronized (thread safe) wrapper for the <see cref="T:System.Collections.Stack" />.</summary>
|
||||
/// <returns>A synchronized wrapper around the <see cref="T:System.Collections.Stack" />.</returns>
|
||||
/// <param name="stack">The <see cref="T:System.Collections.Stack" /> to synchronize. </param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="stack" /> is null. </exception>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x0600109A RID: 4250 RVA: 0x000445A0 File Offset: 0x000427A0
|
||||
public static Stack Synchronized(Stack stack)
|
||||
{
|
||||
if (stack == null)
|
||||
{
|
||||
throw new ArgumentNullException("stack");
|
||||
}
|
||||
return new Stack.SyncStack(stack);
|
||||
}
|
||||
|
||||
/// <summary>Gets the number of elements contained in the <see cref="T:System.Collections.Stack" />.</summary>
|
||||
/// <returns>The number of elements contained in the <see cref="T:System.Collections.Stack" />.</returns>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x170002C2 RID: 706
|
||||
// (get) Token: 0x0600109B RID: 4251 RVA: 0x000445BC File Offset: 0x000427BC
|
||||
public virtual int Count
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.count;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a value indicating whether access to the <see cref="T:System.Collections.Stack" /> is synchronized (thread safe).</summary>
|
||||
/// <returns>true, if access to the <see cref="T:System.Collections.Stack" /> is synchronized (thread safe); otherwise, false. The default is false.</returns>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x170002C3 RID: 707
|
||||
// (get) Token: 0x0600109C RID: 4252 RVA: 0x000445C4 File Offset: 0x000427C4
|
||||
public virtual bool IsSynchronized
|
||||
{
|
||||
get
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets an object that can be used to synchronize access to the <see cref="T:System.Collections.Stack" />.</summary>
|
||||
/// <returns>An <see cref="T:System.Object" /> that can be used to synchronize access to the <see cref="T:System.Collections.Stack" />.</returns>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x170002C4 RID: 708
|
||||
// (get) Token: 0x0600109D RID: 4253 RVA: 0x000445C8 File Offset: 0x000427C8
|
||||
public virtual object SyncRoot
|
||||
{
|
||||
get
|
||||
{
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Removes all objects from the <see cref="T:System.Collections.Stack" />.</summary>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x0600109E RID: 4254 RVA: 0x000445CC File Offset: 0x000427CC
|
||||
public virtual void Clear()
|
||||
{
|
||||
this.modCount++;
|
||||
for (int i = 0; i < this.count; i++)
|
||||
{
|
||||
this.contents[i] = null;
|
||||
}
|
||||
this.count = 0;
|
||||
this.current = -1;
|
||||
}
|
||||
|
||||
/// <summary>Creates a shallow copy of the <see cref="T:System.Collections.Stack" />.</summary>
|
||||
/// <returns>A shallow copy of the <see cref="T:System.Collections.Stack" />.</returns>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x0600109F RID: 4255 RVA: 0x00044618 File Offset: 0x00042818
|
||||
public virtual object Clone()
|
||||
{
|
||||
return new Stack(this.contents)
|
||||
{
|
||||
current = this.current,
|
||||
count = this.count
|
||||
};
|
||||
}
|
||||
|
||||
/// <summary>Determines whether an element is in the <see cref="T:System.Collections.Stack" />.</summary>
|
||||
/// <returns>true, if <paramref name="obj" /> is found in the <see cref="T:System.Collections.Stack" />; otherwise, false.</returns>
|
||||
/// <param name="obj">The <see cref="T:System.Object" /> to locate in the <see cref="T:System.Collections.Stack" />. The value can be null. </param>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x060010A0 RID: 4256 RVA: 0x0004464C File Offset: 0x0004284C
|
||||
public virtual bool Contains(object obj)
|
||||
{
|
||||
if (this.count == 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (obj == null)
|
||||
{
|
||||
for (int i = 0; i < this.count; i++)
|
||||
{
|
||||
if (this.contents[i] == null)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int j = 0; j < this.count; j++)
|
||||
{
|
||||
if (obj.Equals(this.contents[j]))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/// <summary>Copies the <see cref="T:System.Collections.Stack" /> to an existing one-dimensional <see cref="T:System.Array" />, starting at the specified array index.</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.Stack" />. 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.Stack" /> 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.Stack" /> cannot be cast automatically to the type of the destination <paramref name="array" />. </exception>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x060010A1 RID: 4257 RVA: 0x000446C4 File Offset: 0x000428C4
|
||||
public virtual void CopyTo(Array array, int index)
|
||||
{
|
||||
if (array == null)
|
||||
{
|
||||
throw new ArgumentNullException("array");
|
||||
}
|
||||
if (index < 0)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException("index");
|
||||
}
|
||||
if (array.Rank > 1 || (array.Length > 0 && index >= array.Length) || this.count > array.Length - index)
|
||||
{
|
||||
throw new ArgumentException();
|
||||
}
|
||||
for (int num = this.current; num != -1; num--)
|
||||
{
|
||||
array.SetValue(this.contents[num], this.count - (num + 1) + index);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Returns an <see cref="T:System.Collections.IEnumerator" /> for the <see cref="T:System.Collections.Stack" />.</summary>
|
||||
/// <returns>An <see cref="T:System.Collections.IEnumerator" /> for the <see cref="T:System.Collections.Stack" />.</returns>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x060010A2 RID: 4258 RVA: 0x00044764 File Offset: 0x00042964
|
||||
public virtual IEnumerator GetEnumerator()
|
||||
{
|
||||
return new Stack.Enumerator(this);
|
||||
}
|
||||
|
||||
/// <summary>Returns the object at the top of the <see cref="T:System.Collections.Stack" /> without removing it.</summary>
|
||||
/// <returns>The <see cref="T:System.Object" /> at the top of the <see cref="T:System.Collections.Stack" />.</returns>
|
||||
/// <exception cref="T:System.InvalidOperationException">The <see cref="T:System.Collections.Stack" /> is empty. </exception>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x060010A3 RID: 4259 RVA: 0x0004476C File Offset: 0x0004296C
|
||||
public virtual object Peek()
|
||||
{
|
||||
if (this.current == -1)
|
||||
{
|
||||
throw new InvalidOperationException();
|
||||
}
|
||||
return this.contents[this.current];
|
||||
}
|
||||
|
||||
/// <summary>Removes and returns the object at the top of the <see cref="T:System.Collections.Stack" />.</summary>
|
||||
/// <returns>The <see cref="T:System.Object" /> removed from the top of the <see cref="T:System.Collections.Stack" />.</returns>
|
||||
/// <exception cref="T:System.InvalidOperationException">The <see cref="T:System.Collections.Stack" /> is empty. </exception>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x060010A4 RID: 4260 RVA: 0x00044790 File Offset: 0x00042990
|
||||
public virtual object Pop()
|
||||
{
|
||||
if (this.current == -1)
|
||||
{
|
||||
throw new InvalidOperationException();
|
||||
}
|
||||
this.modCount++;
|
||||
object obj = this.contents[this.current];
|
||||
this.contents[this.current] = null;
|
||||
this.count--;
|
||||
this.current--;
|
||||
if (this.count <= this.capacity / 4 && this.count > 16)
|
||||
{
|
||||
this.Resize(this.capacity / 2);
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
/// <summary>Inserts an object at the top of the <see cref="T:System.Collections.Stack" />.</summary>
|
||||
/// <param name="obj">The <see cref="T:System.Object" /> to push onto the <see cref="T:System.Collections.Stack" />. The value can be null. </param>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x060010A5 RID: 4261 RVA: 0x00044824 File Offset: 0x00042A24
|
||||
public virtual void Push(object obj)
|
||||
{
|
||||
this.modCount++;
|
||||
if (this.capacity == this.count)
|
||||
{
|
||||
this.Resize(this.capacity * 2);
|
||||
}
|
||||
this.count++;
|
||||
this.current++;
|
||||
this.contents[this.current] = obj;
|
||||
}
|
||||
|
||||
/// <summary>Copies the <see cref="T:System.Collections.Stack" /> to a new array.</summary>
|
||||
/// <returns>A new array containing copies of the elements of the <see cref="T:System.Collections.Stack" />.</returns>
|
||||
/// <filterpriority>2</filterpriority>
|
||||
// Token: 0x060010A6 RID: 4262 RVA: 0x00044888 File Offset: 0x00042A88
|
||||
public virtual object[] ToArray()
|
||||
{
|
||||
object[] array = new object[this.count];
|
||||
Array.Copy(this.contents, array, this.count);
|
||||
Array.Reverse(array);
|
||||
return array;
|
||||
}
|
||||
|
||||
// Token: 0x04000402 RID: 1026
|
||||
private const int default_capacity = 16;
|
||||
|
||||
// Token: 0x04000403 RID: 1027
|
||||
private object[] contents;
|
||||
|
||||
// Token: 0x04000404 RID: 1028
|
||||
private int current = -1;
|
||||
|
||||
// Token: 0x04000405 RID: 1029
|
||||
private int count;
|
||||
|
||||
// Token: 0x04000406 RID: 1030
|
||||
private int capacity;
|
||||
|
||||
// Token: 0x04000407 RID: 1031
|
||||
private int modCount;
|
||||
|
||||
// Token: 0x02000143 RID: 323
|
||||
[Serializable]
|
||||
private class SyncStack : Stack
|
||||
{
|
||||
// Token: 0x060010A7 RID: 4263 RVA: 0x000448BC File Offset: 0x00042ABC
|
||||
internal SyncStack(Stack s)
|
||||
{
|
||||
this.stack = s;
|
||||
}
|
||||
|
||||
// Token: 0x170002C5 RID: 709
|
||||
// (get) Token: 0x060010A8 RID: 4264 RVA: 0x000448CC File Offset: 0x00042ACC
|
||||
public override int Count
|
||||
{
|
||||
get
|
||||
{
|
||||
Stack stack = this.stack;
|
||||
int count;
|
||||
lock (stack)
|
||||
{
|
||||
count = this.stack.Count;
|
||||
}
|
||||
return count;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170002C6 RID: 710
|
||||
// (get) Token: 0x060010A9 RID: 4265 RVA: 0x00044920 File Offset: 0x00042B20
|
||||
public override bool IsSynchronized
|
||||
{
|
||||
get
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170002C7 RID: 711
|
||||
// (get) Token: 0x060010AA RID: 4266 RVA: 0x00044924 File Offset: 0x00042B24
|
||||
public override object SyncRoot
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.stack.SyncRoot;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060010AB RID: 4267 RVA: 0x00044934 File Offset: 0x00042B34
|
||||
public override void Clear()
|
||||
{
|
||||
Stack stack = this.stack;
|
||||
lock (stack)
|
||||
{
|
||||
this.stack.Clear();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060010AC RID: 4268 RVA: 0x00044984 File Offset: 0x00042B84
|
||||
public override object Clone()
|
||||
{
|
||||
Stack stack = this.stack;
|
||||
object obj;
|
||||
lock (stack)
|
||||
{
|
||||
obj = Stack.Synchronized((Stack)this.stack.Clone());
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
// Token: 0x060010AD RID: 4269 RVA: 0x000449E4 File Offset: 0x00042BE4
|
||||
public override bool Contains(object obj)
|
||||
{
|
||||
Stack stack = this.stack;
|
||||
bool flag;
|
||||
lock (stack)
|
||||
{
|
||||
flag = this.stack.Contains(obj);
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
// Token: 0x060010AE RID: 4270 RVA: 0x00044A3C File Offset: 0x00042C3C
|
||||
public override void CopyTo(Array array, int index)
|
||||
{
|
||||
Stack stack = this.stack;
|
||||
lock (stack)
|
||||
{
|
||||
this.stack.CopyTo(array, index);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060010AF RID: 4271 RVA: 0x00044A8C File Offset: 0x00042C8C
|
||||
public override IEnumerator GetEnumerator()
|
||||
{
|
||||
Stack stack = this.stack;
|
||||
IEnumerator enumerator;
|
||||
lock (stack)
|
||||
{
|
||||
enumerator = new Stack.Enumerator(this.stack);
|
||||
}
|
||||
return enumerator;
|
||||
}
|
||||
|
||||
// Token: 0x060010B0 RID: 4272 RVA: 0x00044AE0 File Offset: 0x00042CE0
|
||||
public override object Peek()
|
||||
{
|
||||
Stack stack = this.stack;
|
||||
object obj;
|
||||
lock (stack)
|
||||
{
|
||||
obj = this.stack.Peek();
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
// Token: 0x060010B1 RID: 4273 RVA: 0x00044B34 File Offset: 0x00042D34
|
||||
public override object Pop()
|
||||
{
|
||||
Stack stack = this.stack;
|
||||
object obj;
|
||||
lock (stack)
|
||||
{
|
||||
obj = this.stack.Pop();
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
// Token: 0x060010B2 RID: 4274 RVA: 0x00044B88 File Offset: 0x00042D88
|
||||
public override void Push(object obj)
|
||||
{
|
||||
Stack stack = this.stack;
|
||||
lock (stack)
|
||||
{
|
||||
this.stack.Push(obj);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060010B3 RID: 4275 RVA: 0x00044BD8 File Offset: 0x00042DD8
|
||||
public override object[] ToArray()
|
||||
{
|
||||
Stack stack = this.stack;
|
||||
object[] array;
|
||||
lock (stack)
|
||||
{
|
||||
array = this.stack.ToArray();
|
||||
}
|
||||
return array;
|
||||
}
|
||||
|
||||
// Token: 0x04000408 RID: 1032
|
||||
private Stack stack;
|
||||
}
|
||||
|
||||
// Token: 0x02000144 RID: 324
|
||||
private class Enumerator : IEnumerator, ICloneable
|
||||
{
|
||||
// Token: 0x060010B4 RID: 4276 RVA: 0x00044C2C File Offset: 0x00042E2C
|
||||
internal Enumerator(Stack s)
|
||||
{
|
||||
this.stack = s;
|
||||
this.modCount = s.modCount;
|
||||
this.current = -2;
|
||||
}
|
||||
|
||||
// Token: 0x060010B5 RID: 4277 RVA: 0x00044C50 File Offset: 0x00042E50
|
||||
public object Clone()
|
||||
{
|
||||
return base.MemberwiseClone();
|
||||
}
|
||||
|
||||
// Token: 0x170002C8 RID: 712
|
||||
// (get) Token: 0x060010B6 RID: 4278 RVA: 0x00044C58 File Offset: 0x00042E58
|
||||
public virtual object Current
|
||||
{
|
||||
get
|
||||
{
|
||||
if (this.modCount != this.stack.modCount || this.current == -2 || this.current == -1 || this.current > this.stack.count)
|
||||
{
|
||||
throw new InvalidOperationException();
|
||||
}
|
||||
return this.stack.contents[this.current];
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060010B7 RID: 4279 RVA: 0x00044CC4 File Offset: 0x00042EC4
|
||||
public virtual bool MoveNext()
|
||||
{
|
||||
if (this.modCount != this.stack.modCount)
|
||||
{
|
||||
throw new InvalidOperationException();
|
||||
}
|
||||
int num = this.current;
|
||||
if (num == -2)
|
||||
{
|
||||
this.current = this.stack.current;
|
||||
return this.current != -1;
|
||||
}
|
||||
if (num != -1)
|
||||
{
|
||||
this.current--;
|
||||
return this.current != -1;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// Token: 0x060010B8 RID: 4280 RVA: 0x00044D44 File Offset: 0x00042F44
|
||||
public virtual void Reset()
|
||||
{
|
||||
if (this.modCount != this.stack.modCount)
|
||||
{
|
||||
throw new InvalidOperationException();
|
||||
}
|
||||
this.current = -2;
|
||||
}
|
||||
|
||||
// Token: 0x04000409 RID: 1033
|
||||
private const int EOF = -1;
|
||||
|
||||
// Token: 0x0400040A RID: 1034
|
||||
private const int BOF = -2;
|
||||
|
||||
// Token: 0x0400040B RID: 1035
|
||||
private Stack stack;
|
||||
|
||||
// Token: 0x0400040C RID: 1036
|
||||
private int modCount;
|
||||
|
||||
// Token: 0x0400040D RID: 1037
|
||||
private int current;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user