scripts
This commit is contained in:
@@ -0,0 +1,50 @@
|
||||
using System;
|
||||
|
||||
namespace System.CodeDom.Compiler
|
||||
{
|
||||
/// <summary>Identifies code generated by a tool. This class cannot be inherited.</summary>
|
||||
// Token: 0x0200000A RID: 10
|
||||
[AttributeUsage(AttributeTargets.All, Inherited = false, AllowMultiple = false)]
|
||||
public sealed class GeneratedCodeAttribute : Attribute
|
||||
{
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.CodeDom.Compiler.GeneratedCodeAttribute" /> class specifying the name and version of the tool that generated the code.</summary>
|
||||
/// <param name="tool">The name of the tool that generated the code.</param>
|
||||
/// <param name="version">The version of the tool that generated the code.</param>
|
||||
// Token: 0x0600000C RID: 12 RVA: 0x00002160 File Offset: 0x00000360
|
||||
public GeneratedCodeAttribute(string tool, string version)
|
||||
{
|
||||
this.tool = tool;
|
||||
this.version = version;
|
||||
}
|
||||
|
||||
/// <summary>Gets the name of the tool that generated the code.</summary>
|
||||
/// <returns>The name of the tool that generated to code.</returns>
|
||||
// Token: 0x17000002 RID: 2
|
||||
// (get) Token: 0x0600000D RID: 13 RVA: 0x00002178 File Offset: 0x00000378
|
||||
public string Tool
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.tool;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets the version of the tool that generated the code.</summary>
|
||||
/// <returns>The version of the tool that generated the code.</returns>
|
||||
// Token: 0x17000003 RID: 3
|
||||
// (get) Token: 0x0600000E RID: 14 RVA: 0x00002180 File Offset: 0x00000380
|
||||
public string Version
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.version;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0400001F RID: 31
|
||||
private string tool;
|
||||
|
||||
// Token: 0x04000020 RID: 32
|
||||
private string version;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,731 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
namespace System.Collections.Generic
|
||||
{
|
||||
/// <summary>Represents a doubly linked list.</summary>
|
||||
/// <typeparam name="T">Specifies the element type of the linked list.</typeparam>
|
||||
/// <filterpriority>1</filterpriority>
|
||||
// Token: 0x0200000B RID: 11
|
||||
[ComVisible(false)]
|
||||
[Serializable]
|
||||
public class LinkedList<T> : IEnumerable<T>, ICollection, IDeserializationCallback, IEnumerable, ICollection<T>, ISerializable
|
||||
{
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.Generic.LinkedList`1" /> class that is empty.</summary>
|
||||
// Token: 0x0600000F RID: 15 RVA: 0x00002188 File Offset: 0x00000388
|
||||
public LinkedList()
|
||||
{
|
||||
this.syncRoot = new object();
|
||||
this.first = null;
|
||||
this.count = (this.version = 0U);
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.Generic.LinkedList`1" /> class that contains elements copied from the specified <see cref="T:System.Collections.IEnumerable" /> and has sufficient capacity to accommodate the number of elements copied. </summary>
|
||||
/// <param name="collection">The <see cref="T:System.Collections.IEnumerable" /> whose elements are copied to the new <see cref="T:System.Collections.Generic.LinkedList`1" />.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="collection" /> is null.</exception>
|
||||
// Token: 0x06000010 RID: 16 RVA: 0x000021C0 File Offset: 0x000003C0
|
||||
public LinkedList(IEnumerable<T> collection)
|
||||
: this()
|
||||
{
|
||||
foreach (T t in collection)
|
||||
{
|
||||
this.AddLast(t);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.Generic.LinkedList`1" /> class that is serializable with the specified <see cref="T:System.Runtime.Serialization.SerializationInfo" /> and <see cref="T:System.Runtime.Serialization.StreamingContext" />.</summary>
|
||||
/// <param name="info">A <see cref="T:System.Runtime.Serialization.SerializationInfo" /> object containing the information required to serialize the <see cref="T:System.Collections.Generic.LinkedList`1" />.</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.Generic.LinkedList`1" />.</param>
|
||||
// Token: 0x06000011 RID: 17 RVA: 0x00002228 File Offset: 0x00000428
|
||||
protected LinkedList(SerializationInfo info, StreamingContext context)
|
||||
: this()
|
||||
{
|
||||
this.si = info;
|
||||
this.syncRoot = new object();
|
||||
}
|
||||
|
||||
// Token: 0x06000012 RID: 18 RVA: 0x00002244 File Offset: 0x00000444
|
||||
void ICollection<T>.Add(T value)
|
||||
{
|
||||
this.AddLast(value);
|
||||
}
|
||||
|
||||
/// <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: 0x06000013 RID: 19 RVA: 0x00002250 File Offset: 0x00000450
|
||||
void ICollection.CopyTo(Array array, int index)
|
||||
{
|
||||
T[] array2 = array as T[];
|
||||
if (array2 == null)
|
||||
{
|
||||
throw new ArgumentException("array");
|
||||
}
|
||||
this.CopyTo(array2, index);
|
||||
}
|
||||
|
||||
// Token: 0x06000014 RID: 20 RVA: 0x00002280 File Offset: 0x00000480
|
||||
IEnumerator<T> IEnumerable<T>.GetEnumerator()
|
||||
{
|
||||
return this.GetEnumerator();
|
||||
}
|
||||
|
||||
/// <summary>Returns an enumerator that iterates through the linked list as a collection.</summary>
|
||||
/// <returns>An <see cref="T:System.Collections.IEnumerator" /> that can be used to iterate through the linked list as a collection.</returns>
|
||||
// Token: 0x06000015 RID: 21 RVA: 0x00002290 File Offset: 0x00000490
|
||||
IEnumerator IEnumerable.GetEnumerator()
|
||||
{
|
||||
return this.GetEnumerator();
|
||||
}
|
||||
|
||||
// Token: 0x17000004 RID: 4
|
||||
// (get) Token: 0x06000016 RID: 22 RVA: 0x000022A0 File Offset: 0x000004A0
|
||||
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.LinkedList`1" />, this property always returns false.</returns>
|
||||
// Token: 0x17000005 RID: 5
|
||||
// (get) Token: 0x06000017 RID: 23 RVA: 0x000022A4 File Offset: 0x000004A4
|
||||
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.LinkedList`1" />, this property always returns the current instance.</returns>
|
||||
// Token: 0x17000006 RID: 6
|
||||
// (get) Token: 0x06000018 RID: 24 RVA: 0x000022A8 File Offset: 0x000004A8
|
||||
object ICollection.SyncRoot
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.syncRoot;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000019 RID: 25 RVA: 0x000022B0 File Offset: 0x000004B0
|
||||
private void VerifyReferencedNode(LinkedListNode<T> node)
|
||||
{
|
||||
if (node == null)
|
||||
{
|
||||
throw new ArgumentNullException("node");
|
||||
}
|
||||
if (node.List != this)
|
||||
{
|
||||
throw new InvalidOperationException();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600001A RID: 26 RVA: 0x000022D8 File Offset: 0x000004D8
|
||||
private static void VerifyBlankNode(LinkedListNode<T> newNode)
|
||||
{
|
||||
if (newNode == null)
|
||||
{
|
||||
throw new ArgumentNullException("newNode");
|
||||
}
|
||||
if (newNode.List != null)
|
||||
{
|
||||
throw new InvalidOperationException();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Adds a new node containing the specified value after the specified existing node in the <see cref="T:System.Collections.Generic.LinkedList`1" />.</summary>
|
||||
/// <returns>The new <see cref="T:System.Collections.Generic.LinkedListNode`1" /> containing <paramref name="value" />.</returns>
|
||||
/// <param name="node">The <see cref="T:System.Collections.Generic.LinkedListNode`1" /> after which to insert a new <see cref="T:System.Collections.Generic.LinkedListNode`1" /> containing <paramref name="value" />.</param>
|
||||
/// <param name="value">The value to add to the <see cref="T:System.Collections.Generic.LinkedList`1" />.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="node" /> is null.</exception>
|
||||
/// <exception cref="T:System.InvalidOperationException">
|
||||
/// <paramref name="node" /> is not in the current <see cref="T:System.Collections.Generic.LinkedList`1" />.</exception>
|
||||
// Token: 0x0600001B RID: 27 RVA: 0x00002308 File Offset: 0x00000508
|
||||
public LinkedListNode<T> AddAfter(LinkedListNode<T> node, T value)
|
||||
{
|
||||
this.VerifyReferencedNode(node);
|
||||
LinkedListNode<T> linkedListNode = new LinkedListNode<T>(this, value, node, node.forward);
|
||||
this.count += 1U;
|
||||
this.version += 1U;
|
||||
return linkedListNode;
|
||||
}
|
||||
|
||||
/// <summary>Adds the specified new node after the specified existing node in the <see cref="T:System.Collections.Generic.LinkedList`1" />.</summary>
|
||||
/// <param name="node">The <see cref="T:System.Collections.Generic.LinkedListNode`1" /> after which to insert <paramref name="newNode" />.</param>
|
||||
/// <param name="newNode">The new <see cref="T:System.Collections.Generic.LinkedListNode`1" /> to add to the <see cref="T:System.Collections.Generic.LinkedList`1" />.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="node" /> is null.-or-<paramref name="newNode" /> is null.</exception>
|
||||
/// <exception cref="T:System.InvalidOperationException">
|
||||
/// <paramref name="node" /> is not in the current <see cref="T:System.Collections.Generic.LinkedList`1" />.-or-<paramref name="newNode" /> belongs to another <see cref="T:System.Collections.Generic.LinkedList`1" />.</exception>
|
||||
// Token: 0x0600001C RID: 28 RVA: 0x00002348 File Offset: 0x00000548
|
||||
public void AddAfter(LinkedListNode<T> node, LinkedListNode<T> newNode)
|
||||
{
|
||||
this.VerifyReferencedNode(node);
|
||||
LinkedList<T>.VerifyBlankNode(newNode);
|
||||
newNode.InsertBetween(node, node.forward, this);
|
||||
this.count += 1U;
|
||||
this.version += 1U;
|
||||
}
|
||||
|
||||
/// <summary>Adds a new node containing the specified value before the specified existing node in the <see cref="T:System.Collections.Generic.LinkedList`1" />.</summary>
|
||||
/// <returns>The new <see cref="T:System.Collections.Generic.LinkedListNode`1" /> containing <paramref name="value" />.</returns>
|
||||
/// <param name="node">The <see cref="T:System.Collections.Generic.LinkedListNode`1" /> before which to insert a new <see cref="T:System.Collections.Generic.LinkedListNode`1" /> containing <paramref name="value" />.</param>
|
||||
/// <param name="value">The value to add to the <see cref="T:System.Collections.Generic.LinkedList`1" />.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="node" /> is null.</exception>
|
||||
/// <exception cref="T:System.InvalidOperationException">
|
||||
/// <paramref name="node" /> is not in the current <see cref="T:System.Collections.Generic.LinkedList`1" />.</exception>
|
||||
// Token: 0x0600001D RID: 29 RVA: 0x0000238C File Offset: 0x0000058C
|
||||
public LinkedListNode<T> AddBefore(LinkedListNode<T> node, T value)
|
||||
{
|
||||
this.VerifyReferencedNode(node);
|
||||
LinkedListNode<T> linkedListNode = new LinkedListNode<T>(this, value, node.back, node);
|
||||
this.count += 1U;
|
||||
this.version += 1U;
|
||||
if (node == this.first)
|
||||
{
|
||||
this.first = linkedListNode;
|
||||
}
|
||||
return linkedListNode;
|
||||
}
|
||||
|
||||
/// <summary>Adds the specified new node before the specified existing node in the <see cref="T:System.Collections.Generic.LinkedList`1" />.</summary>
|
||||
/// <param name="node">The <see cref="T:System.Collections.Generic.LinkedListNode`1" /> before which to insert <paramref name="newNode" />.</param>
|
||||
/// <param name="newNode">The new <see cref="T:System.Collections.Generic.LinkedListNode`1" /> to add to the <see cref="T:System.Collections.Generic.LinkedList`1" />.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="node" /> is null.-or-<paramref name="newNode" /> is null.</exception>
|
||||
/// <exception cref="T:System.InvalidOperationException">
|
||||
/// <paramref name="node" /> is not in the current <see cref="T:System.Collections.Generic.LinkedList`1" />.-or-<paramref name="newNode" /> belongs to another <see cref="T:System.Collections.Generic.LinkedList`1" />.</exception>
|
||||
// Token: 0x0600001E RID: 30 RVA: 0x000023E0 File Offset: 0x000005E0
|
||||
public void AddBefore(LinkedListNode<T> node, LinkedListNode<T> newNode)
|
||||
{
|
||||
this.VerifyReferencedNode(node);
|
||||
LinkedList<T>.VerifyBlankNode(newNode);
|
||||
newNode.InsertBetween(node.back, node, this);
|
||||
this.count += 1U;
|
||||
this.version += 1U;
|
||||
if (node == this.first)
|
||||
{
|
||||
this.first = newNode;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Adds the specified new node at the start of the <see cref="T:System.Collections.Generic.LinkedList`1" />.</summary>
|
||||
/// <param name="node">The new <see cref="T:System.Collections.Generic.LinkedListNode`1" /> to add at the start of the <see cref="T:System.Collections.Generic.LinkedList`1" />.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="node" /> is null.</exception>
|
||||
/// <exception cref="T:System.InvalidOperationException">
|
||||
/// <paramref name="node" /> belongs to another <see cref="T:System.Collections.Generic.LinkedList`1" />.</exception>
|
||||
// Token: 0x0600001F RID: 31 RVA: 0x00002438 File Offset: 0x00000638
|
||||
public void AddFirst(LinkedListNode<T> node)
|
||||
{
|
||||
LinkedList<T>.VerifyBlankNode(node);
|
||||
if (this.first == null)
|
||||
{
|
||||
node.SelfReference(this);
|
||||
}
|
||||
else
|
||||
{
|
||||
node.InsertBetween(this.first.back, this.first, this);
|
||||
}
|
||||
this.count += 1U;
|
||||
this.version += 1U;
|
||||
this.first = node;
|
||||
}
|
||||
|
||||
/// <summary>Adds a new node containing the specified value at the start of the <see cref="T:System.Collections.Generic.LinkedList`1" />.</summary>
|
||||
/// <returns>The new <see cref="T:System.Collections.Generic.LinkedListNode`1" /> containing <paramref name="value" />.</returns>
|
||||
/// <param name="value">The value to add at the start of the <see cref="T:System.Collections.Generic.LinkedList`1" />.</param>
|
||||
// Token: 0x06000020 RID: 32 RVA: 0x000024A0 File Offset: 0x000006A0
|
||||
public LinkedListNode<T> AddFirst(T value)
|
||||
{
|
||||
LinkedListNode<T> linkedListNode;
|
||||
if (this.first == null)
|
||||
{
|
||||
linkedListNode = new LinkedListNode<T>(this, value);
|
||||
}
|
||||
else
|
||||
{
|
||||
linkedListNode = new LinkedListNode<T>(this, value, this.first.back, this.first);
|
||||
}
|
||||
this.count += 1U;
|
||||
this.version += 1U;
|
||||
this.first = linkedListNode;
|
||||
return linkedListNode;
|
||||
}
|
||||
|
||||
/// <summary>Adds a new node containing the specified value at the end of the <see cref="T:System.Collections.Generic.LinkedList`1" />.</summary>
|
||||
/// <returns>The new <see cref="T:System.Collections.Generic.LinkedListNode`1" /> containing <paramref name="value" />.</returns>
|
||||
/// <param name="value">The value to add at the end of the <see cref="T:System.Collections.Generic.LinkedList`1" />.</param>
|
||||
// Token: 0x06000021 RID: 33 RVA: 0x00002504 File Offset: 0x00000704
|
||||
public LinkedListNode<T> AddLast(T value)
|
||||
{
|
||||
LinkedListNode<T> linkedListNode;
|
||||
if (this.first == null)
|
||||
{
|
||||
linkedListNode = new LinkedListNode<T>(this, value);
|
||||
this.first = linkedListNode;
|
||||
}
|
||||
else
|
||||
{
|
||||
linkedListNode = new LinkedListNode<T>(this, value, this.first.back, this.first);
|
||||
}
|
||||
this.count += 1U;
|
||||
this.version += 1U;
|
||||
return linkedListNode;
|
||||
}
|
||||
|
||||
/// <summary>Adds the specified new node at the end of the <see cref="T:System.Collections.Generic.LinkedList`1" />.</summary>
|
||||
/// <param name="node">The new <see cref="T:System.Collections.Generic.LinkedListNode`1" /> to add at the end of the <see cref="T:System.Collections.Generic.LinkedList`1" />.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="node" /> is null.</exception>
|
||||
/// <exception cref="T:System.InvalidOperationException">
|
||||
/// <paramref name="node" /> belongs to another <see cref="T:System.Collections.Generic.LinkedList`1" />.</exception>
|
||||
// Token: 0x06000022 RID: 34 RVA: 0x00002568 File Offset: 0x00000768
|
||||
public void AddLast(LinkedListNode<T> node)
|
||||
{
|
||||
LinkedList<T>.VerifyBlankNode(node);
|
||||
if (this.first == null)
|
||||
{
|
||||
node.SelfReference(this);
|
||||
this.first = node;
|
||||
}
|
||||
else
|
||||
{
|
||||
node.InsertBetween(this.first.back, this.first, this);
|
||||
}
|
||||
this.count += 1U;
|
||||
this.version += 1U;
|
||||
}
|
||||
|
||||
/// <summary>Removes all nodes from the <see cref="T:System.Collections.Generic.LinkedList`1" />.</summary>
|
||||
// Token: 0x06000023 RID: 35 RVA: 0x000025D0 File Offset: 0x000007D0
|
||||
public void Clear()
|
||||
{
|
||||
while (this.first != null)
|
||||
{
|
||||
this.RemoveLast();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Determines whether a value is in the <see cref="T:System.Collections.Generic.LinkedList`1" />.</summary>
|
||||
/// <returns>true if <paramref name="value" /> is found in the <see cref="T:System.Collections.Generic.LinkedList`1" />; otherwise, false.</returns>
|
||||
/// <param name="value">The value to locate in the <see cref="T:System.Collections.Generic.LinkedList`1" />. The value can be null for reference types.</param>
|
||||
// Token: 0x06000024 RID: 36 RVA: 0x000025E8 File Offset: 0x000007E8
|
||||
public bool Contains(T value)
|
||||
{
|
||||
LinkedListNode<T> forward = this.first;
|
||||
if (forward == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
while (!value.Equals(forward.Value))
|
||||
{
|
||||
forward = forward.forward;
|
||||
if (forward == this.first)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>Copies the entire <see cref="T:System.Collections.Generic.LinkedList`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.Generic.LinkedList`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.Generic.LinkedList`1" /> is greater than the available space from <paramref name="index" /> to the end of the destination <paramref name="array" />.</exception>
|
||||
// Token: 0x06000025 RID: 37 RVA: 0x00002638 File Offset: 0x00000838
|
||||
public void CopyTo(T[] array, int index)
|
||||
{
|
||||
if (array == null)
|
||||
{
|
||||
throw new ArgumentNullException("array");
|
||||
}
|
||||
if (index < array.GetLowerBound(0))
|
||||
{
|
||||
throw new ArgumentOutOfRangeException("index");
|
||||
}
|
||||
if (array.Rank != 1)
|
||||
{
|
||||
throw new ArgumentException("array", "Array is multidimensional");
|
||||
}
|
||||
if ((long)(array.Length - index + array.GetLowerBound(0)) < (long)((ulong)this.count))
|
||||
{
|
||||
throw new ArgumentException("number of items exceeds capacity");
|
||||
}
|
||||
LinkedListNode<T> forward = this.first;
|
||||
if (this.first == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
do
|
||||
{
|
||||
array[index] = forward.Value;
|
||||
index++;
|
||||
forward = forward.forward;
|
||||
}
|
||||
while (forward != this.first);
|
||||
}
|
||||
|
||||
/// <summary>Finds the first node that contains the specified value.</summary>
|
||||
/// <returns>The first <see cref="T:System.Collections.Generic.LinkedListNode`1" /> that contains the specified value, if found; otherwise, null.</returns>
|
||||
/// <param name="value">The value to locate in the <see cref="T:System.Collections.Generic.LinkedList`1" />.</param>
|
||||
// Token: 0x06000026 RID: 38 RVA: 0x000026E8 File Offset: 0x000008E8
|
||||
public LinkedListNode<T> Find(T value)
|
||||
{
|
||||
LinkedListNode<T> forward = this.first;
|
||||
if (forward == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
while ((value != null || forward.Value != null) && (value == null || !value.Equals(forward.Value)))
|
||||
{
|
||||
forward = forward.forward;
|
||||
if (forward == this.first)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
return forward;
|
||||
}
|
||||
|
||||
/// <summary>Finds the last node that contains the specified value.</summary>
|
||||
/// <returns>The last <see cref="T:System.Collections.Generic.LinkedListNode`1" /> that contains the specified value, if found; otherwise, null.</returns>
|
||||
/// <param name="value">The value to locate in the <see cref="T:System.Collections.Generic.LinkedList`1" />.</param>
|
||||
// Token: 0x06000027 RID: 39 RVA: 0x00002760 File Offset: 0x00000960
|
||||
public LinkedListNode<T> FindLast(T value)
|
||||
{
|
||||
LinkedListNode<T> back = this.first;
|
||||
if (back == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
for (;;)
|
||||
{
|
||||
back = back.back;
|
||||
if (value.Equals(back.Value))
|
||||
{
|
||||
break;
|
||||
}
|
||||
if (back == this.first)
|
||||
{
|
||||
goto Block_3;
|
||||
}
|
||||
}
|
||||
return back;
|
||||
Block_3:
|
||||
return null;
|
||||
}
|
||||
|
||||
/// <summary>Returns an enumerator that iterates through the <see cref="T:System.Collections.Generic.LinkedList`1" />.</summary>
|
||||
/// <returns>An <see cref="T:System.Collections.Generic.LinkedList`1.Enumerator" /> for the <see cref="T:System.Collections.Generic.LinkedList`1" />.</returns>
|
||||
// Token: 0x06000028 RID: 40 RVA: 0x000027B0 File Offset: 0x000009B0
|
||||
public LinkedList<T>.Enumerator GetEnumerator()
|
||||
{
|
||||
return new LinkedList<T>.Enumerator(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.Generic.LinkedList`1" /> 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.LinkedList`1" /> instance.</param>
|
||||
/// <param name="context">A <see cref="T:System.Runtime.Serialization.StreamingContext" /> object that contains the source and destination of the serialized stream associated with the <see cref="T:System.Collections.Generic.LinkedList`1" /> instance.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="info" /> is null.</exception>
|
||||
// Token: 0x06000029 RID: 41 RVA: 0x000027B8 File Offset: 0x000009B8
|
||||
public virtual void GetObjectData(SerializationInfo info, StreamingContext context)
|
||||
{
|
||||
T[] array = new T[this.count];
|
||||
this.CopyTo(array, 0);
|
||||
info.AddValue("DataArray", array, typeof(T[]));
|
||||
info.AddValue("version", this.version);
|
||||
}
|
||||
|
||||
/// <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.LinkedList`1" /> instance is invalid.</exception>
|
||||
// Token: 0x0600002A RID: 42 RVA: 0x00002804 File Offset: 0x00000A04
|
||||
public virtual void OnDeserialization(object sender)
|
||||
{
|
||||
if (this.si != null)
|
||||
{
|
||||
T[] array = (T[])this.si.GetValue("DataArray", typeof(T[]));
|
||||
if (array != null)
|
||||
{
|
||||
foreach (T t in array)
|
||||
{
|
||||
this.AddLast(t);
|
||||
}
|
||||
}
|
||||
this.version = this.si.GetUInt32("version");
|
||||
this.si = null;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Removes the first occurrence of the specified value from the <see cref="T:System.Collections.Generic.LinkedList`1" />.</summary>
|
||||
/// <returns>true if the element containing <paramref name="value" /> is successfully removed; otherwise, false. This method also returns false if <paramref name="value" /> was not found in the original <see cref="T:System.Collections.Generic.LinkedList`1" />.</returns>
|
||||
/// <param name="value">The value to remove from the <see cref="T:System.Collections.Generic.LinkedList`1" />.</param>
|
||||
// Token: 0x0600002B RID: 43 RVA: 0x00002888 File Offset: 0x00000A88
|
||||
public bool Remove(T value)
|
||||
{
|
||||
LinkedListNode<T> linkedListNode = this.Find(value);
|
||||
if (linkedListNode == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
this.Remove(linkedListNode);
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>Removes the specified node from the <see cref="T:System.Collections.Generic.LinkedList`1" />.</summary>
|
||||
/// <param name="node">The <see cref="T:System.Collections.Generic.LinkedListNode`1" /> to remove from the <see cref="T:System.Collections.Generic.LinkedList`1" />.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="node" /> is null.</exception>
|
||||
/// <exception cref="T:System.InvalidOperationException">
|
||||
/// <paramref name="node" /> is not in the current <see cref="T:System.Collections.Generic.LinkedList`1" />.</exception>
|
||||
// Token: 0x0600002C RID: 44 RVA: 0x000028B0 File Offset: 0x00000AB0
|
||||
public void Remove(LinkedListNode<T> node)
|
||||
{
|
||||
this.VerifyReferencedNode(node);
|
||||
this.count -= 1U;
|
||||
if (this.count == 0U)
|
||||
{
|
||||
this.first = null;
|
||||
}
|
||||
if (node == this.first)
|
||||
{
|
||||
this.first = this.first.forward;
|
||||
}
|
||||
this.version += 1U;
|
||||
node.Detach();
|
||||
}
|
||||
|
||||
/// <summary>Removes the node at the start of the <see cref="T:System.Collections.Generic.LinkedList`1" />.</summary>
|
||||
/// <exception cref="T:System.InvalidOperationException">The <see cref="T:System.Collections.Generic.LinkedList`1" /> is empty.</exception>
|
||||
// Token: 0x0600002D RID: 45 RVA: 0x00002918 File Offset: 0x00000B18
|
||||
public void RemoveFirst()
|
||||
{
|
||||
if (this.first != null)
|
||||
{
|
||||
this.Remove(this.first);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Removes the node at the end of the <see cref="T:System.Collections.Generic.LinkedList`1" />.</summary>
|
||||
/// <exception cref="T:System.InvalidOperationException">The <see cref="T:System.Collections.Generic.LinkedList`1" /> is empty.</exception>
|
||||
// Token: 0x0600002E RID: 46 RVA: 0x00002934 File Offset: 0x00000B34
|
||||
public void RemoveLast()
|
||||
{
|
||||
if (this.first != null)
|
||||
{
|
||||
this.Remove(this.first.back);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets the number of nodes actually contained in the <see cref="T:System.Collections.Generic.LinkedList`1" />.</summary>
|
||||
/// <returns>The number of nodes actually contained in the <see cref="T:System.Collections.Generic.LinkedList`1" />.</returns>
|
||||
// Token: 0x17000007 RID: 7
|
||||
// (get) Token: 0x0600002F RID: 47 RVA: 0x00002954 File Offset: 0x00000B54
|
||||
public int Count
|
||||
{
|
||||
get
|
||||
{
|
||||
return (int)this.count;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets the first node of the <see cref="T:System.Collections.Generic.LinkedList`1" />.</summary>
|
||||
/// <returns>The first <see cref="T:System.Collections.Generic.LinkedListNode`1" /> of the <see cref="T:System.Collections.Generic.LinkedList`1" />.</returns>
|
||||
// Token: 0x17000008 RID: 8
|
||||
// (get) Token: 0x06000030 RID: 48 RVA: 0x0000295C File Offset: 0x00000B5C
|
||||
public LinkedListNode<T> First
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.first;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets the last node of the <see cref="T:System.Collections.Generic.LinkedList`1" />.</summary>
|
||||
/// <returns>The last <see cref="T:System.Collections.Generic.LinkedListNode`1" /> of the <see cref="T:System.Collections.Generic.LinkedList`1" />.</returns>
|
||||
// Token: 0x17000009 RID: 9
|
||||
// (get) Token: 0x06000031 RID: 49 RVA: 0x00002964 File Offset: 0x00000B64
|
||||
public LinkedListNode<T> Last
|
||||
{
|
||||
get
|
||||
{
|
||||
return (this.first == null) ? null : this.first.back;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04000021 RID: 33
|
||||
private const string DataArrayKey = "DataArray";
|
||||
|
||||
// Token: 0x04000022 RID: 34
|
||||
private const string VersionKey = "version";
|
||||
|
||||
// Token: 0x04000023 RID: 35
|
||||
private uint count;
|
||||
|
||||
// Token: 0x04000024 RID: 36
|
||||
private uint version;
|
||||
|
||||
// Token: 0x04000025 RID: 37
|
||||
private object syncRoot;
|
||||
|
||||
// Token: 0x04000026 RID: 38
|
||||
internal LinkedListNode<T> first;
|
||||
|
||||
// Token: 0x04000027 RID: 39
|
||||
internal SerializationInfo si;
|
||||
|
||||
/// <summary>Enumerates the elements of a <see cref="T:System.Collections.Generic.LinkedList`1" />.</summary>
|
||||
// Token: 0x0200000C RID: 12
|
||||
[Serializable]
|
||||
public struct Enumerator : IEnumerator<T>, IEnumerator, IDisposable
|
||||
{
|
||||
// Token: 0x06000032 RID: 50 RVA: 0x00002984 File Offset: 0x00000B84
|
||||
internal Enumerator(LinkedList<T> parent)
|
||||
{
|
||||
this.list = parent;
|
||||
this.current = null;
|
||||
this.index = -1;
|
||||
this.version = parent.version;
|
||||
}
|
||||
|
||||
/// <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: 0x1700000A RID: 10
|
||||
// (get) Token: 0x06000033 RID: 51 RVA: 0x000029A8 File Offset: 0x00000BA8
|
||||
object IEnumerator.Current
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Current;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Sets the enumerator to its initial position, which is before the first element in the collection. This class cannot be inherited.</summary>
|
||||
/// <exception cref="T:System.InvalidOperationException">The collection was modified after the enumerator was created. </exception>
|
||||
// Token: 0x06000034 RID: 52 RVA: 0x000029B8 File Offset: 0x00000BB8
|
||||
void IEnumerator.Reset()
|
||||
{
|
||||
if (this.list == null)
|
||||
{
|
||||
throw new ObjectDisposedException(null);
|
||||
}
|
||||
if (this.version != this.list.version)
|
||||
{
|
||||
throw new InvalidOperationException("list modified");
|
||||
}
|
||||
this.current = null;
|
||||
this.index = -1;
|
||||
}
|
||||
|
||||
/// <summary>Gets the element at the current position of the enumerator.</summary>
|
||||
/// <returns>The element in the <see cref="T:System.Collections.Generic.LinkedList`1" /> at the current position of the enumerator.</returns>
|
||||
// Token: 0x1700000B RID: 11
|
||||
// (get) Token: 0x06000035 RID: 53 RVA: 0x00002A08 File Offset: 0x00000C08
|
||||
public T Current
|
||||
{
|
||||
get
|
||||
{
|
||||
if (this.list == null)
|
||||
{
|
||||
throw new ObjectDisposedException(null);
|
||||
}
|
||||
if (this.current == null)
|
||||
{
|
||||
throw new InvalidOperationException();
|
||||
}
|
||||
return this.current.Value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Advances the enumerator to the next element of the <see cref="T:System.Collections.Generic.LinkedList`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: 0x06000036 RID: 54 RVA: 0x00002A44 File Offset: 0x00000C44
|
||||
public bool MoveNext()
|
||||
{
|
||||
if (this.list == null)
|
||||
{
|
||||
throw new ObjectDisposedException(null);
|
||||
}
|
||||
if (this.version != this.list.version)
|
||||
{
|
||||
throw new InvalidOperationException("list modified");
|
||||
}
|
||||
if (this.current == null)
|
||||
{
|
||||
this.current = this.list.first;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.current = this.current.forward;
|
||||
if (this.current == this.list.first)
|
||||
{
|
||||
this.current = null;
|
||||
}
|
||||
}
|
||||
if (this.current == null)
|
||||
{
|
||||
this.index = -1;
|
||||
return false;
|
||||
}
|
||||
this.index++;
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>Releases all resources used by the <see cref="T:System.Collections.Generic.LinkedList`1.Enumerator" />.</summary>
|
||||
// Token: 0x06000037 RID: 55 RVA: 0x00002AF8 File Offset: 0x00000CF8
|
||||
public void Dispose()
|
||||
{
|
||||
if (this.list == null)
|
||||
{
|
||||
throw new ObjectDisposedException(null);
|
||||
}
|
||||
this.current = null;
|
||||
this.list = null;
|
||||
}
|
||||
|
||||
// Token: 0x04000028 RID: 40
|
||||
private const string VersionKey = "version";
|
||||
|
||||
// Token: 0x04000029 RID: 41
|
||||
private const string IndexKey = "index";
|
||||
|
||||
// Token: 0x0400002A RID: 42
|
||||
private const string ListKey = "list";
|
||||
|
||||
// Token: 0x0400002B RID: 43
|
||||
private LinkedList<T> list;
|
||||
|
||||
// Token: 0x0400002C RID: 44
|
||||
private LinkedListNode<T> current;
|
||||
|
||||
// Token: 0x0400002D RID: 45
|
||||
private int index;
|
||||
|
||||
// Token: 0x0400002E RID: 46
|
||||
private uint version;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,133 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.Collections.Generic
|
||||
{
|
||||
/// <summary>Represents a node in a <see cref="T:System.Collections.Generic.LinkedList`1" />. This class cannot be inherited.</summary>
|
||||
/// <typeparam name="T">Specifies the element type of the linked list.</typeparam>
|
||||
/// <filterpriority>1</filterpriority>
|
||||
// Token: 0x0200000D RID: 13
|
||||
[ComVisible(false)]
|
||||
public sealed class LinkedListNode<T>
|
||||
{
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.Generic.LinkedListNode`1" /> class, containing the specified value.</summary>
|
||||
/// <param name="value">The value to contain in the <see cref="T:System.Collections.Generic.LinkedListNode`1" />.</param>
|
||||
// Token: 0x06000038 RID: 56 RVA: 0x00002B28 File Offset: 0x00000D28
|
||||
public LinkedListNode(T value)
|
||||
{
|
||||
this.item = value;
|
||||
}
|
||||
|
||||
// Token: 0x06000039 RID: 57 RVA: 0x00002B38 File Offset: 0x00000D38
|
||||
internal LinkedListNode(LinkedList<T> list, T value)
|
||||
{
|
||||
this.container = list;
|
||||
this.item = value;
|
||||
this.forward = this;
|
||||
this.back = this;
|
||||
}
|
||||
|
||||
// Token: 0x0600003A RID: 58 RVA: 0x00002B6C File Offset: 0x00000D6C
|
||||
internal LinkedListNode(LinkedList<T> list, T value, LinkedListNode<T> previousNode, LinkedListNode<T> nextNode)
|
||||
{
|
||||
this.container = list;
|
||||
this.item = value;
|
||||
this.back = previousNode;
|
||||
this.forward = nextNode;
|
||||
previousNode.forward = this;
|
||||
nextNode.back = this;
|
||||
}
|
||||
|
||||
// Token: 0x0600003B RID: 59 RVA: 0x00002BAC File Offset: 0x00000DAC
|
||||
internal void Detach()
|
||||
{
|
||||
this.back.forward = this.forward;
|
||||
this.forward.back = this.back;
|
||||
this.forward = (this.back = null);
|
||||
this.container = null;
|
||||
}
|
||||
|
||||
// Token: 0x0600003C RID: 60 RVA: 0x00002BF4 File Offset: 0x00000DF4
|
||||
internal void SelfReference(LinkedList<T> list)
|
||||
{
|
||||
this.forward = this;
|
||||
this.back = this;
|
||||
this.container = list;
|
||||
}
|
||||
|
||||
// Token: 0x0600003D RID: 61 RVA: 0x00002C0C File Offset: 0x00000E0C
|
||||
internal void InsertBetween(LinkedListNode<T> previousNode, LinkedListNode<T> nextNode, LinkedList<T> list)
|
||||
{
|
||||
previousNode.forward = this;
|
||||
nextNode.back = this;
|
||||
this.forward = nextNode;
|
||||
this.back = previousNode;
|
||||
this.container = list;
|
||||
}
|
||||
|
||||
/// <summary>Gets the <see cref="T:System.Collections.Generic.LinkedList`1" /> that the <see cref="T:System.Collections.Generic.LinkedListNode`1" /> belongs to.</summary>
|
||||
/// <returns>A reference to the <see cref="T:System.Collections.Generic.LinkedList`1" /> that the <see cref="T:System.Collections.Generic.LinkedListNode`1" /> belongs to, or null if the <see cref="T:System.Collections.Generic.LinkedListNode`1" /> is not linked.</returns>
|
||||
// Token: 0x1700000C RID: 12
|
||||
// (get) Token: 0x0600003E RID: 62 RVA: 0x00002C34 File Offset: 0x00000E34
|
||||
public LinkedList<T> List
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.container;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets the next node in the <see cref="T:System.Collections.Generic.LinkedList`1" />.</summary>
|
||||
/// <returns>A reference to the next node in the <see cref="T:System.Collections.Generic.LinkedList`1" />, or null if the current node is the last element (<see cref="P:System.Collections.Generic.LinkedList`1.Last" />) of the <see cref="T:System.Collections.Generic.LinkedList`1" />.</returns>
|
||||
// Token: 0x1700000D RID: 13
|
||||
// (get) Token: 0x0600003F RID: 63 RVA: 0x00002C3C File Offset: 0x00000E3C
|
||||
public LinkedListNode<T> Next
|
||||
{
|
||||
get
|
||||
{
|
||||
return (this.container == null || this.forward == this.container.first) ? null : this.forward;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets the previous node in the <see cref="T:System.Collections.Generic.LinkedList`1" />.</summary>
|
||||
/// <returns>A reference to the previous node in the <see cref="T:System.Collections.Generic.LinkedList`1" />, or null if the current node is the first element (<see cref="P:System.Collections.Generic.LinkedList`1.First" />) of the <see cref="T:System.Collections.Generic.LinkedList`1" />.</returns>
|
||||
// Token: 0x1700000E RID: 14
|
||||
// (get) Token: 0x06000040 RID: 64 RVA: 0x00002C6C File Offset: 0x00000E6C
|
||||
public LinkedListNode<T> Previous
|
||||
{
|
||||
get
|
||||
{
|
||||
return (this.container == null || this == this.container.first) ? null : this.back;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets the value contained in the node.</summary>
|
||||
/// <returns>The value contained in the node.</returns>
|
||||
// Token: 0x1700000F RID: 15
|
||||
// (get) Token: 0x06000041 RID: 65 RVA: 0x00002CA4 File Offset: 0x00000EA4
|
||||
// (set) Token: 0x06000042 RID: 66 RVA: 0x00002CAC File Offset: 0x00000EAC
|
||||
public T Value
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.item;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.item = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0400002F RID: 47
|
||||
private T item;
|
||||
|
||||
// Token: 0x04000030 RID: 48
|
||||
private LinkedList<T> container;
|
||||
|
||||
// Token: 0x04000031 RID: 49
|
||||
internal LinkedListNode<T> forward;
|
||||
|
||||
// Token: 0x04000032 RID: 50
|
||||
internal LinkedListNode<T> back;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,414 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.Collections.Generic
|
||||
{
|
||||
/// <summary>Represents a first-in, first-out collection of objects.</summary>
|
||||
/// <typeparam name="T">Specifies the type of elements in the queue.</typeparam>
|
||||
/// <filterpriority>1</filterpriority>
|
||||
// Token: 0x0200000E RID: 14
|
||||
[ComVisible(false)]
|
||||
[Serializable]
|
||||
public class Queue<T> : IEnumerable<T>, ICollection, IEnumerable
|
||||
{
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.Generic.Queue`1" /> class that is empty and has the default initial capacity.</summary>
|
||||
// Token: 0x06000043 RID: 67 RVA: 0x00002CB8 File Offset: 0x00000EB8
|
||||
public Queue()
|
||||
{
|
||||
this._array = new T[0];
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.Generic.Queue`1" /> class that is empty and has the specified initial capacity.</summary>
|
||||
/// <param name="capacity">The initial number of elements that the <see cref="T:System.Collections.Generic.Queue`1" /> can contain.</param>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="capacity" /> is less than zero.</exception>
|
||||
// Token: 0x06000044 RID: 68 RVA: 0x00002CCC File Offset: 0x00000ECC
|
||||
public Queue(int count)
|
||||
{
|
||||
if (count < 0)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException("count");
|
||||
}
|
||||
this._array = new T[count];
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.Generic.Queue`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 <see cref="T:System.Collections.Generic.Queue`1" />.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="collection" /> is null.</exception>
|
||||
// Token: 0x06000045 RID: 69 RVA: 0x00002D00 File Offset: 0x00000F00
|
||||
public Queue(IEnumerable<T> collection)
|
||||
{
|
||||
if (collection == null)
|
||||
{
|
||||
throw new ArgumentNullException("collection");
|
||||
}
|
||||
ICollection<T> collection2 = collection as ICollection<T>;
|
||||
int num = ((collection2 == null) ? 0 : collection2.Count);
|
||||
this._array = new T[num];
|
||||
foreach (T t in collection)
|
||||
{
|
||||
this.Enqueue(t);
|
||||
}
|
||||
}
|
||||
|
||||
/// <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: 0x06000046 RID: 70 RVA: 0x00002D9C File Offset: 0x00000F9C
|
||||
void ICollection.CopyTo(Array array, int idx)
|
||||
{
|
||||
if (array == null)
|
||||
{
|
||||
throw new ArgumentNullException();
|
||||
}
|
||||
if (idx > array.Length)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException();
|
||||
}
|
||||
if (array.Length - idx < this._size)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException();
|
||||
}
|
||||
if (this._size == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
try
|
||||
{
|
||||
int num = this._array.Length;
|
||||
int num2 = num - this._head;
|
||||
Array.Copy(this._array, this._head, array, idx, Math.Min(this._size, num2));
|
||||
if (this._size > num2)
|
||||
{
|
||||
Array.Copy(this._array, 0, array, idx + num2, this._size - num2);
|
||||
}
|
||||
}
|
||||
catch (ArrayTypeMismatchException)
|
||||
{
|
||||
throw new ArgumentException();
|
||||
}
|
||||
}
|
||||
|
||||
/// <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.Queue`1" />, this property always returns false.</returns>
|
||||
// Token: 0x17000010 RID: 16
|
||||
// (get) Token: 0x06000047 RID: 71 RVA: 0x00002E70 File Offset: 0x00001070
|
||||
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.Queue`1" />, this property always returns the current instance.</returns>
|
||||
// Token: 0x17000011 RID: 17
|
||||
// (get) Token: 0x06000048 RID: 72 RVA: 0x00002E74 File Offset: 0x00001074
|
||||
object ICollection.SyncRoot
|
||||
{
|
||||
get
|
||||
{
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000049 RID: 73 RVA: 0x00002E78 File Offset: 0x00001078
|
||||
IEnumerator<T> IEnumerable<T>.GetEnumerator()
|
||||
{
|
||||
return this.GetEnumerator();
|
||||
}
|
||||
|
||||
/// <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: 0x0600004A RID: 74 RVA: 0x00002E88 File Offset: 0x00001088
|
||||
IEnumerator IEnumerable.GetEnumerator()
|
||||
{
|
||||
return this.GetEnumerator();
|
||||
}
|
||||
|
||||
/// <summary>Removes all objects from the <see cref="T:System.Collections.Generic.Queue`1" />.</summary>
|
||||
/// <filterpriority>1</filterpriority>
|
||||
// Token: 0x0600004B RID: 75 RVA: 0x00002E98 File Offset: 0x00001098
|
||||
public void Clear()
|
||||
{
|
||||
Array.Clear(this._array, 0, this._array.Length);
|
||||
this._head = (this._tail = (this._size = 0));
|
||||
this._version++;
|
||||
}
|
||||
|
||||
/// <summary>Determines whether an element is in the <see cref="T:System.Collections.Generic.Queue`1" />.</summary>
|
||||
/// <returns>true if <paramref name="item" /> is found in the <see cref="T:System.Collections.Generic.Queue`1" />; otherwise, false.</returns>
|
||||
/// <param name="item">The object to locate in the <see cref="T:System.Collections.Generic.Queue`1" />. The value can be null for reference types.</param>
|
||||
// Token: 0x0600004C RID: 76 RVA: 0x00002EE0 File Offset: 0x000010E0
|
||||
public bool Contains(T item)
|
||||
{
|
||||
if (item == null)
|
||||
{
|
||||
foreach (T t in this)
|
||||
{
|
||||
if (t == null)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach (T t2 in this)
|
||||
{
|
||||
if (item.Equals(t2))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/// <summary>Copies the <see cref="T:System.Collections.Generic.Queue`1" /> 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.Queue`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 zero.</exception>
|
||||
/// <exception cref="T:System.ArgumentException">The number of elements in the source <see cref="T:System.Collections.Generic.Queue`1" /> is greater than the available space from <paramref name="arrayIndex" /> to the end of the destination <paramref name="array" />.</exception>
|
||||
// Token: 0x0600004D RID: 77 RVA: 0x00002FCC File Offset: 0x000011CC
|
||||
public void CopyTo(T[] array, int idx)
|
||||
{
|
||||
if (array == null)
|
||||
{
|
||||
throw new ArgumentNullException();
|
||||
}
|
||||
((ICollection)this).CopyTo(array, idx);
|
||||
}
|
||||
|
||||
/// <summary>Removes and returns the object at the beginning of the <see cref="T:System.Collections.Generic.Queue`1" />.</summary>
|
||||
/// <returns>The object that is removed from the beginning of the <see cref="T:System.Collections.Generic.Queue`1" />.</returns>
|
||||
/// <exception cref="T:System.InvalidOperationException">The <see cref="T:System.Collections.Generic.Queue`1" /> is empty.</exception>
|
||||
// Token: 0x0600004E RID: 78 RVA: 0x00002FE4 File Offset: 0x000011E4
|
||||
public T Dequeue()
|
||||
{
|
||||
T t = this.Peek();
|
||||
this._array[this._head] = default(T);
|
||||
if (++this._head == this._array.Length)
|
||||
{
|
||||
this._head = 0;
|
||||
}
|
||||
this._size--;
|
||||
this._version++;
|
||||
return t;
|
||||
}
|
||||
|
||||
/// <summary>Returns the object at the beginning of the <see cref="T:System.Collections.Generic.Queue`1" /> without removing it.</summary>
|
||||
/// <returns>The object at the beginning of the <see cref="T:System.Collections.Generic.Queue`1" />.</returns>
|
||||
/// <exception cref="T:System.InvalidOperationException">The <see cref="T:System.Collections.Generic.Queue`1" /> is empty.</exception>
|
||||
// Token: 0x0600004F RID: 79 RVA: 0x00003054 File Offset: 0x00001254
|
||||
public T Peek()
|
||||
{
|
||||
if (this._size == 0)
|
||||
{
|
||||
throw new InvalidOperationException();
|
||||
}
|
||||
return this._array[this._head];
|
||||
}
|
||||
|
||||
/// <summary>Adds an object to the end of the <see cref="T:System.Collections.Generic.Queue`1" />.</summary>
|
||||
/// <param name="item">The object to add to the <see cref="T:System.Collections.Generic.Queue`1" />. The value can be null for reference types.</param>
|
||||
// Token: 0x06000050 RID: 80 RVA: 0x00003084 File Offset: 0x00001284
|
||||
public void Enqueue(T item)
|
||||
{
|
||||
if (this._size == this._array.Length || this._tail == this._array.Length)
|
||||
{
|
||||
this.SetCapacity(Math.Max(Math.Max(this._size, this._tail) * 2, 4));
|
||||
}
|
||||
this._array[this._tail] = item;
|
||||
if (++this._tail == this._array.Length)
|
||||
{
|
||||
this._tail = 0;
|
||||
}
|
||||
this._size++;
|
||||
this._version++;
|
||||
}
|
||||
|
||||
/// <summary>Copies the <see cref="T:System.Collections.Generic.Queue`1" /> elements to a new array.</summary>
|
||||
/// <returns>A new array containing elements copied from the <see cref="T:System.Collections.Generic.Queue`1" />.</returns>
|
||||
// Token: 0x06000051 RID: 81 RVA: 0x0000312C File Offset: 0x0000132C
|
||||
public T[] ToArray()
|
||||
{
|
||||
T[] array = new T[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.Generic.Queue`1" />, if that number is less than 90 percent of current capacity.</summary>
|
||||
// Token: 0x06000052 RID: 82 RVA: 0x00003150 File Offset: 0x00001350
|
||||
public void TrimExcess()
|
||||
{
|
||||
if ((double)this._size < (double)this._array.Length * 0.9)
|
||||
{
|
||||
this.SetCapacity(this._size);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000053 RID: 83 RVA: 0x00003180 File Offset: 0x00001380
|
||||
private void SetCapacity(int new_size)
|
||||
{
|
||||
if (new_size == this._array.Length)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (new_size < this._size)
|
||||
{
|
||||
throw new InvalidOperationException("shouldnt happen");
|
||||
}
|
||||
T[] array = new T[new_size];
|
||||
if (this._size > 0)
|
||||
{
|
||||
this.CopyTo(array, 0);
|
||||
}
|
||||
this._array = array;
|
||||
this._tail = this._size;
|
||||
this._head = 0;
|
||||
this._version++;
|
||||
}
|
||||
|
||||
/// <summary>Gets the number of elements contained in the <see cref="T:System.Collections.Generic.Queue`1" />.</summary>
|
||||
/// <returns>The number of elements contained in the <see cref="T:System.Collections.Generic.Queue`1" />.</returns>
|
||||
// Token: 0x17000012 RID: 18
|
||||
// (get) Token: 0x06000054 RID: 84 RVA: 0x000031F8 File Offset: 0x000013F8
|
||||
public int Count
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._size;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Returns an enumerator that iterates through the <see cref="T:System.Collections.Generic.Queue`1" />.</summary>
|
||||
/// <returns>An <see cref="T:System.Collections.Generic.Queue`1.Enumerator" /> for the <see cref="T:System.Collections.Generic.Queue`1" />.</returns>
|
||||
// Token: 0x06000055 RID: 85 RVA: 0x00003200 File Offset: 0x00001400
|
||||
public Queue<T>.Enumerator GetEnumerator()
|
||||
{
|
||||
return new Queue<T>.Enumerator(this);
|
||||
}
|
||||
|
||||
// Token: 0x04000033 RID: 51
|
||||
private T[] _array;
|
||||
|
||||
// Token: 0x04000034 RID: 52
|
||||
private int _head;
|
||||
|
||||
// Token: 0x04000035 RID: 53
|
||||
private int _tail;
|
||||
|
||||
// Token: 0x04000036 RID: 54
|
||||
private int _size;
|
||||
|
||||
// Token: 0x04000037 RID: 55
|
||||
private int _version;
|
||||
|
||||
/// <summary>Enumerates the elements of a <see cref="T:System.Collections.Generic.Queue`1" />.</summary>
|
||||
// Token: 0x0200000F RID: 15
|
||||
[Serializable]
|
||||
public struct Enumerator : IEnumerator, IDisposable, IEnumerator<T>
|
||||
{
|
||||
// Token: 0x06000056 RID: 86 RVA: 0x00003208 File Offset: 0x00001408
|
||||
internal Enumerator(Queue<T> q)
|
||||
{
|
||||
this.q = q;
|
||||
this.idx = -2;
|
||||
this.ver = q._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: 0x06000057 RID: 87 RVA: 0x00003228 File Offset: 0x00001428
|
||||
void IEnumerator.Reset()
|
||||
{
|
||||
if (this.ver != this.q._version)
|
||||
{
|
||||
throw new InvalidOperationException();
|
||||
}
|
||||
this.idx = -2;
|
||||
}
|
||||
|
||||
/// <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: 0x17000013 RID: 19
|
||||
// (get) Token: 0x06000058 RID: 88 RVA: 0x0000325C File Offset: 0x0000145C
|
||||
object IEnumerator.Current
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Current;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Releases all resources used by the <see cref="T:System.Collections.Generic.Queue`1.Enumerator" />.</summary>
|
||||
// Token: 0x06000059 RID: 89 RVA: 0x0000326C File Offset: 0x0000146C
|
||||
public void Dispose()
|
||||
{
|
||||
this.idx = -2;
|
||||
}
|
||||
|
||||
/// <summary>Advances the enumerator to the next element of the <see cref="T:System.Collections.Generic.Queue`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: 0x0600005A RID: 90 RVA: 0x00003278 File Offset: 0x00001478
|
||||
public bool MoveNext()
|
||||
{
|
||||
if (this.ver != this.q._version)
|
||||
{
|
||||
throw new InvalidOperationException();
|
||||
}
|
||||
if (this.idx == -2)
|
||||
{
|
||||
this.idx = this.q._size;
|
||||
}
|
||||
return this.idx != -1 && --this.idx != -1;
|
||||
}
|
||||
|
||||
/// <summary>Gets the element at the current position of the enumerator.</summary>
|
||||
/// <returns>The element in the <see cref="T:System.Collections.Generic.Queue`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: 0x17000014 RID: 20
|
||||
// (get) Token: 0x0600005B RID: 91 RVA: 0x000032E8 File Offset: 0x000014E8
|
||||
public T Current
|
||||
{
|
||||
get
|
||||
{
|
||||
if (this.idx < 0)
|
||||
{
|
||||
throw new InvalidOperationException();
|
||||
}
|
||||
return this.q._array[(this.q._size - 1 - this.idx + this.q._head) % this.q._array.Length];
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04000038 RID: 56
|
||||
private const int NOT_STARTED = -2;
|
||||
|
||||
// Token: 0x04000039 RID: 57
|
||||
private const int FINISHED = -1;
|
||||
|
||||
// Token: 0x0400003A RID: 58
|
||||
private Queue<T> q;
|
||||
|
||||
// Token: 0x0400003B RID: 59
|
||||
private int idx;
|
||||
|
||||
// Token: 0x0400003C RID: 60
|
||||
private int ver;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,723 @@
|
||||
using System;
|
||||
|
||||
namespace System.Collections.Generic
|
||||
{
|
||||
// Token: 0x02000010 RID: 16
|
||||
internal class RBTree : IEnumerable, IEnumerable<RBTree.Node>
|
||||
{
|
||||
// Token: 0x0600005C RID: 92 RVA: 0x00003348 File Offset: 0x00001548
|
||||
public RBTree(object hlp)
|
||||
{
|
||||
this.hlp = hlp;
|
||||
}
|
||||
|
||||
// Token: 0x0600005D RID: 93 RVA: 0x00003358 File Offset: 0x00001558
|
||||
IEnumerator<RBTree.Node> IEnumerable<RBTree.Node>.GetEnumerator()
|
||||
{
|
||||
return this.GetEnumerator();
|
||||
}
|
||||
|
||||
// Token: 0x0600005E RID: 94 RVA: 0x00003368 File Offset: 0x00001568
|
||||
IEnumerator IEnumerable.GetEnumerator()
|
||||
{
|
||||
return this.GetEnumerator();
|
||||
}
|
||||
|
||||
// Token: 0x0600005F RID: 95 RVA: 0x00003378 File Offset: 0x00001578
|
||||
private static List<RBTree.Node> alloc_path()
|
||||
{
|
||||
if (RBTree.cached_path == null)
|
||||
{
|
||||
return new List<RBTree.Node>();
|
||||
}
|
||||
List<RBTree.Node> list = RBTree.cached_path;
|
||||
RBTree.cached_path = null;
|
||||
return list;
|
||||
}
|
||||
|
||||
// Token: 0x06000060 RID: 96 RVA: 0x000033A4 File Offset: 0x000015A4
|
||||
private static void release_path(List<RBTree.Node> path)
|
||||
{
|
||||
if (RBTree.cached_path == null || RBTree.cached_path.Capacity < path.Capacity)
|
||||
{
|
||||
path.Clear();
|
||||
RBTree.cached_path = path;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000061 RID: 97 RVA: 0x000033D4 File Offset: 0x000015D4
|
||||
public void Clear()
|
||||
{
|
||||
this.root = null;
|
||||
this.version += 1U;
|
||||
}
|
||||
|
||||
// Token: 0x06000062 RID: 98 RVA: 0x000033EC File Offset: 0x000015EC
|
||||
public RBTree.Node Intern<T>(T key, RBTree.Node new_node)
|
||||
{
|
||||
if (this.root == null)
|
||||
{
|
||||
if (new_node == null)
|
||||
{
|
||||
new_node = ((RBTree.INodeHelper<T>)this.hlp).CreateNode(key);
|
||||
}
|
||||
this.root = new_node;
|
||||
this.root.IsBlack = true;
|
||||
this.version += 1U;
|
||||
return this.root;
|
||||
}
|
||||
List<RBTree.Node> list = RBTree.alloc_path();
|
||||
int num = this.find_key<T>(key, list);
|
||||
RBTree.Node node = list[list.Count - 1];
|
||||
if (node == null)
|
||||
{
|
||||
if (new_node == null)
|
||||
{
|
||||
new_node = ((RBTree.INodeHelper<T>)this.hlp).CreateNode(key);
|
||||
}
|
||||
node = this.do_insert(num, new_node, list);
|
||||
}
|
||||
RBTree.release_path(list);
|
||||
return node;
|
||||
}
|
||||
|
||||
// Token: 0x06000063 RID: 99 RVA: 0x00003494 File Offset: 0x00001694
|
||||
public RBTree.Node Remove<T>(T key)
|
||||
{
|
||||
if (this.root == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
List<RBTree.Node> list = RBTree.alloc_path();
|
||||
int num = this.find_key<T>(key, list);
|
||||
RBTree.Node node = null;
|
||||
if (num == 0)
|
||||
{
|
||||
node = this.do_remove(list);
|
||||
}
|
||||
RBTree.release_path(list);
|
||||
return node;
|
||||
}
|
||||
|
||||
// Token: 0x06000064 RID: 100 RVA: 0x000034D4 File Offset: 0x000016D4
|
||||
public RBTree.Node Lookup<T>(T key)
|
||||
{
|
||||
RBTree.INodeHelper<T> nodeHelper = (RBTree.INodeHelper<T>)this.hlp;
|
||||
RBTree.Node node;
|
||||
int num;
|
||||
for (node = this.root; node != null; node = ((num >= 0) ? node.right : node.left))
|
||||
{
|
||||
num = nodeHelper.Compare(key, node);
|
||||
if (num == 0)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
return node;
|
||||
}
|
||||
|
||||
// Token: 0x17000015 RID: 21
|
||||
// (get) Token: 0x06000065 RID: 101 RVA: 0x00003530 File Offset: 0x00001730
|
||||
public int Count
|
||||
{
|
||||
get
|
||||
{
|
||||
return (int)((this.root != null) ? this.root.Size : 0U);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000016 RID: 22
|
||||
public RBTree.Node this[int index]
|
||||
{
|
||||
get
|
||||
{
|
||||
if (index < 0 || index >= this.Count)
|
||||
{
|
||||
throw new IndexOutOfRangeException("index");
|
||||
}
|
||||
RBTree.Node node = this.root;
|
||||
while (node != null)
|
||||
{
|
||||
int num = (int)((node.left != null) ? node.left.Size : 0U);
|
||||
if (index == num)
|
||||
{
|
||||
return node;
|
||||
}
|
||||
if (index < num)
|
||||
{
|
||||
node = node.left;
|
||||
}
|
||||
else
|
||||
{
|
||||
index -= num + 1;
|
||||
node = node.right;
|
||||
}
|
||||
}
|
||||
throw new SystemException("Internal Error: index calculation");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000067 RID: 103 RVA: 0x000035E0 File Offset: 0x000017E0
|
||||
public RBTree.NodeEnumerator GetEnumerator()
|
||||
{
|
||||
return new RBTree.NodeEnumerator(this);
|
||||
}
|
||||
|
||||
// Token: 0x06000068 RID: 104 RVA: 0x000035E8 File Offset: 0x000017E8
|
||||
private int find_key<T>(T key, List<RBTree.Node> path)
|
||||
{
|
||||
RBTree.INodeHelper<T> nodeHelper = (RBTree.INodeHelper<T>)this.hlp;
|
||||
int num = 0;
|
||||
RBTree.Node node = this.root;
|
||||
if (path != null)
|
||||
{
|
||||
path.Add(this.root);
|
||||
}
|
||||
while (node != null)
|
||||
{
|
||||
num = nodeHelper.Compare(key, node);
|
||||
if (num == 0)
|
||||
{
|
||||
return num;
|
||||
}
|
||||
RBTree.Node node2;
|
||||
if (num < 0)
|
||||
{
|
||||
node2 = node.right;
|
||||
node = node.left;
|
||||
}
|
||||
else
|
||||
{
|
||||
node2 = node.left;
|
||||
node = node.right;
|
||||
}
|
||||
if (path != null)
|
||||
{
|
||||
path.Add(node2);
|
||||
path.Add(node);
|
||||
}
|
||||
}
|
||||
return num;
|
||||
}
|
||||
|
||||
// Token: 0x06000069 RID: 105 RVA: 0x00003678 File Offset: 0x00001878
|
||||
private RBTree.Node do_insert(int in_tree_cmp, RBTree.Node current, List<RBTree.Node> path)
|
||||
{
|
||||
path[path.Count - 1] = current;
|
||||
RBTree.Node node = path[path.Count - 3];
|
||||
if (in_tree_cmp < 0)
|
||||
{
|
||||
node.left = current;
|
||||
}
|
||||
else
|
||||
{
|
||||
node.right = current;
|
||||
}
|
||||
for (int i = 0; i < path.Count - 2; i += 2)
|
||||
{
|
||||
path[i].Size += 1U;
|
||||
}
|
||||
if (!node.IsBlack)
|
||||
{
|
||||
this.rebalance_insert(path);
|
||||
}
|
||||
if (!this.root.IsBlack)
|
||||
{
|
||||
throw new SystemException("Internal error: root is not black");
|
||||
}
|
||||
this.version += 1U;
|
||||
return current;
|
||||
}
|
||||
|
||||
// Token: 0x0600006A RID: 106 RVA: 0x00003728 File Offset: 0x00001928
|
||||
private RBTree.Node do_remove(List<RBTree.Node> path)
|
||||
{
|
||||
int num = path.Count - 1;
|
||||
RBTree.Node node = path[num];
|
||||
if (node.left != null)
|
||||
{
|
||||
RBTree.Node node2 = RBTree.right_most(node.left, node.right, path);
|
||||
node.SwapValue(node2);
|
||||
if (node2.left != null)
|
||||
{
|
||||
RBTree.Node left = node2.left;
|
||||
path.Add(null);
|
||||
path.Add(left);
|
||||
node2.SwapValue(left);
|
||||
}
|
||||
}
|
||||
else if (node.right != null)
|
||||
{
|
||||
RBTree.Node right = node.right;
|
||||
path.Add(null);
|
||||
path.Add(right);
|
||||
node.SwapValue(right);
|
||||
}
|
||||
num = path.Count - 1;
|
||||
node = path[num];
|
||||
if (node.Size != 1U)
|
||||
{
|
||||
throw new SystemException("Internal Error: red-black violation somewhere");
|
||||
}
|
||||
path[num] = null;
|
||||
this.node_reparent((num != 0) ? path[num - 2] : null, node, 0U, null);
|
||||
for (int i = 0; i < path.Count - 2; i += 2)
|
||||
{
|
||||
path[i].Size -= 1U;
|
||||
}
|
||||
if (num != 0 && node.IsBlack)
|
||||
{
|
||||
this.rebalance_delete(path);
|
||||
}
|
||||
if (this.root != null && !this.root.IsBlack)
|
||||
{
|
||||
throw new SystemException("Internal Error: root is not black");
|
||||
}
|
||||
this.version += 1U;
|
||||
return node;
|
||||
}
|
||||
|
||||
// Token: 0x0600006B RID: 107 RVA: 0x00003890 File Offset: 0x00001A90
|
||||
private void rebalance_insert(List<RBTree.Node> path)
|
||||
{
|
||||
int num = path.Count - 1;
|
||||
while (path[num - 3] != null && !path[num - 3].IsBlack)
|
||||
{
|
||||
RBTree.Node node = path[num - 2];
|
||||
bool flag = true;
|
||||
path[num - 3].IsBlack = flag;
|
||||
node.IsBlack = flag;
|
||||
num -= 4;
|
||||
if (num == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
path[num].IsBlack = false;
|
||||
if (path[num - 2].IsBlack)
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
this.rebalance_insert__rotate_final(num, path);
|
||||
}
|
||||
|
||||
// Token: 0x0600006C RID: 108 RVA: 0x0000391C File Offset: 0x00001B1C
|
||||
private void rebalance_delete(List<RBTree.Node> path)
|
||||
{
|
||||
int num = path.Count - 1;
|
||||
for (;;)
|
||||
{
|
||||
RBTree.Node node = path[num - 1];
|
||||
if (!node.IsBlack)
|
||||
{
|
||||
num = this.ensure_sibling_black(num, path);
|
||||
node = path[num - 1];
|
||||
}
|
||||
if ((node.left != null && !node.left.IsBlack) || (node.right != null && !node.right.IsBlack))
|
||||
{
|
||||
break;
|
||||
}
|
||||
node.IsBlack = false;
|
||||
num -= 2;
|
||||
if (num == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (!path[num].IsBlack)
|
||||
{
|
||||
goto Block_5;
|
||||
}
|
||||
}
|
||||
this.rebalance_delete__rotate_final(num, path);
|
||||
return;
|
||||
Block_5:
|
||||
path[num].IsBlack = true;
|
||||
}
|
||||
|
||||
// Token: 0x0600006D RID: 109 RVA: 0x000039CC File Offset: 0x00001BCC
|
||||
private void rebalance_insert__rotate_final(int curpos, List<RBTree.Node> path)
|
||||
{
|
||||
RBTree.Node node = path[curpos];
|
||||
RBTree.Node node2 = path[curpos - 2];
|
||||
RBTree.Node node3 = path[curpos - 4];
|
||||
uint size = node3.Size;
|
||||
bool flag = node2 == node3.left;
|
||||
bool flag2 = node == node2.left;
|
||||
RBTree.Node node4;
|
||||
if (flag && flag2)
|
||||
{
|
||||
node3.left = node2.right;
|
||||
node2.right = node3;
|
||||
node4 = node2;
|
||||
}
|
||||
else if (flag && !flag2)
|
||||
{
|
||||
node3.left = node.right;
|
||||
node.right = node3;
|
||||
node2.right = node.left;
|
||||
node.left = node2;
|
||||
node4 = node;
|
||||
}
|
||||
else if (!flag && flag2)
|
||||
{
|
||||
node3.right = node.left;
|
||||
node.left = node3;
|
||||
node2.left = node.right;
|
||||
node.right = node2;
|
||||
node4 = node;
|
||||
}
|
||||
else
|
||||
{
|
||||
node3.right = node2.left;
|
||||
node2.left = node3;
|
||||
node4 = node2;
|
||||
}
|
||||
node3.FixSize();
|
||||
node3.IsBlack = false;
|
||||
if (node4 != node2)
|
||||
{
|
||||
node2.FixSize();
|
||||
}
|
||||
node4.IsBlack = true;
|
||||
this.node_reparent((curpos != 4) ? path[curpos - 6] : null, node3, size, node4);
|
||||
}
|
||||
|
||||
// Token: 0x0600006E RID: 110 RVA: 0x00003B10 File Offset: 0x00001D10
|
||||
private void rebalance_delete__rotate_final(int curpos, List<RBTree.Node> path)
|
||||
{
|
||||
RBTree.Node node = path[curpos - 1];
|
||||
RBTree.Node node2 = path[curpos - 2];
|
||||
uint size = node2.Size;
|
||||
bool isBlack = node2.IsBlack;
|
||||
RBTree.Node node3;
|
||||
if (node2.right == node)
|
||||
{
|
||||
if (node.right == null || node.right.IsBlack)
|
||||
{
|
||||
RBTree.Node left = node.left;
|
||||
node2.right = left.left;
|
||||
left.left = node2;
|
||||
node.left = left.right;
|
||||
left.right = node;
|
||||
node3 = left;
|
||||
}
|
||||
else
|
||||
{
|
||||
node2.right = node.left;
|
||||
node.left = node2;
|
||||
node.right.IsBlack = true;
|
||||
node3 = node;
|
||||
}
|
||||
}
|
||||
else if (node.left == null || node.left.IsBlack)
|
||||
{
|
||||
RBTree.Node right = node.right;
|
||||
node2.left = right.right;
|
||||
right.right = node2;
|
||||
node.right = right.left;
|
||||
right.left = node;
|
||||
node3 = right;
|
||||
}
|
||||
else
|
||||
{
|
||||
node2.left = node.right;
|
||||
node.right = node2;
|
||||
node.left.IsBlack = true;
|
||||
node3 = node;
|
||||
}
|
||||
node2.FixSize();
|
||||
node2.IsBlack = true;
|
||||
if (node3 != node)
|
||||
{
|
||||
node.FixSize();
|
||||
}
|
||||
node3.IsBlack = isBlack;
|
||||
this.node_reparent((curpos != 2) ? path[curpos - 4] : null, node2, size, node3);
|
||||
}
|
||||
|
||||
// Token: 0x0600006F RID: 111 RVA: 0x00003C88 File Offset: 0x00001E88
|
||||
private int ensure_sibling_black(int curpos, List<RBTree.Node> path)
|
||||
{
|
||||
RBTree.Node node = path[curpos];
|
||||
RBTree.Node node2 = path[curpos - 1];
|
||||
RBTree.Node node3 = path[curpos - 2];
|
||||
uint size = node3.Size;
|
||||
bool flag;
|
||||
if (node3.right == node2)
|
||||
{
|
||||
node3.right = node2.left;
|
||||
node2.left = node3;
|
||||
flag = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
node3.left = node2.right;
|
||||
node2.right = node3;
|
||||
flag = false;
|
||||
}
|
||||
node3.FixSize();
|
||||
node3.IsBlack = false;
|
||||
node2.IsBlack = true;
|
||||
this.node_reparent((curpos != 2) ? path[curpos - 4] : null, node3, size, node2);
|
||||
if (curpos + 1 == path.Count)
|
||||
{
|
||||
path.Add(null);
|
||||
path.Add(null);
|
||||
}
|
||||
path[curpos - 2] = node2;
|
||||
path[curpos - 1] = ((!flag) ? node2.left : node2.right);
|
||||
path[curpos] = node3;
|
||||
path[curpos + 1] = ((!flag) ? node3.left : node3.right);
|
||||
path[curpos + 2] = node;
|
||||
return curpos + 2;
|
||||
}
|
||||
|
||||
// Token: 0x06000070 RID: 112 RVA: 0x00003DA4 File Offset: 0x00001FA4
|
||||
private void node_reparent(RBTree.Node orig_parent, RBTree.Node orig, uint orig_size, RBTree.Node updated)
|
||||
{
|
||||
if (updated != null && updated.FixSize() != orig_size)
|
||||
{
|
||||
throw new SystemException("Internal error: rotation");
|
||||
}
|
||||
if (orig == this.root)
|
||||
{
|
||||
this.root = updated;
|
||||
}
|
||||
else if (orig == orig_parent.left)
|
||||
{
|
||||
orig_parent.left = updated;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (orig != orig_parent.right)
|
||||
{
|
||||
throw new SystemException("Internal error: path error");
|
||||
}
|
||||
orig_parent.right = updated;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000071 RID: 113 RVA: 0x00003E28 File Offset: 0x00002028
|
||||
private static RBTree.Node right_most(RBTree.Node current, RBTree.Node sibling, List<RBTree.Node> path)
|
||||
{
|
||||
for (;;)
|
||||
{
|
||||
path.Add(sibling);
|
||||
path.Add(current);
|
||||
if (current.right == null)
|
||||
{
|
||||
break;
|
||||
}
|
||||
sibling = current.left;
|
||||
current = current.right;
|
||||
}
|
||||
return current;
|
||||
}
|
||||
|
||||
// Token: 0x0400003D RID: 61
|
||||
private RBTree.Node root;
|
||||
|
||||
// Token: 0x0400003E RID: 62
|
||||
private object hlp;
|
||||
|
||||
// Token: 0x0400003F RID: 63
|
||||
private uint version;
|
||||
|
||||
// Token: 0x04000040 RID: 64
|
||||
[ThreadStatic]
|
||||
private static List<RBTree.Node> cached_path;
|
||||
|
||||
// Token: 0x02000011 RID: 17
|
||||
public interface INodeHelper<T>
|
||||
{
|
||||
// Token: 0x06000072 RID: 114
|
||||
int Compare(T key, RBTree.Node node);
|
||||
|
||||
// Token: 0x06000073 RID: 115
|
||||
RBTree.Node CreateNode(T key);
|
||||
}
|
||||
|
||||
// Token: 0x02000012 RID: 18
|
||||
public abstract class Node
|
||||
{
|
||||
// Token: 0x06000074 RID: 116 RVA: 0x00003E6C File Offset: 0x0000206C
|
||||
public Node()
|
||||
{
|
||||
this.size_black = 2U;
|
||||
}
|
||||
|
||||
// Token: 0x17000017 RID: 23
|
||||
// (get) Token: 0x06000075 RID: 117 RVA: 0x00003E7C File Offset: 0x0000207C
|
||||
// (set) Token: 0x06000076 RID: 118 RVA: 0x00003E8C File Offset: 0x0000208C
|
||||
public bool IsBlack
|
||||
{
|
||||
get
|
||||
{
|
||||
return (this.size_black & 1U) == 1U;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.size_black = ((!value) ? (this.size_black & 4294967294U) : (this.size_black | 1U));
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000018 RID: 24
|
||||
// (get) Token: 0x06000077 RID: 119 RVA: 0x00003EBC File Offset: 0x000020BC
|
||||
// (set) Token: 0x06000078 RID: 120 RVA: 0x00003EC8 File Offset: 0x000020C8
|
||||
public uint Size
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.size_black >> 1;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.size_black = (value << 1) | (this.size_black & 1U);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000079 RID: 121 RVA: 0x00003EDC File Offset: 0x000020DC
|
||||
public uint FixSize()
|
||||
{
|
||||
this.Size = 1U;
|
||||
if (this.left != null)
|
||||
{
|
||||
this.Size += this.left.Size;
|
||||
}
|
||||
if (this.right != null)
|
||||
{
|
||||
this.Size += this.right.Size;
|
||||
}
|
||||
return this.Size;
|
||||
}
|
||||
|
||||
// Token: 0x0600007A RID: 122
|
||||
public abstract void SwapValue(RBTree.Node other);
|
||||
|
||||
// Token: 0x04000041 RID: 65
|
||||
private const uint black_mask = 1U;
|
||||
|
||||
// Token: 0x04000042 RID: 66
|
||||
private const int black_shift = 1;
|
||||
|
||||
// Token: 0x04000043 RID: 67
|
||||
public RBTree.Node left;
|
||||
|
||||
// Token: 0x04000044 RID: 68
|
||||
public RBTree.Node right;
|
||||
|
||||
// Token: 0x04000045 RID: 69
|
||||
private uint size_black;
|
||||
}
|
||||
|
||||
// Token: 0x02000013 RID: 19
|
||||
public struct NodeEnumerator : IEnumerator, IDisposable, IEnumerator<RBTree.Node>
|
||||
{
|
||||
// Token: 0x0600007B RID: 123 RVA: 0x00003F3C File Offset: 0x0000213C
|
||||
internal NodeEnumerator(RBTree tree)
|
||||
{
|
||||
this.tree = tree;
|
||||
this.version = tree.version;
|
||||
this.pennants = null;
|
||||
}
|
||||
|
||||
// Token: 0x17000019 RID: 25
|
||||
// (get) Token: 0x0600007C RID: 124 RVA: 0x00003F58 File Offset: 0x00002158
|
||||
object IEnumerator.Current
|
||||
{
|
||||
get
|
||||
{
|
||||
this.check_current();
|
||||
return this.Current;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600007D RID: 125 RVA: 0x00003F68 File Offset: 0x00002168
|
||||
public void Reset()
|
||||
{
|
||||
this.check_version();
|
||||
this.pennants = null;
|
||||
}
|
||||
|
||||
// Token: 0x1700001A RID: 26
|
||||
// (get) Token: 0x0600007E RID: 126 RVA: 0x00003F78 File Offset: 0x00002178
|
||||
public RBTree.Node Current
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.pennants.Peek();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600007F RID: 127 RVA: 0x00003F88 File Offset: 0x00002188
|
||||
public bool MoveNext()
|
||||
{
|
||||
this.check_version();
|
||||
RBTree.Node node;
|
||||
if (this.pennants == null)
|
||||
{
|
||||
if (this.tree.root == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
this.pennants = new Stack<RBTree.Node>();
|
||||
node = this.tree.root;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (this.pennants.Count == 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
RBTree.Node node2 = this.pennants.Pop();
|
||||
node = node2.right;
|
||||
}
|
||||
while (node != null)
|
||||
{
|
||||
this.pennants.Push(node);
|
||||
node = node.left;
|
||||
}
|
||||
return this.pennants.Count != 0;
|
||||
}
|
||||
|
||||
// Token: 0x06000080 RID: 128 RVA: 0x00004028 File Offset: 0x00002228
|
||||
public void Dispose()
|
||||
{
|
||||
this.tree = null;
|
||||
this.pennants = null;
|
||||
}
|
||||
|
||||
// Token: 0x06000081 RID: 129 RVA: 0x00004038 File Offset: 0x00002238
|
||||
private void check_version()
|
||||
{
|
||||
if (this.tree == null)
|
||||
{
|
||||
throw new ObjectDisposedException("enumerator");
|
||||
}
|
||||
if (this.version != this.tree.version)
|
||||
{
|
||||
throw new InvalidOperationException("tree modified");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000082 RID: 130 RVA: 0x00004074 File Offset: 0x00002274
|
||||
internal void check_current()
|
||||
{
|
||||
this.check_version();
|
||||
if (this.pennants == null)
|
||||
{
|
||||
throw new InvalidOperationException("state invalid before the first MoveNext()");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04000046 RID: 70
|
||||
private RBTree tree;
|
||||
|
||||
// Token: 0x04000047 RID: 71
|
||||
private uint version;
|
||||
|
||||
// Token: 0x04000048 RID: 72
|
||||
private Stack<RBTree.Node> pennants;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,1234 @@
|
||||
using System;
|
||||
|
||||
namespace System.Collections.Generic
|
||||
{
|
||||
/// <summary>Represents a collection of key/value pairs that are sorted on the key.</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: 0x02000014 RID: 20
|
||||
[Serializable]
|
||||
public class SortedDictionary<TKey, TValue> : ICollection, IEnumerable<KeyValuePair<TKey, TValue>>, IDictionary, IEnumerable, IDictionary<TKey, TValue>, ICollection<KeyValuePair<TKey, TValue>>
|
||||
{
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.Generic.SortedDictionary`2" /> class that is empty and uses the default <see cref="T:System.Collections.Generic.IComparer`1" /> implementation for the key type.</summary>
|
||||
// Token: 0x06000083 RID: 131 RVA: 0x00004094 File Offset: 0x00002294
|
||||
public SortedDictionary()
|
||||
: this(null)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.Generic.SortedDictionary`2" /> class that is empty and uses the specified <see cref="T:System.Collections.Generic.IComparer`1" /> implementation to compare keys.</summary>
|
||||
/// <param name="comparer">The <see cref="T:System.Collections.Generic.IComparer`1" /> implementation to use when comparing keys, or null to use the default <see cref="T:System.Collections.Generic.Comparer`1" /> for the type of the key.</param>
|
||||
// Token: 0x06000084 RID: 132 RVA: 0x000040A0 File Offset: 0x000022A0
|
||||
public SortedDictionary(IComparer<TKey> comparer)
|
||||
{
|
||||
this.hlp = SortedDictionary<TKey, TValue>.NodeHelper.GetHelper(comparer);
|
||||
this.tree = new RBTree(this.hlp);
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.Generic.SortedDictionary`2" /> class that contains elements copied from the specified <see cref="T:System.Collections.Generic.IDictionary`2" /> and uses the default <see cref="T:System.Collections.Generic.IComparer`1" /> implementation 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.SortedDictionary`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: 0x06000085 RID: 133 RVA: 0x000040C8 File Offset: 0x000022C8
|
||||
public SortedDictionary(IDictionary<TKey, TValue> dic)
|
||||
: this(dic, null)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.Generic.SortedDictionary`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.IComparer`1" /> implementation to compare keys.</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.SortedDictionary`2" />.</param>
|
||||
/// <param name="comparer">The <see cref="T:System.Collections.Generic.IComparer`1" /> implementation to use when comparing keys, or null to use the default <see cref="T:System.Collections.Generic.Comparer`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: 0x06000086 RID: 134 RVA: 0x000040D4 File Offset: 0x000022D4
|
||||
public SortedDictionary(IDictionary<TKey, TValue> dic, IComparer<TKey> comparer)
|
||||
: this(comparer)
|
||||
{
|
||||
if (dic == null)
|
||||
{
|
||||
throw new ArgumentNullException();
|
||||
}
|
||||
foreach (KeyValuePair<TKey, TValue> keyValuePair in dic)
|
||||
{
|
||||
this.Add(keyValuePair.Key, keyValuePair.Value);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700001B RID: 27
|
||||
// (get) Token: 0x06000087 RID: 135 RVA: 0x00004154 File Offset: 0x00002354
|
||||
ICollection<TKey> IDictionary<TKey, TValue>.Keys
|
||||
{
|
||||
get
|
||||
{
|
||||
return new SortedDictionary<TKey, TValue>.KeyCollection(this);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700001C RID: 28
|
||||
// (get) Token: 0x06000088 RID: 136 RVA: 0x0000415C File Offset: 0x0000235C
|
||||
ICollection<TValue> IDictionary<TKey, TValue>.Values
|
||||
{
|
||||
get
|
||||
{
|
||||
return new SortedDictionary<TKey, TValue>.ValueCollection(this);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000089 RID: 137 RVA: 0x00004164 File Offset: 0x00002364
|
||||
void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item)
|
||||
{
|
||||
this.Add(item.Key, item.Value);
|
||||
}
|
||||
|
||||
// Token: 0x0600008A RID: 138 RVA: 0x0000417C File Offset: 0x0000237C
|
||||
bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> item)
|
||||
{
|
||||
TValue tvalue;
|
||||
return this.TryGetValue(item.Key, out tvalue) && EqualityComparer<TValue>.Default.Equals(item.Value, tvalue);
|
||||
}
|
||||
|
||||
// Token: 0x1700001D RID: 29
|
||||
// (get) Token: 0x0600008B RID: 139 RVA: 0x000041B4 File Offset: 0x000023B4
|
||||
bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly
|
||||
{
|
||||
get
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600008C RID: 140 RVA: 0x000041B8 File Offset: 0x000023B8
|
||||
bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item)
|
||||
{
|
||||
TValue tvalue;
|
||||
return this.TryGetValue(item.Key, out tvalue) && EqualityComparer<TValue>.Default.Equals(item.Value, tvalue) && this.Remove(item.Key);
|
||||
}
|
||||
|
||||
/// <summary>Adds an element with the provided key and value to the <see cref="T:System.Collections.IDictionary" />.</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">
|
||||
/// <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.IDictionary" />.-or-<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.IDictionary" />.-or-An element with the same key already exists in the <see cref="T:System.Collections.IDictionary" />.</exception>
|
||||
// Token: 0x0600008D RID: 141 RVA: 0x00004200 File Offset: 0x00002400
|
||||
void IDictionary.Add(object key, object value)
|
||||
{
|
||||
this.Add(this.ToKey(key), this.ToValue(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 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: 0x0600008E RID: 142 RVA: 0x00004218 File Offset: 0x00002418
|
||||
bool IDictionary.Contains(object key)
|
||||
{
|
||||
return this.ContainsKey(this.ToKey(key));
|
||||
}
|
||||
|
||||
/// <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: 0x0600008F RID: 143 RVA: 0x00004228 File Offset: 0x00002428
|
||||
IDictionaryEnumerator IDictionary.GetEnumerator()
|
||||
{
|
||||
return new SortedDictionary<TKey, TValue>.Enumerator(this);
|
||||
}
|
||||
|
||||
/// <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.SortedDictionary`2" />, this property always returns false.</returns>
|
||||
// Token: 0x1700001E RID: 30
|
||||
// (get) Token: 0x06000090 RID: 144 RVA: 0x00004238 File Offset: 0x00002438
|
||||
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.SortedDictionary`2" />, this property always returns false.</returns>
|
||||
// Token: 0x1700001F RID: 31
|
||||
// (get) Token: 0x06000091 RID: 145 RVA: 0x0000423C File Offset: 0x0000243C
|
||||
bool IDictionary.IsReadOnly
|
||||
{
|
||||
get
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <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: 0x17000020 RID: 32
|
||||
// (get) Token: 0x06000092 RID: 146 RVA: 0x00004240 File Offset: 0x00002440
|
||||
ICollection IDictionary.Keys
|
||||
{
|
||||
get
|
||||
{
|
||||
return new SortedDictionary<TKey, TValue>.KeyCollection(this);
|
||||
}
|
||||
}
|
||||
|
||||
/// <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: 0x06000093 RID: 147 RVA: 0x00004248 File Offset: 0x00002448
|
||||
void IDictionary.Remove(object key)
|
||||
{
|
||||
this.Remove(this.ToKey(key));
|
||||
}
|
||||
|
||||
/// <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: 0x17000021 RID: 33
|
||||
// (get) Token: 0x06000094 RID: 148 RVA: 0x00004258 File Offset: 0x00002458
|
||||
ICollection IDictionary.Values
|
||||
{
|
||||
get
|
||||
{
|
||||
return new SortedDictionary<TKey, TValue>.ValueCollection(this);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets or sets the element with the specified key.</summary>
|
||||
/// <returns>The element 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.SortedDictionary`2" />.</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.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.SortedDictionary`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.SortedDictionary`2" />.</exception>
|
||||
// Token: 0x17000022 RID: 34
|
||||
object IDictionary.this[object key]
|
||||
{
|
||||
get
|
||||
{
|
||||
return this[this.ToKey(key)];
|
||||
}
|
||||
set
|
||||
{
|
||||
this[this.ToKey(key)] = this.ToValue(value);
|
||||
}
|
||||
}
|
||||
|
||||
/// <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 the <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: 0x06000097 RID: 151 RVA: 0x0000428C File Offset: 0x0000248C
|
||||
void ICollection.CopyTo(Array array, int index)
|
||||
{
|
||||
if (this.Count == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (array == null)
|
||||
{
|
||||
throw new ArgumentNullException();
|
||||
}
|
||||
if (index < 0 || array.Length <= index)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException();
|
||||
}
|
||||
if (array.Length - index < this.Count)
|
||||
{
|
||||
throw new ArgumentException();
|
||||
}
|
||||
foreach (RBTree.Node node in this.tree)
|
||||
{
|
||||
SortedDictionary<TKey, TValue>.Node node2 = (SortedDictionary<TKey, TValue>.Node)node;
|
||||
array.SetValue(node2.AsDE(), index++);
|
||||
}
|
||||
}
|
||||
|
||||
/// <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.SortedDictionary`2" />, this property always returns false.</returns>
|
||||
// Token: 0x17000023 RID: 35
|
||||
// (get) Token: 0x06000098 RID: 152 RVA: 0x00004354 File Offset: 0x00002554
|
||||
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: 0x17000024 RID: 36
|
||||
// (get) Token: 0x06000099 RID: 153 RVA: 0x00004358 File Offset: 0x00002558
|
||||
object ICollection.SyncRoot
|
||||
{
|
||||
get
|
||||
{
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Returns an enumerator that iterates through the collection.</summary>
|
||||
/// <returns>An <see cref="T:System.Collections.Generic.IEnumerator`1" /> that can be used to iterate through the collection.</returns>
|
||||
// Token: 0x0600009A RID: 154 RVA: 0x0000435C File Offset: 0x0000255C
|
||||
IEnumerator IEnumerable.GetEnumerator()
|
||||
{
|
||||
return new SortedDictionary<TKey, TValue>.Enumerator(this);
|
||||
}
|
||||
|
||||
// Token: 0x0600009B RID: 155 RVA: 0x0000436C File Offset: 0x0000256C
|
||||
IEnumerator<KeyValuePair<TKey, TValue>> IEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator()
|
||||
{
|
||||
return new SortedDictionary<TKey, TValue>.Enumerator(this);
|
||||
}
|
||||
|
||||
/// <summary>Gets the <see cref="T:System.Collections.Generic.IComparer`1" /> used to order the elements of the <see cref="T:System.Collections.Generic.SortedDictionary`2" />.</summary>
|
||||
/// <returns>The <see cref="T:System.Collections.Generic.IComparer`1" /> used to order the elements of the <see cref="T:System.Collections.Generic.SortedDictionary`2" /></returns>
|
||||
// Token: 0x17000025 RID: 37
|
||||
// (get) Token: 0x0600009C RID: 156 RVA: 0x0000437C File Offset: 0x0000257C
|
||||
public IComparer<TKey> Comparer
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.hlp.cmp;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets the number of key/value pairs contained in the <see cref="T:System.Collections.Generic.SortedDictionary`2" />.</summary>
|
||||
/// <returns>The number of key/value pairs contained in the <see cref="T:System.Collections.Generic.SortedDictionary`2" />.</returns>
|
||||
// Token: 0x17000026 RID: 38
|
||||
// (get) Token: 0x0600009D RID: 157 RVA: 0x0000438C File Offset: 0x0000258C
|
||||
public int Count
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.tree.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: 0x17000027 RID: 39
|
||||
public TValue this[TKey key]
|
||||
{
|
||||
get
|
||||
{
|
||||
SortedDictionary<TKey, TValue>.Node node = (SortedDictionary<TKey, TValue>.Node)this.tree.Lookup<TKey>(key);
|
||||
if (node == null)
|
||||
{
|
||||
throw new KeyNotFoundException();
|
||||
}
|
||||
return node.value;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (key == null)
|
||||
{
|
||||
throw new ArgumentNullException("key");
|
||||
}
|
||||
SortedDictionary<TKey, TValue>.Node node = (SortedDictionary<TKey, TValue>.Node)this.tree.Intern<TKey>(key, null);
|
||||
node.value = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a collection containing the keys in the <see cref="T:System.Collections.Generic.SortedDictionary`2" />.</summary>
|
||||
/// <returns>A <see cref="T:System.Collections.Generic.SortedDictionary`2.KeyCollection" /> containing the keys in the <see cref="T:System.Collections.Generic.SortedDictionary`2" />.</returns>
|
||||
// Token: 0x17000028 RID: 40
|
||||
// (get) Token: 0x060000A0 RID: 160 RVA: 0x00004410 File Offset: 0x00002610
|
||||
public SortedDictionary<TKey, TValue>.KeyCollection Keys
|
||||
{
|
||||
get
|
||||
{
|
||||
return new SortedDictionary<TKey, TValue>.KeyCollection(this);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a collection containing the values in the <see cref="T:System.Collections.Generic.SortedDictionary`2" />.</summary>
|
||||
/// <returns>A <see cref="T:System.Collections.Generic.SortedDictionary`2.ValueCollection" /> containing the values in the <see cref="T:System.Collections.Generic.SortedDictionary`2" />.</returns>
|
||||
// Token: 0x17000029 RID: 41
|
||||
// (get) Token: 0x060000A1 RID: 161 RVA: 0x00004418 File Offset: 0x00002618
|
||||
public SortedDictionary<TKey, TValue>.ValueCollection Values
|
||||
{
|
||||
get
|
||||
{
|
||||
return new SortedDictionary<TKey, TValue>.ValueCollection(this);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Adds an element with the specified key and value into the <see cref="T:System.Collections.Generic.SortedDictionary`2" />.</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.SortedDictionary`2" />.</exception>
|
||||
// Token: 0x060000A2 RID: 162 RVA: 0x00004420 File Offset: 0x00002620
|
||||
public void Add(TKey key, TValue value)
|
||||
{
|
||||
if (key == null)
|
||||
{
|
||||
throw new ArgumentNullException("key");
|
||||
}
|
||||
RBTree.Node node = new SortedDictionary<TKey, TValue>.Node(key, value);
|
||||
if (this.tree.Intern<TKey>(key, node) != node)
|
||||
{
|
||||
throw new ArgumentException("key already present in dictionary", "key");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Removes all elements from the <see cref="T:System.Collections.Generic.SortedDictionary`2" />.</summary>
|
||||
// Token: 0x060000A3 RID: 163 RVA: 0x00004470 File Offset: 0x00002670
|
||||
public void Clear()
|
||||
{
|
||||
this.tree.Clear();
|
||||
}
|
||||
|
||||
/// <summary>Determines whether the <see cref="T:System.Collections.Generic.SortedDictionary`2" /> contains an element with the specified key.</summary>
|
||||
/// <returns>true if the <see cref="T:System.Collections.Generic.SortedDictionary`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.SortedDictionary`2" />.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="key" /> is null.</exception>
|
||||
// Token: 0x060000A4 RID: 164 RVA: 0x00004480 File Offset: 0x00002680
|
||||
public bool ContainsKey(TKey key)
|
||||
{
|
||||
return this.tree.Lookup<TKey>(key) != null;
|
||||
}
|
||||
|
||||
/// <summary>Determines whether the <see cref="T:System.Collections.Generic.SortedDictionary`2" /> contains an element with the specified value.</summary>
|
||||
/// <returns>true if the <see cref="T:System.Collections.Generic.SortedDictionary`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.SortedDictionary`2" />. The value can be null for reference types.</param>
|
||||
// Token: 0x060000A5 RID: 165 RVA: 0x00004494 File Offset: 0x00002694
|
||||
public bool ContainsValue(TValue value)
|
||||
{
|
||||
IEqualityComparer<TValue> @default = EqualityComparer<TValue>.Default;
|
||||
foreach (RBTree.Node node in this.tree)
|
||||
{
|
||||
SortedDictionary<TKey, TValue>.Node node2 = (SortedDictionary<TKey, TValue>.Node)node;
|
||||
if (@default.Equals(value, node2.value))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/// <summary>Copies the elements of the <see cref="T:System.Collections.Generic.SortedDictionary`2" /> to the specified array of <see cref="T:System.Collections.Generic.KeyValuePair`2" /> structures, starting at the specified index.</summary>
|
||||
/// <param name="array">The one-dimensional array of <see cref="T:System.Collections.Generic.KeyValuePair`2" /> structures that is the destination of the elements copied from the current <see cref="T:System.Collections.Generic.SortedDictionary`2" /> 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">The number of elements in the source <see cref="T:System.Collections.Generic.SortedDictionary`2" /> is greater than the available space from <paramref name="index" /> to the end of the destination <paramref name="array" />.</exception>
|
||||
// Token: 0x060000A6 RID: 166 RVA: 0x0000451C File Offset: 0x0000271C
|
||||
public void CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex)
|
||||
{
|
||||
if (this.Count == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (array == null)
|
||||
{
|
||||
throw new ArgumentNullException();
|
||||
}
|
||||
if (arrayIndex < 0 || array.Length <= arrayIndex)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException();
|
||||
}
|
||||
if (array.Length - arrayIndex < this.Count)
|
||||
{
|
||||
throw new ArgumentException();
|
||||
}
|
||||
foreach (RBTree.Node node in this.tree)
|
||||
{
|
||||
SortedDictionary<TKey, TValue>.Node node2 = (SortedDictionary<TKey, TValue>.Node)node;
|
||||
array[arrayIndex++] = node2.AsKV();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Returns an enumerator that iterates through the <see cref="T:System.Collections.Generic.SortedDictionary`2" />.</summary>
|
||||
/// <returns>A <see cref="T:System.Collections.Generic.SortedDictionary`2.Enumerator" /> for the <see cref="T:System.Collections.Generic.SortedDictionary`2" />.</returns>
|
||||
// Token: 0x060000A7 RID: 167 RVA: 0x000045DC File Offset: 0x000027DC
|
||||
public SortedDictionary<TKey, TValue>.Enumerator GetEnumerator()
|
||||
{
|
||||
return new SortedDictionary<TKey, TValue>.Enumerator(this);
|
||||
}
|
||||
|
||||
/// <summary>Removes the element with the specified key from the <see cref="T:System.Collections.Generic.SortedDictionary`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.Generic.SortedDictionary`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: 0x060000A8 RID: 168 RVA: 0x000045E4 File Offset: 0x000027E4
|
||||
public bool Remove(TKey key)
|
||||
{
|
||||
return this.tree.Remove<TKey>(key) != null;
|
||||
}
|
||||
|
||||
/// <summary>Gets the value associated with the specified key.</summary>
|
||||
/// <returns>true if the <see cref="T:System.Collections.Generic.SortedDictionary`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, 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. </param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="key" /> is null.</exception>
|
||||
// Token: 0x060000A9 RID: 169 RVA: 0x000045F8 File Offset: 0x000027F8
|
||||
public bool TryGetValue(TKey key, out TValue value)
|
||||
{
|
||||
SortedDictionary<TKey, TValue>.Node node = (SortedDictionary<TKey, TValue>.Node)this.tree.Lookup<TKey>(key);
|
||||
value = ((node != null) ? node.value : default(TValue));
|
||||
return node != null;
|
||||
}
|
||||
|
||||
// Token: 0x060000AA RID: 170 RVA: 0x00004640 File Offset: 0x00002840
|
||||
private TKey ToKey(object key)
|
||||
{
|
||||
if (key == null)
|
||||
{
|
||||
throw new ArgumentNullException("key");
|
||||
}
|
||||
if (!(key is TKey))
|
||||
{
|
||||
throw new ArgumentException(string.Format("Key \"{0}\" cannot be converted to the key type {1}.", key, typeof(TKey)));
|
||||
}
|
||||
return (TKey)((object)key);
|
||||
}
|
||||
|
||||
// Token: 0x060000AB RID: 171 RVA: 0x00004680 File Offset: 0x00002880
|
||||
private TValue ToValue(object value)
|
||||
{
|
||||
if (!(value is TValue) && (value != null || typeof(TValue).IsValueType))
|
||||
{
|
||||
throw new ArgumentException(string.Format("Value \"{0}\" cannot be converted to the value type {1}.", value, typeof(TValue)));
|
||||
}
|
||||
return (TValue)((object)value);
|
||||
}
|
||||
|
||||
// Token: 0x04000049 RID: 73
|
||||
private RBTree tree;
|
||||
|
||||
// Token: 0x0400004A RID: 74
|
||||
private SortedDictionary<TKey, TValue>.NodeHelper hlp;
|
||||
|
||||
// Token: 0x02000015 RID: 21
|
||||
private class Node : RBTree.Node
|
||||
{
|
||||
// Token: 0x060000AC RID: 172 RVA: 0x000046D4 File Offset: 0x000028D4
|
||||
public Node(TKey key)
|
||||
{
|
||||
this.key = key;
|
||||
}
|
||||
|
||||
// Token: 0x060000AD RID: 173 RVA: 0x000046E4 File Offset: 0x000028E4
|
||||
public Node(TKey key, TValue value)
|
||||
{
|
||||
this.key = key;
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
// Token: 0x060000AE RID: 174 RVA: 0x000046FC File Offset: 0x000028FC
|
||||
public override void SwapValue(RBTree.Node other)
|
||||
{
|
||||
SortedDictionary<TKey, TValue>.Node node = (SortedDictionary<TKey, TValue>.Node)other;
|
||||
TKey tkey = this.key;
|
||||
this.key = node.key;
|
||||
node.key = tkey;
|
||||
TValue tvalue = this.value;
|
||||
this.value = node.value;
|
||||
node.value = tvalue;
|
||||
}
|
||||
|
||||
// Token: 0x060000AF RID: 175 RVA: 0x00004744 File Offset: 0x00002944
|
||||
public KeyValuePair<TKey, TValue> AsKV()
|
||||
{
|
||||
return new KeyValuePair<TKey, TValue>(this.key, this.value);
|
||||
}
|
||||
|
||||
// Token: 0x060000B0 RID: 176 RVA: 0x00004758 File Offset: 0x00002958
|
||||
public DictionaryEntry AsDE()
|
||||
{
|
||||
return new DictionaryEntry(this.key, this.value);
|
||||
}
|
||||
|
||||
// Token: 0x0400004B RID: 75
|
||||
public TKey key;
|
||||
|
||||
// Token: 0x0400004C RID: 76
|
||||
public TValue value;
|
||||
}
|
||||
|
||||
// Token: 0x02000016 RID: 22
|
||||
private class NodeHelper : RBTree.INodeHelper<TKey>
|
||||
{
|
||||
// Token: 0x060000B1 RID: 177 RVA: 0x00004778 File Offset: 0x00002978
|
||||
private NodeHelper(IComparer<TKey> cmp)
|
||||
{
|
||||
this.cmp = cmp;
|
||||
}
|
||||
|
||||
// Token: 0x060000B3 RID: 179 RVA: 0x0000479C File Offset: 0x0000299C
|
||||
public int Compare(TKey key, RBTree.Node node)
|
||||
{
|
||||
return this.cmp.Compare(key, ((SortedDictionary<TKey, TValue>.Node)node).key);
|
||||
}
|
||||
|
||||
// Token: 0x060000B4 RID: 180 RVA: 0x000047B8 File Offset: 0x000029B8
|
||||
public RBTree.Node CreateNode(TKey key)
|
||||
{
|
||||
return new SortedDictionary<TKey, TValue>.Node(key);
|
||||
}
|
||||
|
||||
// Token: 0x060000B5 RID: 181 RVA: 0x000047C0 File Offset: 0x000029C0
|
||||
public static SortedDictionary<TKey, TValue>.NodeHelper GetHelper(IComparer<TKey> cmp)
|
||||
{
|
||||
if (cmp == null || cmp == Comparer<TKey>.Default)
|
||||
{
|
||||
return SortedDictionary<TKey, TValue>.NodeHelper.Default;
|
||||
}
|
||||
return new SortedDictionary<TKey, TValue>.NodeHelper(cmp);
|
||||
}
|
||||
|
||||
// Token: 0x0400004D RID: 77
|
||||
public IComparer<TKey> cmp;
|
||||
|
||||
// Token: 0x0400004E RID: 78
|
||||
private static SortedDictionary<TKey, TValue>.NodeHelper Default = new SortedDictionary<TKey, TValue>.NodeHelper(Comparer<TKey>.Default);
|
||||
}
|
||||
|
||||
/// <summary>Represents the collection of values in a <see cref="T:System.Collections.Generic.SortedDictionary`2" />. This class cannot be inherited.</summary>
|
||||
// Token: 0x02000017 RID: 23
|
||||
[Serializable]
|
||||
public sealed class ValueCollection : ICollection, IEnumerable, ICollection<TValue>, IEnumerable<TValue>
|
||||
{
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.Generic.SortedDictionary`2.ValueCollection" /> class that reflects the values in the specified <see cref="T:System.Collections.Generic.SortedDictionary`2" />.</summary>
|
||||
/// <param name="dictionary">The <see cref="T:System.Collections.Generic.SortedDictionary`2" /> whose values are reflected in the new <see cref="T:System.Collections.Generic.SortedDictionary`2.ValueCollection" />.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="dictionary" /> is null.</exception>
|
||||
// Token: 0x060000B6 RID: 182 RVA: 0x000047E0 File Offset: 0x000029E0
|
||||
public ValueCollection(SortedDictionary<TKey, TValue> dic)
|
||||
{
|
||||
this._dic = dic;
|
||||
}
|
||||
|
||||
// Token: 0x060000B7 RID: 183 RVA: 0x000047F0 File Offset: 0x000029F0
|
||||
void ICollection<TValue>.Add(TValue item)
|
||||
{
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
|
||||
// Token: 0x060000B8 RID: 184 RVA: 0x000047F8 File Offset: 0x000029F8
|
||||
void ICollection<TValue>.Clear()
|
||||
{
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
|
||||
// Token: 0x060000B9 RID: 185 RVA: 0x00004800 File Offset: 0x00002A00
|
||||
bool ICollection<TValue>.Contains(TValue item)
|
||||
{
|
||||
return this._dic.ContainsValue(item);
|
||||
}
|
||||
|
||||
// Token: 0x1700002A RID: 42
|
||||
// (get) Token: 0x060000BA RID: 186 RVA: 0x00004810 File Offset: 0x00002A10
|
||||
bool ICollection<TValue>.IsReadOnly
|
||||
{
|
||||
get
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060000BB RID: 187 RVA: 0x00004814 File Offset: 0x00002A14
|
||||
bool ICollection<TValue>.Remove(TValue item)
|
||||
{
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
|
||||
// Token: 0x060000BC RID: 188 RVA: 0x0000481C File Offset: 0x00002A1C
|
||||
IEnumerator<TValue> IEnumerable<TValue>.GetEnumerator()
|
||||
{
|
||||
return this.GetEnumerator();
|
||||
}
|
||||
|
||||
/// <summary>Copies the elements of the <see cref="T:System.Collections.ICollection" /> to an array, starting at a particular array index.</summary>
|
||||
/// <param name="array">The one-dimensional array that is the destination of the elements copied from the <see cref="T:System.Collections.ICollection" />. 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.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: 0x060000BD RID: 189 RVA: 0x0000482C File Offset: 0x00002A2C
|
||||
void ICollection.CopyTo(Array array, int index)
|
||||
{
|
||||
if (this.Count == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (array == null)
|
||||
{
|
||||
throw new ArgumentNullException();
|
||||
}
|
||||
if (index < 0 || array.Length <= index)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException();
|
||||
}
|
||||
if (array.Length - index < this.Count)
|
||||
{
|
||||
throw new ArgumentException();
|
||||
}
|
||||
foreach (RBTree.Node node in this._dic.tree)
|
||||
{
|
||||
SortedDictionary<TKey, TValue>.Node node2 = (SortedDictionary<TKey, TValue>.Node)node;
|
||||
array.SetValue(node2.value, index++);
|
||||
}
|
||||
}
|
||||
|
||||
/// <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.SortedDictionary`2.ValueCollection" />, this property always returns false.</returns>
|
||||
// Token: 0x1700002B RID: 43
|
||||
// (get) Token: 0x060000BE RID: 190 RVA: 0x000048F8 File Offset: 0x00002AF8
|
||||
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.SortedDictionary`2.ValueCollection" />, this property always returns the current instance.</returns>
|
||||
// Token: 0x1700002C RID: 44
|
||||
// (get) Token: 0x060000BF RID: 191 RVA: 0x000048FC File Offset: 0x00002AFC
|
||||
object ICollection.SyncRoot
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._dic;
|
||||
}
|
||||
}
|
||||
|
||||
/// <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: 0x060000C0 RID: 192 RVA: 0x00004904 File Offset: 0x00002B04
|
||||
IEnumerator IEnumerable.GetEnumerator()
|
||||
{
|
||||
return new SortedDictionary<TKey, TValue>.ValueCollection.Enumerator(this._dic);
|
||||
}
|
||||
|
||||
/// <summary>Copies the <see cref="T:System.Collections.Generic.SortedDictionary`2.ValueCollection" /> elements to an existing one-dimensional array, starting at the specified array index.</summary>
|
||||
/// <param name="array">The one-dimensional array that is the destination of the elements copied from the <see cref="T:System.Collections.Generic.SortedDictionary`2.ValueCollection" />. 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">The number of elements in the source <see cref="T:System.Collections.Generic.SortedDictionary`2.ValueCollection" /> is greater than the available space from <paramref name="index" /> to the end of the destination <paramref name="array" />.</exception>
|
||||
// Token: 0x060000C1 RID: 193 RVA: 0x00004918 File Offset: 0x00002B18
|
||||
public void CopyTo(TValue[] array, int arrayIndex)
|
||||
{
|
||||
if (this.Count == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (array == null)
|
||||
{
|
||||
throw new ArgumentNullException();
|
||||
}
|
||||
if (arrayIndex < 0 || array.Length <= arrayIndex)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException();
|
||||
}
|
||||
if (array.Length - arrayIndex < this.Count)
|
||||
{
|
||||
throw new ArgumentException();
|
||||
}
|
||||
foreach (RBTree.Node node in this._dic.tree)
|
||||
{
|
||||
SortedDictionary<TKey, TValue>.Node node2 = (SortedDictionary<TKey, TValue>.Node)node;
|
||||
array[arrayIndex++] = node2.value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets the number of elements contained in the <see cref="T:System.Collections.Generic.SortedDictionary`2.ValueCollection" />.</summary>
|
||||
/// <returns>The number of elements contained in the <see cref="T:System.Collections.Generic.SortedDictionary`2.ValueCollection" />.</returns>
|
||||
// Token: 0x1700002D RID: 45
|
||||
// (get) Token: 0x060000C2 RID: 194 RVA: 0x000049D8 File Offset: 0x00002BD8
|
||||
public int Count
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._dic.Count;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Returns an enumerator that iterates through the <see cref="T:System.Collections.Generic.SortedDictionary`2.ValueCollection" />.</summary>
|
||||
/// <returns>A <see cref="T:System.Collections.Generic.SortedDictionary`2.ValueCollection.Enumerator" /> structure for the <see cref="T:System.Collections.Generic.SortedDictionary`2.ValueCollection" />.</returns>
|
||||
// Token: 0x060000C3 RID: 195 RVA: 0x000049E8 File Offset: 0x00002BE8
|
||||
public SortedDictionary<TKey, TValue>.ValueCollection.Enumerator GetEnumerator()
|
||||
{
|
||||
return new SortedDictionary<TKey, TValue>.ValueCollection.Enumerator(this._dic);
|
||||
}
|
||||
|
||||
// Token: 0x0400004F RID: 79
|
||||
private SortedDictionary<TKey, TValue> _dic;
|
||||
|
||||
/// <summary>Enumerates the elements of a <see cref="T:System.Collections.Generic.SortedDictionary`2.ValueCollection" />.</summary>
|
||||
// Token: 0x02000018 RID: 24
|
||||
public struct Enumerator : IEnumerator, IDisposable, IEnumerator<TValue>
|
||||
{
|
||||
// Token: 0x060000C4 RID: 196 RVA: 0x000049F8 File Offset: 0x00002BF8
|
||||
internal Enumerator(SortedDictionary<TKey, TValue> dic)
|
||||
{
|
||||
this.host = dic.tree.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: 0x1700002E RID: 46
|
||||
// (get) Token: 0x060000C5 RID: 197 RVA: 0x00004A0C File Offset: 0x00002C0C
|
||||
object IEnumerator.Current
|
||||
{
|
||||
get
|
||||
{
|
||||
this.host.check_current();
|
||||
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: 0x060000C6 RID: 198 RVA: 0x00004A24 File Offset: 0x00002C24
|
||||
void IEnumerator.Reset()
|
||||
{
|
||||
this.host.Reset();
|
||||
}
|
||||
|
||||
/// <summary>Gets the element at the current position of the enumerator.</summary>
|
||||
/// <returns>The element in the <see cref="T:System.Collections.Generic.SortedDictionary`2.ValueCollection" /> at the current position of the enumerator.</returns>
|
||||
// Token: 0x1700002F RID: 47
|
||||
// (get) Token: 0x060000C7 RID: 199 RVA: 0x00004A34 File Offset: 0x00002C34
|
||||
public TValue Current
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.current;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Advances the enumerator to the next element of the <see cref="T:System.Collections.Generic.SortedDictionary`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: 0x060000C8 RID: 200 RVA: 0x00004A3C File Offset: 0x00002C3C
|
||||
public bool MoveNext()
|
||||
{
|
||||
if (!this.host.MoveNext())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
this.current = ((SortedDictionary<TKey, TValue>.Node)this.host.Current).value;
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>Releases all resources used by the <see cref="T:System.Collections.Generic.SortedDictionary`2.ValueCollection.Enumerator" />.</summary>
|
||||
// Token: 0x060000C9 RID: 201 RVA: 0x00004A78 File Offset: 0x00002C78
|
||||
public void Dispose()
|
||||
{
|
||||
this.host.Dispose();
|
||||
}
|
||||
|
||||
// Token: 0x04000050 RID: 80
|
||||
private RBTree.NodeEnumerator host;
|
||||
|
||||
// Token: 0x04000051 RID: 81
|
||||
private TValue current;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Represents the collection of keys in a <see cref="T:System.Collections.Generic.SortedDictionary`2" />. This class cannot be inherited. </summary>
|
||||
// Token: 0x02000019 RID: 25
|
||||
[Serializable]
|
||||
public sealed class KeyCollection : ICollection, IEnumerable, ICollection<TKey>, IEnumerable<TKey>
|
||||
{
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.Generic.SortedDictionary`2.KeyCollection" /> class that reflects the keys in the specified <see cref="T:System.Collections.Generic.SortedDictionary`2" />.</summary>
|
||||
/// <param name="dictionary">The <see cref="T:System.Collections.Generic.SortedDictionary`2" /> whose keys are reflected in the new <see cref="T:System.Collections.Generic.SortedDictionary`2.KeyCollection" />.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="dictionary" /> is null.</exception>
|
||||
// Token: 0x060000CA RID: 202 RVA: 0x00004A88 File Offset: 0x00002C88
|
||||
public KeyCollection(SortedDictionary<TKey, TValue> dic)
|
||||
{
|
||||
this._dic = dic;
|
||||
}
|
||||
|
||||
// Token: 0x060000CB RID: 203 RVA: 0x00004A98 File Offset: 0x00002C98
|
||||
void ICollection<TKey>.Add(TKey item)
|
||||
{
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
|
||||
// Token: 0x060000CC RID: 204 RVA: 0x00004AA0 File Offset: 0x00002CA0
|
||||
void ICollection<TKey>.Clear()
|
||||
{
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
|
||||
// Token: 0x060000CD RID: 205 RVA: 0x00004AA8 File Offset: 0x00002CA8
|
||||
bool ICollection<TKey>.Contains(TKey item)
|
||||
{
|
||||
return this._dic.ContainsKey(item);
|
||||
}
|
||||
|
||||
// Token: 0x060000CE RID: 206 RVA: 0x00004AB8 File Offset: 0x00002CB8
|
||||
IEnumerator<TKey> IEnumerable<TKey>.GetEnumerator()
|
||||
{
|
||||
return this.GetEnumerator();
|
||||
}
|
||||
|
||||
// Token: 0x17000030 RID: 48
|
||||
// (get) Token: 0x060000CF RID: 207 RVA: 0x00004AC8 File Offset: 0x00002CC8
|
||||
bool ICollection<TKey>.IsReadOnly
|
||||
{
|
||||
get
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060000D0 RID: 208 RVA: 0x00004ACC File Offset: 0x00002CCC
|
||||
bool ICollection<TKey>.Remove(TKey item)
|
||||
{
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
|
||||
/// <summary>Copies the elements of the <see cref="T:System.Collections.ICollection" /> to an array, starting at a particular array index.</summary>
|
||||
/// <param name="array">The one-dimensional array that is the destination of the elements copied from the <see cref="T:System.Collections.ICollection" />. 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.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: 0x060000D1 RID: 209 RVA: 0x00004AD4 File Offset: 0x00002CD4
|
||||
void ICollection.CopyTo(Array array, int index)
|
||||
{
|
||||
if (this.Count == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (array == null)
|
||||
{
|
||||
throw new ArgumentNullException();
|
||||
}
|
||||
if (index < 0 || array.Length <= index)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException();
|
||||
}
|
||||
if (array.Length - index < this.Count)
|
||||
{
|
||||
throw new ArgumentException();
|
||||
}
|
||||
foreach (RBTree.Node node in this._dic.tree)
|
||||
{
|
||||
SortedDictionary<TKey, TValue>.Node node2 = (SortedDictionary<TKey, TValue>.Node)node;
|
||||
array.SetValue(node2.key, index++);
|
||||
}
|
||||
}
|
||||
|
||||
/// <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.SortedDictionary`2.KeyCollection" />, this property always returns false.</returns>
|
||||
// Token: 0x17000031 RID: 49
|
||||
// (get) Token: 0x060000D2 RID: 210 RVA: 0x00004BA0 File Offset: 0x00002DA0
|
||||
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.SortedDictionary`2.KeyCollection" />, this property always returns the current instance.</returns>
|
||||
// Token: 0x17000032 RID: 50
|
||||
// (get) Token: 0x060000D3 RID: 211 RVA: 0x00004BA4 File Offset: 0x00002DA4
|
||||
object ICollection.SyncRoot
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._dic;
|
||||
}
|
||||
}
|
||||
|
||||
/// <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: 0x060000D4 RID: 212 RVA: 0x00004BAC File Offset: 0x00002DAC
|
||||
IEnumerator IEnumerable.GetEnumerator()
|
||||
{
|
||||
return new SortedDictionary<TKey, TValue>.KeyCollection.Enumerator(this._dic);
|
||||
}
|
||||
|
||||
/// <summary>Copies the <see cref="T:System.Collections.Generic.SortedDictionary`2.KeyCollection" /> elements to an existing one-dimensional array, starting at the specified array index.</summary>
|
||||
/// <param name="array">The one-dimensional array that is the destination of the elements copied from the <see cref="T:System.Collections.Generic.SortedDictionary`2.KeyCollection" />. 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">The number of elements in the source <see cref="T:System.Collections.Generic.SortedDictionary`2.KeyCollection" /> is greater than the available space from <paramref name="index" /> to the end of the destination <paramref name="array" />.</exception>
|
||||
// Token: 0x060000D5 RID: 213 RVA: 0x00004BC0 File Offset: 0x00002DC0
|
||||
public void CopyTo(TKey[] array, int arrayIndex)
|
||||
{
|
||||
if (this.Count == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (array == null)
|
||||
{
|
||||
throw new ArgumentNullException();
|
||||
}
|
||||
if (arrayIndex < 0 || array.Length <= arrayIndex)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException();
|
||||
}
|
||||
if (array.Length - arrayIndex < this.Count)
|
||||
{
|
||||
throw new ArgumentException();
|
||||
}
|
||||
foreach (RBTree.Node node in this._dic.tree)
|
||||
{
|
||||
SortedDictionary<TKey, TValue>.Node node2 = (SortedDictionary<TKey, TValue>.Node)node;
|
||||
array[arrayIndex++] = node2.key;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets the number of elements contained in the <see cref="T:System.Collections.Generic.SortedDictionary`2.KeyCollection" />.</summary>
|
||||
/// <returns>The number of elements contained in the <see cref="T:System.Collections.Generic.SortedDictionary`2.KeyCollection" />.</returns>
|
||||
// Token: 0x17000033 RID: 51
|
||||
// (get) Token: 0x060000D6 RID: 214 RVA: 0x00004C80 File Offset: 0x00002E80
|
||||
public int Count
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._dic.Count;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Returns an enumerator that iterates through the <see cref="T:System.Collections.Generic.SortedDictionary`2.KeyCollection" />.</summary>
|
||||
/// <returns>A <see cref="T:System.Collections.Generic.SortedDictionary`2.KeyCollection.Enumerator" /> structure for the <see cref="T:System.Collections.Generic.SortedDictionary`2.KeyCollection" />.</returns>
|
||||
// Token: 0x060000D7 RID: 215 RVA: 0x00004C90 File Offset: 0x00002E90
|
||||
public SortedDictionary<TKey, TValue>.KeyCollection.Enumerator GetEnumerator()
|
||||
{
|
||||
return new SortedDictionary<TKey, TValue>.KeyCollection.Enumerator(this._dic);
|
||||
}
|
||||
|
||||
// Token: 0x04000052 RID: 82
|
||||
private SortedDictionary<TKey, TValue> _dic;
|
||||
|
||||
/// <summary>Enumerates the elements of a <see cref="T:System.Collections.Generic.SortedDictionary`2.KeyCollection" />.</summary>
|
||||
// Token: 0x0200001A RID: 26
|
||||
public struct Enumerator : IEnumerator, IDisposable, IEnumerator<TKey>
|
||||
{
|
||||
// Token: 0x060000D8 RID: 216 RVA: 0x00004CA0 File Offset: 0x00002EA0
|
||||
internal Enumerator(SortedDictionary<TKey, TValue> dic)
|
||||
{
|
||||
this.host = dic.tree.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: 0x17000034 RID: 52
|
||||
// (get) Token: 0x060000D9 RID: 217 RVA: 0x00004CB4 File Offset: 0x00002EB4
|
||||
object IEnumerator.Current
|
||||
{
|
||||
get
|
||||
{
|
||||
this.host.check_current();
|
||||
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: 0x060000DA RID: 218 RVA: 0x00004CCC File Offset: 0x00002ECC
|
||||
void IEnumerator.Reset()
|
||||
{
|
||||
this.host.Reset();
|
||||
}
|
||||
|
||||
/// <summary>Gets the element at the current position of the enumerator.</summary>
|
||||
/// <returns>The element in the <see cref="T:System.Collections.Generic.SortedDictionary`2.KeyCollection" /> at the current position of the enumerator.</returns>
|
||||
// Token: 0x17000035 RID: 53
|
||||
// (get) Token: 0x060000DB RID: 219 RVA: 0x00004CDC File Offset: 0x00002EDC
|
||||
public TKey Current
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.current;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Advances the enumerator to the next element of the <see cref="T:System.Collections.Generic.SortedDictionary`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: 0x060000DC RID: 220 RVA: 0x00004CE4 File Offset: 0x00002EE4
|
||||
public bool MoveNext()
|
||||
{
|
||||
if (!this.host.MoveNext())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
this.current = ((SortedDictionary<TKey, TValue>.Node)this.host.Current).key;
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>Releases all resources used by the <see cref="T:System.Collections.Generic.SortedDictionary`2.KeyCollection.Enumerator" />.</summary>
|
||||
// Token: 0x060000DD RID: 221 RVA: 0x00004D20 File Offset: 0x00002F20
|
||||
public void Dispose()
|
||||
{
|
||||
this.host.Dispose();
|
||||
}
|
||||
|
||||
// Token: 0x04000053 RID: 83
|
||||
private RBTree.NodeEnumerator host;
|
||||
|
||||
// Token: 0x04000054 RID: 84
|
||||
private TKey current;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Enumerates the elements of a <see cref="T:System.Collections.Generic.SortedDictionary`2" />.</summary>
|
||||
// Token: 0x0200001B RID: 27
|
||||
public struct Enumerator : IEnumerator, IDisposable, IEnumerator<KeyValuePair<TKey, TValue>>, IDictionaryEnumerator
|
||||
{
|
||||
// Token: 0x060000DE RID: 222 RVA: 0x00004D30 File Offset: 0x00002F30
|
||||
internal Enumerator(SortedDictionary<TKey, TValue> dic)
|
||||
{
|
||||
this.host = dic.tree.GetEnumerator();
|
||||
}
|
||||
|
||||
/// <summary>Gets the element at the current position of the enumerator as a <see cref="T:System.Collections.DictionaryEntry" /> structure.</summary>
|
||||
/// <returns>The element in the collection at the current position of the dictionary, as a <see cref="T:System.Collections.DictionaryEntry" /> structure.</returns>
|
||||
/// <exception cref="T:System.InvalidOperationException">The enumerator is positioned before the first element of the collection or after the last element. </exception>
|
||||
// Token: 0x17000036 RID: 54
|
||||
// (get) Token: 0x060000DF RID: 223 RVA: 0x00004D44 File Offset: 0x00002F44
|
||||
DictionaryEntry IDictionaryEnumerator.Entry
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.CurrentNode.AsDE();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets the key of the element at the current position of the enumerator.</summary>
|
||||
/// <returns>The key of 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: 0x17000037 RID: 55
|
||||
// (get) Token: 0x060000E0 RID: 224 RVA: 0x00004D54 File Offset: 0x00002F54
|
||||
object IDictionaryEnumerator.Key
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.CurrentNode.key;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets the value of the element at the current position of the enumerator.</summary>
|
||||
/// <returns>The value of 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: 0x17000038 RID: 56
|
||||
// (get) Token: 0x060000E1 RID: 225 RVA: 0x00004D68 File Offset: 0x00002F68
|
||||
object IDictionaryEnumerator.Value
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.CurrentNode.value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <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: 0x17000039 RID: 57
|
||||
// (get) Token: 0x060000E2 RID: 226 RVA: 0x00004D7C File Offset: 0x00002F7C
|
||||
object IEnumerator.Current
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.CurrentNode.AsDE();
|
||||
}
|
||||
}
|
||||
|
||||
/// <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: 0x060000E3 RID: 227 RVA: 0x00004D90 File Offset: 0x00002F90
|
||||
void IEnumerator.Reset()
|
||||
{
|
||||
this.host.Reset();
|
||||
}
|
||||
|
||||
/// <summary>Gets the element at the current position of the enumerator.</summary>
|
||||
/// <returns>The element in the <see cref="T:System.Collections.Generic.SortedDictionary`2" /> at the current position of the enumerator.</returns>
|
||||
// Token: 0x1700003A RID: 58
|
||||
// (get) Token: 0x060000E4 RID: 228 RVA: 0x00004DA0 File Offset: 0x00002FA0
|
||||
public KeyValuePair<TKey, TValue> Current
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.current;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Advances the enumerator to the next element of the <see cref="T:System.Collections.Generic.SortedDictionary`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: 0x060000E5 RID: 229 RVA: 0x00004DA8 File Offset: 0x00002FA8
|
||||
public bool MoveNext()
|
||||
{
|
||||
if (!this.host.MoveNext())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
this.current = ((SortedDictionary<TKey, TValue>.Node)this.host.Current).AsKV();
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>Releases all resources used by the <see cref="T:System.Collections.Generic.SortedDictionary`2.Enumerator" />.</summary>
|
||||
// Token: 0x060000E6 RID: 230 RVA: 0x00004DE4 File Offset: 0x00002FE4
|
||||
public void Dispose()
|
||||
{
|
||||
this.host.Dispose();
|
||||
}
|
||||
|
||||
// Token: 0x1700003B RID: 59
|
||||
// (get) Token: 0x060000E7 RID: 231 RVA: 0x00004DF4 File Offset: 0x00002FF4
|
||||
private SortedDictionary<TKey, TValue>.Node CurrentNode
|
||||
{
|
||||
get
|
||||
{
|
||||
this.host.check_current();
|
||||
return (SortedDictionary<TKey, TValue>.Node)this.host.Current;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04000055 RID: 85
|
||||
private RBTree.NodeEnumerator host;
|
||||
|
||||
// Token: 0x04000056 RID: 86
|
||||
private KeyValuePair<TKey, TValue> current;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,1601 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.Collections.Generic
|
||||
{
|
||||
/// <summary>Represents a collection of key/value pairs that are sorted by key based on the associated <see cref="T:System.Collections.Generic.IComparer`1" /> implementation.</summary>
|
||||
/// <typeparam name="TKey">The type of keys in the collection.</typeparam>
|
||||
/// <typeparam name="TValue">The type of values in the collection.</typeparam>
|
||||
// Token: 0x0200001C RID: 28
|
||||
[ComVisible(false)]
|
||||
[Serializable]
|
||||
public class SortedList<TKey, TValue> : ICollection, IDictionary, ICollection<KeyValuePair<TKey, TValue>>, IEnumerable<KeyValuePair<TKey, TValue>>, IEnumerable, IDictionary<TKey, TValue>
|
||||
{
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.Generic.SortedList`2" /> class that is empty, has the default initial capacity, and uses the default <see cref="T:System.Collections.Generic.IComparer`1" />.</summary>
|
||||
// Token: 0x060000E8 RID: 232 RVA: 0x00004E14 File Offset: 0x00003014
|
||||
public SortedList()
|
||||
: this(SortedList<TKey, TValue>.INITIAL_SIZE, null)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.Generic.SortedList`2" /> class that is empty, has the specified initial capacity, and uses the default <see cref="T:System.Collections.Generic.IComparer`1" />.</summary>
|
||||
/// <param name="capacity">The initial number of elements that the <see cref="T:System.Collections.Generic.SortedList`2" /> can contain.</param>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="capacity" /> is less than zero.</exception>
|
||||
// Token: 0x060000E9 RID: 233 RVA: 0x00004E24 File Offset: 0x00003024
|
||||
public SortedList(int capacity)
|
||||
: this(capacity, null)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.Generic.SortedList`2" /> class that is empty, has the specified initial capacity, and uses the specified <see cref="T:System.Collections.Generic.IComparer`1" />.</summary>
|
||||
/// <param name="capacity">The initial number of elements that the <see cref="T:System.Collections.Generic.SortedList`2" /> can contain.</param>
|
||||
/// <param name="comparer">The <see cref="T:System.Collections.Generic.IComparer`1" /> implementation to use when comparing keys.-or-null to use the default <see cref="T:System.Collections.Generic.Comparer`1" /> for the type of the key.</param>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="capacity" /> is less than zero.</exception>
|
||||
// Token: 0x060000EA RID: 234 RVA: 0x00004E30 File Offset: 0x00003030
|
||||
public SortedList(int capacity, IComparer<TKey> comparer)
|
||||
{
|
||||
if (capacity < 0)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException("initialCapacity");
|
||||
}
|
||||
if (capacity == 0)
|
||||
{
|
||||
this.defaultCapacity = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.defaultCapacity = SortedList<TKey, TValue>.INITIAL_SIZE;
|
||||
}
|
||||
this.Init(comparer, capacity, true);
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.Generic.SortedList`2" /> class that is empty, has the default initial capacity, and uses the specified <see cref="T:System.Collections.Generic.IComparer`1" />.</summary>
|
||||
/// <param name="comparer">The <see cref="T:System.Collections.Generic.IComparer`1" /> implementation to use when comparing keys.-or-null to use the default <see cref="T:System.Collections.Generic.Comparer`1" /> for the type of the key.</param>
|
||||
// Token: 0x060000EB RID: 235 RVA: 0x00004E7C File Offset: 0x0000307C
|
||||
public SortedList(IComparer<TKey> comparer)
|
||||
: this(SortedList<TKey, TValue>.INITIAL_SIZE, comparer)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.Generic.SortedList`2" /> class that contains elements copied from the specified <see cref="T:System.Collections.Generic.IDictionary`2" />, has sufficient capacity to accommodate the number of elements copied, and uses the default <see cref="T:System.Collections.Generic.IComparer`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.SortedList`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: 0x060000EC RID: 236 RVA: 0x00004E8C File Offset: 0x0000308C
|
||||
public SortedList(IDictionary<TKey, TValue> dictionary)
|
||||
: this(dictionary, null)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.Generic.SortedList`2" /> class that contains elements copied from the specified <see cref="T:System.Collections.Generic.IDictionary`2" />, has sufficient capacity to accommodate the number of elements copied, and uses the specified <see cref="T:System.Collections.Generic.IComparer`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.SortedList`2" />.</param>
|
||||
/// <param name="comparer">The <see cref="T:System.Collections.Generic.IComparer`1" /> implementation to use when comparing keys.-or-null to use the default <see cref="T:System.Collections.Generic.Comparer`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: 0x060000ED RID: 237 RVA: 0x00004E98 File Offset: 0x00003098
|
||||
public SortedList(IDictionary<TKey, TValue> dictionary, IComparer<TKey> comparer)
|
||||
{
|
||||
if (dictionary == null)
|
||||
{
|
||||
throw new ArgumentNullException("dictionary");
|
||||
}
|
||||
this.Init(comparer, dictionary.Count, true);
|
||||
foreach (KeyValuePair<TKey, TValue> keyValuePair in dictionary)
|
||||
{
|
||||
this.Add(keyValuePair.Key, keyValuePair.Value);
|
||||
}
|
||||
}
|
||||
|
||||
/// <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.SortedList`2" />, this property always returns false.</returns>
|
||||
// Token: 0x1700003C RID: 60
|
||||
// (get) Token: 0x060000EF RID: 239 RVA: 0x00004F34 File Offset: 0x00003134
|
||||
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.SortedList`2" />, this property always returns the current instance.</returns>
|
||||
// Token: 0x1700003D RID: 61
|
||||
// (get) Token: 0x060000F0 RID: 240 RVA: 0x00004F38 File Offset: 0x00003138
|
||||
object ICollection.SyncRoot
|
||||
{
|
||||
get
|
||||
{
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
/// <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.SortedList`2" />, this property always returns false.</returns>
|
||||
// Token: 0x1700003E RID: 62
|
||||
// (get) Token: 0x060000F1 RID: 241 RVA: 0x00004F3C File Offset: 0x0000313C
|
||||
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.SortedList`2" />, this property always returns false.</returns>
|
||||
// Token: 0x1700003F RID: 63
|
||||
// (get) Token: 0x060000F2 RID: 242 RVA: 0x00004F40 File Offset: 0x00003140
|
||||
bool IDictionary.IsReadOnly
|
||||
{
|
||||
get
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets or sets the element with the specified key.</summary>
|
||||
/// <returns>The element 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.SortedList`2" />.</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.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.SortedList`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.SortedList`2" />.</exception>
|
||||
// Token: 0x17000040 RID: 64
|
||||
object IDictionary.this[object key]
|
||||
{
|
||||
get
|
||||
{
|
||||
if (!(key is TKey))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
return this[(TKey)((object)key)];
|
||||
}
|
||||
set
|
||||
{
|
||||
this[this.ToKey(key)] = this.ToValue(value);
|
||||
}
|
||||
}
|
||||
|
||||
/// <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: 0x17000041 RID: 65
|
||||
// (get) Token: 0x060000F5 RID: 245 RVA: 0x00004F7C File Offset: 0x0000317C
|
||||
ICollection IDictionary.Keys
|
||||
{
|
||||
get
|
||||
{
|
||||
return new SortedList<TKey, TValue>.ListKeys(this);
|
||||
}
|
||||
}
|
||||
|
||||
/// <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: 0x17000042 RID: 66
|
||||
// (get) Token: 0x060000F6 RID: 246 RVA: 0x00004F84 File Offset: 0x00003184
|
||||
ICollection IDictionary.Values
|
||||
{
|
||||
get
|
||||
{
|
||||
return new SortedList<TKey, TValue>.ListValues(this);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000043 RID: 67
|
||||
// (get) Token: 0x060000F7 RID: 247 RVA: 0x00004F8C File Offset: 0x0000318C
|
||||
ICollection<TKey> IDictionary<TKey, TValue>.Keys
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Keys;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000044 RID: 68
|
||||
// (get) Token: 0x060000F8 RID: 248 RVA: 0x00004F94 File Offset: 0x00003194
|
||||
ICollection<TValue> IDictionary<TKey, TValue>.Values
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Values;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000045 RID: 69
|
||||
// (get) Token: 0x060000F9 RID: 249 RVA: 0x00004F9C File Offset: 0x0000319C
|
||||
bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly
|
||||
{
|
||||
get
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060000FA RID: 250 RVA: 0x00004FA0 File Offset: 0x000031A0
|
||||
void ICollection<KeyValuePair<TKey, TValue>>.Clear()
|
||||
{
|
||||
this.defaultCapacity = SortedList<TKey, TValue>.INITIAL_SIZE;
|
||||
this.table = new KeyValuePair<TKey, TValue>[this.defaultCapacity];
|
||||
this.inUse = 0;
|
||||
this.modificationCount++;
|
||||
}
|
||||
|
||||
// Token: 0x060000FB RID: 251 RVA: 0x00004FD4 File Offset: 0x000031D4
|
||||
void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex)
|
||||
{
|
||||
if (this.Count == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (array == null)
|
||||
{
|
||||
throw new ArgumentNullException();
|
||||
}
|
||||
if (arrayIndex < 0)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException();
|
||||
}
|
||||
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");
|
||||
}
|
||||
int num = arrayIndex;
|
||||
foreach (KeyValuePair<TKey, TValue> keyValuePair in this)
|
||||
{
|
||||
array[num++] = keyValuePair;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060000FC RID: 252 RVA: 0x00005094 File Offset: 0x00003294
|
||||
void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> keyValuePair)
|
||||
{
|
||||
this.Add(keyValuePair.Key, keyValuePair.Value);
|
||||
}
|
||||
|
||||
// Token: 0x060000FD RID: 253 RVA: 0x000050AC File Offset: 0x000032AC
|
||||
bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> keyValuePair)
|
||||
{
|
||||
int num = this.Find(keyValuePair.Key);
|
||||
return num >= 0 && Comparer<KeyValuePair<TKey, TValue>>.Default.Compare(this.table[num], keyValuePair) == 0;
|
||||
}
|
||||
|
||||
// Token: 0x060000FE RID: 254 RVA: 0x000050F0 File Offset: 0x000032F0
|
||||
bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> keyValuePair)
|
||||
{
|
||||
int num = this.Find(keyValuePair.Key);
|
||||
if (num >= 0 && Comparer<KeyValuePair<TKey, TValue>>.Default.Compare(this.table[num], keyValuePair) == 0)
|
||||
{
|
||||
this.RemoveAt(num);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// Token: 0x060000FF RID: 255 RVA: 0x00005140 File Offset: 0x00003340
|
||||
IEnumerator<KeyValuePair<TKey, TValue>> IEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator()
|
||||
{
|
||||
for (int i = 0; i < this.inUse; i++)
|
||||
{
|
||||
KeyValuePair<TKey, TValue> current = this.table[i];
|
||||
yield return new KeyValuePair<TKey, TValue>(current.Key, current.Value);
|
||||
}
|
||||
yield break;
|
||||
}
|
||||
|
||||
/// <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: 0x06000100 RID: 256 RVA: 0x0000515C File Offset: 0x0000335C
|
||||
IEnumerator IEnumerable.GetEnumerator()
|
||||
{
|
||||
return this.GetEnumerator();
|
||||
}
|
||||
|
||||
/// <summary>Adds an element with the provided key and value to the <see cref="T:System.Collections.IDictionary" />.</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">
|
||||
/// <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.IDictionary" />.-or-<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.IDictionary" />.-or-An element with the same key already exists in the <see cref="T:System.Collections.IDictionary" />.</exception>
|
||||
// Token: 0x06000101 RID: 257 RVA: 0x00005164 File Offset: 0x00003364
|
||||
void IDictionary.Add(object key, object value)
|
||||
{
|
||||
this.PutImpl(this.ToKey(key), this.ToValue(value), false);
|
||||
}
|
||||
|
||||
/// <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 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: 0x06000102 RID: 258 RVA: 0x00005188 File Offset: 0x00003388
|
||||
bool IDictionary.Contains(object key)
|
||||
{
|
||||
if (key == null)
|
||||
{
|
||||
throw new ArgumentNullException();
|
||||
}
|
||||
return key is TKey && this.Find((TKey)((object)key)) >= 0;
|
||||
}
|
||||
|
||||
/// <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: 0x06000103 RID: 259 RVA: 0x000051B8 File Offset: 0x000033B8
|
||||
IDictionaryEnumerator IDictionary.GetEnumerator()
|
||||
{
|
||||
return new SortedList<TKey, TValue>.Enumerator(this, SortedList<TKey, TValue>.EnumeratorMode.ENTRY_MODE);
|
||||
}
|
||||
|
||||
/// <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: 0x06000104 RID: 260 RVA: 0x000051C4 File Offset: 0x000033C4
|
||||
void IDictionary.Remove(object key)
|
||||
{
|
||||
if (key == null)
|
||||
{
|
||||
throw new ArgumentNullException("key");
|
||||
}
|
||||
if (!(key is TKey))
|
||||
{
|
||||
return;
|
||||
}
|
||||
int num = this.IndexOfKey((TKey)((object)key));
|
||||
if (num >= 0)
|
||||
{
|
||||
this.RemoveAt(num);
|
||||
}
|
||||
}
|
||||
|
||||
/// <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 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="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: 0x06000105 RID: 261 RVA: 0x0000520C File Offset: 0x0000340C
|
||||
void ICollection.CopyTo(Array array, int arrayIndex)
|
||||
{
|
||||
if (this.Count == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
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");
|
||||
}
|
||||
IEnumerator<KeyValuePair<TKey, TValue>> enumerator = this.GetEnumerator();
|
||||
int num = arrayIndex;
|
||||
while (enumerator.MoveNext())
|
||||
{
|
||||
KeyValuePair<TKey, TValue> keyValuePair = enumerator.Current;
|
||||
array.SetValue(keyValuePair, num++);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets the number of key/value pairs contained in the <see cref="T:System.Collections.Generic.SortedList`2" />.</summary>
|
||||
/// <returns>The number of key/value pairs contained in the <see cref="T:System.Collections.Generic.SortedList`2" />.</returns>
|
||||
// Token: 0x17000046 RID: 70
|
||||
// (get) Token: 0x06000106 RID: 262 RVA: 0x000052BC File Offset: 0x000034BC
|
||||
public int Count
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.inUse;
|
||||
}
|
||||
}
|
||||
|
||||
/// <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 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.Collections.Generic.KeyNotFoundException">The property is retrieved and <paramref name="key" /> does not exist in the collection.</exception>
|
||||
// Token: 0x17000047 RID: 71
|
||||
public TValue this[TKey key]
|
||||
{
|
||||
get
|
||||
{
|
||||
if (key == null)
|
||||
{
|
||||
throw new ArgumentNullException("key");
|
||||
}
|
||||
int num = this.Find(key);
|
||||
if (num >= 0)
|
||||
{
|
||||
return this.table[num].Value;
|
||||
}
|
||||
throw new KeyNotFoundException();
|
||||
}
|
||||
set
|
||||
{
|
||||
if (key == null)
|
||||
{
|
||||
throw new ArgumentNullException("key");
|
||||
}
|
||||
this.PutImpl(key, value, true);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets or sets the number of elements that the <see cref="T:System.Collections.Generic.SortedList`2" /> can contain.</summary>
|
||||
/// <returns>The number of elements that the <see cref="T:System.Collections.Generic.SortedList`2" /> can contain.</returns>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <see cref="P:System.Collections.Generic.SortedList`2.Capacity" /> is set to a value that is less than <see cref="P:System.Collections.Generic.SortedList`2.Count" />.</exception>
|
||||
/// <exception cref="T:System.OutOfMemoryException">There is not enough memory available on the system.</exception>
|
||||
// Token: 0x17000048 RID: 72
|
||||
// (get) Token: 0x06000109 RID: 265 RVA: 0x00005334 File Offset: 0x00003534
|
||||
// (set) Token: 0x0600010A RID: 266 RVA: 0x00005340 File Offset: 0x00003540
|
||||
public 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)
|
||||
{
|
||||
KeyValuePair<TKey, TValue>[] array = new KeyValuePair<TKey, TValue>[this.defaultCapacity];
|
||||
Array.Copy(this.table, array, this.inUse);
|
||||
this.table = array;
|
||||
}
|
||||
else if (value > this.inUse)
|
||||
{
|
||||
KeyValuePair<TKey, TValue>[] array2 = new KeyValuePair<TKey, TValue>[value];
|
||||
Array.Copy(this.table, array2, this.inUse);
|
||||
this.table = array2;
|
||||
}
|
||||
else if (value > num)
|
||||
{
|
||||
KeyValuePair<TKey, TValue>[] array3 = new KeyValuePair<TKey, TValue>[value];
|
||||
Array.Copy(this.table, array3, num);
|
||||
this.table = array3;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a collection containing the keys in the <see cref="T:System.Collections.Generic.SortedList`2" />.</summary>
|
||||
/// <returns>A <see cref="T:System.Collections.Generic.IList`1" /> containing the keys in the <see cref="T:System.Collections.Generic.SortedList`2" />.</returns>
|
||||
// Token: 0x17000049 RID: 73
|
||||
// (get) Token: 0x0600010B RID: 267 RVA: 0x000053F0 File Offset: 0x000035F0
|
||||
public IList<TKey> Keys
|
||||
{
|
||||
get
|
||||
{
|
||||
return new SortedList<TKey, TValue>.ListKeys(this);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a collection containing the values in the <see cref="T:System.Collections.Generic.SortedList`2" />.</summary>
|
||||
/// <returns>A <see cref="T:System.Collections.Generic.IList`1" /> containing the values in the <see cref="T:System.Collections.Generic.SortedList`2" />.</returns>
|
||||
// Token: 0x1700004A RID: 74
|
||||
// (get) Token: 0x0600010C RID: 268 RVA: 0x000053F8 File Offset: 0x000035F8
|
||||
public IList<TValue> Values
|
||||
{
|
||||
get
|
||||
{
|
||||
return new SortedList<TKey, TValue>.ListValues(this);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets the <see cref="T:System.Collections.Generic.IComparer`1" /> for the sorted list. </summary>
|
||||
/// <returns>The <see cref="T:System.IComparable`1" /> for the current <see cref="T:System.Collections.Generic.SortedList`2" />.</returns>
|
||||
// Token: 0x1700004B RID: 75
|
||||
// (get) Token: 0x0600010D RID: 269 RVA: 0x00005400 File Offset: 0x00003600
|
||||
public IComparer<TKey> Comparer
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.comparer;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Adds an element with the specified key and value into the <see cref="T:System.Collections.Generic.SortedList`2" />.</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.SortedList`2" />.</exception>
|
||||
// Token: 0x0600010E RID: 270 RVA: 0x00005408 File Offset: 0x00003608
|
||||
public void Add(TKey key, TValue value)
|
||||
{
|
||||
if (key == null)
|
||||
{
|
||||
throw new ArgumentNullException("key");
|
||||
}
|
||||
this.PutImpl(key, value, false);
|
||||
}
|
||||
|
||||
/// <summary>Determines whether the <see cref="T:System.Collections.Generic.SortedList`2" /> contains a specific key.</summary>
|
||||
/// <returns>true if the <see cref="T:System.Collections.Generic.SortedList`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.SortedList`2" />.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="key" /> is null.</exception>
|
||||
// Token: 0x0600010F RID: 271 RVA: 0x0000542C File Offset: 0x0000362C
|
||||
public bool ContainsKey(TKey key)
|
||||
{
|
||||
if (key == null)
|
||||
{
|
||||
throw new ArgumentNullException("key");
|
||||
}
|
||||
return this.Find(key) >= 0;
|
||||
}
|
||||
|
||||
/// <summary>Returns an enumerator that iterates through the <see cref="T:System.Collections.Generic.SortedList`2" />.</summary>
|
||||
/// <returns>An <see cref="T:System.Collections.Generic.IEnumerator`1" /> of type <see cref="T:System.Collections.Generic.KeyValuePair`2" /> for the <see cref="T:System.Collections.Generic.SortedList`2" />.</returns>
|
||||
// Token: 0x06000110 RID: 272 RVA: 0x00005454 File Offset: 0x00003654
|
||||
public IEnumerator<KeyValuePair<TKey, TValue>> GetEnumerator()
|
||||
{
|
||||
for (int i = 0; i < this.inUse; i++)
|
||||
{
|
||||
KeyValuePair<TKey, TValue> current = this.table[i];
|
||||
yield return new KeyValuePair<TKey, TValue>(current.Key, current.Value);
|
||||
}
|
||||
yield break;
|
||||
}
|
||||
|
||||
/// <summary>Removes the element with the specified key from the <see cref="T:System.Collections.Generic.SortedList`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.SortedList`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: 0x06000111 RID: 273 RVA: 0x00005470 File Offset: 0x00003670
|
||||
public bool Remove(TKey key)
|
||||
{
|
||||
if (key == null)
|
||||
{
|
||||
throw new ArgumentNullException("key");
|
||||
}
|
||||
int num = this.IndexOfKey(key);
|
||||
if (num >= 0)
|
||||
{
|
||||
this.RemoveAt(num);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/// <summary>Removes all elements from the <see cref="T:System.Collections.Generic.SortedList`2" />.</summary>
|
||||
// Token: 0x06000112 RID: 274 RVA: 0x000054AC File Offset: 0x000036AC
|
||||
public void Clear()
|
||||
{
|
||||
this.defaultCapacity = SortedList<TKey, TValue>.INITIAL_SIZE;
|
||||
this.table = new KeyValuePair<TKey, TValue>[this.defaultCapacity];
|
||||
this.inUse = 0;
|
||||
this.modificationCount++;
|
||||
}
|
||||
|
||||
/// <summary>Removes the element at the specified index of the <see cref="T:System.Collections.Generic.SortedList`2" />.</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.Generic.SortedList`2.Count" />.</exception>
|
||||
// Token: 0x06000113 RID: 275 RVA: 0x000054E0 File Offset: 0x000036E0
|
||||
public void RemoveAt(int index)
|
||||
{
|
||||
KeyValuePair<TKey, TValue>[] 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] = default(KeyValuePair<TKey, TValue>);
|
||||
}
|
||||
this.inUse--;
|
||||
this.modificationCount++;
|
||||
return;
|
||||
}
|
||||
throw new ArgumentOutOfRangeException("index out of range");
|
||||
}
|
||||
|
||||
/// <summary>Searches for the specified key and returns the zero-based index within the entire <see cref="T:System.Collections.Generic.SortedList`2" />.</summary>
|
||||
/// <returns>The zero-based index of <paramref name="key" /> within the entire <see cref="T:System.Collections.Generic.SortedList`2" />, if found; otherwise, -1.</returns>
|
||||
/// <param name="key">The key to locate in the <see cref="T:System.Collections.Generic.SortedList`2" />.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="key" /> is null.</exception>
|
||||
// Token: 0x06000114 RID: 276 RVA: 0x00005568 File Offset: 0x00003768
|
||||
public int IndexOfKey(TKey key)
|
||||
{
|
||||
if (key == null)
|
||||
{
|
||||
throw new ArgumentNullException("key");
|
||||
}
|
||||
int num = 0;
|
||||
try
|
||||
{
|
||||
num = this.Find(key);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
throw new InvalidOperationException();
|
||||
}
|
||||
return num | (num >> 31);
|
||||
}
|
||||
|
||||
/// <summary>Searches for the specified value and returns the zero-based index of the first occurrence within the entire <see cref="T:System.Collections.Generic.SortedList`2" />.</summary>
|
||||
/// <returns>The zero-based index of the first occurrence of <paramref name="value" /> within the entire <see cref="T:System.Collections.Generic.SortedList`2" />, if found; otherwise, -1.</returns>
|
||||
/// <param name="value">The value to locate in the <see cref="T:System.Collections.Generic.SortedList`2" />. The value can be null for reference types.</param>
|
||||
// Token: 0x06000115 RID: 277 RVA: 0x000055C8 File Offset: 0x000037C8
|
||||
public int IndexOfValue(TValue value)
|
||||
{
|
||||
if (this.inUse == 0)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
for (int i = 0; i < this.inUse; i++)
|
||||
{
|
||||
KeyValuePair<TKey, TValue> keyValuePair = this.table[i];
|
||||
if (object.Equals(value, keyValuePair.Value))
|
||||
{
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
/// <summary>Determines whether the <see cref="T:System.Collections.Generic.SortedList`2" /> contains a specific value.</summary>
|
||||
/// <returns>true if the <see cref="T:System.Collections.Generic.SortedList`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.SortedList`2" />. The value can be null for reference types.</param>
|
||||
// Token: 0x06000116 RID: 278 RVA: 0x0000562C File Offset: 0x0000382C
|
||||
public bool ContainsValue(TValue value)
|
||||
{
|
||||
return this.IndexOfValue(value) >= 0;
|
||||
}
|
||||
|
||||
/// <summary>Sets the capacity to the actual number of elements in the <see cref="T:System.Collections.Generic.SortedList`2" />, if that number is less than 90 percent of current capacity.</summary>
|
||||
// Token: 0x06000117 RID: 279 RVA: 0x0000563C File Offset: 0x0000383C
|
||||
public void TrimExcess()
|
||||
{
|
||||
if ((double)this.inUse < (double)this.table.Length * 0.9)
|
||||
{
|
||||
this.Capacity = this.inUse;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets the value associated with the specified key.</summary>
|
||||
/// <returns>true if the <see cref="T:System.Collections.Generic.SortedList`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: 0x06000118 RID: 280 RVA: 0x0000566C File Offset: 0x0000386C
|
||||
public bool TryGetValue(TKey key, out TValue value)
|
||||
{
|
||||
if (key == null)
|
||||
{
|
||||
throw new ArgumentNullException("key");
|
||||
}
|
||||
int num = this.Find(key);
|
||||
if (num >= 0)
|
||||
{
|
||||
value = this.table[num].Value;
|
||||
return true;
|
||||
}
|
||||
value = default(TValue);
|
||||
return false;
|
||||
}
|
||||
|
||||
// Token: 0x06000119 RID: 281 RVA: 0x000056C8 File Offset: 0x000038C8
|
||||
private void EnsureCapacity(int n, int free)
|
||||
{
|
||||
KeyValuePair<TKey, TValue>[] array = this.table;
|
||||
KeyValuePair<TKey, TValue>[] array2 = null;
|
||||
int capacity = this.Capacity;
|
||||
bool flag = free >= 0 && free < this.Count;
|
||||
if (n > capacity)
|
||||
{
|
||||
array2 = new KeyValuePair<TKey, TValue>[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: 0x0600011A RID: 282 RVA: 0x00005784 File Offset: 0x00003984
|
||||
private void PutImpl(TKey key, TValue value, bool overwrite)
|
||||
{
|
||||
if (key == null)
|
||||
{
|
||||
throw new ArgumentNullException("null key");
|
||||
}
|
||||
KeyValuePair<TKey, TValue>[] array = this.table;
|
||||
int num = -1;
|
||||
try
|
||||
{
|
||||
num = this.Find(key);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
throw new InvalidOperationException();
|
||||
}
|
||||
if (num >= 0)
|
||||
{
|
||||
if (!overwrite)
|
||||
{
|
||||
throw new ArgumentException("element already exists");
|
||||
}
|
||||
array[num] = new KeyValuePair<TKey, TValue>(key, 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] = new KeyValuePair<TKey, TValue>(key, value);
|
||||
this.inUse++;
|
||||
this.modificationCount++;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600011B RID: 283 RVA: 0x000058C4 File Offset: 0x00003AC4
|
||||
private void Init(IComparer<TKey> comparer, int capacity, bool forceSize)
|
||||
{
|
||||
if (comparer == null)
|
||||
{
|
||||
comparer = Comparer<TKey>.Default;
|
||||
}
|
||||
this.comparer = comparer;
|
||||
if (!forceSize && capacity < this.defaultCapacity)
|
||||
{
|
||||
capacity = this.defaultCapacity;
|
||||
}
|
||||
this.table = new KeyValuePair<TKey, TValue>[capacity];
|
||||
this.inUse = 0;
|
||||
this.modificationCount = 0;
|
||||
}
|
||||
|
||||
// Token: 0x0600011C RID: 284 RVA: 0x0000591C File Offset: 0x00003B1C
|
||||
private void CopyToArray(Array arr, int i, SortedList<TKey, TValue>.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<TKey, TValue>.Enumerator(this, mode);
|
||||
while (enumerator.MoveNext())
|
||||
{
|
||||
object obj = enumerator.Current;
|
||||
arr.SetValue(obj, i++);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600011D RID: 285 RVA: 0x0000598C File Offset: 0x00003B8C
|
||||
private int Find(TKey key)
|
||||
{
|
||||
KeyValuePair<TKey, TValue>[] array = this.table;
|
||||
int count = this.Count;
|
||||
if (count == 0)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
int i = 0;
|
||||
int num = count - 1;
|
||||
while (i <= num)
|
||||
{
|
||||
int num2 = i + num >> 1;
|
||||
int num3 = this.comparer.Compare(array[num2].Key, key);
|
||||
if (num3 == 0)
|
||||
{
|
||||
return num2;
|
||||
}
|
||||
if (num3 < 0)
|
||||
{
|
||||
i = num2 + 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
num = num2 - 1;
|
||||
}
|
||||
}
|
||||
return ~i;
|
||||
}
|
||||
|
||||
// Token: 0x0600011E RID: 286 RVA: 0x00005A08 File Offset: 0x00003C08
|
||||
private TKey ToKey(object key)
|
||||
{
|
||||
if (key == null)
|
||||
{
|
||||
throw new ArgumentNullException("key");
|
||||
}
|
||||
if (!(key is TKey))
|
||||
{
|
||||
throw new ArgumentException(string.Concat(new object[]
|
||||
{
|
||||
"The value \"",
|
||||
key,
|
||||
"\" isn't of type \"",
|
||||
typeof(TKey),
|
||||
"\" and can't be used in this generic collection."
|
||||
}), "key");
|
||||
}
|
||||
return (TKey)((object)key);
|
||||
}
|
||||
|
||||
// Token: 0x0600011F RID: 287 RVA: 0x00005A78 File Offset: 0x00003C78
|
||||
private TValue ToValue(object value)
|
||||
{
|
||||
if (!(value is TValue))
|
||||
{
|
||||
throw new ArgumentException(string.Concat(new object[]
|
||||
{
|
||||
"The value \"",
|
||||
value,
|
||||
"\" isn't of type \"",
|
||||
typeof(TValue),
|
||||
"\" and can't be used in this generic collection."
|
||||
}), "value");
|
||||
}
|
||||
return (TValue)((object)value);
|
||||
}
|
||||
|
||||
// Token: 0x06000120 RID: 288 RVA: 0x00005AD8 File Offset: 0x00003CD8
|
||||
internal TKey KeyAt(int index)
|
||||
{
|
||||
if (index >= 0 && index < this.Count)
|
||||
{
|
||||
return this.table[index].Key;
|
||||
}
|
||||
throw new ArgumentOutOfRangeException("Index out of range");
|
||||
}
|
||||
|
||||
// Token: 0x06000121 RID: 289 RVA: 0x00005B0C File Offset: 0x00003D0C
|
||||
internal TValue ValueAt(int index)
|
||||
{
|
||||
if (index >= 0 && index < this.Count)
|
||||
{
|
||||
return this.table[index].Value;
|
||||
}
|
||||
throw new ArgumentOutOfRangeException("Index out of range");
|
||||
}
|
||||
|
||||
// Token: 0x04000057 RID: 87
|
||||
private static readonly int INITIAL_SIZE = 16;
|
||||
|
||||
// Token: 0x04000058 RID: 88
|
||||
private int inUse;
|
||||
|
||||
// Token: 0x04000059 RID: 89
|
||||
private int modificationCount;
|
||||
|
||||
// Token: 0x0400005A RID: 90
|
||||
private KeyValuePair<TKey, TValue>[] table;
|
||||
|
||||
// Token: 0x0400005B RID: 91
|
||||
private IComparer<TKey> comparer;
|
||||
|
||||
// Token: 0x0400005C RID: 92
|
||||
private int defaultCapacity;
|
||||
|
||||
// Token: 0x0200001D RID: 29
|
||||
private enum EnumeratorMode
|
||||
{
|
||||
// Token: 0x0400005E RID: 94
|
||||
KEY_MODE,
|
||||
// Token: 0x0400005F RID: 95
|
||||
VALUE_MODE,
|
||||
// Token: 0x04000060 RID: 96
|
||||
ENTRY_MODE
|
||||
}
|
||||
|
||||
// Token: 0x0200001E RID: 30
|
||||
private sealed class Enumerator : IEnumerator, IDictionaryEnumerator, ICloneable
|
||||
{
|
||||
// Token: 0x06000122 RID: 290 RVA: 0x00005B40 File Offset: 0x00003D40
|
||||
public Enumerator(SortedList<TKey, TValue> host, SortedList<TKey, TValue>.EnumeratorMode mode)
|
||||
{
|
||||
this.host = host;
|
||||
this.stamp = host.modificationCount;
|
||||
this.size = host.Count;
|
||||
this.mode = mode;
|
||||
this.Reset();
|
||||
}
|
||||
|
||||
// Token: 0x06000123 RID: 291 RVA: 0x00005B80 File Offset: 0x00003D80
|
||||
public Enumerator(SortedList<TKey, TValue> host)
|
||||
: this(host, SortedList<TKey, TValue>.EnumeratorMode.ENTRY_MODE)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x06000125 RID: 293 RVA: 0x00005B98 File Offset: 0x00003D98
|
||||
public void Reset()
|
||||
{
|
||||
if (this.host.modificationCount != this.stamp || this.invalid)
|
||||
{
|
||||
throw new InvalidOperationException(SortedList<TKey, TValue>.Enumerator.xstr);
|
||||
}
|
||||
this.pos = -1;
|
||||
this.currentKey = null;
|
||||
this.currentValue = null;
|
||||
}
|
||||
|
||||
// Token: 0x06000126 RID: 294 RVA: 0x00005BE8 File Offset: 0x00003DE8
|
||||
public bool MoveNext()
|
||||
{
|
||||
if (this.host.modificationCount != this.stamp || this.invalid)
|
||||
{
|
||||
throw new InvalidOperationException(SortedList<TKey, TValue>.Enumerator.xstr);
|
||||
}
|
||||
KeyValuePair<TKey, TValue>[] table = this.host.table;
|
||||
if (++this.pos < this.size)
|
||||
{
|
||||
KeyValuePair<TKey, TValue> keyValuePair = table[this.pos];
|
||||
this.currentKey = keyValuePair.Key;
|
||||
this.currentValue = keyValuePair.Value;
|
||||
return true;
|
||||
}
|
||||
this.currentKey = null;
|
||||
this.currentValue = null;
|
||||
return false;
|
||||
}
|
||||
|
||||
// Token: 0x1700004C RID: 76
|
||||
// (get) Token: 0x06000127 RID: 295 RVA: 0x00005C90 File Offset: 0x00003E90
|
||||
public DictionaryEntry Entry
|
||||
{
|
||||
get
|
||||
{
|
||||
if (this.invalid || this.pos >= this.size || this.pos == -1)
|
||||
{
|
||||
throw new InvalidOperationException(SortedList<TKey, TValue>.Enumerator.xstr);
|
||||
}
|
||||
return new DictionaryEntry(this.currentKey, this.currentValue);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700004D RID: 77
|
||||
// (get) Token: 0x06000128 RID: 296 RVA: 0x00005CE4 File Offset: 0x00003EE4
|
||||
public object Key
|
||||
{
|
||||
get
|
||||
{
|
||||
if (this.invalid || this.pos >= this.size || this.pos == -1)
|
||||
{
|
||||
throw new InvalidOperationException(SortedList<TKey, TValue>.Enumerator.xstr);
|
||||
}
|
||||
return this.currentKey;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700004E RID: 78
|
||||
// (get) Token: 0x06000129 RID: 297 RVA: 0x00005D20 File Offset: 0x00003F20
|
||||
public object Value
|
||||
{
|
||||
get
|
||||
{
|
||||
if (this.invalid || this.pos >= this.size || this.pos == -1)
|
||||
{
|
||||
throw new InvalidOperationException(SortedList<TKey, TValue>.Enumerator.xstr);
|
||||
}
|
||||
return this.currentValue;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700004F RID: 79
|
||||
// (get) Token: 0x0600012A RID: 298 RVA: 0x00005D5C File Offset: 0x00003F5C
|
||||
public object Current
|
||||
{
|
||||
get
|
||||
{
|
||||
if (this.invalid || this.pos >= this.size || this.pos == -1)
|
||||
{
|
||||
throw new InvalidOperationException(SortedList<TKey, TValue>.Enumerator.xstr);
|
||||
}
|
||||
switch (this.mode)
|
||||
{
|
||||
case SortedList<TKey, TValue>.EnumeratorMode.KEY_MODE:
|
||||
return this.currentKey;
|
||||
case SortedList<TKey, TValue>.EnumeratorMode.VALUE_MODE:
|
||||
return this.currentValue;
|
||||
case SortedList<TKey, TValue>.EnumeratorMode.ENTRY_MODE:
|
||||
return this.Entry;
|
||||
default:
|
||||
throw new NotSupportedException(this.mode + " is not a supported mode.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600012B RID: 299 RVA: 0x00005DF0 File Offset: 0x00003FF0
|
||||
public object Clone()
|
||||
{
|
||||
return new SortedList<TKey, TValue>.Enumerator(this.host, this.mode)
|
||||
{
|
||||
stamp = this.stamp,
|
||||
pos = this.pos,
|
||||
size = this.size,
|
||||
currentKey = this.currentKey,
|
||||
currentValue = this.currentValue,
|
||||
invalid = this.invalid
|
||||
};
|
||||
}
|
||||
|
||||
// Token: 0x04000061 RID: 97
|
||||
private SortedList<TKey, TValue> host;
|
||||
|
||||
// Token: 0x04000062 RID: 98
|
||||
private int stamp;
|
||||
|
||||
// Token: 0x04000063 RID: 99
|
||||
private int pos;
|
||||
|
||||
// Token: 0x04000064 RID: 100
|
||||
private int size;
|
||||
|
||||
// Token: 0x04000065 RID: 101
|
||||
private SortedList<TKey, TValue>.EnumeratorMode mode;
|
||||
|
||||
// Token: 0x04000066 RID: 102
|
||||
private object currentKey;
|
||||
|
||||
// Token: 0x04000067 RID: 103
|
||||
private object currentValue;
|
||||
|
||||
// Token: 0x04000068 RID: 104
|
||||
private bool invalid;
|
||||
|
||||
// Token: 0x04000069 RID: 105
|
||||
private static readonly string xstr = "SortedList.Enumerator: snapshot out of sync.";
|
||||
}
|
||||
|
||||
// Token: 0x0200001F RID: 31
|
||||
[Serializable]
|
||||
public struct KeyEnumerator : IEnumerator, IDisposable, IEnumerator<TKey>
|
||||
{
|
||||
// Token: 0x0600012C RID: 300 RVA: 0x00005E58 File Offset: 0x00004058
|
||||
internal KeyEnumerator(SortedList<TKey, TValue> l)
|
||||
{
|
||||
this.l = l;
|
||||
this.idx = -2;
|
||||
this.ver = l.modificationCount;
|
||||
}
|
||||
|
||||
// Token: 0x0600012D RID: 301 RVA: 0x00005E78 File Offset: 0x00004078
|
||||
void IEnumerator.Reset()
|
||||
{
|
||||
if (this.ver != this.l.modificationCount)
|
||||
{
|
||||
throw new InvalidOperationException("Collection was modified after the enumerator was instantiated.");
|
||||
}
|
||||
this.idx = -2;
|
||||
}
|
||||
|
||||
// Token: 0x17000050 RID: 80
|
||||
// (get) Token: 0x0600012E RID: 302 RVA: 0x00005EA4 File Offset: 0x000040A4
|
||||
object IEnumerator.Current
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Current;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600012F RID: 303 RVA: 0x00005EB4 File Offset: 0x000040B4
|
||||
public void Dispose()
|
||||
{
|
||||
this.idx = -2;
|
||||
}
|
||||
|
||||
// Token: 0x06000130 RID: 304 RVA: 0x00005EC0 File Offset: 0x000040C0
|
||||
public bool MoveNext()
|
||||
{
|
||||
if (this.ver != this.l.modificationCount)
|
||||
{
|
||||
throw new InvalidOperationException("Collection was modified after the enumerator was instantiated.");
|
||||
}
|
||||
if (this.idx == -2)
|
||||
{
|
||||
this.idx = this.l.Count;
|
||||
}
|
||||
return this.idx != -1 && --this.idx != -1;
|
||||
}
|
||||
|
||||
// Token: 0x17000051 RID: 81
|
||||
// (get) Token: 0x06000131 RID: 305 RVA: 0x00005F34 File Offset: 0x00004134
|
||||
public TKey Current
|
||||
{
|
||||
get
|
||||
{
|
||||
if (this.idx < 0)
|
||||
{
|
||||
throw new InvalidOperationException();
|
||||
}
|
||||
return this.l.KeyAt(this.l.Count - 1 - this.idx);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0400006A RID: 106
|
||||
private const int NOT_STARTED = -2;
|
||||
|
||||
// Token: 0x0400006B RID: 107
|
||||
private const int FINISHED = -1;
|
||||
|
||||
// Token: 0x0400006C RID: 108
|
||||
private SortedList<TKey, TValue> l;
|
||||
|
||||
// Token: 0x0400006D RID: 109
|
||||
private int idx;
|
||||
|
||||
// Token: 0x0400006E RID: 110
|
||||
private int ver;
|
||||
}
|
||||
|
||||
// Token: 0x02000020 RID: 32
|
||||
[Serializable]
|
||||
public struct ValueEnumerator : IEnumerator, IDisposable, IEnumerator<TValue>
|
||||
{
|
||||
// Token: 0x06000132 RID: 306 RVA: 0x00005F68 File Offset: 0x00004168
|
||||
internal ValueEnumerator(SortedList<TKey, TValue> l)
|
||||
{
|
||||
this.l = l;
|
||||
this.idx = -2;
|
||||
this.ver = l.modificationCount;
|
||||
}
|
||||
|
||||
// Token: 0x06000133 RID: 307 RVA: 0x00005F88 File Offset: 0x00004188
|
||||
void IEnumerator.Reset()
|
||||
{
|
||||
if (this.ver != this.l.modificationCount)
|
||||
{
|
||||
throw new InvalidOperationException("Collection was modified after the enumerator was instantiated.");
|
||||
}
|
||||
this.idx = -2;
|
||||
}
|
||||
|
||||
// Token: 0x17000052 RID: 82
|
||||
// (get) Token: 0x06000134 RID: 308 RVA: 0x00005FB4 File Offset: 0x000041B4
|
||||
object IEnumerator.Current
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Current;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000135 RID: 309 RVA: 0x00005FC4 File Offset: 0x000041C4
|
||||
public void Dispose()
|
||||
{
|
||||
this.idx = -2;
|
||||
}
|
||||
|
||||
// Token: 0x06000136 RID: 310 RVA: 0x00005FD0 File Offset: 0x000041D0
|
||||
public bool MoveNext()
|
||||
{
|
||||
if (this.ver != this.l.modificationCount)
|
||||
{
|
||||
throw new InvalidOperationException("Collection was modified after the enumerator was instantiated.");
|
||||
}
|
||||
if (this.idx == -2)
|
||||
{
|
||||
this.idx = this.l.Count;
|
||||
}
|
||||
return this.idx != -1 && --this.idx != -1;
|
||||
}
|
||||
|
||||
// Token: 0x17000053 RID: 83
|
||||
// (get) Token: 0x06000137 RID: 311 RVA: 0x00006044 File Offset: 0x00004244
|
||||
public TValue Current
|
||||
{
|
||||
get
|
||||
{
|
||||
if (this.idx < 0)
|
||||
{
|
||||
throw new InvalidOperationException();
|
||||
}
|
||||
return this.l.ValueAt(this.l.Count - 1 - this.idx);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0400006F RID: 111
|
||||
private const int NOT_STARTED = -2;
|
||||
|
||||
// Token: 0x04000070 RID: 112
|
||||
private const int FINISHED = -1;
|
||||
|
||||
// Token: 0x04000071 RID: 113
|
||||
private SortedList<TKey, TValue> l;
|
||||
|
||||
// Token: 0x04000072 RID: 114
|
||||
private int idx;
|
||||
|
||||
// Token: 0x04000073 RID: 115
|
||||
private int ver;
|
||||
}
|
||||
|
||||
// Token: 0x02000021 RID: 33
|
||||
private class ListKeys : ICollection, IEnumerable, IList<TKey>, ICollection<TKey>, IEnumerable<TKey>
|
||||
{
|
||||
// Token: 0x06000138 RID: 312 RVA: 0x00006078 File Offset: 0x00004278
|
||||
public ListKeys(SortedList<TKey, TValue> host)
|
||||
{
|
||||
if (host == null)
|
||||
{
|
||||
throw new ArgumentNullException();
|
||||
}
|
||||
this.host = host;
|
||||
}
|
||||
|
||||
// Token: 0x06000139 RID: 313 RVA: 0x00006094 File Offset: 0x00004294
|
||||
IEnumerator IEnumerable.GetEnumerator()
|
||||
{
|
||||
for (int i = 0; i < this.host.Count; i++)
|
||||
{
|
||||
yield return this.host.KeyAt(i);
|
||||
}
|
||||
yield break;
|
||||
}
|
||||
|
||||
// Token: 0x0600013A RID: 314 RVA: 0x000060B0 File Offset: 0x000042B0
|
||||
public virtual void Add(TKey item)
|
||||
{
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
|
||||
// Token: 0x0600013B RID: 315 RVA: 0x000060B8 File Offset: 0x000042B8
|
||||
public virtual bool Remove(TKey key)
|
||||
{
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
|
||||
// Token: 0x0600013C RID: 316 RVA: 0x000060C0 File Offset: 0x000042C0
|
||||
public virtual void Clear()
|
||||
{
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
|
||||
// Token: 0x0600013D RID: 317 RVA: 0x000060C8 File Offset: 0x000042C8
|
||||
public virtual void CopyTo(TKey[] array, int arrayIndex)
|
||||
{
|
||||
if (this.host.Count == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (array == null)
|
||||
{
|
||||
throw new ArgumentNullException("array");
|
||||
}
|
||||
if (arrayIndex < 0)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException();
|
||||
}
|
||||
if (arrayIndex >= array.Length)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException("arrayIndex is greater than or equal to array.Length");
|
||||
}
|
||||
if (this.Count > array.Length - arrayIndex)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException("Not enough space in array from arrayIndex to end of array");
|
||||
}
|
||||
int num = arrayIndex;
|
||||
for (int i = 0; i < this.Count; i++)
|
||||
{
|
||||
array[num++] = this.host.KeyAt(i);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600013E RID: 318 RVA: 0x00006164 File Offset: 0x00004364
|
||||
public virtual bool Contains(TKey item)
|
||||
{
|
||||
return this.host.IndexOfKey(item) > -1;
|
||||
}
|
||||
|
||||
// Token: 0x0600013F RID: 319 RVA: 0x00006178 File Offset: 0x00004378
|
||||
public virtual int IndexOf(TKey item)
|
||||
{
|
||||
return this.host.IndexOfKey(item);
|
||||
}
|
||||
|
||||
// Token: 0x06000140 RID: 320 RVA: 0x00006188 File Offset: 0x00004388
|
||||
public virtual void Insert(int index, TKey item)
|
||||
{
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
|
||||
// Token: 0x06000141 RID: 321 RVA: 0x00006190 File Offset: 0x00004390
|
||||
public virtual void RemoveAt(int index)
|
||||
{
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
|
||||
// Token: 0x17000054 RID: 84
|
||||
public virtual TKey this[int index]
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.host.KeyAt(index);
|
||||
}
|
||||
set
|
||||
{
|
||||
throw new NotSupportedException("attempt to modify a key");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000144 RID: 324 RVA: 0x000061B4 File Offset: 0x000043B4
|
||||
public virtual IEnumerator<TKey> GetEnumerator()
|
||||
{
|
||||
return new SortedList<TKey, TValue>.KeyEnumerator(this.host);
|
||||
}
|
||||
|
||||
// Token: 0x17000055 RID: 85
|
||||
// (get) Token: 0x06000145 RID: 325 RVA: 0x000061C8 File Offset: 0x000043C8
|
||||
public virtual int Count
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.host.Count;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000056 RID: 86
|
||||
// (get) Token: 0x06000146 RID: 326 RVA: 0x000061D8 File Offset: 0x000043D8
|
||||
public virtual bool IsSynchronized
|
||||
{
|
||||
get
|
||||
{
|
||||
return ((ICollection)this.host).IsSynchronized;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000057 RID: 87
|
||||
// (get) Token: 0x06000147 RID: 327 RVA: 0x000061E8 File Offset: 0x000043E8
|
||||
public virtual bool IsReadOnly
|
||||
{
|
||||
get
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000058 RID: 88
|
||||
// (get) Token: 0x06000148 RID: 328 RVA: 0x000061EC File Offset: 0x000043EC
|
||||
public virtual object SyncRoot
|
||||
{
|
||||
get
|
||||
{
|
||||
return ((ICollection)this.host).SyncRoot;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000149 RID: 329 RVA: 0x000061FC File Offset: 0x000043FC
|
||||
public virtual void CopyTo(Array array, int arrayIndex)
|
||||
{
|
||||
this.host.CopyToArray(array, arrayIndex, SortedList<TKey, TValue>.EnumeratorMode.KEY_MODE);
|
||||
}
|
||||
|
||||
// Token: 0x04000074 RID: 116
|
||||
private SortedList<TKey, TValue> host;
|
||||
}
|
||||
|
||||
// Token: 0x02000022 RID: 34
|
||||
private class ListValues : ICollection, IEnumerable, IList<TValue>, ICollection<TValue>, IEnumerable<TValue>
|
||||
{
|
||||
// Token: 0x0600014A RID: 330 RVA: 0x0000620C File Offset: 0x0000440C
|
||||
public ListValues(SortedList<TKey, TValue> host)
|
||||
{
|
||||
if (host == null)
|
||||
{
|
||||
throw new ArgumentNullException();
|
||||
}
|
||||
this.host = host;
|
||||
}
|
||||
|
||||
// Token: 0x0600014B RID: 331 RVA: 0x00006228 File Offset: 0x00004428
|
||||
IEnumerator IEnumerable.GetEnumerator()
|
||||
{
|
||||
for (int i = 0; i < this.host.Count; i++)
|
||||
{
|
||||
yield return this.host.ValueAt(i);
|
||||
}
|
||||
yield break;
|
||||
}
|
||||
|
||||
// Token: 0x0600014C RID: 332 RVA: 0x00006244 File Offset: 0x00004444
|
||||
public virtual void Add(TValue item)
|
||||
{
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
|
||||
// Token: 0x0600014D RID: 333 RVA: 0x0000624C File Offset: 0x0000444C
|
||||
public virtual bool Remove(TValue value)
|
||||
{
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
|
||||
// Token: 0x0600014E RID: 334 RVA: 0x00006254 File Offset: 0x00004454
|
||||
public virtual void Clear()
|
||||
{
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
|
||||
// Token: 0x0600014F RID: 335 RVA: 0x0000625C File Offset: 0x0000445C
|
||||
public virtual void CopyTo(TValue[] array, int arrayIndex)
|
||||
{
|
||||
if (this.host.Count == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (array == null)
|
||||
{
|
||||
throw new ArgumentNullException("array");
|
||||
}
|
||||
if (arrayIndex < 0)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException();
|
||||
}
|
||||
if (arrayIndex >= array.Length)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException("arrayIndex is greater than or equal to array.Length");
|
||||
}
|
||||
if (this.Count > array.Length - arrayIndex)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException("Not enough space in array from arrayIndex to end of array");
|
||||
}
|
||||
int num = arrayIndex;
|
||||
for (int i = 0; i < this.Count; i++)
|
||||
{
|
||||
array[num++] = this.host.ValueAt(i);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000150 RID: 336 RVA: 0x000062F8 File Offset: 0x000044F8
|
||||
public virtual bool Contains(TValue item)
|
||||
{
|
||||
return this.host.IndexOfValue(item) > -1;
|
||||
}
|
||||
|
||||
// Token: 0x06000151 RID: 337 RVA: 0x0000630C File Offset: 0x0000450C
|
||||
public virtual int IndexOf(TValue item)
|
||||
{
|
||||
return this.host.IndexOfValue(item);
|
||||
}
|
||||
|
||||
// Token: 0x06000152 RID: 338 RVA: 0x0000631C File Offset: 0x0000451C
|
||||
public virtual void Insert(int index, TValue item)
|
||||
{
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
|
||||
// Token: 0x06000153 RID: 339 RVA: 0x00006324 File Offset: 0x00004524
|
||||
public virtual void RemoveAt(int index)
|
||||
{
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
|
||||
// Token: 0x17000059 RID: 89
|
||||
public virtual TValue this[int index]
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.host.ValueAt(index);
|
||||
}
|
||||
set
|
||||
{
|
||||
throw new NotSupportedException("attempt to modify a key");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000156 RID: 342 RVA: 0x00006348 File Offset: 0x00004548
|
||||
public virtual IEnumerator<TValue> GetEnumerator()
|
||||
{
|
||||
return new SortedList<TKey, TValue>.ValueEnumerator(this.host);
|
||||
}
|
||||
|
||||
// Token: 0x1700005A RID: 90
|
||||
// (get) Token: 0x06000157 RID: 343 RVA: 0x0000635C File Offset: 0x0000455C
|
||||
public virtual int Count
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.host.Count;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700005B RID: 91
|
||||
// (get) Token: 0x06000158 RID: 344 RVA: 0x0000636C File Offset: 0x0000456C
|
||||
public virtual bool IsSynchronized
|
||||
{
|
||||
get
|
||||
{
|
||||
return ((ICollection)this.host).IsSynchronized;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700005C RID: 92
|
||||
// (get) Token: 0x06000159 RID: 345 RVA: 0x0000637C File Offset: 0x0000457C
|
||||
public virtual bool IsReadOnly
|
||||
{
|
||||
get
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700005D RID: 93
|
||||
// (get) Token: 0x0600015A RID: 346 RVA: 0x00006380 File Offset: 0x00004580
|
||||
public virtual object SyncRoot
|
||||
{
|
||||
get
|
||||
{
|
||||
return ((ICollection)this.host).SyncRoot;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600015B RID: 347 RVA: 0x00006390 File Offset: 0x00004590
|
||||
public virtual void CopyTo(Array array, int arrayIndex)
|
||||
{
|
||||
this.host.CopyToArray(array, arrayIndex, SortedList<TKey, TValue>.EnumeratorMode.VALUE_MODE);
|
||||
}
|
||||
|
||||
// Token: 0x04000075 RID: 117
|
||||
private SortedList<TKey, TValue> host;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,363 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.Collections.Generic
|
||||
{
|
||||
/// <summary>Represents a variable size last-in-first-out (LIFO) collection of instances of the same arbitrary type.</summary>
|
||||
/// <typeparam name="T">Specifies the type of elements in the stack.</typeparam>
|
||||
/// <filterpriority>1</filterpriority>
|
||||
// Token: 0x02000023 RID: 35
|
||||
[ComVisible(false)]
|
||||
[Serializable]
|
||||
public class Stack<T> : ICollection, IEnumerable, IEnumerable<T>
|
||||
{
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.Generic.Stack`1" /> class that is empty and has the default initial capacity.</summary>
|
||||
// Token: 0x0600015C RID: 348 RVA: 0x000063A0 File Offset: 0x000045A0
|
||||
public Stack()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.Generic.Stack`1" /> class that is empty and has the specified initial capacity or the default initial capacity, whichever is greater.</summary>
|
||||
/// <param name="capacity">The initial number of elements that the <see cref="T:System.Collections.Generic.Stack`1" /> can contain.</param>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="capacity" /> is less than zero.</exception>
|
||||
// Token: 0x0600015D RID: 349 RVA: 0x000063A8 File Offset: 0x000045A8
|
||||
public Stack(int count)
|
||||
{
|
||||
if (count < 0)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException("count");
|
||||
}
|
||||
this._array = new T[count];
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.Generic.Stack`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 to copy elements from.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="collection" /> is null.</exception>
|
||||
// Token: 0x0600015E RID: 350 RVA: 0x000063DC File Offset: 0x000045DC
|
||||
public Stack(IEnumerable<T> collection)
|
||||
{
|
||||
if (collection == null)
|
||||
{
|
||||
throw new ArgumentNullException("collection");
|
||||
}
|
||||
ICollection<T> collection2 = collection as ICollection<T>;
|
||||
if (collection2 != null)
|
||||
{
|
||||
this._size = collection2.Count;
|
||||
this._array = new T[this._size];
|
||||
collection2.CopyTo(this._array, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach (T t in collection)
|
||||
{
|
||||
this.Push(t);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <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.Stack`1" />, this property always returns false.</returns>
|
||||
// Token: 0x1700005E RID: 94
|
||||
// (get) Token: 0x0600015F RID: 351 RVA: 0x00006490 File Offset: 0x00004690
|
||||
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.Stack`1" />, this property always returns the current instance.</returns>
|
||||
// Token: 0x1700005F RID: 95
|
||||
// (get) Token: 0x06000160 RID: 352 RVA: 0x00006494 File Offset: 0x00004694
|
||||
object ICollection.SyncRoot
|
||||
{
|
||||
get
|
||||
{
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
/// <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 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="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: 0x06000161 RID: 353 RVA: 0x00006498 File Offset: 0x00004698
|
||||
void ICollection.CopyTo(Array dest, int idx)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (this._array != null)
|
||||
{
|
||||
this._array.CopyTo(dest, idx);
|
||||
Array.Reverse(dest, idx, this._size);
|
||||
}
|
||||
}
|
||||
catch (ArrayTypeMismatchException)
|
||||
{
|
||||
throw new ArgumentException();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000162 RID: 354 RVA: 0x000064F8 File Offset: 0x000046F8
|
||||
IEnumerator<T> IEnumerable<T>.GetEnumerator()
|
||||
{
|
||||
return this.GetEnumerator();
|
||||
}
|
||||
|
||||
/// <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: 0x06000163 RID: 355 RVA: 0x00006508 File Offset: 0x00004708
|
||||
IEnumerator IEnumerable.GetEnumerator()
|
||||
{
|
||||
return this.GetEnumerator();
|
||||
}
|
||||
|
||||
/// <summary>Removes all objects from the <see cref="T:System.Collections.Generic.Stack`1" />.</summary>
|
||||
/// <filterpriority>1</filterpriority>
|
||||
// Token: 0x06000164 RID: 356 RVA: 0x00006518 File Offset: 0x00004718
|
||||
public void Clear()
|
||||
{
|
||||
if (this._array != null)
|
||||
{
|
||||
Array.Clear(this._array, 0, this._array.Length);
|
||||
}
|
||||
this._size = 0;
|
||||
this._version++;
|
||||
}
|
||||
|
||||
/// <summary>Determines whether an element is in the <see cref="T:System.Collections.Generic.Stack`1" />.</summary>
|
||||
/// <returns>true if <paramref name="item" /> is found in the <see cref="T:System.Collections.Generic.Stack`1" />; otherwise, false.</returns>
|
||||
/// <param name="item">The object to locate in the <see cref="T:System.Collections.Generic.Stack`1" />. The value can be null for reference types.</param>
|
||||
// Token: 0x06000165 RID: 357 RVA: 0x0000655C File Offset: 0x0000475C
|
||||
public bool Contains(T t)
|
||||
{
|
||||
return this._array != null && Array.IndexOf<T>(this._array, t, 0, this._size) != -1;
|
||||
}
|
||||
|
||||
/// <summary>Copies the <see cref="T:System.Collections.Generic.Stack`1" /> 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.Stack`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 zero.</exception>
|
||||
/// <exception cref="T:System.ArgumentException">The number of elements in the source <see cref="T:System.Collections.Generic.Stack`1" /> is greater than the available space from <paramref name="arrayIndex" /> to the end of the destination <paramref name="array" />.</exception>
|
||||
// Token: 0x06000166 RID: 358 RVA: 0x00006588 File Offset: 0x00004788
|
||||
public void CopyTo(T[] dest, int idx)
|
||||
{
|
||||
if (dest == null)
|
||||
{
|
||||
throw new ArgumentNullException("dest");
|
||||
}
|
||||
if (idx < 0)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException("idx");
|
||||
}
|
||||
if (this._array != null)
|
||||
{
|
||||
Array.Copy(this._array, 0, dest, idx, this._size);
|
||||
Array.Reverse(dest, idx, this._size);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Returns the object at the top of the <see cref="T:System.Collections.Generic.Stack`1" /> without removing it.</summary>
|
||||
/// <returns>The object at the top of the <see cref="T:System.Collections.Generic.Stack`1" />.</returns>
|
||||
/// <exception cref="T:System.InvalidOperationException">The <see cref="T:System.Collections.Generic.Stack`1" /> is empty.</exception>
|
||||
// Token: 0x06000167 RID: 359 RVA: 0x000065E4 File Offset: 0x000047E4
|
||||
public T Peek()
|
||||
{
|
||||
if (this._size == 0)
|
||||
{
|
||||
throw new InvalidOperationException();
|
||||
}
|
||||
return this._array[this._size - 1];
|
||||
}
|
||||
|
||||
/// <summary>Removes and returns the object at the top of the <see cref="T:System.Collections.Generic.Stack`1" />.</summary>
|
||||
/// <returns>The object removed from the top of the <see cref="T:System.Collections.Generic.Stack`1" />.</returns>
|
||||
/// <exception cref="T:System.InvalidOperationException">The <see cref="T:System.Collections.Generic.Stack`1" /> is empty.</exception>
|
||||
// Token: 0x06000168 RID: 360 RVA: 0x00006618 File Offset: 0x00004818
|
||||
public T Pop()
|
||||
{
|
||||
if (this._size == 0)
|
||||
{
|
||||
throw new InvalidOperationException();
|
||||
}
|
||||
this._version++;
|
||||
T t = this._array[--this._size];
|
||||
this._array[this._size] = default(T);
|
||||
return t;
|
||||
}
|
||||
|
||||
/// <summary>Inserts an object at the top of the <see cref="T:System.Collections.Generic.Stack`1" />.</summary>
|
||||
/// <param name="item">The object to push onto the <see cref="T:System.Collections.Generic.Stack`1" />. The value can be null for reference types.</param>
|
||||
// Token: 0x06000169 RID: 361 RVA: 0x0000667C File Offset: 0x0000487C
|
||||
public void Push(T t)
|
||||
{
|
||||
if (this._array == null || this._size == this._array.Length)
|
||||
{
|
||||
Array.Resize<T>(ref this._array, (this._size != 0) ? (2 * this._size) : 16);
|
||||
}
|
||||
this._version++;
|
||||
this._array[this._size++] = t;
|
||||
}
|
||||
|
||||
/// <summary>Copies the <see cref="T:System.Collections.Generic.Stack`1" /> to a new array.</summary>
|
||||
/// <returns>A new array containing copies of the elements of the <see cref="T:System.Collections.Generic.Stack`1" />.</returns>
|
||||
// Token: 0x0600016A RID: 362 RVA: 0x000066F8 File Offset: 0x000048F8
|
||||
public T[] ToArray()
|
||||
{
|
||||
T[] array = new T[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.Generic.Stack`1" />, if that number is less than 90 percent of current capacity.</summary>
|
||||
// Token: 0x0600016B RID: 363 RVA: 0x0000671C File Offset: 0x0000491C
|
||||
public void TrimExcess()
|
||||
{
|
||||
if (this._array != null && (double)this._size < (double)this._array.Length * 0.9)
|
||||
{
|
||||
Array.Resize<T>(ref this._array, this._size);
|
||||
}
|
||||
this._version++;
|
||||
}
|
||||
|
||||
/// <summary>Gets the number of elements contained in the <see cref="T:System.Collections.Generic.Stack`1" />.</summary>
|
||||
/// <returns>The number of elements contained in the <see cref="T:System.Collections.Generic.Stack`1" />.</returns>
|
||||
// Token: 0x17000060 RID: 96
|
||||
// (get) Token: 0x0600016C RID: 364 RVA: 0x00006774 File Offset: 0x00004974
|
||||
public int Count
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._size;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Returns an enumerator for the <see cref="T:System.Collections.Generic.Stack`1" />.</summary>
|
||||
/// <returns>An <see cref="T:System.Collections.Generic.Stack`1.Enumerator" /> for the <see cref="T:System.Collections.Generic.Stack`1" />.</returns>
|
||||
// Token: 0x0600016D RID: 365 RVA: 0x0000677C File Offset: 0x0000497C
|
||||
public Stack<T>.Enumerator GetEnumerator()
|
||||
{
|
||||
return new Stack<T>.Enumerator(this);
|
||||
}
|
||||
|
||||
// Token: 0x04000076 RID: 118
|
||||
private const int INITIAL_SIZE = 16;
|
||||
|
||||
// Token: 0x04000077 RID: 119
|
||||
private T[] _array;
|
||||
|
||||
// Token: 0x04000078 RID: 120
|
||||
private int _size;
|
||||
|
||||
// Token: 0x04000079 RID: 121
|
||||
private int _version;
|
||||
|
||||
/// <summary>Enumerates the elements of a <see cref="T:System.Collections.Generic.Stack`1" />.</summary>
|
||||
// Token: 0x02000024 RID: 36
|
||||
[Serializable]
|
||||
public struct Enumerator : IEnumerator, IDisposable, IEnumerator<T>
|
||||
{
|
||||
// Token: 0x0600016E RID: 366 RVA: 0x00006784 File Offset: 0x00004984
|
||||
internal Enumerator(Stack<T> t)
|
||||
{
|
||||
this.parent = t;
|
||||
this.idx = -2;
|
||||
this._version = t._version;
|
||||
}
|
||||
|
||||
/// <summary>Sets the enumerator to its initial position, which is before the first element in the collection. This class cannot be inherited.</summary>
|
||||
/// <exception cref="T:System.InvalidOperationException">The collection was modified after the enumerator was created. </exception>
|
||||
// Token: 0x0600016F RID: 367 RVA: 0x000067A4 File Offset: 0x000049A4
|
||||
void IEnumerator.Reset()
|
||||
{
|
||||
if (this._version != this.parent._version)
|
||||
{
|
||||
throw new InvalidOperationException();
|
||||
}
|
||||
this.idx = -2;
|
||||
}
|
||||
|
||||
/// <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: 0x17000061 RID: 97
|
||||
// (get) Token: 0x06000170 RID: 368 RVA: 0x000067D8 File Offset: 0x000049D8
|
||||
object IEnumerator.Current
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Current;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Releases all resources used by the <see cref="T:System.Collections.Generic.Stack`1.Enumerator" />.</summary>
|
||||
// Token: 0x06000171 RID: 369 RVA: 0x000067E8 File Offset: 0x000049E8
|
||||
public void Dispose()
|
||||
{
|
||||
this.idx = -2;
|
||||
}
|
||||
|
||||
/// <summary>Advances the enumerator to the next element of the <see cref="T:System.Collections.Generic.Stack`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: 0x06000172 RID: 370 RVA: 0x000067F4 File Offset: 0x000049F4
|
||||
public bool MoveNext()
|
||||
{
|
||||
if (this._version != this.parent._version)
|
||||
{
|
||||
throw new InvalidOperationException();
|
||||
}
|
||||
if (this.idx == -2)
|
||||
{
|
||||
this.idx = this.parent._size;
|
||||
}
|
||||
return this.idx != -1 && --this.idx != -1;
|
||||
}
|
||||
|
||||
/// <summary>Gets the element at the current position of the enumerator.</summary>
|
||||
/// <returns>The element in the <see cref="T:System.Collections.Generic.Stack`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: 0x17000062 RID: 98
|
||||
// (get) Token: 0x06000173 RID: 371 RVA: 0x00006864 File Offset: 0x00004A64
|
||||
public T Current
|
||||
{
|
||||
get
|
||||
{
|
||||
if (this.idx < 0)
|
||||
{
|
||||
throw new InvalidOperationException();
|
||||
}
|
||||
return this.parent._array[this.idx];
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0400007A RID: 122
|
||||
private const int NOT_STARTED = -2;
|
||||
|
||||
// Token: 0x0400007B RID: 123
|
||||
private const int FINISHED = -1;
|
||||
|
||||
// Token: 0x0400007C RID: 124
|
||||
private Stack<T> parent;
|
||||
|
||||
// Token: 0x0400007D RID: 125
|
||||
private int idx;
|
||||
|
||||
// Token: 0x0400007E RID: 126
|
||||
private int _version;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,323 @@
|
||||
using System;
|
||||
using System.Text;
|
||||
|
||||
namespace System.Collections.Specialized
|
||||
{
|
||||
/// <summary>Provides a simple structure that stores Boolean values and small integers in 32 bits of memory.</summary>
|
||||
// Token: 0x02000025 RID: 37
|
||||
public struct BitVector32
|
||||
{
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.Specialized.BitVector32" /> structure containing the data represented in an existing <see cref="T:System.Collections.Specialized.BitVector32" /> structure.</summary>
|
||||
/// <param name="value">A <see cref="T:System.Collections.Specialized.BitVector32" /> structure that contains the data to copy. </param>
|
||||
// Token: 0x06000174 RID: 372 RVA: 0x0000689C File Offset: 0x00004A9C
|
||||
public BitVector32(BitVector32 source)
|
||||
{
|
||||
this.bits = source.bits;
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.Specialized.BitVector32" /> structure containing the data represented in an integer.</summary>
|
||||
/// <param name="data">An integer representing the data of the new <see cref="T:System.Collections.Specialized.BitVector32" />. </param>
|
||||
// Token: 0x06000175 RID: 373 RVA: 0x000068AC File Offset: 0x00004AAC
|
||||
public BitVector32(int init)
|
||||
{
|
||||
this.bits = init;
|
||||
}
|
||||
|
||||
/// <summary>Gets the value of the <see cref="T:System.Collections.Specialized.BitVector32" /> as an integer.</summary>
|
||||
/// <returns>The value of the <see cref="T:System.Collections.Specialized.BitVector32" /> as an integer.</returns>
|
||||
// Token: 0x17000063 RID: 99
|
||||
// (get) Token: 0x06000176 RID: 374 RVA: 0x000068B8 File Offset: 0x00004AB8
|
||||
public int Data
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.bits;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets or sets the value stored in the specified <see cref="T:System.Collections.Specialized.BitVector32.Section" />.</summary>
|
||||
/// <returns>The value stored in the specified <see cref="T:System.Collections.Specialized.BitVector32.Section" />.</returns>
|
||||
/// <param name="section">A <see cref="T:System.Collections.Specialized.BitVector32.Section" /> that contains the value to get or set. </param>
|
||||
// Token: 0x17000064 RID: 100
|
||||
public int this[BitVector32.Section section]
|
||||
{
|
||||
get
|
||||
{
|
||||
return (this.bits >> (int)section.Offset) & (int)section.Mask;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (value < 0)
|
||||
{
|
||||
throw new ArgumentException("Section can't hold negative values");
|
||||
}
|
||||
if (value > (int)section.Mask)
|
||||
{
|
||||
throw new ArgumentException("Value too large to fit in section");
|
||||
}
|
||||
this.bits &= ~((int)section.Mask << (int)section.Offset);
|
||||
this.bits |= value << (int)section.Offset;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets or sets the state of the bit flag indicated by the specified mask.</summary>
|
||||
/// <returns>true if the specified bit flag is on (1); otherwise, false.</returns>
|
||||
/// <param name="bit">A mask that indicates the bit to get or set. </param>
|
||||
// Token: 0x17000065 RID: 101
|
||||
public bool this[int mask]
|
||||
{
|
||||
get
|
||||
{
|
||||
return (this.bits & mask) == mask;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (value)
|
||||
{
|
||||
this.bits |= mask;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.bits &= ~mask;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Creates the first mask in a series of masks that can be used to retrieve individual bits in a <see cref="T:System.Collections.Specialized.BitVector32" /> that is set up as bit flags.</summary>
|
||||
/// <returns>A mask that isolates the first bit flag in the <see cref="T:System.Collections.Specialized.BitVector32" />.</returns>
|
||||
/// <PermissionSet>
|
||||
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="UnmanagedCode, ControlEvidence" />
|
||||
/// </PermissionSet>
|
||||
// Token: 0x0600017B RID: 379 RVA: 0x0000699C File Offset: 0x00004B9C
|
||||
public static int CreateMask()
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
/// <summary>Creates an additional mask following the specified mask in a series of masks that can be used to retrieve individual bits in a <see cref="T:System.Collections.Specialized.BitVector32" /> that is set up as bit flags.</summary>
|
||||
/// <returns>A mask that isolates the bit flag following the one that <paramref name="previous" /> points to in <see cref="T:System.Collections.Specialized.BitVector32" />.</returns>
|
||||
/// <param name="previous">The mask that indicates the previous bit flag. </param>
|
||||
/// <exception cref="T:System.InvalidOperationException">
|
||||
/// <paramref name="previous" /> indicates the last bit flag in the <see cref="T:System.Collections.Specialized.BitVector32" />. </exception>
|
||||
// Token: 0x0600017C RID: 380 RVA: 0x000069A0 File Offset: 0x00004BA0
|
||||
public static int CreateMask(int prev)
|
||||
{
|
||||
if (prev == 0)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
if (prev == -2147483648)
|
||||
{
|
||||
throw new InvalidOperationException("all bits set");
|
||||
}
|
||||
return prev << 1;
|
||||
}
|
||||
|
||||
/// <summary>Creates the first <see cref="T:System.Collections.Specialized.BitVector32.Section" /> in a series of sections that contain small integers.</summary>
|
||||
/// <returns>A <see cref="T:System.Collections.Specialized.BitVector32.Section" /> that can hold a number from zero to <paramref name="maxValue" />.</returns>
|
||||
/// <param name="maxValue">A 16-bit signed integer that specifies the maximum value for the new <see cref="T:System.Collections.Specialized.BitVector32.Section" />. </param>
|
||||
/// <exception cref="T:System.ArgumentException">
|
||||
/// <paramref name="maxValue" /> is less than 1. </exception>
|
||||
// Token: 0x0600017D RID: 381 RVA: 0x000069C4 File Offset: 0x00004BC4
|
||||
public static BitVector32.Section CreateSection(short maxValue)
|
||||
{
|
||||
return BitVector32.CreateSection(maxValue, new BitVector32.Section(0, 0));
|
||||
}
|
||||
|
||||
/// <summary>Creates a new <see cref="T:System.Collections.Specialized.BitVector32.Section" /> following the specified <see cref="T:System.Collections.Specialized.BitVector32.Section" /> in a series of sections that contain small integers.</summary>
|
||||
/// <returns>A <see cref="T:System.Collections.Specialized.BitVector32.Section" /> that can hold a number from zero to <paramref name="maxValue" />.</returns>
|
||||
/// <param name="maxValue">A 16-bit signed integer that specifies the maximum value for the new <see cref="T:System.Collections.Specialized.BitVector32.Section" />. </param>
|
||||
/// <param name="previous">The previous <see cref="T:System.Collections.Specialized.BitVector32.Section" /> in the <see cref="T:System.Collections.Specialized.BitVector32" />. </param>
|
||||
/// <exception cref="T:System.ArgumentException">
|
||||
/// <paramref name="maxValue" /> is less than 1. </exception>
|
||||
/// <exception cref="T:System.InvalidOperationException">
|
||||
/// <paramref name="previous" /> includes the final bit in the <see cref="T:System.Collections.Specialized.BitVector32" />.-or- <paramref name="maxValue" /> is greater than the highest value that can be represented by the number of bits after <paramref name="previous" />. </exception>
|
||||
// Token: 0x0600017E RID: 382 RVA: 0x000069D4 File Offset: 0x00004BD4
|
||||
public static BitVector32.Section CreateSection(short maxValue, BitVector32.Section previous)
|
||||
{
|
||||
if (maxValue < 1)
|
||||
{
|
||||
throw new ArgumentException("maxValue");
|
||||
}
|
||||
int num = BitVector32.HighestSetBit((int)maxValue);
|
||||
int num2 = (1 << num) - 1;
|
||||
int num3 = (int)previous.Offset + BitVector32.HighestSetBit((int)previous.Mask);
|
||||
if (num3 + num > 32)
|
||||
{
|
||||
throw new ArgumentException("Sections cannot exceed 32 bits in total");
|
||||
}
|
||||
return new BitVector32.Section((short)num2, (short)num3);
|
||||
}
|
||||
|
||||
/// <summary>Determines whether the specified object is equal to the <see cref="T:System.Collections.Specialized.BitVector32" />.</summary>
|
||||
/// <returns>true if the specified object is equal to the <see cref="T:System.Collections.Specialized.BitVector32" />; otherwise, false.</returns>
|
||||
/// <param name="o">The object to compare with the current <see cref="T:System.Collections.Specialized.BitVector32" />. </param>
|
||||
// Token: 0x0600017F RID: 383 RVA: 0x00006A38 File Offset: 0x00004C38
|
||||
public override bool Equals(object o)
|
||||
{
|
||||
return o is BitVector32 && this.bits == ((BitVector32)o).bits;
|
||||
}
|
||||
|
||||
/// <summary>Serves as a hash function for the <see cref="T:System.Collections.Specialized.BitVector32" />.</summary>
|
||||
/// <returns>A hash code for the <see cref="T:System.Collections.Specialized.BitVector32" />.</returns>
|
||||
// Token: 0x06000180 RID: 384 RVA: 0x00006A6C File Offset: 0x00004C6C
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return this.bits.GetHashCode();
|
||||
}
|
||||
|
||||
/// <summary>Returns a string that represents the current <see cref="T:System.Collections.Specialized.BitVector32" />.</summary>
|
||||
/// <returns>A string that represents the current <see cref="T:System.Collections.Specialized.BitVector32" />.</returns>
|
||||
// Token: 0x06000181 RID: 385 RVA: 0x00006A7C File Offset: 0x00004C7C
|
||||
public override string ToString()
|
||||
{
|
||||
return BitVector32.ToString(this);
|
||||
}
|
||||
|
||||
/// <summary>Returns a string that represents the specified <see cref="T:System.Collections.Specialized.BitVector32" />.</summary>
|
||||
/// <returns>A string that represents the specified <see cref="T:System.Collections.Specialized.BitVector32" />.</returns>
|
||||
/// <param name="value">The <see cref="T:System.Collections.Specialized.BitVector32" /> to represent. </param>
|
||||
// Token: 0x06000182 RID: 386 RVA: 0x00006A8C File Offset: 0x00004C8C
|
||||
public static string ToString(BitVector32 value)
|
||||
{
|
||||
StringBuilder stringBuilder = new StringBuilder();
|
||||
stringBuilder.Append("BitVector32{");
|
||||
for (long num = (long)((ulong)int.MinValue); num > 0L; num >>= 1)
|
||||
{
|
||||
stringBuilder.Append((((long)value.bits & num) != 0L) ? '1' : '0');
|
||||
}
|
||||
stringBuilder.Append('}');
|
||||
return stringBuilder.ToString();
|
||||
}
|
||||
|
||||
// Token: 0x06000183 RID: 387 RVA: 0x00006AF4 File Offset: 0x00004CF4
|
||||
private static int HighestSetBit(int i)
|
||||
{
|
||||
int num = 0;
|
||||
while (i >> num != 0)
|
||||
{
|
||||
num++;
|
||||
}
|
||||
return num;
|
||||
}
|
||||
|
||||
// Token: 0x0400007F RID: 127
|
||||
private int bits;
|
||||
|
||||
/// <summary>Represents a section of the vector that can contain an integer number.</summary>
|
||||
// Token: 0x02000026 RID: 38
|
||||
public struct Section
|
||||
{
|
||||
// Token: 0x06000184 RID: 388 RVA: 0x00006B18 File Offset: 0x00004D18
|
||||
internal Section(short mask, short offset)
|
||||
{
|
||||
this.mask = mask;
|
||||
this.offset = offset;
|
||||
}
|
||||
|
||||
/// <summary>Gets a mask that isolates this section within the <see cref="T:System.Collections.Specialized.BitVector32" />.</summary>
|
||||
/// <returns>A mask that isolates this section within the <see cref="T:System.Collections.Specialized.BitVector32" />.</returns>
|
||||
// Token: 0x17000066 RID: 102
|
||||
// (get) Token: 0x06000185 RID: 389 RVA: 0x00006B28 File Offset: 0x00004D28
|
||||
public short Mask
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.mask;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets the offset of this section from the start of the <see cref="T:System.Collections.Specialized.BitVector32" />.</summary>
|
||||
/// <returns>The offset of this section from the start of the <see cref="T:System.Collections.Specialized.BitVector32" />.</returns>
|
||||
// Token: 0x17000067 RID: 103
|
||||
// (get) Token: 0x06000186 RID: 390 RVA: 0x00006B30 File Offset: 0x00004D30
|
||||
public short Offset
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.offset;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Determines whether the specified <see cref="T:System.Collections.Specialized.BitVector32.Section" /> object is the same as the current <see cref="T:System.Collections.Specialized.BitVector32.Section" /> object.</summary>
|
||||
/// <returns>true if the <paramref name="obj" /> parameter is the same as the current <see cref="T:System.Collections.Specialized.BitVector32.Section" /> object; otherwise false.</returns>
|
||||
/// <param name="obj">The <see cref="T:System.Collections.Specialized.BitVector32.Section" /> object to compare with the current <see cref="T:System.Collections.Specialized.BitVector32.Section" /> object.</param>
|
||||
// Token: 0x06000187 RID: 391 RVA: 0x00006B38 File Offset: 0x00004D38
|
||||
public bool Equals(BitVector32.Section obj)
|
||||
{
|
||||
return this.mask == obj.mask && this.offset == obj.offset;
|
||||
}
|
||||
|
||||
/// <summary>Determines whether the specified object is the same as the current <see cref="T:System.Collections.Specialized.BitVector32.Section" /> object.</summary>
|
||||
/// <returns>true if the specified object is the same as the current <see cref="T:System.Collections.Specialized.BitVector32.Section" /> object; otherwise, false.</returns>
|
||||
/// <param name="o">The object to compare with the current <see cref="T:System.Collections.Specialized.BitVector32.Section" />.</param>
|
||||
// Token: 0x06000188 RID: 392 RVA: 0x00006B6C File Offset: 0x00004D6C
|
||||
public override bool Equals(object o)
|
||||
{
|
||||
if (!(o is BitVector32.Section))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
BitVector32.Section section = (BitVector32.Section)o;
|
||||
return this.mask == section.mask && this.offset == section.offset;
|
||||
}
|
||||
|
||||
/// <summary>Serves as a hash function for the current <see cref="T:System.Collections.Specialized.BitVector32.Section" />, suitable for hashing algorithms and data structures, such as a hash table.</summary>
|
||||
/// <returns>A hash code for the current <see cref="T:System.Collections.Specialized.BitVector32.Section" />.</returns>
|
||||
// Token: 0x06000189 RID: 393 RVA: 0x00006BB4 File Offset: 0x00004DB4
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return (int)this.mask << (int)this.offset;
|
||||
}
|
||||
|
||||
/// <summary>Returns a string that represents the current <see cref="T:System.Collections.Specialized.BitVector32.Section" />.</summary>
|
||||
/// <returns>A string that represents the current <see cref="T:System.Collections.Specialized.BitVector32.Section" />.</returns>
|
||||
// Token: 0x0600018A RID: 394 RVA: 0x00006BC8 File Offset: 0x00004DC8
|
||||
public override string ToString()
|
||||
{
|
||||
return BitVector32.Section.ToString(this);
|
||||
}
|
||||
|
||||
/// <summary>Returns a string that represents the specified <see cref="T:System.Collections.Specialized.BitVector32.Section" />.</summary>
|
||||
/// <returns>A string that represents the specified <see cref="T:System.Collections.Specialized.BitVector32.Section" />.</returns>
|
||||
/// <param name="value">The <see cref="T:System.Collections.Specialized.BitVector32.Section" /> to represent.</param>
|
||||
// Token: 0x0600018B RID: 395 RVA: 0x00006BD8 File Offset: 0x00004DD8
|
||||
public static string ToString(BitVector32.Section value)
|
||||
{
|
||||
StringBuilder stringBuilder = new StringBuilder();
|
||||
stringBuilder.Append("Section{0x");
|
||||
stringBuilder.Append(Convert.ToString(value.Mask, 16));
|
||||
stringBuilder.Append(", 0x");
|
||||
stringBuilder.Append(Convert.ToString(value.Offset, 16));
|
||||
stringBuilder.Append("}");
|
||||
return stringBuilder.ToString();
|
||||
}
|
||||
|
||||
/// <summary>Determines whether two specified <see cref="T:System.Collections.Specialized.BitVector32.Section" /> objects are equal.</summary>
|
||||
/// <returns>true if the <paramref name="a" /> and <paramref name="b" /> parameters represent the same <see cref="T:System.Collections.Specialized.BitVector32.Section" /> object, otherwise, false.</returns>
|
||||
/// <param name="a">A <see cref="T:System.Collections.Specialized.BitVector32.Section" /> object.</param>
|
||||
/// <param name="b">A <see cref="T:System.Collections.Specialized.BitVector32.Section" /> object.</param>
|
||||
// Token: 0x0600018C RID: 396 RVA: 0x00006C40 File Offset: 0x00004E40
|
||||
public static bool operator ==(BitVector32.Section v1, BitVector32.Section v2)
|
||||
{
|
||||
return v1.mask == v2.mask && v1.offset == v2.offset;
|
||||
}
|
||||
|
||||
/// <summary>Determines whether two <see cref="T:System.Collections.Specialized.BitVector32.Section" /> objects have different values.</summary>
|
||||
/// <returns>true if the <paramref name="a" /> and <paramref name="b" /> parameters represent different <see cref="T:System.Collections.Specialized.BitVector32.Section" /> objects; otherwise, false.</returns>
|
||||
/// <param name="a">A <see cref="T:System.Collections.Specialized.BitVector32.Section" /> object.</param>
|
||||
/// <param name="b">A <see cref="T:System.Collections.Specialized.BitVector32.Section" /> object.</param>
|
||||
// Token: 0x0600018D RID: 397 RVA: 0x00006C74 File Offset: 0x00004E74
|
||||
public static bool operator !=(BitVector32.Section v1, BitVector32.Section v2)
|
||||
{
|
||||
return v1.mask != v2.mask || v1.offset != v2.offset;
|
||||
}
|
||||
|
||||
// Token: 0x04000080 RID: 128
|
||||
private short mask;
|
||||
|
||||
// Token: 0x04000081 RID: 129
|
||||
private short offset;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
using System;
|
||||
|
||||
namespace System.Collections.Specialized
|
||||
{
|
||||
/// <summary>Creates collections that ignore the case in strings.</summary>
|
||||
// Token: 0x02000027 RID: 39
|
||||
internal class CollectionsUtil
|
||||
{
|
||||
/// <summary>Creates a new case-insensitive instance of the <see cref="T:System.Collections.Hashtable" /> class with the default initial capacity.</summary>
|
||||
/// <returns>A new case-insensitive instance of the <see cref="T:System.Collections.Hashtable" /> class with the default initial capacity.</returns>
|
||||
/// <PermissionSet>
|
||||
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="UnmanagedCode" />
|
||||
/// </PermissionSet>
|
||||
// Token: 0x0600018F RID: 399 RVA: 0x00006CA8 File Offset: 0x00004EA8
|
||||
public static Hashtable CreateCaseInsensitiveHashtable()
|
||||
{
|
||||
return new Hashtable(CaseInsensitiveHashCodeProvider.Default, CaseInsensitiveComparer.Default);
|
||||
}
|
||||
|
||||
/// <summary>Copies the entries from the specified dictionary to a new case-insensitive instance of the <see cref="T:System.Collections.Hashtable" /> class with the same initial capacity as the number of entries copied.</summary>
|
||||
/// <returns>A new case-insensitive instance of the <see cref="T:System.Collections.Hashtable" /> class containing the entries from the specified <see cref="T:System.Collections.IDictionary" />.</returns>
|
||||
/// <param name="d">The <see cref="T:System.Collections.IDictionary" /> to copy to a new case-insensitive <see cref="T:System.Collections.Hashtable" />. </param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="d" /> is null. </exception>
|
||||
// Token: 0x06000190 RID: 400 RVA: 0x00006CBC File Offset: 0x00004EBC
|
||||
public static Hashtable CreateCaseInsensitiveHashtable(IDictionary d)
|
||||
{
|
||||
return new Hashtable(d, CaseInsensitiveHashCodeProvider.Default, CaseInsensitiveComparer.Default);
|
||||
}
|
||||
|
||||
/// <summary>Creates a new case-insensitive instance of the <see cref="T:System.Collections.Hashtable" /> class with the specified initial capacity.</summary>
|
||||
/// <returns>A new case-insensitive instance of the <see cref="T:System.Collections.Hashtable" /> class with the specified initial capacity.</returns>
|
||||
/// <param name="capacity">The approximate number of entries that the <see cref="T:System.Collections.Hashtable" /> can initially contain. </param>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="capacity" /> is less than zero. </exception>
|
||||
// Token: 0x06000191 RID: 401 RVA: 0x00006CD0 File Offset: 0x00004ED0
|
||||
public static Hashtable CreateCaseInsensitiveHashtable(int capacity)
|
||||
{
|
||||
return new Hashtable(capacity, CaseInsensitiveHashCodeProvider.Default, CaseInsensitiveComparer.Default);
|
||||
}
|
||||
|
||||
/// <summary>Creates a new instance of the <see cref="T:System.Collections.SortedList" /> class that ignores the case of strings.</summary>
|
||||
/// <returns>A new instance of the <see cref="T:System.Collections.SortedList" /> class that ignores the case of strings.</returns>
|
||||
// Token: 0x06000192 RID: 402 RVA: 0x00006CE4 File Offset: 0x00004EE4
|
||||
public static SortedList CreateCaseInsensitiveSortedList()
|
||||
{
|
||||
return new SortedList(CaseInsensitiveComparer.Default);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,276 @@
|
||||
using System;
|
||||
|
||||
namespace System.Collections.Specialized
|
||||
{
|
||||
/// <summary>Implements IDictionary by using a <see cref="T:System.Collections.Specialized.ListDictionary" /> while the collection is small, and then switching to a <see cref="T:System.Collections.Hashtable" /> when the collection gets large.</summary>
|
||||
// Token: 0x02000028 RID: 40
|
||||
[Serializable]
|
||||
public class HybridDictionary : ICollection, IDictionary, IEnumerable
|
||||
{
|
||||
/// <summary>Creates an empty case-sensitive <see cref="T:System.Collections.Specialized.HybridDictionary" />.</summary>
|
||||
// Token: 0x06000193 RID: 403 RVA: 0x00006CF0 File Offset: 0x00004EF0
|
||||
public HybridDictionary()
|
||||
: this(0, false)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Creates an empty <see cref="T:System.Collections.Specialized.HybridDictionary" /> with the specified case sensitivity.</summary>
|
||||
/// <param name="caseInsensitive">A Boolean that denotes whether the <see cref="T:System.Collections.Specialized.HybridDictionary" /> is case-insensitive. </param>
|
||||
// Token: 0x06000194 RID: 404 RVA: 0x00006CFC File Offset: 0x00004EFC
|
||||
public HybridDictionary(bool caseInsensitive)
|
||||
: this(0, caseInsensitive)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Creates a case-sensitive <see cref="T:System.Collections.Specialized.HybridDictionary" /> with the specified initial size.</summary>
|
||||
/// <param name="initialSize">The approximate number of entries that the <see cref="T:System.Collections.Specialized.HybridDictionary" /> can initially contain. </param>
|
||||
// Token: 0x06000195 RID: 405 RVA: 0x00006D08 File Offset: 0x00004F08
|
||||
public HybridDictionary(int initialSize)
|
||||
: this(initialSize, false)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Creates a <see cref="T:System.Collections.Specialized.HybridDictionary" /> with the specified initial size and case sensitivity.</summary>
|
||||
/// <param name="initialSize">The approximate number of entries that the <see cref="T:System.Collections.Specialized.HybridDictionary" /> can initially contain. </param>
|
||||
/// <param name="caseInsensitive">A Boolean that denotes whether the <see cref="T:System.Collections.Specialized.HybridDictionary" /> is case-insensitive. </param>
|
||||
// Token: 0x06000196 RID: 406 RVA: 0x00006D14 File Offset: 0x00004F14
|
||||
public HybridDictionary(int initialSize, bool caseInsensitive)
|
||||
{
|
||||
this.caseInsensitive = caseInsensitive;
|
||||
IComparer comparer = ((!caseInsensitive) ? null : CaseInsensitiveComparer.DefaultInvariant);
|
||||
IHashCodeProvider hashCodeProvider = ((!caseInsensitive) ? null : CaseInsensitiveHashCodeProvider.DefaultInvariant);
|
||||
if (initialSize <= 10)
|
||||
{
|
||||
this.list = new ListDictionary(comparer);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.hashtable = new Hashtable(initialSize, hashCodeProvider, comparer);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Returns an <see cref="T:System.Collections.IEnumerator" /> that iterates through the <see cref="T:System.Collections.Specialized.HybridDictionary" />.</summary>
|
||||
/// <returns>An <see cref="T:System.Collections.IEnumerator" /> for the <see cref="T:System.Collections.Specialized.HybridDictionary" />.</returns>
|
||||
// Token: 0x06000197 RID: 407 RVA: 0x00006D7C File Offset: 0x00004F7C
|
||||
IEnumerator IEnumerable.GetEnumerator()
|
||||
{
|
||||
return this.GetEnumerator();
|
||||
}
|
||||
|
||||
// Token: 0x17000068 RID: 104
|
||||
// (get) Token: 0x06000198 RID: 408 RVA: 0x00006D84 File Offset: 0x00004F84
|
||||
private IDictionary inner
|
||||
{
|
||||
get
|
||||
{
|
||||
IDictionary dictionary2;
|
||||
if (this.list == null)
|
||||
{
|
||||
IDictionary dictionary = this.hashtable;
|
||||
dictionary2 = dictionary;
|
||||
}
|
||||
else
|
||||
{
|
||||
dictionary2 = this.list;
|
||||
}
|
||||
return dictionary2;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets the number of key/value pairs contained in the <see cref="T:System.Collections.Specialized.HybridDictionary" />.</summary>
|
||||
/// <returns>The number of key/value pairs contained in the <see cref="T:System.Collections.Specialized.HybridDictionary" />.Retrieving the value of this property is an O(1) operation.</returns>
|
||||
// Token: 0x17000069 RID: 105
|
||||
// (get) Token: 0x06000199 RID: 409 RVA: 0x00006DB0 File Offset: 0x00004FB0
|
||||
public int Count
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.inner.Count;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a value indicating whether the <see cref="T:System.Collections.Specialized.HybridDictionary" /> has a fixed size.</summary>
|
||||
/// <returns>This property always returns false.</returns>
|
||||
// Token: 0x1700006A RID: 106
|
||||
// (get) Token: 0x0600019A RID: 410 RVA: 0x00006DC0 File Offset: 0x00004FC0
|
||||
public bool IsFixedSize
|
||||
{
|
||||
get
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a value indicating whether the <see cref="T:System.Collections.Specialized.HybridDictionary" /> is read-only.</summary>
|
||||
/// <returns>This property always returns false.</returns>
|
||||
// Token: 0x1700006B RID: 107
|
||||
// (get) Token: 0x0600019B RID: 411 RVA: 0x00006DC4 File Offset: 0x00004FC4
|
||||
public bool IsReadOnly
|
||||
{
|
||||
get
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a value indicating whether the <see cref="T:System.Collections.Specialized.HybridDictionary" /> is synchronized (thread safe).</summary>
|
||||
/// <returns>This property always returns false.</returns>
|
||||
// Token: 0x1700006C RID: 108
|
||||
// (get) Token: 0x0600019C RID: 412 RVA: 0x00006DC8 File Offset: 0x00004FC8
|
||||
public bool IsSynchronized
|
||||
{
|
||||
get
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets or sets the value associated with the specified key.</summary>
|
||||
/// <returns>The value associated with the specified key. If the specified key is not found, attempting to get it returns null, and attempting to set it creates a new entry using the specified key.</returns>
|
||||
/// <param name="key">The key whose value to get or set. </param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="key" /> is null. </exception>
|
||||
// Token: 0x1700006D RID: 109
|
||||
public object this[object key]
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.inner[key];
|
||||
}
|
||||
set
|
||||
{
|
||||
this.inner[key] = value;
|
||||
if (this.list != null && this.Count > 10)
|
||||
{
|
||||
this.Switch();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets an <see cref="T:System.Collections.ICollection" /> containing the keys in the <see cref="T:System.Collections.Specialized.HybridDictionary" />.</summary>
|
||||
/// <returns>An <see cref="T:System.Collections.ICollection" /> containing the keys in the <see cref="T:System.Collections.Specialized.HybridDictionary" />.</returns>
|
||||
// Token: 0x1700006E RID: 110
|
||||
// (get) Token: 0x0600019F RID: 415 RVA: 0x00006E0C File Offset: 0x0000500C
|
||||
public ICollection Keys
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.inner.Keys;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets an object that can be used to synchronize access to the <see cref="T:System.Collections.Specialized.HybridDictionary" />.</summary>
|
||||
/// <returns>An object that can be used to synchronize access to the <see cref="T:System.Collections.Specialized.HybridDictionary" />.</returns>
|
||||
// Token: 0x1700006F RID: 111
|
||||
// (get) Token: 0x060001A0 RID: 416 RVA: 0x00006E1C File Offset: 0x0000501C
|
||||
public object SyncRoot
|
||||
{
|
||||
get
|
||||
{
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets an <see cref="T:System.Collections.ICollection" /> containing the values in the <see cref="T:System.Collections.Specialized.HybridDictionary" />.</summary>
|
||||
/// <returns>An <see cref="T:System.Collections.ICollection" /> containing the values in the <see cref="T:System.Collections.Specialized.HybridDictionary" />.</returns>
|
||||
// Token: 0x17000070 RID: 112
|
||||
// (get) Token: 0x060001A1 RID: 417 RVA: 0x00006E20 File Offset: 0x00005020
|
||||
public ICollection Values
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.inner.Values;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Adds an entry with the specified key and value into the <see cref="T:System.Collections.Specialized.HybridDictionary" />.</summary>
|
||||
/// <param name="key">The key of the entry to add. </param>
|
||||
/// <param name="value">The value of the entry to add. The value can be null. </param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="key" /> is null. </exception>
|
||||
/// <exception cref="T:System.ArgumentException">An entry with the same key already exists in the <see cref="T:System.Collections.Specialized.HybridDictionary" />. </exception>
|
||||
// Token: 0x060001A2 RID: 418 RVA: 0x00006E30 File Offset: 0x00005030
|
||||
public void Add(object key, object value)
|
||||
{
|
||||
this.inner.Add(key, value);
|
||||
if (this.list != null && this.Count > 10)
|
||||
{
|
||||
this.Switch();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Removes all entries from the <see cref="T:System.Collections.Specialized.HybridDictionary" />.</summary>
|
||||
// Token: 0x060001A3 RID: 419 RVA: 0x00006E60 File Offset: 0x00005060
|
||||
public void Clear()
|
||||
{
|
||||
this.inner.Clear();
|
||||
}
|
||||
|
||||
/// <summary>Determines whether the <see cref="T:System.Collections.Specialized.HybridDictionary" /> contains a specific key.</summary>
|
||||
/// <returns>true if the <see cref="T:System.Collections.Specialized.HybridDictionary" /> contains an entry with the specified key; otherwise, false.</returns>
|
||||
/// <param name="key">The key to locate in the <see cref="T:System.Collections.Specialized.HybridDictionary" />. </param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="key" /> is null. </exception>
|
||||
// Token: 0x060001A4 RID: 420 RVA: 0x00006E70 File Offset: 0x00005070
|
||||
public bool Contains(object key)
|
||||
{
|
||||
return this.inner.Contains(key);
|
||||
}
|
||||
|
||||
/// <summary>Copies the <see cref="T:System.Collections.Specialized.HybridDictionary" /> entries to a one-dimensional <see cref="T:System.Array" /> instance at the specified index.</summary>
|
||||
/// <param name="array">The one-dimensional <see cref="T:System.Array" /> that is the destination of the <see cref="T:System.Collections.DictionaryEntry" /> objects copied from <see cref="T:System.Collections.Specialized.HybridDictionary" />. The <see cref="T:System.Array" /> must have zero-based indexing. </param>
|
||||
/// <param name="index">The zero-based index in <paramref name="array" /> at which copying begins. </param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="array" /> is null. </exception>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="index" /> is less than zero. </exception>
|
||||
/// <exception cref="T:System.ArgumentException">
|
||||
/// <paramref name="array" /> is multidimensional.-or- The number of elements in the source <see cref="T:System.Collections.Specialized.HybridDictionary" /> is greater than the available space from <paramref name="index" /> to the end of the destination <paramref name="array" />. </exception>
|
||||
/// <exception cref="T:System.InvalidCastException">The type of the source <see cref="T:System.Collections.Specialized.HybridDictionary" /> cannot be cast automatically to the type of the destination <paramref name="array" />. </exception>
|
||||
// Token: 0x060001A5 RID: 421 RVA: 0x00006E80 File Offset: 0x00005080
|
||||
public void CopyTo(Array array, int index)
|
||||
{
|
||||
this.inner.CopyTo(array, index);
|
||||
}
|
||||
|
||||
/// <summary>Returns an <see cref="T:System.Collections.IDictionaryEnumerator" /> that iterates through the <see cref="T:System.Collections.Specialized.HybridDictionary" />.</summary>
|
||||
/// <returns>An <see cref="T:System.Collections.IDictionaryEnumerator" /> for the <see cref="T:System.Collections.Specialized.HybridDictionary" />.</returns>
|
||||
// Token: 0x060001A6 RID: 422 RVA: 0x00006E90 File Offset: 0x00005090
|
||||
public IDictionaryEnumerator GetEnumerator()
|
||||
{
|
||||
return this.inner.GetEnumerator();
|
||||
}
|
||||
|
||||
/// <summary>Removes the entry with the specified key from the <see cref="T:System.Collections.Specialized.HybridDictionary" />.</summary>
|
||||
/// <param name="key">The key of the entry to remove. </param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="key" /> is null. </exception>
|
||||
// Token: 0x060001A7 RID: 423 RVA: 0x00006EA0 File Offset: 0x000050A0
|
||||
public void Remove(object key)
|
||||
{
|
||||
this.inner.Remove(key);
|
||||
}
|
||||
|
||||
// Token: 0x060001A8 RID: 424 RVA: 0x00006EB0 File Offset: 0x000050B0
|
||||
private void Switch()
|
||||
{
|
||||
IComparer comparer = ((!this.caseInsensitive) ? null : CaseInsensitiveComparer.DefaultInvariant);
|
||||
IHashCodeProvider hashCodeProvider = ((!this.caseInsensitive) ? null : CaseInsensitiveHashCodeProvider.DefaultInvariant);
|
||||
this.hashtable = new Hashtable(this.list, hashCodeProvider, comparer);
|
||||
this.list.Clear();
|
||||
this.list = null;
|
||||
}
|
||||
|
||||
// Token: 0x04000082 RID: 130
|
||||
private const int switchAfter = 10;
|
||||
|
||||
// Token: 0x04000083 RID: 131
|
||||
private bool caseInsensitive;
|
||||
|
||||
// Token: 0x04000084 RID: 132
|
||||
private Hashtable hashtable;
|
||||
|
||||
// Token: 0x04000085 RID: 133
|
||||
private ListDictionary list;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
using System;
|
||||
|
||||
namespace System.Collections.Specialized
|
||||
{
|
||||
/// <summary>Represents an indexed collection of key/value pairs.</summary>
|
||||
// Token: 0x02000029 RID: 41
|
||||
public interface IOrderedDictionary : ICollection, IDictionary, IEnumerable
|
||||
{
|
||||
/// <summary>Returns an enumerator that iterates through the <see cref="T:System.Collections.Specialized.IOrderedDictionary" /> collection.</summary>
|
||||
/// <returns>An <see cref="T:System.Collections.IDictionaryEnumerator" /> for the entire <see cref="T:System.Collections.Specialized.IOrderedDictionary" /> collection.</returns>
|
||||
// Token: 0x060001A9 RID: 425
|
||||
IDictionaryEnumerator GetEnumerator();
|
||||
|
||||
/// <summary>Inserts a key/value pair into the collection at the specified index.</summary>
|
||||
/// <param name="index">The zero-based index at which the key/value pair should be inserted.</param>
|
||||
/// <param name="key">The object to use as the key of the element to add.</param>
|
||||
/// <param name="value">The object to use as the value of the element to add. The value can be null.</param>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="index" /> is less than 0.-or-<paramref name="index" /> is greater than <see cref="P:System.Collections.ICollection.Count" />.</exception>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="key" /> is null.</exception>
|
||||
/// <exception cref="T:System.ArgumentException">An element with the same key already exists in the <see cref="T:System.Collections.Specialized.IOrderedDictionary" /> collection.</exception>
|
||||
/// <exception cref="T:System.NotSupportedException">The <see cref="T:System.Collections.Specialized.IOrderedDictionary" /> collection is read-only.-or-The <see cref="T:System.Collections.Specialized.IOrderedDictionary" /> collection has a fixed size.</exception>
|
||||
// Token: 0x060001AA RID: 426
|
||||
void Insert(int idx, object key, object value);
|
||||
|
||||
/// <summary>Removes the element at the specified index.</summary>
|
||||
/// <param name="index">The zero-based index of the element to remove.</param>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="index" /> is less than 0.-or- <paramref name="index" /> is equal to or greater than <see cref="P:System.Collections.ICollection.Count" />. </exception>
|
||||
/// <exception cref="T:System.NotSupportedException">The <see cref="T:System.Collections.Specialized.IOrderedDictionary" /> collection is read-only.-or- The <see cref="T:System.Collections.Specialized.IOrderedDictionary" /> collection has a fixed size. </exception>
|
||||
// Token: 0x060001AB RID: 427
|
||||
void RemoveAt(int idx);
|
||||
|
||||
/// <summary>Gets or sets the element at the specified index.</summary>
|
||||
/// <returns>The element at the specified index.</returns>
|
||||
/// <param name="index">The zero-based index of the element to get or set.</param>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="index" /> is less than 0.-or- <paramref name="index" /> is equal to or greater than <see cref="P:System.Collections.ICollection.Count" />. </exception>
|
||||
// Token: 0x17000071 RID: 113
|
||||
object this[int idx] { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,602 @@
|
||||
using System;
|
||||
|
||||
namespace System.Collections.Specialized
|
||||
{
|
||||
/// <summary>Implements IDictionary using a singly linked list. Recommended for collections that typically contain 10 items or less.</summary>
|
||||
// Token: 0x0200002A RID: 42
|
||||
[Serializable]
|
||||
public class ListDictionary : ICollection, IDictionary, IEnumerable
|
||||
{
|
||||
/// <summary>Creates an empty <see cref="T:System.Collections.Specialized.ListDictionary" /> using the default comparer.</summary>
|
||||
// Token: 0x060001AE RID: 430 RVA: 0x00006F10 File Offset: 0x00005110
|
||||
public ListDictionary()
|
||||
{
|
||||
this.count = 0;
|
||||
this.version = 0;
|
||||
this.comparer = null;
|
||||
this.head = null;
|
||||
}
|
||||
|
||||
/// <summary>Creates an empty <see cref="T:System.Collections.Specialized.ListDictionary" /> using the specified comparer.</summary>
|
||||
/// <param name="comparer">The <see cref="T:System.Collections.IComparer" /> to use to determine whether two keys are equal.-or- null to use the default comparer, which is each key's implementation of <see cref="M:System.Object.Equals(System.Object)" />. </param>
|
||||
// Token: 0x060001AF RID: 431 RVA: 0x00006F40 File Offset: 0x00005140
|
||||
public ListDictionary(IComparer comparer)
|
||||
: this()
|
||||
{
|
||||
this.comparer = comparer;
|
||||
}
|
||||
|
||||
/// <summary>Returns an <see cref="T:System.Collections.IEnumerator" /> that iterates through the <see cref="T:System.Collections.Specialized.ListDictionary" />.</summary>
|
||||
/// <returns>An <see cref="T:System.Collections.IEnumerator" /> for the <see cref="T:System.Collections.Specialized.ListDictionary" />.</returns>
|
||||
// Token: 0x060001B0 RID: 432 RVA: 0x00006F50 File Offset: 0x00005150
|
||||
IEnumerator IEnumerable.GetEnumerator()
|
||||
{
|
||||
return new ListDictionary.DictionaryNodeEnumerator(this);
|
||||
}
|
||||
|
||||
// Token: 0x060001B1 RID: 433 RVA: 0x00006F58 File Offset: 0x00005158
|
||||
private ListDictionary.DictionaryNode FindEntry(object key)
|
||||
{
|
||||
if (key == null)
|
||||
{
|
||||
throw new ArgumentNullException("key", "Attempted lookup for a null key.");
|
||||
}
|
||||
ListDictionary.DictionaryNode dictionaryNode = this.head;
|
||||
if (this.comparer == null)
|
||||
{
|
||||
while (dictionaryNode != null)
|
||||
{
|
||||
if (key.Equals(dictionaryNode.key))
|
||||
{
|
||||
break;
|
||||
}
|
||||
dictionaryNode = dictionaryNode.next;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
while (dictionaryNode != null)
|
||||
{
|
||||
if (this.comparer.Compare(key, dictionaryNode.key) == 0)
|
||||
{
|
||||
break;
|
||||
}
|
||||
dictionaryNode = dictionaryNode.next;
|
||||
}
|
||||
}
|
||||
return dictionaryNode;
|
||||
}
|
||||
|
||||
// Token: 0x060001B2 RID: 434 RVA: 0x00006FEC File Offset: 0x000051EC
|
||||
private ListDictionary.DictionaryNode FindEntry(object key, out ListDictionary.DictionaryNode prev)
|
||||
{
|
||||
if (key == null)
|
||||
{
|
||||
throw new ArgumentNullException("key", "Attempted lookup for a null key.");
|
||||
}
|
||||
ListDictionary.DictionaryNode dictionaryNode = this.head;
|
||||
prev = null;
|
||||
if (this.comparer == null)
|
||||
{
|
||||
while (dictionaryNode != null)
|
||||
{
|
||||
if (key.Equals(dictionaryNode.key))
|
||||
{
|
||||
break;
|
||||
}
|
||||
prev = dictionaryNode;
|
||||
dictionaryNode = dictionaryNode.next;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
while (dictionaryNode != null)
|
||||
{
|
||||
if (this.comparer.Compare(key, dictionaryNode.key) == 0)
|
||||
{
|
||||
break;
|
||||
}
|
||||
prev = dictionaryNode;
|
||||
dictionaryNode = dictionaryNode.next;
|
||||
}
|
||||
}
|
||||
return dictionaryNode;
|
||||
}
|
||||
|
||||
// Token: 0x060001B3 RID: 435 RVA: 0x00007088 File Offset: 0x00005288
|
||||
private void AddImpl(object key, object value, ListDictionary.DictionaryNode prev)
|
||||
{
|
||||
if (prev == null)
|
||||
{
|
||||
this.head = new ListDictionary.DictionaryNode(key, value, this.head);
|
||||
}
|
||||
else
|
||||
{
|
||||
prev.next = new ListDictionary.DictionaryNode(key, value, prev.next);
|
||||
}
|
||||
this.count++;
|
||||
this.version++;
|
||||
}
|
||||
|
||||
/// <summary>Gets the number of key/value pairs contained in the <see cref="T:System.Collections.Specialized.ListDictionary" />.</summary>
|
||||
/// <returns>The number of key/value pairs contained in the <see cref="T:System.Collections.Specialized.ListDictionary" />.</returns>
|
||||
// Token: 0x17000072 RID: 114
|
||||
// (get) Token: 0x060001B4 RID: 436 RVA: 0x000070E4 File Offset: 0x000052E4
|
||||
public int Count
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.count;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a value indicating whether the <see cref="T:System.Collections.Specialized.ListDictionary" /> is synchronized (thread safe).</summary>
|
||||
/// <returns>This property always returns false.</returns>
|
||||
// Token: 0x17000073 RID: 115
|
||||
// (get) Token: 0x060001B5 RID: 437 RVA: 0x000070EC File Offset: 0x000052EC
|
||||
public bool IsSynchronized
|
||||
{
|
||||
get
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets an object that can be used to synchronize access to the <see cref="T:System.Collections.Specialized.ListDictionary" />.</summary>
|
||||
/// <returns>An object that can be used to synchronize access to the <see cref="T:System.Collections.Specialized.ListDictionary" />.</returns>
|
||||
// Token: 0x17000074 RID: 116
|
||||
// (get) Token: 0x060001B6 RID: 438 RVA: 0x000070F0 File Offset: 0x000052F0
|
||||
public object SyncRoot
|
||||
{
|
||||
get
|
||||
{
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Copies the <see cref="T:System.Collections.Specialized.ListDictionary" /> entries to a one-dimensional <see cref="T:System.Array" /> instance at the specified index.</summary>
|
||||
/// <param name="array">The one-dimensional <see cref="T:System.Array" /> that is the destination of the <see cref="T:System.Collections.DictionaryEntry" /> objects copied from <see cref="T:System.Collections.Specialized.ListDictionary" />. The <see cref="T:System.Array" /> must have zero-based indexing. </param>
|
||||
/// <param name="index">The zero-based index in <paramref name="array" /> at which copying begins. </param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="array" /> is null. </exception>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="index" /> is less than zero. </exception>
|
||||
/// <exception cref="T:System.ArgumentException">
|
||||
/// <paramref name="array" /> is multidimensional.-or- The number of elements in the source <see cref="T:System.Collections.Specialized.ListDictionary" /> is greater than the available space from <paramref name="index" /> to the end of the destination <paramref name="array" />. </exception>
|
||||
/// <exception cref="T:System.InvalidCastException">The type of the source <see cref="T:System.Collections.Specialized.ListDictionary" /> cannot be cast automatically to the type of the destination <paramref name="array" />. </exception>
|
||||
// Token: 0x060001B7 RID: 439 RVA: 0x000070F4 File Offset: 0x000052F4
|
||||
public void CopyTo(Array array, int index)
|
||||
{
|
||||
if (array == null)
|
||||
{
|
||||
throw new ArgumentNullException("array", "Array cannot be null.");
|
||||
}
|
||||
if (index < 0)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException("index", "index is less than 0");
|
||||
}
|
||||
if (index > array.Length)
|
||||
{
|
||||
throw new IndexOutOfRangeException("index is too large");
|
||||
}
|
||||
if (this.Count > array.Length - index)
|
||||
{
|
||||
throw new ArgumentException("Not enough room in the array");
|
||||
}
|
||||
foreach (object obj in this)
|
||||
{
|
||||
DictionaryEntry dictionaryEntry = (DictionaryEntry)obj;
|
||||
array.SetValue(dictionaryEntry, index++);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a value indicating whether the <see cref="T:System.Collections.Specialized.ListDictionary" /> has a fixed size.</summary>
|
||||
/// <returns>This property always returns false.</returns>
|
||||
// Token: 0x17000075 RID: 117
|
||||
// (get) Token: 0x060001B8 RID: 440 RVA: 0x000071CC File Offset: 0x000053CC
|
||||
public bool IsFixedSize
|
||||
{
|
||||
get
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a value indicating whether the <see cref="T:System.Collections.Specialized.ListDictionary" /> is read-only.</summary>
|
||||
/// <returns>This property always returns false.</returns>
|
||||
// Token: 0x17000076 RID: 118
|
||||
// (get) Token: 0x060001B9 RID: 441 RVA: 0x000071D0 File Offset: 0x000053D0
|
||||
public bool IsReadOnly
|
||||
{
|
||||
get
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets or sets the value associated with the specified key.</summary>
|
||||
/// <returns>The value associated with the specified key. If the specified key is not found, attempting to get it returns null, and attempting to set it creates a new entry using the specified key.</returns>
|
||||
/// <param name="key">The key whose value to get or set. </param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="key" /> is null. </exception>
|
||||
// Token: 0x17000077 RID: 119
|
||||
public object this[object key]
|
||||
{
|
||||
get
|
||||
{
|
||||
ListDictionary.DictionaryNode dictionaryNode = this.FindEntry(key);
|
||||
return (dictionaryNode != null) ? dictionaryNode.value : null;
|
||||
}
|
||||
set
|
||||
{
|
||||
ListDictionary.DictionaryNode dictionaryNode2;
|
||||
ListDictionary.DictionaryNode dictionaryNode = this.FindEntry(key, out dictionaryNode2);
|
||||
if (dictionaryNode != null)
|
||||
{
|
||||
dictionaryNode.value = value;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.AddImpl(key, value, dictionaryNode2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets an <see cref="T:System.Collections.ICollection" /> containing the keys in the <see cref="T:System.Collections.Specialized.ListDictionary" />.</summary>
|
||||
/// <returns>An <see cref="T:System.Collections.ICollection" /> containing the keys in the <see cref="T:System.Collections.Specialized.ListDictionary" />.</returns>
|
||||
// Token: 0x17000078 RID: 120
|
||||
// (get) Token: 0x060001BC RID: 444 RVA: 0x00007230 File Offset: 0x00005430
|
||||
public ICollection Keys
|
||||
{
|
||||
get
|
||||
{
|
||||
return new ListDictionary.DictionaryNodeCollection(this, true);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets an <see cref="T:System.Collections.ICollection" /> containing the values in the <see cref="T:System.Collections.Specialized.ListDictionary" />.</summary>
|
||||
/// <returns>An <see cref="T:System.Collections.ICollection" /> containing the values in the <see cref="T:System.Collections.Specialized.ListDictionary" />.</returns>
|
||||
// Token: 0x17000079 RID: 121
|
||||
// (get) Token: 0x060001BD RID: 445 RVA: 0x0000723C File Offset: 0x0000543C
|
||||
public ICollection Values
|
||||
{
|
||||
get
|
||||
{
|
||||
return new ListDictionary.DictionaryNodeCollection(this, false);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Adds an entry with the specified key and value into the <see cref="T:System.Collections.Specialized.ListDictionary" />.</summary>
|
||||
/// <param name="key">The key of the entry to add. </param>
|
||||
/// <param name="value">The value of the entry to add. The value can be null. </param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="key" /> is null. </exception>
|
||||
/// <exception cref="T:System.ArgumentException">An entry with the same key already exists in the <see cref="T:System.Collections.Specialized.ListDictionary" />. </exception>
|
||||
// Token: 0x060001BE RID: 446 RVA: 0x00007248 File Offset: 0x00005448
|
||||
public void Add(object key, object value)
|
||||
{
|
||||
ListDictionary.DictionaryNode dictionaryNode2;
|
||||
ListDictionary.DictionaryNode dictionaryNode = this.FindEntry(key, out dictionaryNode2);
|
||||
if (dictionaryNode != null)
|
||||
{
|
||||
throw new ArgumentException("key", "Duplicate key in add.");
|
||||
}
|
||||
this.AddImpl(key, value, dictionaryNode2);
|
||||
}
|
||||
|
||||
/// <summary>Removes all entries from the <see cref="T:System.Collections.Specialized.ListDictionary" />.</summary>
|
||||
// Token: 0x060001BF RID: 447 RVA: 0x00007280 File Offset: 0x00005480
|
||||
public void Clear()
|
||||
{
|
||||
this.head = null;
|
||||
this.count = 0;
|
||||
this.version++;
|
||||
}
|
||||
|
||||
/// <summary>Determines whether the <see cref="T:System.Collections.Specialized.ListDictionary" /> contains a specific key.</summary>
|
||||
/// <returns>true if the <see cref="T:System.Collections.Specialized.ListDictionary" /> contains an entry with the specified key; otherwise, false.</returns>
|
||||
/// <param name="key">The key to locate in the <see cref="T:System.Collections.Specialized.ListDictionary" />. </param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="key" /> is null. </exception>
|
||||
// Token: 0x060001C0 RID: 448 RVA: 0x000072A0 File Offset: 0x000054A0
|
||||
public bool Contains(object key)
|
||||
{
|
||||
return this.FindEntry(key) != null;
|
||||
}
|
||||
|
||||
/// <summary>Returns an <see cref="T:System.Collections.IDictionaryEnumerator" /> that iterates through the <see cref="T:System.Collections.Specialized.ListDictionary" />.</summary>
|
||||
/// <returns>An <see cref="T:System.Collections.IDictionaryEnumerator" /> for the <see cref="T:System.Collections.Specialized.ListDictionary" />.</returns>
|
||||
// Token: 0x060001C1 RID: 449 RVA: 0x000072B0 File Offset: 0x000054B0
|
||||
public IDictionaryEnumerator GetEnumerator()
|
||||
{
|
||||
return new ListDictionary.DictionaryNodeEnumerator(this);
|
||||
}
|
||||
|
||||
/// <summary>Removes the entry with the specified key from the <see cref="T:System.Collections.Specialized.ListDictionary" />.</summary>
|
||||
/// <param name="key">The key of the entry to remove. </param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="key" /> is null. </exception>
|
||||
// Token: 0x060001C2 RID: 450 RVA: 0x000072B8 File Offset: 0x000054B8
|
||||
public void Remove(object key)
|
||||
{
|
||||
ListDictionary.DictionaryNode dictionaryNode2;
|
||||
ListDictionary.DictionaryNode dictionaryNode = this.FindEntry(key, out dictionaryNode2);
|
||||
if (dictionaryNode == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (dictionaryNode2 == null)
|
||||
{
|
||||
this.head = dictionaryNode.next;
|
||||
}
|
||||
else
|
||||
{
|
||||
dictionaryNode2.next = dictionaryNode.next;
|
||||
}
|
||||
dictionaryNode.value = null;
|
||||
this.count--;
|
||||
this.version++;
|
||||
}
|
||||
|
||||
// Token: 0x04000086 RID: 134
|
||||
private int count;
|
||||
|
||||
// Token: 0x04000087 RID: 135
|
||||
private int version;
|
||||
|
||||
// Token: 0x04000088 RID: 136
|
||||
private ListDictionary.DictionaryNode head;
|
||||
|
||||
// Token: 0x04000089 RID: 137
|
||||
private IComparer comparer;
|
||||
|
||||
// Token: 0x0200002B RID: 43
|
||||
[Serializable]
|
||||
private class DictionaryNode
|
||||
{
|
||||
// Token: 0x060001C3 RID: 451 RVA: 0x0000731C File Offset: 0x0000551C
|
||||
public DictionaryNode(object key, object value, ListDictionary.DictionaryNode next)
|
||||
{
|
||||
this.key = key;
|
||||
this.value = value;
|
||||
this.next = next;
|
||||
}
|
||||
|
||||
// Token: 0x0400008A RID: 138
|
||||
public object key;
|
||||
|
||||
// Token: 0x0400008B RID: 139
|
||||
public object value;
|
||||
|
||||
// Token: 0x0400008C RID: 140
|
||||
public ListDictionary.DictionaryNode next;
|
||||
}
|
||||
|
||||
// Token: 0x0200002C RID: 44
|
||||
private class DictionaryNodeEnumerator : IEnumerator, IDictionaryEnumerator
|
||||
{
|
||||
// Token: 0x060001C4 RID: 452 RVA: 0x0000733C File Offset: 0x0000553C
|
||||
public DictionaryNodeEnumerator(ListDictionary dict)
|
||||
{
|
||||
this.dict = dict;
|
||||
this.version = dict.version;
|
||||
this.Reset();
|
||||
}
|
||||
|
||||
// Token: 0x060001C5 RID: 453 RVA: 0x00007360 File Offset: 0x00005560
|
||||
private void FailFast()
|
||||
{
|
||||
if (this.version != this.dict.version)
|
||||
{
|
||||
throw new InvalidOperationException("The ListDictionary's contents changed after this enumerator was instantiated.");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060001C6 RID: 454 RVA: 0x00007384 File Offset: 0x00005584
|
||||
public bool MoveNext()
|
||||
{
|
||||
this.FailFast();
|
||||
if (this.current == null && !this.isAtStart)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
this.current = ((!this.isAtStart) ? this.current.next : this.dict.head);
|
||||
this.isAtStart = false;
|
||||
return this.current != null;
|
||||
}
|
||||
|
||||
// Token: 0x060001C7 RID: 455 RVA: 0x000073F0 File Offset: 0x000055F0
|
||||
public void Reset()
|
||||
{
|
||||
this.FailFast();
|
||||
this.isAtStart = true;
|
||||
this.current = null;
|
||||
}
|
||||
|
||||
// Token: 0x1700007A RID: 122
|
||||
// (get) Token: 0x060001C8 RID: 456 RVA: 0x00007408 File Offset: 0x00005608
|
||||
public object Current
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Entry;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700007B RID: 123
|
||||
// (get) Token: 0x060001C9 RID: 457 RVA: 0x00007418 File Offset: 0x00005618
|
||||
private ListDictionary.DictionaryNode DictionaryNode
|
||||
{
|
||||
get
|
||||
{
|
||||
this.FailFast();
|
||||
if (this.current == null)
|
||||
{
|
||||
throw new InvalidOperationException("Enumerator is positioned before the collection's first element or after the last element.");
|
||||
}
|
||||
return this.current;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700007C RID: 124
|
||||
// (get) Token: 0x060001CA RID: 458 RVA: 0x00007448 File Offset: 0x00005648
|
||||
public DictionaryEntry Entry
|
||||
{
|
||||
get
|
||||
{
|
||||
object key = this.DictionaryNode.key;
|
||||
return new DictionaryEntry(key, this.current.value);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700007D RID: 125
|
||||
// (get) Token: 0x060001CB RID: 459 RVA: 0x00007474 File Offset: 0x00005674
|
||||
public object Key
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.DictionaryNode.key;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700007E RID: 126
|
||||
// (get) Token: 0x060001CC RID: 460 RVA: 0x00007484 File Offset: 0x00005684
|
||||
public object Value
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.DictionaryNode.value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0400008D RID: 141
|
||||
private ListDictionary dict;
|
||||
|
||||
// Token: 0x0400008E RID: 142
|
||||
private bool isAtStart;
|
||||
|
||||
// Token: 0x0400008F RID: 143
|
||||
private ListDictionary.DictionaryNode current;
|
||||
|
||||
// Token: 0x04000090 RID: 144
|
||||
private int version;
|
||||
}
|
||||
|
||||
// Token: 0x0200002D RID: 45
|
||||
private class DictionaryNodeCollection : ICollection, IEnumerable
|
||||
{
|
||||
// Token: 0x060001CD RID: 461 RVA: 0x00007494 File Offset: 0x00005694
|
||||
public DictionaryNodeCollection(ListDictionary dict, bool isKeyList)
|
||||
{
|
||||
this.dict = dict;
|
||||
this.isKeyList = isKeyList;
|
||||
}
|
||||
|
||||
// Token: 0x1700007F RID: 127
|
||||
// (get) Token: 0x060001CE RID: 462 RVA: 0x000074AC File Offset: 0x000056AC
|
||||
public int Count
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.dict.Count;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000080 RID: 128
|
||||
// (get) Token: 0x060001CF RID: 463 RVA: 0x000074BC File Offset: 0x000056BC
|
||||
public bool IsSynchronized
|
||||
{
|
||||
get
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000081 RID: 129
|
||||
// (get) Token: 0x060001D0 RID: 464 RVA: 0x000074C0 File Offset: 0x000056C0
|
||||
public object SyncRoot
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.dict.SyncRoot;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060001D1 RID: 465 RVA: 0x000074D0 File Offset: 0x000056D0
|
||||
public void CopyTo(Array array, int index)
|
||||
{
|
||||
if (array == null)
|
||||
{
|
||||
throw new ArgumentNullException("array", "Array cannot be null.");
|
||||
}
|
||||
if (index < 0)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException("index", "index is less than 0");
|
||||
}
|
||||
if (index > array.Length)
|
||||
{
|
||||
throw new IndexOutOfRangeException("index is too large");
|
||||
}
|
||||
if (this.Count > array.Length - index)
|
||||
{
|
||||
throw new ArgumentException("Not enough room in the array");
|
||||
}
|
||||
foreach (object obj in this)
|
||||
{
|
||||
array.SetValue(obj, index++);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060001D2 RID: 466 RVA: 0x000075A0 File Offset: 0x000057A0
|
||||
public IEnumerator GetEnumerator()
|
||||
{
|
||||
return new ListDictionary.DictionaryNodeCollection.DictionaryNodeCollectionEnumerator(this.dict.GetEnumerator(), this.isKeyList);
|
||||
}
|
||||
|
||||
// Token: 0x04000091 RID: 145
|
||||
private ListDictionary dict;
|
||||
|
||||
// Token: 0x04000092 RID: 146
|
||||
private bool isKeyList;
|
||||
|
||||
// Token: 0x0200002E RID: 46
|
||||
private class DictionaryNodeCollectionEnumerator : IEnumerator
|
||||
{
|
||||
// Token: 0x060001D3 RID: 467 RVA: 0x000075B8 File Offset: 0x000057B8
|
||||
public DictionaryNodeCollectionEnumerator(IDictionaryEnumerator inner, bool isKeyList)
|
||||
{
|
||||
this.inner = inner;
|
||||
this.isKeyList = isKeyList;
|
||||
}
|
||||
|
||||
// Token: 0x17000082 RID: 130
|
||||
// (get) Token: 0x060001D4 RID: 468 RVA: 0x000075D0 File Offset: 0x000057D0
|
||||
public object Current
|
||||
{
|
||||
get
|
||||
{
|
||||
return (!this.isKeyList) ? this.inner.Value : this.inner.Key;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060001D5 RID: 469 RVA: 0x00007604 File Offset: 0x00005804
|
||||
public bool MoveNext()
|
||||
{
|
||||
return this.inner.MoveNext();
|
||||
}
|
||||
|
||||
// Token: 0x060001D6 RID: 470 RVA: 0x00007614 File Offset: 0x00005814
|
||||
public void Reset()
|
||||
{
|
||||
this.inner.Reset();
|
||||
}
|
||||
|
||||
// Token: 0x04000093 RID: 147
|
||||
private IDictionaryEnumerator inner;
|
||||
|
||||
// Token: 0x04000094 RID: 148
|
||||
private bool isKeyList;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,822 @@
|
||||
using System;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
namespace System.Collections.Specialized
|
||||
{
|
||||
/// <summary>Provides the abstract base class for a collection of associated <see cref="T:System.String" /> keys and <see cref="T:System.Object" /> values that can be accessed either with the key or with the index.</summary>
|
||||
// Token: 0x0200002F RID: 47
|
||||
[Serializable]
|
||||
public abstract class NameObjectCollectionBase : ICollection, IDeserializationCallback, IEnumerable, ISerializable
|
||||
{
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.Specialized.NameObjectCollectionBase" /> class that is empty.</summary>
|
||||
// Token: 0x060001D7 RID: 471 RVA: 0x00007624 File Offset: 0x00005824
|
||||
protected NameObjectCollectionBase()
|
||||
{
|
||||
this.m_readonly = false;
|
||||
this.m_hashprovider = CaseInsensitiveHashCodeProvider.DefaultInvariant;
|
||||
this.m_comparer = CaseInsensitiveComparer.DefaultInvariant;
|
||||
this.m_defCapacity = 0;
|
||||
this.Init();
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.Specialized.NameObjectCollectionBase" /> class that is empty, has the specified initial capacity, and uses the default hash code provider and the default comparer.</summary>
|
||||
/// <param name="capacity">The approximate number of entries that the <see cref="T:System.Collections.Specialized.NameObjectCollectionBase" /> instance can initially contain.</param>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="capacity" /> is less than zero. </exception>
|
||||
// Token: 0x060001D8 RID: 472 RVA: 0x00007664 File Offset: 0x00005864
|
||||
protected NameObjectCollectionBase(int capacity)
|
||||
{
|
||||
this.m_readonly = false;
|
||||
this.m_hashprovider = CaseInsensitiveHashCodeProvider.DefaultInvariant;
|
||||
this.m_comparer = CaseInsensitiveComparer.DefaultInvariant;
|
||||
this.m_defCapacity = capacity;
|
||||
this.Init();
|
||||
}
|
||||
|
||||
// Token: 0x060001D9 RID: 473 RVA: 0x000076A4 File Offset: 0x000058A4
|
||||
internal NameObjectCollectionBase(IEqualityComparer equalityComparer, IComparer comparer, IHashCodeProvider hcp)
|
||||
{
|
||||
this.equality_comparer = equalityComparer;
|
||||
this.m_comparer = comparer;
|
||||
this.m_hashprovider = hcp;
|
||||
this.m_readonly = false;
|
||||
this.m_defCapacity = 0;
|
||||
this.Init();
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.Specialized.NameObjectCollectionBase" /> class that is empty, has the default initial capacity, and uses the specified <see cref="T:System.Collections.IEqualityComparer" /> object.</summary>
|
||||
/// <param name="equalityComparer">The <see cref="T:System.Collections.IEqualityComparer" /> object to use to determine whether two keys are equal and to generate hash codes for the keys in the collection.</param>
|
||||
// Token: 0x060001DA RID: 474 RVA: 0x000076D8 File Offset: 0x000058D8
|
||||
protected NameObjectCollectionBase(IEqualityComparer equalityComparer)
|
||||
{
|
||||
IEqualityComparer equalityComparer2;
|
||||
if (equalityComparer == null)
|
||||
{
|
||||
IEqualityComparer invariantCultureIgnoreCase = StringComparer.InvariantCultureIgnoreCase;
|
||||
equalityComparer2 = invariantCultureIgnoreCase;
|
||||
}
|
||||
else
|
||||
{
|
||||
equalityComparer2 = equalityComparer;
|
||||
}
|
||||
this..ctor(equalityComparer2, null, null);
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.Specialized.NameObjectCollectionBase" /> class that is empty, has the default initial capacity, and uses the specified hash code provider and the specified comparer.</summary>
|
||||
/// <param name="hashProvider">The <see cref="T:System.Collections.IHashCodeProvider" /> that will supply the hash codes for all keys in the <see cref="T:System.Collections.Specialized.NameObjectCollectionBase" /> instance.</param>
|
||||
/// <param name="comparer">The <see cref="T:System.Collections.IComparer" /> to use to determine whether two keys are equal.</param>
|
||||
// Token: 0x060001DB RID: 475 RVA: 0x00007700 File Offset: 0x00005900
|
||||
[Obsolete("Use NameObjectCollectionBase(IEqualityComparer)")]
|
||||
protected NameObjectCollectionBase(IHashCodeProvider hashProvider, IComparer comparer)
|
||||
{
|
||||
this.m_comparer = comparer;
|
||||
this.m_hashprovider = hashProvider;
|
||||
this.m_readonly = false;
|
||||
this.m_defCapacity = 0;
|
||||
this.Init();
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.Specialized.NameObjectCollectionBase" /> class that is serializable and uses the specified <see cref="T:System.Runtime.Serialization.SerializationInfo" /> and <see cref="T:System.Runtime.Serialization.StreamingContext" />.</summary>
|
||||
/// <param name="info">A <see cref="T:System.Runtime.Serialization.SerializationInfo" /> object that contains the information required to serialize the new <see cref="T:System.Collections.Specialized.NameObjectCollectionBase" /> instance.</param>
|
||||
/// <param name="context">A <see cref="T:System.Runtime.Serialization.StreamingContext" /> object that contains the source and destination of the serialized stream associated with the new <see cref="T:System.Collections.Specialized.NameObjectCollectionBase" /> instance.</param>
|
||||
// Token: 0x060001DC RID: 476 RVA: 0x00007738 File Offset: 0x00005938
|
||||
protected NameObjectCollectionBase(SerializationInfo info, StreamingContext context)
|
||||
{
|
||||
this.infoCopy = info;
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.Specialized.NameObjectCollectionBase" /> class that is empty, has the specified initial capacity, and uses the specified <see cref="T:System.Collections.IEqualityComparer" /> object.</summary>
|
||||
/// <param name="capacity">The approximate number of entries that the <see cref="T:System.Collections.Specialized.NameObjectCollectionBase" /> object can initially contain.</param>
|
||||
/// <param name="equalityComparer">The <see cref="T:System.Collections.IEqualityComparer" /> object to use to determine whether two keys are equal and to generate hash codes for the keys in the collection.</param>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="capacity" /> is less than zero.</exception>
|
||||
// Token: 0x060001DD RID: 477 RVA: 0x00007748 File Offset: 0x00005948
|
||||
protected NameObjectCollectionBase(int capacity, IEqualityComparer equalityComparer)
|
||||
{
|
||||
this.m_readonly = false;
|
||||
IEqualityComparer equalityComparer2;
|
||||
if (equalityComparer == null)
|
||||
{
|
||||
IEqualityComparer invariantCultureIgnoreCase = StringComparer.InvariantCultureIgnoreCase;
|
||||
equalityComparer2 = invariantCultureIgnoreCase;
|
||||
}
|
||||
else
|
||||
{
|
||||
equalityComparer2 = equalityComparer;
|
||||
}
|
||||
this.equality_comparer = equalityComparer2;
|
||||
this.m_defCapacity = capacity;
|
||||
this.Init();
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.Specialized.NameObjectCollectionBase" /> class that is empty, has the specified initial capacity and uses the specified hash code provider and the specified comparer.</summary>
|
||||
/// <param name="capacity">The approximate number of entries that the <see cref="T:System.Collections.Specialized.NameObjectCollectionBase" /> instance can initially contain.</param>
|
||||
/// <param name="hashProvider">The <see cref="T:System.Collections.IHashCodeProvider" /> that will supply the hash codes for all keys in the <see cref="T:System.Collections.Specialized.NameObjectCollectionBase" /> instance.</param>
|
||||
/// <param name="comparer">The <see cref="T:System.Collections.IComparer" /> to use to determine whether two keys are equal.</param>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="capacity" /> is less than zero.</exception>
|
||||
// Token: 0x060001DE RID: 478 RVA: 0x00007788 File Offset: 0x00005988
|
||||
[Obsolete("Use NameObjectCollectionBase(int,IEqualityComparer)")]
|
||||
protected NameObjectCollectionBase(int capacity, IHashCodeProvider hashProvider, IComparer comparer)
|
||||
{
|
||||
this.m_readonly = false;
|
||||
this.m_hashprovider = hashProvider;
|
||||
this.m_comparer = comparer;
|
||||
this.m_defCapacity = capacity;
|
||||
this.Init();
|
||||
}
|
||||
|
||||
/// <summary>Gets a value indicating whether access to the <see cref="T:System.Collections.Specialized.NameObjectCollectionBase" /> object is synchronized (thread safe).</summary>
|
||||
/// <returns>true if access to the <see cref="T:System.Collections.Specialized.NameObjectCollectionBase" /> object is synchronized (thread safe); otherwise, false. The default is false.</returns>
|
||||
// Token: 0x17000083 RID: 131
|
||||
// (get) Token: 0x060001DF RID: 479 RVA: 0x000077C0 File Offset: 0x000059C0
|
||||
bool ICollection.IsSynchronized
|
||||
{
|
||||
get
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets an object that can be used to synchronize access to the <see cref="T:System.Collections.Specialized.NameObjectCollectionBase" /> object.</summary>
|
||||
/// <returns>An object that can be used to synchronize access to the <see cref="T:System.Collections.Specialized.NameObjectCollectionBase" /> object.</returns>
|
||||
// Token: 0x17000084 RID: 132
|
||||
// (get) Token: 0x060001E0 RID: 480 RVA: 0x000077C4 File Offset: 0x000059C4
|
||||
object ICollection.SyncRoot
|
||||
{
|
||||
get
|
||||
{
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Copies the entire <see cref="T:System.Collections.Specialized.NameObjectCollectionBase" /> to a compatible one-dimensional <see cref="T:System.Array" />, starting at the specified index of the target array.</summary>
|
||||
/// <param name="array">The one-dimensional <see cref="T:System.Array" /> that is the destination of the elements copied from <see cref="T:System.Collections.Specialized.NameObjectCollectionBase" />. The <see cref="T:System.Array" /> must have zero-based indexing.</param>
|
||||
/// <param name="index">The zero-based index in <paramref name="array" /> at which copying begins.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="array" /> is null.</exception>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="index" /> is less than zero.</exception>
|
||||
/// <exception cref="T:System.ArgumentException">
|
||||
/// <paramref name="array" /> is multidimensional.-or-The number of elements in the source <see cref="T:System.Collections.Specialized.NameObjectCollectionBase" /> is greater than the available space from <paramref name="index" /> to the end of the destination <paramref name="array" />.</exception>
|
||||
/// <exception cref="T:System.InvalidCastException">The type of the source <see cref="T:System.Collections.Specialized.NameObjectCollectionBase" /> cannot be cast automatically to the type of the destination <paramref name="array" />.</exception>
|
||||
// Token: 0x060001E1 RID: 481 RVA: 0x000077C8 File Offset: 0x000059C8
|
||||
void ICollection.CopyTo(Array array, int index)
|
||||
{
|
||||
((ICollection)this.Keys).CopyTo(array, index);
|
||||
}
|
||||
|
||||
// Token: 0x17000085 RID: 133
|
||||
// (get) Token: 0x060001E2 RID: 482 RVA: 0x000077D8 File Offset: 0x000059D8
|
||||
internal IEqualityComparer EqualityComparer
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.equality_comparer;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000086 RID: 134
|
||||
// (get) Token: 0x060001E3 RID: 483 RVA: 0x000077E0 File Offset: 0x000059E0
|
||||
internal IComparer Comparer
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.m_comparer;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000087 RID: 135
|
||||
// (get) Token: 0x060001E4 RID: 484 RVA: 0x000077E8 File Offset: 0x000059E8
|
||||
internal IHashCodeProvider HashCodeProvider
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.m_hashprovider;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060001E5 RID: 485 RVA: 0x000077F0 File Offset: 0x000059F0
|
||||
private void Init()
|
||||
{
|
||||
if (this.equality_comparer != null)
|
||||
{
|
||||
this.m_ItemsContainer = new Hashtable(this.m_defCapacity, this.equality_comparer);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.m_ItemsContainer = new Hashtable(this.m_defCapacity, this.m_hashprovider, this.m_comparer);
|
||||
}
|
||||
this.m_ItemsArray = new ArrayList();
|
||||
this.m_NullKeyItem = null;
|
||||
}
|
||||
|
||||
/// <summary>Gets a <see cref="T:System.Collections.Specialized.NameObjectCollectionBase.KeysCollection" /> instance that contains all the keys in the <see cref="T:System.Collections.Specialized.NameObjectCollectionBase" /> instance.</summary>
|
||||
/// <returns>A <see cref="T:System.Collections.Specialized.NameObjectCollectionBase.KeysCollection" /> instance that contains all the keys in the <see cref="T:System.Collections.Specialized.NameObjectCollectionBase" /> instance.</returns>
|
||||
// Token: 0x17000088 RID: 136
|
||||
// (get) Token: 0x060001E6 RID: 486 RVA: 0x00007854 File Offset: 0x00005A54
|
||||
public virtual NameObjectCollectionBase.KeysCollection Keys
|
||||
{
|
||||
get
|
||||
{
|
||||
if (this.keyscoll == null)
|
||||
{
|
||||
this.keyscoll = new NameObjectCollectionBase.KeysCollection(this);
|
||||
}
|
||||
return this.keyscoll;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Returns an enumerator that iterates through the <see cref="T:System.Collections.Specialized.NameObjectCollectionBase" />.</summary>
|
||||
/// <returns>An <see cref="T:System.Collections.IEnumerator" /> for the <see cref="T:System.Collections.Specialized.NameObjectCollectionBase" /> instance.</returns>
|
||||
// Token: 0x060001E7 RID: 487 RVA: 0x00007874 File Offset: 0x00005A74
|
||||
public virtual IEnumerator GetEnumerator()
|
||||
{
|
||||
return new NameObjectCollectionBase._KeysEnumerator(this);
|
||||
}
|
||||
|
||||
/// <summary>Implements the <see cref="T:System.Runtime.Serialization.ISerializable" /> interface and returns the data needed to serialize the <see cref="T:System.Collections.Specialized.NameObjectCollectionBase" /> instance.</summary>
|
||||
/// <param name="info">A <see cref="T:System.Runtime.Serialization.SerializationInfo" /> object that contains the information required to serialize the <see cref="T:System.Collections.Specialized.NameObjectCollectionBase" /> instance.</param>
|
||||
/// <param name="context">A <see cref="T:System.Runtime.Serialization.StreamingContext" /> object that contains the source and destination of the serialized stream associated with the <see cref="T:System.Collections.Specialized.NameObjectCollectionBase" /> instance.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="info" /> is null.</exception>
|
||||
// Token: 0x060001E8 RID: 488 RVA: 0x0000787C File Offset: 0x00005A7C
|
||||
public virtual void GetObjectData(SerializationInfo info, StreamingContext context)
|
||||
{
|
||||
if (info == null)
|
||||
{
|
||||
throw new ArgumentNullException("info");
|
||||
}
|
||||
int count = this.Count;
|
||||
string[] array = new string[count];
|
||||
object[] array2 = new object[count];
|
||||
int num = 0;
|
||||
foreach (object obj in this.m_ItemsArray)
|
||||
{
|
||||
NameObjectCollectionBase._Item item = (NameObjectCollectionBase._Item)obj;
|
||||
array[num] = item.key;
|
||||
array2[num] = item.value;
|
||||
num++;
|
||||
}
|
||||
if (this.equality_comparer != null)
|
||||
{
|
||||
info.AddValue("KeyComparer", this.equality_comparer, typeof(IEqualityComparer));
|
||||
info.AddValue("Version", 4, typeof(int));
|
||||
}
|
||||
else
|
||||
{
|
||||
info.AddValue("HashProvider", this.m_hashprovider, typeof(IHashCodeProvider));
|
||||
info.AddValue("Comparer", this.m_comparer, typeof(IComparer));
|
||||
info.AddValue("Version", 2, typeof(int));
|
||||
}
|
||||
info.AddValue("ReadOnly", this.m_readonly);
|
||||
info.AddValue("Count", count);
|
||||
info.AddValue("Keys", array, typeof(string[]));
|
||||
info.AddValue("Values", array2, typeof(object[]));
|
||||
}
|
||||
|
||||
/// <summary>Gets the number of key/value pairs contained in the <see cref="T:System.Collections.Specialized.NameObjectCollectionBase" /> instance.</summary>
|
||||
/// <returns>The number of key/value pairs contained in the <see cref="T:System.Collections.Specialized.NameObjectCollectionBase" /> instance.</returns>
|
||||
// Token: 0x17000089 RID: 137
|
||||
// (get) Token: 0x060001E9 RID: 489 RVA: 0x00007A0C File Offset: 0x00005C0C
|
||||
public virtual int Count
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.m_ItemsArray.Count;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Implements the <see cref="T:System.Runtime.Serialization.ISerializable" /> interface and raises the deserialization event when the deserialization is complete.</summary>
|
||||
/// <param name="sender">The source of the deserialization event.</param>
|
||||
/// <exception cref="T:System.Runtime.Serialization.SerializationException">The <see cref="T:System.Runtime.Serialization.SerializationInfo" /> object associated with the current <see cref="T:System.Collections.Specialized.NameObjectCollectionBase" /> instance is invalid.</exception>
|
||||
// Token: 0x060001EA RID: 490 RVA: 0x00007A1C File Offset: 0x00005C1C
|
||||
public virtual void OnDeserialization(object sender)
|
||||
{
|
||||
SerializationInfo serializationInfo = this.infoCopy;
|
||||
if (serializationInfo == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
this.infoCopy = null;
|
||||
this.m_hashprovider = (IHashCodeProvider)serializationInfo.GetValue("HashProvider", typeof(IHashCodeProvider));
|
||||
if (this.m_hashprovider == null)
|
||||
{
|
||||
this.equality_comparer = (IEqualityComparer)serializationInfo.GetValue("KeyComparer", typeof(IEqualityComparer));
|
||||
}
|
||||
else
|
||||
{
|
||||
this.m_comparer = (IComparer)serializationInfo.GetValue("Comparer", typeof(IComparer));
|
||||
if (this.m_comparer == null)
|
||||
{
|
||||
throw new SerializationException("The comparer is null");
|
||||
}
|
||||
}
|
||||
this.m_readonly = serializationInfo.GetBoolean("ReadOnly");
|
||||
string[] array = (string[])serializationInfo.GetValue("Keys", typeof(string[]));
|
||||
if (array == null)
|
||||
{
|
||||
throw new SerializationException("keys is null");
|
||||
}
|
||||
object[] array2 = (object[])serializationInfo.GetValue("Values", typeof(object[]));
|
||||
if (array2 == null)
|
||||
{
|
||||
throw new SerializationException("values is null");
|
||||
}
|
||||
this.Init();
|
||||
int num = array.Length;
|
||||
for (int i = 0; i < num; i++)
|
||||
{
|
||||
this.BaseAdd(array[i], array2[i]);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets or sets a value indicating whether the <see cref="T:System.Collections.Specialized.NameObjectCollectionBase" /> instance is read-only.</summary>
|
||||
/// <returns>true if the <see cref="T:System.Collections.Specialized.NameObjectCollectionBase" /> instance is read-only; otherwise, false.</returns>
|
||||
// Token: 0x1700008A RID: 138
|
||||
// (get) Token: 0x060001EB RID: 491 RVA: 0x00007B5C File Offset: 0x00005D5C
|
||||
// (set) Token: 0x060001EC RID: 492 RVA: 0x00007B64 File Offset: 0x00005D64
|
||||
protected bool IsReadOnly
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.m_readonly;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.m_readonly = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Adds an entry with the specified key and value into the <see cref="T:System.Collections.Specialized.NameObjectCollectionBase" /> instance.</summary>
|
||||
/// <param name="name">The <see cref="T:System.String" /> key of the entry to add. The key can be null.</param>
|
||||
/// <param name="value">The <see cref="T:System.Object" /> value of the entry to add. The value can be null.</param>
|
||||
/// <exception cref="T:System.NotSupportedException">The collection is read-only. </exception>
|
||||
// Token: 0x060001ED RID: 493 RVA: 0x00007B70 File Offset: 0x00005D70
|
||||
protected void BaseAdd(string name, object value)
|
||||
{
|
||||
if (this.IsReadOnly)
|
||||
{
|
||||
throw new NotSupportedException("Collection is read-only");
|
||||
}
|
||||
NameObjectCollectionBase._Item item = new NameObjectCollectionBase._Item(name, value);
|
||||
if (name == null)
|
||||
{
|
||||
if (this.m_NullKeyItem == null)
|
||||
{
|
||||
this.m_NullKeyItem = item;
|
||||
}
|
||||
}
|
||||
else if (this.m_ItemsContainer[name] == null)
|
||||
{
|
||||
this.m_ItemsContainer.Add(name, item);
|
||||
}
|
||||
this.m_ItemsArray.Add(item);
|
||||
}
|
||||
|
||||
/// <summary>Removes all entries from the <see cref="T:System.Collections.Specialized.NameObjectCollectionBase" /> instance.</summary>
|
||||
/// <exception cref="T:System.NotSupportedException">The collection is read-only.</exception>
|
||||
// Token: 0x060001EE RID: 494 RVA: 0x00007BE4 File Offset: 0x00005DE4
|
||||
protected void BaseClear()
|
||||
{
|
||||
if (this.IsReadOnly)
|
||||
{
|
||||
throw new NotSupportedException("Collection is read-only");
|
||||
}
|
||||
this.Init();
|
||||
}
|
||||
|
||||
/// <summary>Gets the value of the entry at the specified index of the <see cref="T:System.Collections.Specialized.NameObjectCollectionBase" /> instance.</summary>
|
||||
/// <returns>An <see cref="T:System.Object" /> that represents the value of the entry at the specified index.</returns>
|
||||
/// <param name="index">The zero-based index of the value to get.</param>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="index" /> is outside the valid range of indexes for the collection. </exception>
|
||||
// Token: 0x060001EF RID: 495 RVA: 0x00007C04 File Offset: 0x00005E04
|
||||
protected object BaseGet(int index)
|
||||
{
|
||||
return ((NameObjectCollectionBase._Item)this.m_ItemsArray[index]).value;
|
||||
}
|
||||
|
||||
/// <summary>Gets the value of the first entry with the specified key from the <see cref="T:System.Collections.Specialized.NameObjectCollectionBase" /> instance.</summary>
|
||||
/// <returns>An <see cref="T:System.Object" /> that represents the value of the first entry with the specified key, if found; otherwise, null.</returns>
|
||||
/// <param name="name">The <see cref="T:System.String" /> key of the entry to get. The key can be null.</param>
|
||||
// Token: 0x060001F0 RID: 496 RVA: 0x00007C1C File Offset: 0x00005E1C
|
||||
protected object BaseGet(string name)
|
||||
{
|
||||
NameObjectCollectionBase._Item item = this.FindFirstMatchedItem(name);
|
||||
if (item == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
return item.value;
|
||||
}
|
||||
|
||||
/// <summary>Returns a <see cref="T:System.String" /> array that contains all the keys in the <see cref="T:System.Collections.Specialized.NameObjectCollectionBase" /> instance.</summary>
|
||||
/// <returns>A <see cref="T:System.String" /> array that contains all the keys in the <see cref="T:System.Collections.Specialized.NameObjectCollectionBase" /> instance.</returns>
|
||||
// Token: 0x060001F1 RID: 497 RVA: 0x00007C40 File Offset: 0x00005E40
|
||||
protected string[] BaseGetAllKeys()
|
||||
{
|
||||
int count = this.m_ItemsArray.Count;
|
||||
string[] array = new string[count];
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
array[i] = this.BaseGetKey(i);
|
||||
}
|
||||
return array;
|
||||
}
|
||||
|
||||
/// <summary>Returns an <see cref="T:System.Object" /> array that contains all the values in the <see cref="T:System.Collections.Specialized.NameObjectCollectionBase" /> instance.</summary>
|
||||
/// <returns>An <see cref="T:System.Object" /> array that contains all the values in the <see cref="T:System.Collections.Specialized.NameObjectCollectionBase" /> instance.</returns>
|
||||
// Token: 0x060001F2 RID: 498 RVA: 0x00007C80 File Offset: 0x00005E80
|
||||
protected object[] BaseGetAllValues()
|
||||
{
|
||||
int count = this.m_ItemsArray.Count;
|
||||
object[] array = new object[count];
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
array[i] = this.BaseGet(i);
|
||||
}
|
||||
return array;
|
||||
}
|
||||
|
||||
/// <summary>Returns an array of the specified type that contains all the values in the <see cref="T:System.Collections.Specialized.NameObjectCollectionBase" /> instance.</summary>
|
||||
/// <returns>An array of the specified type that contains all the values in the <see cref="T:System.Collections.Specialized.NameObjectCollectionBase" /> instance.</returns>
|
||||
/// <param name="type">A <see cref="T:System.Type" /> that represents the type of array to return.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="type" /> is null. </exception>
|
||||
/// <exception cref="T:System.ArgumentException">
|
||||
/// <paramref name="type" /> is not a valid <see cref="T:System.Type" />. </exception>
|
||||
// Token: 0x060001F3 RID: 499 RVA: 0x00007CC0 File Offset: 0x00005EC0
|
||||
protected object[] BaseGetAllValues(Type type)
|
||||
{
|
||||
if (type == null)
|
||||
{
|
||||
throw new ArgumentNullException("'type' argument can't be null");
|
||||
}
|
||||
int count = this.m_ItemsArray.Count;
|
||||
object[] array = (object[])Array.CreateInstance(type, count);
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
array[i] = this.BaseGet(i);
|
||||
}
|
||||
return array;
|
||||
}
|
||||
|
||||
/// <summary>Gets the key of the entry at the specified index of the <see cref="T:System.Collections.Specialized.NameObjectCollectionBase" /> instance.</summary>
|
||||
/// <returns>A <see cref="T:System.String" /> that represents the key of the entry at the specified index.</returns>
|
||||
/// <param name="index">The zero-based index of the key to get.</param>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="index" /> is outside the valid range of indexes for the collection. </exception>
|
||||
// Token: 0x060001F4 RID: 500 RVA: 0x00007D14 File Offset: 0x00005F14
|
||||
protected string BaseGetKey(int index)
|
||||
{
|
||||
return ((NameObjectCollectionBase._Item)this.m_ItemsArray[index]).key;
|
||||
}
|
||||
|
||||
/// <summary>Gets a value indicating whether the <see cref="T:System.Collections.Specialized.NameObjectCollectionBase" /> instance contains entries whose keys are not null.</summary>
|
||||
/// <returns>true if the <see cref="T:System.Collections.Specialized.NameObjectCollectionBase" /> instance contains entries whose keys are not null; otherwise, false.</returns>
|
||||
// Token: 0x060001F5 RID: 501 RVA: 0x00007D2C File Offset: 0x00005F2C
|
||||
protected bool BaseHasKeys()
|
||||
{
|
||||
return this.m_ItemsContainer.Count > 0;
|
||||
}
|
||||
|
||||
/// <summary>Removes the entries with the specified key from the <see cref="T:System.Collections.Specialized.NameObjectCollectionBase" /> instance.</summary>
|
||||
/// <param name="name">The <see cref="T:System.String" /> key of the entries to remove. The key can be null.</param>
|
||||
/// <exception cref="T:System.NotSupportedException">The collection is read-only. </exception>
|
||||
// Token: 0x060001F6 RID: 502 RVA: 0x00007D3C File Offset: 0x00005F3C
|
||||
protected void BaseRemove(string name)
|
||||
{
|
||||
if (this.IsReadOnly)
|
||||
{
|
||||
throw new NotSupportedException("Collection is read-only");
|
||||
}
|
||||
if (name != null)
|
||||
{
|
||||
this.m_ItemsContainer.Remove(name);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.m_NullKeyItem = null;
|
||||
}
|
||||
int num = this.m_ItemsArray.Count;
|
||||
int i = 0;
|
||||
while (i < num)
|
||||
{
|
||||
string text = this.BaseGetKey(i);
|
||||
if (this.Equals(text, name))
|
||||
{
|
||||
this.m_ItemsArray.RemoveAt(i);
|
||||
num--;
|
||||
}
|
||||
else
|
||||
{
|
||||
i++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Removes the entry at the specified index of the <see cref="T:System.Collections.Specialized.NameObjectCollectionBase" /> instance.</summary>
|
||||
/// <param name="index">The zero-based index of the entry to remove.</param>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="index" /> is outside the valid range of indexes for the collection.</exception>
|
||||
/// <exception cref="T:System.NotSupportedException">The collection is read-only.</exception>
|
||||
// Token: 0x060001F7 RID: 503 RVA: 0x00007DC8 File Offset: 0x00005FC8
|
||||
protected void BaseRemoveAt(int index)
|
||||
{
|
||||
if (this.IsReadOnly)
|
||||
{
|
||||
throw new NotSupportedException("Collection is read-only");
|
||||
}
|
||||
string text = this.BaseGetKey(index);
|
||||
if (text != null)
|
||||
{
|
||||
this.m_ItemsContainer.Remove(text);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.m_NullKeyItem = null;
|
||||
}
|
||||
this.m_ItemsArray.RemoveAt(index);
|
||||
}
|
||||
|
||||
/// <summary>Sets the value of the entry at the specified index of the <see cref="T:System.Collections.Specialized.NameObjectCollectionBase" /> instance.</summary>
|
||||
/// <param name="index">The zero-based index of the entry to set.</param>
|
||||
/// <param name="value">The <see cref="T:System.Object" /> that represents the new value of the entry to set. The value can be null.</param>
|
||||
/// <exception cref="T:System.NotSupportedException">The collection is read-only.</exception>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="index" /> is outside the valid range of indexes for the collection.</exception>
|
||||
// Token: 0x060001F8 RID: 504 RVA: 0x00007E20 File Offset: 0x00006020
|
||||
protected void BaseSet(int index, object value)
|
||||
{
|
||||
if (this.IsReadOnly)
|
||||
{
|
||||
throw new NotSupportedException("Collection is read-only");
|
||||
}
|
||||
NameObjectCollectionBase._Item item = (NameObjectCollectionBase._Item)this.m_ItemsArray[index];
|
||||
item.value = value;
|
||||
}
|
||||
|
||||
/// <summary>Sets the value of the first entry with the specified key in the <see cref="T:System.Collections.Specialized.NameObjectCollectionBase" /> instance, if found; otherwise, adds an entry with the specified key and value into the <see cref="T:System.Collections.Specialized.NameObjectCollectionBase" /> instance.</summary>
|
||||
/// <param name="name">The <see cref="T:System.String" /> key of the entry to set. The key can be null.</param>
|
||||
/// <param name="value">The <see cref="T:System.Object" /> that represents the new value of the entry to set. The value can be null.</param>
|
||||
/// <exception cref="T:System.NotSupportedException">The collection is read-only. </exception>
|
||||
// Token: 0x060001F9 RID: 505 RVA: 0x00007E5C File Offset: 0x0000605C
|
||||
protected void BaseSet(string name, object value)
|
||||
{
|
||||
if (this.IsReadOnly)
|
||||
{
|
||||
throw new NotSupportedException("Collection is read-only");
|
||||
}
|
||||
NameObjectCollectionBase._Item item = this.FindFirstMatchedItem(name);
|
||||
if (item != null)
|
||||
{
|
||||
item.value = value;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.BaseAdd(name, value);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060001FA RID: 506 RVA: 0x00007EA4 File Offset: 0x000060A4
|
||||
[global::System.MonoTODO]
|
||||
private NameObjectCollectionBase._Item FindFirstMatchedItem(string name)
|
||||
{
|
||||
if (name != null)
|
||||
{
|
||||
return (NameObjectCollectionBase._Item)this.m_ItemsContainer[name];
|
||||
}
|
||||
return this.m_NullKeyItem;
|
||||
}
|
||||
|
||||
// Token: 0x060001FB RID: 507 RVA: 0x00007EC4 File Offset: 0x000060C4
|
||||
internal bool Equals(string s1, string s2)
|
||||
{
|
||||
if (this.m_comparer != null)
|
||||
{
|
||||
return this.m_comparer.Compare(s1, s2) == 0;
|
||||
}
|
||||
return this.equality_comparer.Equals(s1, s2);
|
||||
}
|
||||
|
||||
// Token: 0x04000095 RID: 149
|
||||
private Hashtable m_ItemsContainer;
|
||||
|
||||
// Token: 0x04000096 RID: 150
|
||||
private NameObjectCollectionBase._Item m_NullKeyItem;
|
||||
|
||||
// Token: 0x04000097 RID: 151
|
||||
private ArrayList m_ItemsArray;
|
||||
|
||||
// Token: 0x04000098 RID: 152
|
||||
private IHashCodeProvider m_hashprovider;
|
||||
|
||||
// Token: 0x04000099 RID: 153
|
||||
private IComparer m_comparer;
|
||||
|
||||
// Token: 0x0400009A RID: 154
|
||||
private int m_defCapacity;
|
||||
|
||||
// Token: 0x0400009B RID: 155
|
||||
private bool m_readonly;
|
||||
|
||||
// Token: 0x0400009C RID: 156
|
||||
private SerializationInfo infoCopy;
|
||||
|
||||
// Token: 0x0400009D RID: 157
|
||||
private NameObjectCollectionBase.KeysCollection keyscoll;
|
||||
|
||||
// Token: 0x0400009E RID: 158
|
||||
private IEqualityComparer equality_comparer;
|
||||
|
||||
// Token: 0x02000030 RID: 48
|
||||
internal class _Item
|
||||
{
|
||||
// Token: 0x060001FC RID: 508 RVA: 0x00007EF0 File Offset: 0x000060F0
|
||||
public _Item(string key, object value)
|
||||
{
|
||||
this.key = key;
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
// Token: 0x0400009F RID: 159
|
||||
public string key;
|
||||
|
||||
// Token: 0x040000A0 RID: 160
|
||||
public object value;
|
||||
}
|
||||
|
||||
// Token: 0x02000031 RID: 49
|
||||
[Serializable]
|
||||
internal class _KeysEnumerator : IEnumerator
|
||||
{
|
||||
// Token: 0x060001FD RID: 509 RVA: 0x00007F08 File Offset: 0x00006108
|
||||
internal _KeysEnumerator(NameObjectCollectionBase collection)
|
||||
{
|
||||
this.m_collection = collection;
|
||||
this.Reset();
|
||||
}
|
||||
|
||||
// Token: 0x1700008B RID: 139
|
||||
// (get) Token: 0x060001FE RID: 510 RVA: 0x00007F20 File Offset: 0x00006120
|
||||
public object Current
|
||||
{
|
||||
get
|
||||
{
|
||||
if (this.m_position < this.m_collection.Count || this.m_position < 0)
|
||||
{
|
||||
return this.m_collection.BaseGetKey(this.m_position);
|
||||
}
|
||||
throw new InvalidOperationException();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060001FF RID: 511 RVA: 0x00007F5C File Offset: 0x0000615C
|
||||
public bool MoveNext()
|
||||
{
|
||||
return ++this.m_position < this.m_collection.Count;
|
||||
}
|
||||
|
||||
// Token: 0x06000200 RID: 512 RVA: 0x00007F88 File Offset: 0x00006188
|
||||
public void Reset()
|
||||
{
|
||||
this.m_position = -1;
|
||||
}
|
||||
|
||||
// Token: 0x040000A1 RID: 161
|
||||
private NameObjectCollectionBase m_collection;
|
||||
|
||||
// Token: 0x040000A2 RID: 162
|
||||
private int m_position;
|
||||
}
|
||||
|
||||
/// <summary>Represents a collection of the <see cref="T:System.String" /> keys of a collection. </summary>
|
||||
// Token: 0x02000032 RID: 50
|
||||
[Serializable]
|
||||
public class KeysCollection : ICollection, IEnumerable
|
||||
{
|
||||
// Token: 0x06000201 RID: 513 RVA: 0x00007F94 File Offset: 0x00006194
|
||||
internal KeysCollection(NameObjectCollectionBase collection)
|
||||
{
|
||||
this.m_collection = collection;
|
||||
}
|
||||
|
||||
/// <summary>Copies the entire <see cref="T:System.Collections.Specialized.NameObjectCollectionBase.KeysCollection" /> to a compatible one-dimensional <see cref="T:System.Array" />, starting at the specified index of the target array.</summary>
|
||||
/// <param name="array">The one-dimensional <see cref="T:System.Array" /> that is the destination of the elements copied from <see cref="T:System.Collections.Specialized.NameObjectCollectionBase.KeysCollection" />. The <see cref="T:System.Array" /> must have zero-based indexing. </param>
|
||||
/// <param name="index">The zero-based index in <paramref name="array" /> at which copying begins. </param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="array" /> is null. </exception>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="index" /> is less than zero. </exception>
|
||||
/// <exception cref="T:System.ArgumentException">
|
||||
/// <paramref name="array" /> is multidimensional.-or- The number of elements in the source <see cref="T:System.Collections.Specialized.NameObjectCollectionBase.KeysCollection" /> is greater than the available space from <paramref name="index" /> to the end of the destination <paramref name="array" />. </exception>
|
||||
/// <exception cref="T:System.InvalidCastException">The type of the source <see cref="T:System.Collections.Specialized.NameObjectCollectionBase.KeysCollection" /> cannot be cast automatically to the type of the destination <paramref name="array" />. </exception>
|
||||
// Token: 0x06000202 RID: 514 RVA: 0x00007FA4 File Offset: 0x000061A4
|
||||
void ICollection.CopyTo(Array array, int arrayIndex)
|
||||
{
|
||||
ArrayList itemsArray = this.m_collection.m_ItemsArray;
|
||||
if (array == null)
|
||||
{
|
||||
throw new ArgumentNullException("array");
|
||||
}
|
||||
if (arrayIndex < 0)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException("arrayIndex");
|
||||
}
|
||||
if (array.Length > 0 && arrayIndex >= array.Length)
|
||||
{
|
||||
throw new ArgumentException("arrayIndex is equal to or greater than array.Length");
|
||||
}
|
||||
if (arrayIndex + itemsArray.Count > array.Length)
|
||||
{
|
||||
throw new ArgumentException("Not enough room from arrayIndex to end of array for this KeysCollection");
|
||||
}
|
||||
if (array != null && array.Rank > 1)
|
||||
{
|
||||
throw new ArgumentException("array is multidimensional");
|
||||
}
|
||||
object[] array2 = (object[])array;
|
||||
int i = 0;
|
||||
while (i < itemsArray.Count)
|
||||
{
|
||||
array2[arrayIndex] = ((NameObjectCollectionBase._Item)itemsArray[i]).key;
|
||||
i++;
|
||||
arrayIndex++;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a value indicating whether access to the <see cref="T:System.Collections.Specialized.NameObjectCollectionBase.KeysCollection" /> is synchronized (thread safe).</summary>
|
||||
/// <returns>true if access to the <see cref="T:System.Collections.Specialized.NameObjectCollectionBase.KeysCollection" /> is synchronized (thread safe); otherwise, false. The default is false.</returns>
|
||||
// Token: 0x1700008C RID: 140
|
||||
// (get) Token: 0x06000203 RID: 515 RVA: 0x00008078 File Offset: 0x00006278
|
||||
bool ICollection.IsSynchronized
|
||||
{
|
||||
get
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets an object that can be used to synchronize access to the <see cref="T:System.Collections.Specialized.NameObjectCollectionBase.KeysCollection" />.</summary>
|
||||
/// <returns>An object that can be used to synchronize access to the <see cref="T:System.Collections.Specialized.NameObjectCollectionBase.KeysCollection" />.</returns>
|
||||
// Token: 0x1700008D RID: 141
|
||||
// (get) Token: 0x06000204 RID: 516 RVA: 0x0000807C File Offset: 0x0000627C
|
||||
object ICollection.SyncRoot
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.m_collection;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets the key at the specified index of the collection.</summary>
|
||||
/// <returns>A <see cref="T:System.String" /> that contains the key at the specified index of the collection.</returns>
|
||||
/// <param name="index">The zero-based index of the key to get from the collection. </param>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="index" /> is outside the valid range of indexes for the collection. </exception>
|
||||
// Token: 0x06000205 RID: 517 RVA: 0x00008084 File Offset: 0x00006284
|
||||
public virtual string Get(int index)
|
||||
{
|
||||
return this.m_collection.BaseGetKey(index);
|
||||
}
|
||||
|
||||
/// <summary>Gets the number of keys in the <see cref="T:System.Collections.Specialized.NameObjectCollectionBase.KeysCollection" />.</summary>
|
||||
/// <returns>The number of keys in the <see cref="T:System.Collections.Specialized.NameObjectCollectionBase.KeysCollection" />.</returns>
|
||||
// Token: 0x1700008E RID: 142
|
||||
// (get) Token: 0x06000206 RID: 518 RVA: 0x00008094 File Offset: 0x00006294
|
||||
public int Count
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.m_collection.Count;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets the entry at the specified index of the collection.</summary>
|
||||
/// <returns>The <see cref="T:System.String" /> key of the entry at the specified index of the collection.</returns>
|
||||
/// <param name="index">The zero-based index of the entry to locate in the collection. </param>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="index" /> is outside the valid range of indexes for the collection. </exception>
|
||||
// Token: 0x1700008F RID: 143
|
||||
public string this[int index]
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Get(index);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Returns an enumerator that iterates through the <see cref="T:System.Collections.Specialized.NameObjectCollectionBase.KeysCollection" />.</summary>
|
||||
/// <returns>An <see cref="T:System.Collections.IEnumerator" /> for the <see cref="T:System.Collections.Specialized.NameObjectCollectionBase.KeysCollection" />.</returns>
|
||||
// Token: 0x06000208 RID: 520 RVA: 0x000080B0 File Offset: 0x000062B0
|
||||
public IEnumerator GetEnumerator()
|
||||
{
|
||||
return new NameObjectCollectionBase._KeysEnumerator(this.m_collection);
|
||||
}
|
||||
|
||||
// Token: 0x040000A3 RID: 163
|
||||
private NameObjectCollectionBase m_collection;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,501 @@
|
||||
using System;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
|
||||
namespace System.Collections.Specialized
|
||||
{
|
||||
/// <summary>Represents a collection of associated <see cref="T:System.String" /> keys and <see cref="T:System.String" /> values that can be accessed either with the key or with the index. </summary>
|
||||
// Token: 0x02000033 RID: 51
|
||||
[Serializable]
|
||||
public class NameValueCollection : NameObjectCollectionBase
|
||||
{
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.Specialized.NameValueCollection" /> class that is empty, has the default initial capacity and uses the default case-insensitive hash code provider and the default case-insensitive comparer.</summary>
|
||||
// Token: 0x06000209 RID: 521 RVA: 0x000080C0 File Offset: 0x000062C0
|
||||
public NameValueCollection()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.Specialized.NameValueCollection" /> class that is empty, has the specified initial capacity and uses the default case-insensitive hash code provider and the default case-insensitive comparer.</summary>
|
||||
/// <param name="capacity">The initial number of entries that the <see cref="T:System.Collections.Specialized.NameValueCollection" /> can contain.</param>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="capacity" /> is less than zero.</exception>
|
||||
// Token: 0x0600020A RID: 522 RVA: 0x000080C8 File Offset: 0x000062C8
|
||||
public NameValueCollection(int capacity)
|
||||
: base(capacity)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Copies the entries from the specified <see cref="T:System.Collections.Specialized.NameValueCollection" /> to a new <see cref="T:System.Collections.Specialized.NameValueCollection" /> with the same initial capacity as the number of entries copied and using the same hash code provider and the same comparer as the source collection.</summary>
|
||||
/// <param name="col">The <see cref="T:System.Collections.Specialized.NameValueCollection" /> to copy to the new <see cref="T:System.Collections.Specialized.NameValueCollection" /> instance.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="col" /> is null.</exception>
|
||||
// Token: 0x0600020B RID: 523 RVA: 0x000080D4 File Offset: 0x000062D4
|
||||
public NameValueCollection(NameValueCollection col)
|
||||
{
|
||||
IEqualityComparer equalityComparer2;
|
||||
if (col == null)
|
||||
{
|
||||
IEqualityComparer equalityComparer = null;
|
||||
equalityComparer2 = equalityComparer;
|
||||
}
|
||||
else
|
||||
{
|
||||
equalityComparer2 = col.EqualityComparer;
|
||||
}
|
||||
IComparer comparer2;
|
||||
if (col == null)
|
||||
{
|
||||
IComparer comparer = null;
|
||||
comparer2 = comparer;
|
||||
}
|
||||
else
|
||||
{
|
||||
comparer2 = col.Comparer;
|
||||
}
|
||||
IHashCodeProvider hashCodeProvider2;
|
||||
if (col == null)
|
||||
{
|
||||
IHashCodeProvider hashCodeProvider = null;
|
||||
hashCodeProvider2 = hashCodeProvider;
|
||||
}
|
||||
else
|
||||
{
|
||||
hashCodeProvider2 = col.HashCodeProvider;
|
||||
}
|
||||
base..ctor(equalityComparer2, comparer2, hashCodeProvider2);
|
||||
if (col == null)
|
||||
{
|
||||
throw new ArgumentNullException("col");
|
||||
}
|
||||
this.Add(col);
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.Specialized.NameValueCollection" /> class that is empty, has the default initial capacity and uses the specified hash code provider and the specified comparer.</summary>
|
||||
/// <param name="hashProvider">The <see cref="T:System.Collections.IHashCodeProvider" /> that will supply the hash codes for all keys in the <see cref="T:System.Collections.Specialized.NameValueCollection" />.</param>
|
||||
/// <param name="comparer">The <see cref="T:System.Collections.IComparer" /> to use to determine whether two keys are equal.</param>
|
||||
// Token: 0x0600020C RID: 524 RVA: 0x0000813C File Offset: 0x0000633C
|
||||
[Obsolete("Use NameValueCollection (IEqualityComparer)")]
|
||||
public NameValueCollection(IHashCodeProvider hashProvider, IComparer comparer)
|
||||
: base(hashProvider, comparer)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Copies the entries from the specified <see cref="T:System.Collections.Specialized.NameValueCollection" /> to a new <see cref="T:System.Collections.Specialized.NameValueCollection" /> with the specified initial capacity or the same initial capacity as the number of entries copied, whichever is greater, and using the default case-insensitive hash code provider and the default case-insensitive comparer.</summary>
|
||||
/// <param name="capacity">The initial number of entries that the <see cref="T:System.Collections.Specialized.NameValueCollection" /> can contain.</param>
|
||||
/// <param name="col">The <see cref="T:System.Collections.Specialized.NameValueCollection" /> to copy to the new <see cref="T:System.Collections.Specialized.NameValueCollection" /> instance.</param>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="capacity" /> is less than zero.</exception>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="col" /> is null.</exception>
|
||||
// Token: 0x0600020D RID: 525 RVA: 0x00008148 File Offset: 0x00006348
|
||||
public NameValueCollection(int capacity, NameValueCollection col)
|
||||
{
|
||||
IHashCodeProvider hashCodeProvider2;
|
||||
if (col == null)
|
||||
{
|
||||
IHashCodeProvider hashCodeProvider = null;
|
||||
hashCodeProvider2 = hashCodeProvider;
|
||||
}
|
||||
else
|
||||
{
|
||||
hashCodeProvider2 = col.HashCodeProvider;
|
||||
}
|
||||
IComparer comparer2;
|
||||
if (col == null)
|
||||
{
|
||||
IComparer comparer = null;
|
||||
comparer2 = comparer;
|
||||
}
|
||||
else
|
||||
{
|
||||
comparer2 = col.Comparer;
|
||||
}
|
||||
base..ctor(capacity, hashCodeProvider2, comparer2);
|
||||
this.Add(col);
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.Specialized.NameValueCollection" /> class that is serializable and uses the specified <see cref="T:System.Runtime.Serialization.SerializationInfo" /> and <see cref="T:System.Runtime.Serialization.StreamingContext" />.</summary>
|
||||
/// <param name="info">A <see cref="T:System.Runtime.Serialization.SerializationInfo" /> object that contains the information required to serialize the new <see cref="T:System.Collections.Specialized.NameValueCollection" /> instance.</param>
|
||||
/// <param name="context">A <see cref="T:System.Runtime.Serialization.StreamingContext" /> object that contains the source and destination of the serialized stream associated with the new <see cref="T:System.Collections.Specialized.NameValueCollection" /> instance.</param>
|
||||
// Token: 0x0600020E RID: 526 RVA: 0x0000818C File Offset: 0x0000638C
|
||||
protected NameValueCollection(SerializationInfo info, StreamingContext context)
|
||||
: base(info, context)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.Specialized.NameValueCollection" /> class that is empty, has the specified initial capacity and uses the specified hash code provider and the specified comparer.</summary>
|
||||
/// <param name="capacity">The initial number of entries that the <see cref="T:System.Collections.Specialized.NameValueCollection" /> can contain.</param>
|
||||
/// <param name="hashProvider">The <see cref="T:System.Collections.IHashCodeProvider" /> that will supply the hash codes for all keys in the <see cref="T:System.Collections.Specialized.NameValueCollection" />.</param>
|
||||
/// <param name="comparer">The <see cref="T:System.Collections.IComparer" /> to use to determine whether two keys are equal.</param>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="capacity" /> is less than zero.</exception>
|
||||
// Token: 0x0600020F RID: 527 RVA: 0x00008198 File Offset: 0x00006398
|
||||
[Obsolete("Use NameValueCollection (IEqualityComparer)")]
|
||||
public NameValueCollection(int capacity, IHashCodeProvider hashProvider, IComparer comparer)
|
||||
: base(capacity, hashProvider, comparer)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.Specialized.NameValueCollection" /> class that is empty, has the default initial capacity, and uses the specified <see cref="T:System.Collections.IEqualityComparer" /> object.</summary>
|
||||
/// <param name="equalityComparer">The <see cref="T:System.Collections.IEqualityComparer" /> object to use to determine whether two keys are equal and to generate hash codes for the keys in the collection.</param>
|
||||
// Token: 0x06000210 RID: 528 RVA: 0x000081A4 File Offset: 0x000063A4
|
||||
public NameValueCollection(IEqualityComparer equalityComparer)
|
||||
: base(equalityComparer)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.Specialized.NameValueCollection" /> class that is empty, has the specified initial capacity, and uses the specified <see cref="T:System.Collections.IEqualityComparer" /> object.</summary>
|
||||
/// <param name="capacity">The initial number of entries that the <see cref="T:System.Collections.Specialized.NameValueCollection" /> object can contain.</param>
|
||||
/// <param name="equalityComparer">The <see cref="T:System.Collections.IEqualityComparer" /> object to use to determine whether two keys are equal and to generate hash codes for the keys in the collection.</param>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="capacity" /> is less than zero.</exception>
|
||||
// Token: 0x06000211 RID: 529 RVA: 0x000081B0 File Offset: 0x000063B0
|
||||
public NameValueCollection(int capacity, IEqualityComparer equalityComparer)
|
||||
: base(capacity, equalityComparer)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Gets all the keys in the <see cref="T:System.Collections.Specialized.NameValueCollection" />.</summary>
|
||||
/// <returns>A <see cref="T:System.String" /> array that contains all the keys of the <see cref="T:System.Collections.Specialized.NameValueCollection" />.</returns>
|
||||
// Token: 0x17000090 RID: 144
|
||||
// (get) Token: 0x06000212 RID: 530 RVA: 0x000081BC File Offset: 0x000063BC
|
||||
public virtual string[] AllKeys
|
||||
{
|
||||
get
|
||||
{
|
||||
if (this.cachedAllKeys == null)
|
||||
{
|
||||
this.cachedAllKeys = base.BaseGetAllKeys();
|
||||
}
|
||||
return this.cachedAllKeys;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets the entry at the specified index of the <see cref="T:System.Collections.Specialized.NameValueCollection" />.</summary>
|
||||
/// <returns>A <see cref="T:System.String" /> that contains the comma-separated list of values at the specified index of the collection.</returns>
|
||||
/// <param name="index">The zero-based index of the entry to locate in the collection.</param>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="index" /> is outside the valid range of indexes for the collection.</exception>
|
||||
// Token: 0x17000091 RID: 145
|
||||
public string this[int index]
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Get(index);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets or sets the entry with the specified key in the <see cref="T:System.Collections.Specialized.NameValueCollection" />.</summary>
|
||||
/// <returns>A <see cref="T:System.String" /> that contains the comma-separated list of values associated with the specified key, if found; otherwise, null.</returns>
|
||||
/// <param name="name">The <see cref="T:System.String" /> key of the entry to locate. The key can be null.</param>
|
||||
/// <exception cref="T:System.NotSupportedException">The collection is read-only and the operation attempts to modify the collection. </exception>
|
||||
// Token: 0x17000092 RID: 146
|
||||
public string this[string name]
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Get(name);
|
||||
}
|
||||
set
|
||||
{
|
||||
this.Set(name, value);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Copies the entries in the specified <see cref="T:System.Collections.Specialized.NameValueCollection" /> to the current <see cref="T:System.Collections.Specialized.NameValueCollection" />.</summary>
|
||||
/// <param name="c">The <see cref="T:System.Collections.Specialized.NameValueCollection" /> to copy to the current <see cref="T:System.Collections.Specialized.NameValueCollection" />.</param>
|
||||
/// <exception cref="T:System.NotSupportedException">The collection is read-only.</exception>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="c" /> is null.</exception>
|
||||
// Token: 0x06000216 RID: 534 RVA: 0x00008200 File Offset: 0x00006400
|
||||
public void Add(NameValueCollection c)
|
||||
{
|
||||
if (base.IsReadOnly)
|
||||
{
|
||||
throw new NotSupportedException("Collection is read-only");
|
||||
}
|
||||
if (c == null)
|
||||
{
|
||||
throw new ArgumentNullException("c");
|
||||
}
|
||||
this.InvalidateCachedArrays();
|
||||
int count = c.Count;
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
string key = c.GetKey(i);
|
||||
ArrayList arrayList = (ArrayList)c.BaseGet(i);
|
||||
ArrayList arrayList2 = (ArrayList)base.BaseGet(key);
|
||||
if (arrayList2 != null && arrayList != null)
|
||||
{
|
||||
arrayList2.AddRange(arrayList);
|
||||
}
|
||||
else if (arrayList != null)
|
||||
{
|
||||
arrayList2 = new ArrayList(arrayList);
|
||||
}
|
||||
base.BaseSet(key, arrayList2);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Adds an entry with the specified name and value to the <see cref="T:System.Collections.Specialized.NameValueCollection" />.</summary>
|
||||
/// <param name="name">The <see cref="T:System.String" /> key of the entry to add. The key can be null.</param>
|
||||
/// <param name="value">The <see cref="T:System.String" /> value of the entry to add. The value can be null.</param>
|
||||
/// <exception cref="T:System.NotSupportedException">The collection is read-only. </exception>
|
||||
// Token: 0x06000217 RID: 535 RVA: 0x000082A8 File Offset: 0x000064A8
|
||||
public virtual void Add(string name, string val)
|
||||
{
|
||||
if (base.IsReadOnly)
|
||||
{
|
||||
throw new NotSupportedException("Collection is read-only");
|
||||
}
|
||||
this.InvalidateCachedArrays();
|
||||
ArrayList arrayList = (ArrayList)base.BaseGet(name);
|
||||
if (arrayList == null)
|
||||
{
|
||||
arrayList = new ArrayList();
|
||||
if (val != null)
|
||||
{
|
||||
arrayList.Add(val);
|
||||
}
|
||||
base.BaseAdd(name, arrayList);
|
||||
}
|
||||
else if (val != null)
|
||||
{
|
||||
arrayList.Add(val);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Invalidates the cached arrays and removes all entries from the <see cref="T:System.Collections.Specialized.NameValueCollection" />.</summary>
|
||||
/// <exception cref="T:System.NotSupportedException">The collection is read-only.</exception>
|
||||
/// <PermissionSet>
|
||||
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="UnmanagedCode, ControlEvidence" />
|
||||
/// </PermissionSet>
|
||||
// Token: 0x06000218 RID: 536 RVA: 0x00008314 File Offset: 0x00006514
|
||||
public virtual void Clear()
|
||||
{
|
||||
if (base.IsReadOnly)
|
||||
{
|
||||
throw new NotSupportedException("Collection is read-only");
|
||||
}
|
||||
this.InvalidateCachedArrays();
|
||||
base.BaseClear();
|
||||
}
|
||||
|
||||
/// <summary>Copies the entire <see cref="T:System.Collections.Specialized.NameValueCollection" /> to a compatible one-dimensional <see cref="T:System.Array" />, starting at the specified index of the target array.</summary>
|
||||
/// <param name="dest">The one-dimensional <see cref="T:System.Array" /> that is the destination of the elements copied from <see cref="T:System.Collections.Specialized.NameValueCollection" />. The <see cref="T:System.Array" /> must have zero-based indexing.</param>
|
||||
/// <param name="index">The zero-based index in <paramref name="dest" /> at which copying begins.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="dest" /> is null.</exception>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="index" /> is less than zero.</exception>
|
||||
/// <exception cref="T:System.ArgumentException">
|
||||
/// <paramref name="dest" /> is multidimensional.-or- The number of elements in the source <see cref="T:System.Collections.Specialized.NameValueCollection" /> is greater than the available space from <paramref name="index" /> to the end of the destination <paramref name="dest" />.</exception>
|
||||
/// <exception cref="T:System.InvalidCastException">The type of the source <see cref="T:System.Collections.Specialized.NameValueCollection" /> cannot be cast automatically to the type of the destination <paramref name="dest" />.</exception>
|
||||
// Token: 0x06000219 RID: 537 RVA: 0x00008344 File Offset: 0x00006544
|
||||
public void CopyTo(Array dest, int index)
|
||||
{
|
||||
if (dest == null)
|
||||
{
|
||||
throw new ArgumentNullException("dest", "Null argument - dest");
|
||||
}
|
||||
if (index < 0)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException("index", "index is less than 0");
|
||||
}
|
||||
if (dest.Rank > 1)
|
||||
{
|
||||
throw new ArgumentException("dest", "multidim");
|
||||
}
|
||||
if (this.cachedAll == null)
|
||||
{
|
||||
this.RefreshCachedAll();
|
||||
}
|
||||
try
|
||||
{
|
||||
this.cachedAll.CopyTo(dest, index);
|
||||
}
|
||||
catch (ArrayTypeMismatchException)
|
||||
{
|
||||
throw new InvalidCastException();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600021A RID: 538 RVA: 0x000083E8 File Offset: 0x000065E8
|
||||
private void RefreshCachedAll()
|
||||
{
|
||||
this.cachedAll = null;
|
||||
int count = this.Count;
|
||||
this.cachedAll = new string[count];
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
this.cachedAll[i] = this.Get(i);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets the values at the specified index of the <see cref="T:System.Collections.Specialized.NameValueCollection" /> combined into one comma-separated list.</summary>
|
||||
/// <returns>A <see cref="T:System.String" /> that contains a comma-separated list of the values at the specified index of the <see cref="T:System.Collections.Specialized.NameValueCollection" />, if found; otherwise, null.</returns>
|
||||
/// <param name="index">The zero-based index of the entry that contains the values to get from the collection.</param>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="index" /> is outside the valid range of indexes for the collection.</exception>
|
||||
// Token: 0x0600021B RID: 539 RVA: 0x00008430 File Offset: 0x00006630
|
||||
public virtual string Get(int index)
|
||||
{
|
||||
ArrayList arrayList = (ArrayList)base.BaseGet(index);
|
||||
return NameValueCollection.AsSingleString(arrayList);
|
||||
}
|
||||
|
||||
/// <summary>Gets the values associated with the specified key from the <see cref="T:System.Collections.Specialized.NameValueCollection" /> combined into one comma-separated list.</summary>
|
||||
/// <returns>A <see cref="T:System.String" /> that contains a comma-separated list of the values associated with the specified key from the <see cref="T:System.Collections.Specialized.NameValueCollection" />, if found; otherwise, null.</returns>
|
||||
/// <param name="name">The <see cref="T:System.String" /> key of the entry that contains the values to get. The key can be null.</param>
|
||||
// Token: 0x0600021C RID: 540 RVA: 0x00008450 File Offset: 0x00006650
|
||||
public virtual string Get(string name)
|
||||
{
|
||||
ArrayList arrayList = (ArrayList)base.BaseGet(name);
|
||||
return NameValueCollection.AsSingleString(arrayList);
|
||||
}
|
||||
|
||||
// Token: 0x0600021D RID: 541 RVA: 0x00008470 File Offset: 0x00006670
|
||||
private static string AsSingleString(ArrayList values)
|
||||
{
|
||||
if (values == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
int count = values.Count;
|
||||
switch (count)
|
||||
{
|
||||
case 0:
|
||||
return null;
|
||||
case 1:
|
||||
return (string)values[0];
|
||||
case 2:
|
||||
return (string)values[0] + ',' + (string)values[1];
|
||||
default:
|
||||
{
|
||||
int num = count;
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
num += ((string)values[i]).Length;
|
||||
}
|
||||
StringBuilder stringBuilder = new StringBuilder((string)values[0], num);
|
||||
for (int j = 1; j < count; j++)
|
||||
{
|
||||
stringBuilder.Append(',');
|
||||
stringBuilder.Append(values[j]);
|
||||
}
|
||||
return stringBuilder.ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets the key at the specified index of the <see cref="T:System.Collections.Specialized.NameValueCollection" />.</summary>
|
||||
/// <returns>A <see cref="T:System.String" /> that contains the key at the specified index of the <see cref="T:System.Collections.Specialized.NameValueCollection" />, if found; otherwise, null.</returns>
|
||||
/// <param name="index">The zero-based index of the key to get from the collection.</param>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="index" /> is outside the valid range of indexes for the collection. </exception>
|
||||
// Token: 0x0600021E RID: 542 RVA: 0x00008550 File Offset: 0x00006750
|
||||
public virtual string GetKey(int index)
|
||||
{
|
||||
return base.BaseGetKey(index);
|
||||
}
|
||||
|
||||
/// <summary>Gets the values at the specified index of the <see cref="T:System.Collections.Specialized.NameValueCollection" />.</summary>
|
||||
/// <returns>A <see cref="T:System.String" /> array that contains the values at the specified index of the <see cref="T:System.Collections.Specialized.NameValueCollection" />, if found; otherwise, null.</returns>
|
||||
/// <param name="index">The zero-based index of the entry that contains the values to get from the collection.</param>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="index" /> is outside the valid range of indexes for the collection. </exception>
|
||||
// Token: 0x0600021F RID: 543 RVA: 0x0000855C File Offset: 0x0000675C
|
||||
public virtual string[] GetValues(int index)
|
||||
{
|
||||
ArrayList arrayList = (ArrayList)base.BaseGet(index);
|
||||
return NameValueCollection.AsStringArray(arrayList);
|
||||
}
|
||||
|
||||
/// <summary>Gets the values associated with the specified key from the <see cref="T:System.Collections.Specialized.NameValueCollection" />.</summary>
|
||||
/// <returns>A <see cref="T:System.String" /> array that contains the values associated with the specified key from the <see cref="T:System.Collections.Specialized.NameValueCollection" />, if found; otherwise, null.</returns>
|
||||
/// <param name="name">The <see cref="T:System.String" /> key of the entry that contains the values to get. The key can be null.</param>
|
||||
// Token: 0x06000220 RID: 544 RVA: 0x0000857C File Offset: 0x0000677C
|
||||
public virtual string[] GetValues(string name)
|
||||
{
|
||||
ArrayList arrayList = (ArrayList)base.BaseGet(name);
|
||||
return NameValueCollection.AsStringArray(arrayList);
|
||||
}
|
||||
|
||||
// Token: 0x06000221 RID: 545 RVA: 0x0000859C File Offset: 0x0000679C
|
||||
private static string[] AsStringArray(ArrayList values)
|
||||
{
|
||||
if (values == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
int count = values.Count;
|
||||
if (count == 0)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
string[] array = new string[count];
|
||||
values.CopyTo(array);
|
||||
return array;
|
||||
}
|
||||
|
||||
/// <summary>Gets a value indicating whether the <see cref="T:System.Collections.Specialized.NameValueCollection" /> contains keys that are not null.</summary>
|
||||
/// <returns>true if the <see cref="T:System.Collections.Specialized.NameValueCollection" /> contains keys that are not null; otherwise, false.</returns>
|
||||
// Token: 0x06000222 RID: 546 RVA: 0x000085D0 File Offset: 0x000067D0
|
||||
public bool HasKeys()
|
||||
{
|
||||
return base.BaseHasKeys();
|
||||
}
|
||||
|
||||
/// <summary>Removes the entries with the specified key from the <see cref="T:System.Collections.Specialized.NameObjectCollectionBase" /> instance.</summary>
|
||||
/// <param name="name">The <see cref="T:System.String" /> key of the entry to remove. The key can be null.</param>
|
||||
/// <exception cref="T:System.NotSupportedException">The collection is read-only.</exception>
|
||||
// Token: 0x06000223 RID: 547 RVA: 0x000085D8 File Offset: 0x000067D8
|
||||
public virtual void Remove(string name)
|
||||
{
|
||||
if (base.IsReadOnly)
|
||||
{
|
||||
throw new NotSupportedException("Collection is read-only");
|
||||
}
|
||||
this.InvalidateCachedArrays();
|
||||
base.BaseRemove(name);
|
||||
}
|
||||
|
||||
/// <summary>Sets the value of an entry in the <see cref="T:System.Collections.Specialized.NameValueCollection" />.</summary>
|
||||
/// <param name="name">The <see cref="T:System.String" /> key of the entry to add the new value to. The key can be null.</param>
|
||||
/// <param name="value">The <see cref="T:System.Object" /> that represents the new value to add to the specified entry. The value can be null.</param>
|
||||
/// <exception cref="T:System.NotSupportedException">The collection is read-only.</exception>
|
||||
// Token: 0x06000224 RID: 548 RVA: 0x00008600 File Offset: 0x00006800
|
||||
public virtual void Set(string name, string value)
|
||||
{
|
||||
if (base.IsReadOnly)
|
||||
{
|
||||
throw new NotSupportedException("Collection is read-only");
|
||||
}
|
||||
this.InvalidateCachedArrays();
|
||||
ArrayList arrayList = new ArrayList();
|
||||
if (value != null)
|
||||
{
|
||||
arrayList.Add(value);
|
||||
base.BaseSet(name, arrayList);
|
||||
}
|
||||
else
|
||||
{
|
||||
base.BaseSet(name, null);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Resets the cached arrays of the collection to null.</summary>
|
||||
// Token: 0x06000225 RID: 549 RVA: 0x00008654 File Offset: 0x00006854
|
||||
protected void InvalidateCachedArrays()
|
||||
{
|
||||
this.cachedAllKeys = null;
|
||||
this.cachedAll = null;
|
||||
}
|
||||
|
||||
// Token: 0x040000A4 RID: 164
|
||||
private string[] cachedAllKeys;
|
||||
|
||||
// Token: 0x040000A5 RID: 165
|
||||
private string[] cachedAll;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,584 @@
|
||||
using System;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
namespace System.Collections.Specialized
|
||||
{
|
||||
/// <summary>Represents a collection of key/value pairs that are accessible by the key or index.</summary>
|
||||
// Token: 0x02000034 RID: 52
|
||||
[Serializable]
|
||||
public class OrderedDictionary : ICollection, IOrderedDictionary, IDictionary, IDeserializationCallback, IEnumerable, ISerializable
|
||||
{
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.Specialized.OrderedDictionary" /> class.</summary>
|
||||
// Token: 0x06000226 RID: 550 RVA: 0x00008664 File Offset: 0x00006864
|
||||
public OrderedDictionary()
|
||||
{
|
||||
this.list = new ArrayList();
|
||||
this.hash = new Hashtable();
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.Specialized.OrderedDictionary" /> class using the specified initial capacity.</summary>
|
||||
/// <param name="capacity">The initial number of elements that the <see cref="T:System.Collections.Specialized.OrderedDictionary" /> collection can contain.</param>
|
||||
// Token: 0x06000227 RID: 551 RVA: 0x00008684 File Offset: 0x00006884
|
||||
public OrderedDictionary(int capacity)
|
||||
{
|
||||
this.initialCapacity = ((capacity >= 0) ? capacity : 0);
|
||||
this.list = new ArrayList(this.initialCapacity);
|
||||
this.hash = new Hashtable(this.initialCapacity);
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.Specialized.OrderedDictionary" /> class using the specified comparer.</summary>
|
||||
/// <param name="comparer">The <see cref="T:System.Collections.IComparer" /> to use to determine whether two keys are equal.-or- null to use the default comparer, which is each key's implementation of <see cref="M:System.Object.Equals(System.Object)" />.</param>
|
||||
// Token: 0x06000228 RID: 552 RVA: 0x000086D0 File Offset: 0x000068D0
|
||||
public OrderedDictionary(IEqualityComparer equalityComparer)
|
||||
{
|
||||
this.list = new ArrayList();
|
||||
this.hash = new Hashtable(equalityComparer);
|
||||
this.comparer = equalityComparer;
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.Specialized.OrderedDictionary" /> class using the specified initial capacity and comparer.</summary>
|
||||
/// <param name="capacity">The initial number of elements that the <see cref="T:System.Collections.Specialized.OrderedDictionary" /> collection can contain.</param>
|
||||
/// <param name="comparer">The <see cref="T:System.Collections.IComparer" /> to use to determine whether two keys are equal.-or- null to use the default comparer, which is each key's implementation of <see cref="M:System.Object.Equals(System.Object)" />.</param>
|
||||
// Token: 0x06000229 RID: 553 RVA: 0x00008704 File Offset: 0x00006904
|
||||
public OrderedDictionary(int capacity, IEqualityComparer equalityComparer)
|
||||
{
|
||||
this.initialCapacity = ((capacity >= 0) ? capacity : 0);
|
||||
this.list = new ArrayList(this.initialCapacity);
|
||||
this.hash = new Hashtable(this.initialCapacity, equalityComparer);
|
||||
this.comparer = equalityComparer;
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.Specialized.OrderedDictionary" /> class that is serializable using the specified <see cref="T:System.Runtime.Serialization.SerializationInfo" /> and <see cref="T:System.Runtime.Serialization.StreamingContext" /> objects.</summary>
|
||||
/// <param name="info">A <see cref="T:System.Runtime.Serialization.SerializationInfo" /> object containing the information required to serialize the <see cref="T:System.Collections.Specialized.OrderedDictionary" /> collection.</param>
|
||||
/// <param name="context">A <see cref="T:System.Runtime.Serialization.StreamingContext" /> object containing the source and destination of the serialized stream associated with the <see cref="T:System.Collections.Specialized.OrderedDictionary" />.</param>
|
||||
// Token: 0x0600022A RID: 554 RVA: 0x00008758 File Offset: 0x00006958
|
||||
protected OrderedDictionary(SerializationInfo info, StreamingContext context)
|
||||
{
|
||||
this.serializationInfo = info;
|
||||
}
|
||||
|
||||
/// <summary>Implements the <see cref="T:System.Runtime.Serialization.ISerializable" /> interface and is called back by the deserialization event when deserialization is complete.</summary>
|
||||
/// <param name="sender">The source of the deserialization event.</param>
|
||||
// Token: 0x0600022B RID: 555 RVA: 0x00008768 File Offset: 0x00006968
|
||||
void IDeserializationCallback.OnDeserialization(object sender)
|
||||
{
|
||||
if (this.serializationInfo == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
this.comparer = (IEqualityComparer)this.serializationInfo.GetValue("KeyComparer", typeof(IEqualityComparer));
|
||||
this.readOnly = this.serializationInfo.GetBoolean("ReadOnly");
|
||||
this.initialCapacity = this.serializationInfo.GetInt32("InitialCapacity");
|
||||
if (this.list == null)
|
||||
{
|
||||
this.list = new ArrayList();
|
||||
}
|
||||
else
|
||||
{
|
||||
this.list.Clear();
|
||||
}
|
||||
this.hash = new Hashtable(this.comparer);
|
||||
object[] array = (object[])this.serializationInfo.GetValue("ArrayList", typeof(object[]));
|
||||
foreach (DictionaryEntry dictionaryEntry in array)
|
||||
{
|
||||
this.hash.Add(dictionaryEntry.Key, dictionaryEntry.Value);
|
||||
this.list.Add(dictionaryEntry);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Returns an <see cref="T:System.Collections.IDictionaryEnumerator" /> object that iterates through the <see cref="T:System.Collections.Specialized.OrderedDictionary" /> collection.</summary>
|
||||
/// <returns>An <see cref="T:System.Collections.IDictionaryEnumerator" /> object for the <see cref="T:System.Collections.Specialized.OrderedDictionary" /> collection.</returns>
|
||||
// Token: 0x0600022C RID: 556 RVA: 0x00008874 File Offset: 0x00006A74
|
||||
IEnumerator IEnumerable.GetEnumerator()
|
||||
{
|
||||
return this.list.GetEnumerator();
|
||||
}
|
||||
|
||||
/// <summary>Gets a value indicating whether access to the <see cref="T:System.Collections.Specialized.OrderedDictionary" /> object is synchronized (thread-safe).</summary>
|
||||
/// <returns>This method always returns false.</returns>
|
||||
// Token: 0x17000093 RID: 147
|
||||
// (get) Token: 0x0600022D RID: 557 RVA: 0x00008884 File Offset: 0x00006A84
|
||||
bool ICollection.IsSynchronized
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.list.IsSynchronized;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets an object that can be used to synchronize access to the <see cref="T:System.Collections.Specialized.OrderedDictionary" /> object.</summary>
|
||||
/// <returns>An object that can be used to synchronize access to the <see cref="T:System.Collections.Specialized.OrderedDictionary" /> object.</returns>
|
||||
// Token: 0x17000094 RID: 148
|
||||
// (get) Token: 0x0600022E RID: 558 RVA: 0x00008894 File Offset: 0x00006A94
|
||||
object ICollection.SyncRoot
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.list.SyncRoot;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a value indicating whether the <see cref="T:System.Collections.Specialized.OrderedDictionary" /> has a fixed size.</summary>
|
||||
/// <returns>true if the <see cref="T:System.Collections.Specialized.OrderedDictionary" /> has a fixed size; otherwise, false. The default is false.</returns>
|
||||
// Token: 0x17000095 RID: 149
|
||||
// (get) Token: 0x0600022F RID: 559 RVA: 0x000088A4 File Offset: 0x00006AA4
|
||||
bool IDictionary.IsFixedSize
|
||||
{
|
||||
get
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Implements the <see cref="T:System.Runtime.Serialization.ISerializable" /> interface and is called back by the deserialization event when deserialization is complete.</summary>
|
||||
/// <param name="sender">The source of the deserialization event.</param>
|
||||
/// <exception cref="T:System.Runtime.Serialization.SerializationException">The <see cref="T:System.Runtime.Serialization.SerializationInfo" /> object associated with the current <see cref="T:System.Collections.Specialized.OrderedDictionary" /> collection is invalid.</exception>
|
||||
// Token: 0x06000230 RID: 560 RVA: 0x000088A8 File Offset: 0x00006AA8
|
||||
protected virtual void OnDeserialization(object sender)
|
||||
{
|
||||
((IDeserializationCallback)this).OnDeserialization(sender);
|
||||
}
|
||||
|
||||
/// <summary>Implements the <see cref="T:System.Runtime.Serialization.ISerializable" /> interface and returns the data needed to serialize the <see cref="T:System.Collections.Specialized.OrderedDictionary" /> collection.</summary>
|
||||
/// <param name="info">A <see cref="T:System.Runtime.Serialization.SerializationInfo" /> object containing the information required to serialize the <see cref="T:System.Collections.Specialized.OrderedDictionary" /> collection.</param>
|
||||
/// <param name="context">A <see cref="T:System.Runtime.Serialization.StreamingContext" /> object containing the source and destination of the serialized stream associated with the <see cref="T:System.Collections.Specialized.OrderedDictionary" />.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="info" /> is null.</exception>
|
||||
// Token: 0x06000231 RID: 561 RVA: 0x000088B4 File Offset: 0x00006AB4
|
||||
public virtual void GetObjectData(SerializationInfo info, StreamingContext context)
|
||||
{
|
||||
if (info == null)
|
||||
{
|
||||
throw new ArgumentNullException("info");
|
||||
}
|
||||
info.AddValue("KeyComparer", this.comparer, typeof(IEqualityComparer));
|
||||
info.AddValue("ReadOnly", this.readOnly);
|
||||
info.AddValue("InitialCapacity", this.initialCapacity);
|
||||
object[] array = new object[this.hash.Count];
|
||||
this.hash.CopyTo(array, 0);
|
||||
info.AddValue("ArrayList", array);
|
||||
}
|
||||
|
||||
/// <summary>Gets the number of key/values pairs contained in the <see cref="T:System.Collections.Specialized.OrderedDictionary" /> collection.</summary>
|
||||
/// <returns>The number of key/value pairs contained in the <see cref="T:System.Collections.Specialized.OrderedDictionary" /> collection.</returns>
|
||||
// Token: 0x17000096 RID: 150
|
||||
// (get) Token: 0x06000232 RID: 562 RVA: 0x0000893C File Offset: 0x00006B3C
|
||||
public int Count
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.list.Count;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Copies the <see cref="T:System.Collections.Specialized.OrderedDictionary" /> elements to a one-dimensional <see cref="T:System.Array" /> object at the specified index.</summary>
|
||||
/// <param name="array">The one-dimensional <see cref="T:System.Array" /> object that is the destination of the <see cref="T:System.Collections.DictionaryEntry" /> objects copied from <see cref="T:System.Collections.Specialized.OrderedDictionary" /> collection. The <see cref="T:System.Array" /> must have zero-based indexing.</param>
|
||||
/// <param name="index">The zero-based index in <paramref name="array" /> at which copying begins.</param>
|
||||
// Token: 0x06000233 RID: 563 RVA: 0x0000894C File Offset: 0x00006B4C
|
||||
public void CopyTo(Array array, int index)
|
||||
{
|
||||
this.list.CopyTo(array, index);
|
||||
}
|
||||
|
||||
/// <summary>Gets a value indicating whether the <see cref="T:System.Collections.Specialized.OrderedDictionary" /> collection is read-only.</summary>
|
||||
/// <returns>true if the <see cref="T:System.Collections.Specialized.OrderedDictionary" /> collection is read-only; otherwise, false. The default is false.</returns>
|
||||
// Token: 0x17000097 RID: 151
|
||||
// (get) Token: 0x06000234 RID: 564 RVA: 0x0000895C File Offset: 0x00006B5C
|
||||
public bool IsReadOnly
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.readOnly;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets or sets the value with the specified key.</summary>
|
||||
/// <returns>The value associated with the specified key. If the specified key is not found, attempting to get it returns null, and attempting to set it creates a new element using the specified key.</returns>
|
||||
/// <param name="key">The key of the value to get or set.</param>
|
||||
/// <exception cref="T:System.NotSupportedException">The property is being set and the <see cref="T:System.Collections.Specialized.OrderedDictionary" /> collection is read-only.</exception>
|
||||
// Token: 0x17000098 RID: 152
|
||||
public object this[object key]
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.hash[key];
|
||||
}
|
||||
set
|
||||
{
|
||||
this.WriteCheck();
|
||||
if (this.hash.Contains(key))
|
||||
{
|
||||
int num = this.FindListEntry(key);
|
||||
this.list[num] = new DictionaryEntry(key, value);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.list.Add(new DictionaryEntry(key, value));
|
||||
}
|
||||
this.hash[key] = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets or sets the value at the specified index.</summary>
|
||||
/// <returns>The value of the item at the specified index. </returns>
|
||||
/// <param name="index">The zero-based index of the value to get or set.</param>
|
||||
/// <exception cref="T:System.NotSupportedException">The property is being set and the <see cref="T:System.Collections.Specialized.OrderedDictionary" /> collection is read-only.</exception>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="index" /> is less than zero.-or-<paramref name="index" /> is equal to or greater than <see cref="P:System.Collections.Specialized.OrderedDictionary.Count" />.</exception>
|
||||
// Token: 0x17000099 RID: 153
|
||||
public object this[int index]
|
||||
{
|
||||
get
|
||||
{
|
||||
return ((DictionaryEntry)this.list[index]).Value;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.WriteCheck();
|
||||
DictionaryEntry dictionaryEntry = (DictionaryEntry)this.list[index];
|
||||
dictionaryEntry.Value = value;
|
||||
this.list[index] = dictionaryEntry;
|
||||
this.hash[dictionaryEntry.Key] = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets an <see cref="T:System.Collections.ICollection" /> object containing the keys in the <see cref="T:System.Collections.Specialized.OrderedDictionary" /> collection.</summary>
|
||||
/// <returns>An <see cref="T:System.Collections.ICollection" /> object containing the keys in the <see cref="T:System.Collections.Specialized.OrderedDictionary" /> collection.</returns>
|
||||
// Token: 0x1700009A RID: 154
|
||||
// (get) Token: 0x06000239 RID: 569 RVA: 0x00008A60 File Offset: 0x00006C60
|
||||
public ICollection Keys
|
||||
{
|
||||
get
|
||||
{
|
||||
return new OrderedDictionary.OrderedCollection(this.list, true);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets an <see cref="T:System.Collections.ICollection" /> object containing the values in the <see cref="T:System.Collections.Specialized.OrderedDictionary" /> collection.</summary>
|
||||
/// <returns>An <see cref="T:System.Collections.ICollection" /> object containing the values in the <see cref="T:System.Collections.Specialized.OrderedDictionary" /> collection.</returns>
|
||||
// Token: 0x1700009B RID: 155
|
||||
// (get) Token: 0x0600023A RID: 570 RVA: 0x00008A70 File Offset: 0x00006C70
|
||||
public ICollection Values
|
||||
{
|
||||
get
|
||||
{
|
||||
return new OrderedDictionary.OrderedCollection(this.list, false);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Adds an entry with the specified key and value into the <see cref="T:System.Collections.Specialized.OrderedDictionary" /> collection with the lowest available index.</summary>
|
||||
/// <param name="key">The key of the entry to add.</param>
|
||||
/// <param name="value">The value of the entry to add. This value can be null.</param>
|
||||
/// <exception cref="T:System.NotSupportedException">The <see cref="T:System.Collections.Specialized.OrderedDictionary" /> collection is read-only.</exception>
|
||||
// Token: 0x0600023B RID: 571 RVA: 0x00008A80 File Offset: 0x00006C80
|
||||
public void Add(object key, object value)
|
||||
{
|
||||
this.WriteCheck();
|
||||
this.hash.Add(key, value);
|
||||
this.list.Add(new DictionaryEntry(key, value));
|
||||
}
|
||||
|
||||
/// <summary>Removes all elements from the <see cref="T:System.Collections.Specialized.OrderedDictionary" /> collection.</summary>
|
||||
/// <exception cref="T:System.NotSupportedException">The <see cref="T:System.Collections.Specialized.OrderedDictionary" /> collection is read-only.</exception>
|
||||
// Token: 0x0600023C RID: 572 RVA: 0x00008AB0 File Offset: 0x00006CB0
|
||||
public void Clear()
|
||||
{
|
||||
this.WriteCheck();
|
||||
this.hash.Clear();
|
||||
this.list.Clear();
|
||||
}
|
||||
|
||||
/// <summary>Determines whether the <see cref="T:System.Collections.Specialized.OrderedDictionary" /> collection contains a specific key.</summary>
|
||||
/// <returns>true if the <see cref="T:System.Collections.Specialized.OrderedDictionary" /> collection contains an element with the specified key; otherwise, false.</returns>
|
||||
/// <param name="key">The key to locate in the <see cref="T:System.Collections.Specialized.OrderedDictionary" /> collection.</param>
|
||||
// Token: 0x0600023D RID: 573 RVA: 0x00008AD0 File Offset: 0x00006CD0
|
||||
public bool Contains(object key)
|
||||
{
|
||||
return this.hash.Contains(key);
|
||||
}
|
||||
|
||||
/// <summary>Returns an <see cref="T:System.Collections.IDictionaryEnumerator" /> object that iterates through the <see cref="T:System.Collections.Specialized.OrderedDictionary" /> collection.</summary>
|
||||
/// <returns>An <see cref="T:System.Collections.IDictionaryEnumerator" /> object for the <see cref="T:System.Collections.Specialized.OrderedDictionary" /> collection.</returns>
|
||||
// Token: 0x0600023E RID: 574 RVA: 0x00008AE0 File Offset: 0x00006CE0
|
||||
public virtual IDictionaryEnumerator GetEnumerator()
|
||||
{
|
||||
return new OrderedDictionary.OrderedEntryCollectionEnumerator(this.list.GetEnumerator());
|
||||
}
|
||||
|
||||
/// <summary>Removes the entry with the specified key from the <see cref="T:System.Collections.Specialized.OrderedDictionary" /> collection.</summary>
|
||||
/// <param name="key">The key of the entry to remove.</param>
|
||||
/// <exception cref="T:System.NotSupportedException">The <see cref="T:System.Collections.Specialized.OrderedDictionary" /> collection is read-only.</exception>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="key" /> is null.</exception>
|
||||
// Token: 0x0600023F RID: 575 RVA: 0x00008AF4 File Offset: 0x00006CF4
|
||||
public void Remove(object key)
|
||||
{
|
||||
this.WriteCheck();
|
||||
if (this.hash.Contains(key))
|
||||
{
|
||||
this.hash.Remove(key);
|
||||
int num = this.FindListEntry(key);
|
||||
this.list.RemoveAt(num);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000240 RID: 576 RVA: 0x00008B38 File Offset: 0x00006D38
|
||||
private int FindListEntry(object key)
|
||||
{
|
||||
for (int i = 0; i < this.list.Count; i++)
|
||||
{
|
||||
DictionaryEntry dictionaryEntry = (DictionaryEntry)this.list[i];
|
||||
if ((this.comparer == null) ? dictionaryEntry.Key.Equals(key) : this.comparer.Equals(dictionaryEntry.Key, key))
|
||||
{
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
// Token: 0x06000241 RID: 577 RVA: 0x00008BAC File Offset: 0x00006DAC
|
||||
private void WriteCheck()
|
||||
{
|
||||
if (this.readOnly)
|
||||
{
|
||||
throw new NotSupportedException("Collection is read only");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Returns a read-only copy of the current <see cref="T:System.Collections.Specialized.OrderedDictionary" /> collection.</summary>
|
||||
/// <returns>A read-only copy of the current <see cref="T:System.Collections.Specialized.OrderedDictionary" /> collection.</returns>
|
||||
// Token: 0x06000242 RID: 578 RVA: 0x00008BC4 File Offset: 0x00006DC4
|
||||
public OrderedDictionary AsReadOnly()
|
||||
{
|
||||
return new OrderedDictionary
|
||||
{
|
||||
list = this.list,
|
||||
hash = this.hash,
|
||||
comparer = this.comparer,
|
||||
readOnly = true
|
||||
};
|
||||
}
|
||||
|
||||
/// <summary>Inserts a new entry into the <see cref="T:System.Collections.Specialized.OrderedDictionary" /> collection with the specified key and value at the specified index.</summary>
|
||||
/// <param name="index">The zero-based index at which the element should be inserted.</param>
|
||||
/// <param name="key">The key of the entry to add.</param>
|
||||
/// <param name="value">The value of the entry to add. The value can be null.</param>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="index" /> is out of range.</exception>
|
||||
/// <exception cref="T:System.NotSupportedException">This collection is read-only.</exception>
|
||||
// Token: 0x06000243 RID: 579 RVA: 0x00008C04 File Offset: 0x00006E04
|
||||
public void Insert(int index, object key, object value)
|
||||
{
|
||||
this.WriteCheck();
|
||||
this.hash.Add(key, value);
|
||||
this.list.Insert(index, new DictionaryEntry(key, value));
|
||||
}
|
||||
|
||||
/// <summary>Removes the entry at the specified index from the <see cref="T:System.Collections.Specialized.OrderedDictionary" /> collection.</summary>
|
||||
/// <param name="index">The zero-based index of the entry to remove.</param>
|
||||
/// <exception cref="T:System.NotSupportedException">The <see cref="T:System.Collections.Specialized.OrderedDictionary" /> collection is read-only.</exception>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="index" /> is less than zero.- or -<paramref name="index" /> is equal to or greater than <see cref="P:System.Collections.Specialized.OrderedDictionary.Count" />.</exception>
|
||||
// Token: 0x06000244 RID: 580 RVA: 0x00008C3C File Offset: 0x00006E3C
|
||||
public void RemoveAt(int index)
|
||||
{
|
||||
this.WriteCheck();
|
||||
DictionaryEntry dictionaryEntry = (DictionaryEntry)this.list[index];
|
||||
this.list.RemoveAt(index);
|
||||
this.hash.Remove(dictionaryEntry.Key);
|
||||
}
|
||||
|
||||
// Token: 0x040000A6 RID: 166
|
||||
private ArrayList list;
|
||||
|
||||
// Token: 0x040000A7 RID: 167
|
||||
private Hashtable hash;
|
||||
|
||||
// Token: 0x040000A8 RID: 168
|
||||
private bool readOnly;
|
||||
|
||||
// Token: 0x040000A9 RID: 169
|
||||
private int initialCapacity;
|
||||
|
||||
// Token: 0x040000AA RID: 170
|
||||
private SerializationInfo serializationInfo;
|
||||
|
||||
// Token: 0x040000AB RID: 171
|
||||
private IEqualityComparer comparer;
|
||||
|
||||
// Token: 0x02000035 RID: 53
|
||||
private class OrderedEntryCollectionEnumerator : IEnumerator, IDictionaryEnumerator
|
||||
{
|
||||
// Token: 0x06000245 RID: 581 RVA: 0x00008C80 File Offset: 0x00006E80
|
||||
public OrderedEntryCollectionEnumerator(IEnumerator listEnumerator)
|
||||
{
|
||||
this.listEnumerator = listEnumerator;
|
||||
}
|
||||
|
||||
// Token: 0x06000246 RID: 582 RVA: 0x00008C90 File Offset: 0x00006E90
|
||||
public bool MoveNext()
|
||||
{
|
||||
return this.listEnumerator.MoveNext();
|
||||
}
|
||||
|
||||
// Token: 0x06000247 RID: 583 RVA: 0x00008CA0 File Offset: 0x00006EA0
|
||||
public void Reset()
|
||||
{
|
||||
this.listEnumerator.Reset();
|
||||
}
|
||||
|
||||
// Token: 0x1700009C RID: 156
|
||||
// (get) Token: 0x06000248 RID: 584 RVA: 0x00008CB0 File Offset: 0x00006EB0
|
||||
public object Current
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.listEnumerator.Current;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700009D RID: 157
|
||||
// (get) Token: 0x06000249 RID: 585 RVA: 0x00008CC0 File Offset: 0x00006EC0
|
||||
public DictionaryEntry Entry
|
||||
{
|
||||
get
|
||||
{
|
||||
return (DictionaryEntry)this.listEnumerator.Current;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700009E RID: 158
|
||||
// (get) Token: 0x0600024A RID: 586 RVA: 0x00008CD4 File Offset: 0x00006ED4
|
||||
public object Key
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Entry.Key;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700009F RID: 159
|
||||
// (get) Token: 0x0600024B RID: 587 RVA: 0x00008CF0 File Offset: 0x00006EF0
|
||||
public object Value
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Entry.Value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x040000AC RID: 172
|
||||
private IEnumerator listEnumerator;
|
||||
}
|
||||
|
||||
// Token: 0x02000036 RID: 54
|
||||
private class OrderedCollection : ICollection, IEnumerable
|
||||
{
|
||||
// Token: 0x0600024C RID: 588 RVA: 0x00008D0C File Offset: 0x00006F0C
|
||||
public OrderedCollection(ArrayList list, bool isKeyList)
|
||||
{
|
||||
this.list = list;
|
||||
this.isKeyList = isKeyList;
|
||||
}
|
||||
|
||||
// Token: 0x170000A0 RID: 160
|
||||
// (get) Token: 0x0600024D RID: 589 RVA: 0x00008D24 File Offset: 0x00006F24
|
||||
public int Count
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.list.Count;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170000A1 RID: 161
|
||||
// (get) Token: 0x0600024E RID: 590 RVA: 0x00008D34 File Offset: 0x00006F34
|
||||
public bool IsSynchronized
|
||||
{
|
||||
get
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170000A2 RID: 162
|
||||
// (get) Token: 0x0600024F RID: 591 RVA: 0x00008D38 File Offset: 0x00006F38
|
||||
public object SyncRoot
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.list.SyncRoot;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000250 RID: 592 RVA: 0x00008D48 File Offset: 0x00006F48
|
||||
public void CopyTo(Array array, int index)
|
||||
{
|
||||
for (int i = 0; i < this.list.Count; i++)
|
||||
{
|
||||
DictionaryEntry dictionaryEntry = (DictionaryEntry)this.list[i];
|
||||
if (this.isKeyList)
|
||||
{
|
||||
array.SetValue(dictionaryEntry.Key, index + i);
|
||||
}
|
||||
else
|
||||
{
|
||||
array.SetValue(dictionaryEntry.Value, index + i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000251 RID: 593 RVA: 0x00008DB4 File Offset: 0x00006FB4
|
||||
public IEnumerator GetEnumerator()
|
||||
{
|
||||
return new OrderedDictionary.OrderedCollection.OrderedCollectionEnumerator(this.list.GetEnumerator(), this.isKeyList);
|
||||
}
|
||||
|
||||
// Token: 0x040000AD RID: 173
|
||||
private ArrayList list;
|
||||
|
||||
// Token: 0x040000AE RID: 174
|
||||
private bool isKeyList;
|
||||
|
||||
// Token: 0x02000037 RID: 55
|
||||
private class OrderedCollectionEnumerator : IEnumerator
|
||||
{
|
||||
// Token: 0x06000252 RID: 594 RVA: 0x00008DCC File Offset: 0x00006FCC
|
||||
public OrderedCollectionEnumerator(IEnumerator listEnumerator, bool isKeyList)
|
||||
{
|
||||
this.listEnumerator = listEnumerator;
|
||||
this.isKeyList = isKeyList;
|
||||
}
|
||||
|
||||
// Token: 0x170000A3 RID: 163
|
||||
// (get) Token: 0x06000253 RID: 595 RVA: 0x00008DE4 File Offset: 0x00006FE4
|
||||
public object Current
|
||||
{
|
||||
get
|
||||
{
|
||||
DictionaryEntry dictionaryEntry = (DictionaryEntry)this.listEnumerator.Current;
|
||||
return (!this.isKeyList) ? dictionaryEntry.Value : dictionaryEntry.Key;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000254 RID: 596 RVA: 0x00008E20 File Offset: 0x00007020
|
||||
public bool MoveNext()
|
||||
{
|
||||
return this.listEnumerator.MoveNext();
|
||||
}
|
||||
|
||||
// Token: 0x06000255 RID: 597 RVA: 0x00008E30 File Offset: 0x00007030
|
||||
public void Reset()
|
||||
{
|
||||
this.listEnumerator.Reset();
|
||||
}
|
||||
|
||||
// Token: 0x040000AF RID: 175
|
||||
private bool isKeyList;
|
||||
|
||||
// Token: 0x040000B0 RID: 176
|
||||
private IEnumerator listEnumerator;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,130 @@
|
||||
using System;
|
||||
|
||||
namespace System.Collections.Specialized
|
||||
{
|
||||
// Token: 0x02000038 RID: 56
|
||||
internal class ProcessStringDictionary : StringDictionary, IEnumerable
|
||||
{
|
||||
// Token: 0x06000256 RID: 598 RVA: 0x00008E40 File Offset: 0x00007040
|
||||
public ProcessStringDictionary()
|
||||
{
|
||||
IHashCodeProvider hashCodeProvider = null;
|
||||
IComparer comparer = null;
|
||||
int platform = (int)Environment.OSVersion.Platform;
|
||||
if (platform != 4 && platform != 128)
|
||||
{
|
||||
hashCodeProvider = CaseInsensitiveHashCodeProvider.DefaultInvariant;
|
||||
comparer = CaseInsensitiveComparer.DefaultInvariant;
|
||||
}
|
||||
this.table = new Hashtable(hashCodeProvider, comparer);
|
||||
}
|
||||
|
||||
// Token: 0x170000A4 RID: 164
|
||||
// (get) Token: 0x06000257 RID: 599 RVA: 0x00008E90 File Offset: 0x00007090
|
||||
public override int Count
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.table.Count;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170000A5 RID: 165
|
||||
// (get) Token: 0x06000258 RID: 600 RVA: 0x00008EA0 File Offset: 0x000070A0
|
||||
public override bool IsSynchronized
|
||||
{
|
||||
get
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170000A6 RID: 166
|
||||
public override string this[string key]
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)this.table[key];
|
||||
}
|
||||
set
|
||||
{
|
||||
this.table[key] = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170000A7 RID: 167
|
||||
// (get) Token: 0x0600025B RID: 603 RVA: 0x00008EC8 File Offset: 0x000070C8
|
||||
public override ICollection Keys
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.table.Keys;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170000A8 RID: 168
|
||||
// (get) Token: 0x0600025C RID: 604 RVA: 0x00008ED8 File Offset: 0x000070D8
|
||||
public override ICollection Values
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.table.Values;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170000A9 RID: 169
|
||||
// (get) Token: 0x0600025D RID: 605 RVA: 0x00008EE8 File Offset: 0x000070E8
|
||||
public override object SyncRoot
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.table.SyncRoot;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600025E RID: 606 RVA: 0x00008EF8 File Offset: 0x000070F8
|
||||
public override void Add(string key, string value)
|
||||
{
|
||||
this.table.Add(key, value);
|
||||
}
|
||||
|
||||
// Token: 0x0600025F RID: 607 RVA: 0x00008F08 File Offset: 0x00007108
|
||||
public override void Clear()
|
||||
{
|
||||
this.table.Clear();
|
||||
}
|
||||
|
||||
// Token: 0x06000260 RID: 608 RVA: 0x00008F18 File Offset: 0x00007118
|
||||
public override bool ContainsKey(string key)
|
||||
{
|
||||
return this.table.ContainsKey(key);
|
||||
}
|
||||
|
||||
// Token: 0x06000261 RID: 609 RVA: 0x00008F28 File Offset: 0x00007128
|
||||
public override bool ContainsValue(string value)
|
||||
{
|
||||
return this.table.ContainsValue(value);
|
||||
}
|
||||
|
||||
// Token: 0x06000262 RID: 610 RVA: 0x00008F38 File Offset: 0x00007138
|
||||
public override void CopyTo(Array array, int index)
|
||||
{
|
||||
this.table.CopyTo(array, index);
|
||||
}
|
||||
|
||||
// Token: 0x06000263 RID: 611 RVA: 0x00008F48 File Offset: 0x00007148
|
||||
public override IEnumerator GetEnumerator()
|
||||
{
|
||||
return this.table.GetEnumerator();
|
||||
}
|
||||
|
||||
// Token: 0x06000264 RID: 612 RVA: 0x00008F58 File Offset: 0x00007158
|
||||
public override void Remove(string key)
|
||||
{
|
||||
this.table.Remove(key);
|
||||
}
|
||||
|
||||
// Token: 0x040000B1 RID: 177
|
||||
private Hashtable table;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,295 @@
|
||||
using System;
|
||||
|
||||
namespace System.Collections.Specialized
|
||||
{
|
||||
/// <summary>Represents a collection of strings.</summary>
|
||||
// Token: 0x02000039 RID: 57
|
||||
[Serializable]
|
||||
public class StringCollection : ICollection, IEnumerable, IList
|
||||
{
|
||||
/// <summary>Gets a value indicating whether the <see cref="T:System.Collections.Specialized.StringCollection" /> object is read-only.</summary>
|
||||
/// <returns>true if the <see cref="T:System.Collections.Specialized.StringCollection" /> object is read-only; otherwise, false. The default is false.</returns>
|
||||
// Token: 0x170000AA RID: 170
|
||||
// (get) Token: 0x06000266 RID: 614 RVA: 0x00008F7C File Offset: 0x0000717C
|
||||
bool IList.IsReadOnly
|
||||
{
|
||||
get
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a value indicating whether the <see cref="T:System.Collections.Specialized.StringCollection" /> object has a fixed size.</summary>
|
||||
/// <returns>true if the <see cref="T:System.Collections.Specialized.StringCollection" /> object has a fixed size; otherwise, false. The default is false.</returns>
|
||||
// Token: 0x170000AB RID: 171
|
||||
// (get) Token: 0x06000267 RID: 615 RVA: 0x00008F80 File Offset: 0x00007180
|
||||
bool IList.IsFixedSize
|
||||
{
|
||||
get
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets or sets the element at the specified index.</summary>
|
||||
/// <returns>The element at the specified index.</returns>
|
||||
/// <param name="index">The zero-based index of the element to get or set. </param>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="index" /> is less than zero.-or- <paramref name="index" /> is equal to or greater than <see cref="P:System.Collections.Specialized.StringCollection.Count" />. </exception>
|
||||
// Token: 0x170000AC RID: 172
|
||||
object IList.this[int index]
|
||||
{
|
||||
get
|
||||
{
|
||||
return this[index];
|
||||
}
|
||||
set
|
||||
{
|
||||
this[index] = (string)value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Adds an object to the end of the <see cref="T:System.Collections.Specialized.StringCollection" />.</summary>
|
||||
/// <returns>The <see cref="T:System.Collections.Specialized.StringCollection" /> index at which the <paramref name="value" /> has been added.</returns>
|
||||
/// <param name="value">The <see cref="T:System.Object" /> to be added to the end of the <see cref="T:System.Collections.Specialized.StringCollection" />. The value can be null. </param>
|
||||
/// <exception cref="T:System.NotSupportedException">The <see cref="T:System.Collections.Specialized.StringCollection" /> is read-only.-or- The <see cref="T:System.Collections.Specialized.StringCollection" /> has a fixed size. </exception>
|
||||
// Token: 0x0600026A RID: 618 RVA: 0x00008FA0 File Offset: 0x000071A0
|
||||
int IList.Add(object value)
|
||||
{
|
||||
return this.Add((string)value);
|
||||
}
|
||||
|
||||
/// <summary>Determines whether an element is in the <see cref="T:System.Collections.Specialized.StringCollection" />.</summary>
|
||||
/// <returns>true if <paramref name="value" /> is found in the <see cref="T:System.Collections.Specialized.StringCollection" />; otherwise, false.</returns>
|
||||
/// <param name="value">The <see cref="T:System.Object" /> to locate in the <see cref="T:System.Collections.Specialized.StringCollection" />. The value can be null. </param>
|
||||
// Token: 0x0600026B RID: 619 RVA: 0x00008FB0 File Offset: 0x000071B0
|
||||
bool IList.Contains(object value)
|
||||
{
|
||||
return this.Contains((string)value);
|
||||
}
|
||||
|
||||
/// <summary>Searches for the specified <see cref="T:System.Object" /> and returns the zero-based index of the first occurrence within the entire <see cref="T:System.Collections.Specialized.StringCollection" />.</summary>
|
||||
/// <returns>The zero-based index of the first occurrence of <paramref name="value" /> within the entire <see cref="T:System.Collections.Specialized.StringCollection" />, if found; otherwise, -1.</returns>
|
||||
/// <param name="value">The <see cref="T:System.Object" /> to locate in the <see cref="T:System.Collections.Specialized.StringCollection" />. The value can be null. </param>
|
||||
// Token: 0x0600026C RID: 620 RVA: 0x00008FC0 File Offset: 0x000071C0
|
||||
int IList.IndexOf(object value)
|
||||
{
|
||||
return this.IndexOf((string)value);
|
||||
}
|
||||
|
||||
/// <summary>Inserts an element into the <see cref="T:System.Collections.Specialized.StringCollection" /> at the specified index.</summary>
|
||||
/// <param name="index">The zero-based index at which <paramref name="value" /> should be inserted. </param>
|
||||
/// <param name="value">The <see cref="T:System.Object" /> to insert. The value can be null. </param>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="index" /> is less than zero.-or- <paramref name="index" /> is greater than <see cref="P:System.Collections.Specialized.StringCollection.Count" />. </exception>
|
||||
/// <exception cref="T:System.NotSupportedException">The <see cref="T:System.Collections.Specialized.StringCollection" /> is read-only.-or- The <see cref="T:System.Collections.Specialized.StringCollection" /> has a fixed size. </exception>
|
||||
// Token: 0x0600026D RID: 621 RVA: 0x00008FD0 File Offset: 0x000071D0
|
||||
void IList.Insert(int index, object value)
|
||||
{
|
||||
this.Insert(index, (string)value);
|
||||
}
|
||||
|
||||
/// <summary>Removes the first occurrence of a specific object from the <see cref="T:System.Collections.Specialized.StringCollection" />.</summary>
|
||||
/// <param name="value">The <see cref="T:System.Object" /> to remove from the <see cref="T:System.Collections.Specialized.StringCollection" />. The value can be null. </param>
|
||||
/// <exception cref="T:System.NotSupportedException">The <see cref="T:System.Collections.Specialized.StringCollection" /> is read-only.-or- The <see cref="T:System.Collections.Specialized.StringCollection" /> has a fixed size. </exception>
|
||||
// Token: 0x0600026E RID: 622 RVA: 0x00008FE0 File Offset: 0x000071E0
|
||||
void IList.Remove(object value)
|
||||
{
|
||||
this.Remove((string)value);
|
||||
}
|
||||
|
||||
/// <summary>Copies the entire <see cref="T:System.Collections.Specialized.StringCollection" /> to a compatible one-dimensional <see cref="T:System.Array" />, starting at the specified index of the target array.</summary>
|
||||
/// <param name="array">The one-dimensional <see cref="T:System.Array" /> that is the destination of the elements copied from <see cref="T:System.Collections.Specialized.StringCollection" />. The <see cref="T:System.Array" /> must have zero-based indexing. </param>
|
||||
/// <param name="index">The zero-based index in <paramref name="array" /> at which copying begins. </param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="array" /> is null. </exception>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="index" /> is less than zero. </exception>
|
||||
/// <exception cref="T:System.ArgumentException">
|
||||
/// <paramref name="array" /> is multidimensional.-or- The number of elements in the source <see cref="T:System.Collections.Specialized.StringCollection" /> is greater than the available space from <paramref name="index" /> to the end of the destination <paramref name="array" />. </exception>
|
||||
/// <exception cref="T:System.InvalidCastException">The type of the source <see cref="T:System.Collections.Specialized.StringCollection" /> cannot be cast automatically to the type of the destination <paramref name="array" />. </exception>
|
||||
// Token: 0x0600026F RID: 623 RVA: 0x00008FF0 File Offset: 0x000071F0
|
||||
void ICollection.CopyTo(Array array, int index)
|
||||
{
|
||||
this.data.CopyTo(array, index);
|
||||
}
|
||||
|
||||
/// <summary>Returns a <see cref="T:System.Collections.IEnumerator" /> that iterates through the <see cref="T:System.Collections.Specialized.StringCollection" />.</summary>
|
||||
/// <returns>A <see cref="T:System.Collections.IEnumerator" /> for the <see cref="T:System.Collections.Specialized.StringCollection" />.</returns>
|
||||
// Token: 0x06000270 RID: 624 RVA: 0x00009000 File Offset: 0x00007200
|
||||
IEnumerator IEnumerable.GetEnumerator()
|
||||
{
|
||||
return this.data.GetEnumerator();
|
||||
}
|
||||
|
||||
/// <summary>Gets or sets the element at the specified index.</summary>
|
||||
/// <returns>The element at the specified index.</returns>
|
||||
/// <param name="index">The zero-based index of the entry to get or set. </param>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="index" /> is less than zero.-or- <paramref name="index" /> is equal to or greater than <see cref="P:System.Collections.Specialized.StringCollection.Count" />. </exception>
|
||||
// Token: 0x170000AD RID: 173
|
||||
public string this[int index]
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)this.data[index];
|
||||
}
|
||||
set
|
||||
{
|
||||
this.data[index] = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets the number of strings contained in the <see cref="T:System.Collections.Specialized.StringCollection" />.</summary>
|
||||
/// <returns>The number of strings contained in the <see cref="T:System.Collections.Specialized.StringCollection" />.</returns>
|
||||
// Token: 0x170000AE RID: 174
|
||||
// (get) Token: 0x06000273 RID: 627 RVA: 0x00009034 File Offset: 0x00007234
|
||||
public int Count
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.data.Count;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Adds a string to the end of the <see cref="T:System.Collections.Specialized.StringCollection" />.</summary>
|
||||
/// <returns>The zero-based index at which the new element is inserted.</returns>
|
||||
/// <param name="value">The string to add to the end of the <see cref="T:System.Collections.Specialized.StringCollection" />. The value can be null. </param>
|
||||
// Token: 0x06000274 RID: 628 RVA: 0x00009044 File Offset: 0x00007244
|
||||
public int Add(string value)
|
||||
{
|
||||
return this.data.Add(value);
|
||||
}
|
||||
|
||||
/// <summary>Copies the elements of a string array to the end of the <see cref="T:System.Collections.Specialized.StringCollection" />.</summary>
|
||||
/// <param name="value">An array of strings to add to the end of the <see cref="T:System.Collections.Specialized.StringCollection" />. The array itself can not be null but it can contain elements that are null. </param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="value" /> is null. </exception>
|
||||
// Token: 0x06000275 RID: 629 RVA: 0x00009054 File Offset: 0x00007254
|
||||
public void AddRange(string[] value)
|
||||
{
|
||||
if (value == null)
|
||||
{
|
||||
throw new ArgumentNullException("value");
|
||||
}
|
||||
this.data.AddRange(value);
|
||||
}
|
||||
|
||||
/// <summary>Removes all the strings from the <see cref="T:System.Collections.Specialized.StringCollection" />.</summary>
|
||||
// Token: 0x06000276 RID: 630 RVA: 0x00009074 File Offset: 0x00007274
|
||||
public void Clear()
|
||||
{
|
||||
this.data.Clear();
|
||||
}
|
||||
|
||||
/// <summary>Determines whether the specified string is in the <see cref="T:System.Collections.Specialized.StringCollection" />.</summary>
|
||||
/// <returns>true if <paramref name="value" /> is found in the <see cref="T:System.Collections.Specialized.StringCollection" />; otherwise, false.</returns>
|
||||
/// <param name="value">The string to locate in the <see cref="T:System.Collections.Specialized.StringCollection" />. The value can be null. </param>
|
||||
// Token: 0x06000277 RID: 631 RVA: 0x00009084 File Offset: 0x00007284
|
||||
public bool Contains(string value)
|
||||
{
|
||||
return this.data.Contains(value);
|
||||
}
|
||||
|
||||
/// <summary>Copies the entire <see cref="T:System.Collections.Specialized.StringCollection" /> values to a one-dimensional array of strings, starting at the specified index of the target array.</summary>
|
||||
/// <param name="array">The one-dimensional array of strings that is the destination of the elements copied from <see cref="T:System.Collections.Specialized.StringCollection" />. The <see cref="T:System.Array" /> must have zero-based indexing. </param>
|
||||
/// <param name="index">The zero-based index in <paramref name="array" /> at which copying begins. </param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="array" /> is null. </exception>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="index" /> is less than zero. </exception>
|
||||
/// <exception cref="T:System.ArgumentException">
|
||||
/// <paramref name="array" /> is multidimensional.-or- The number of elements in the source <see cref="T:System.Collections.Specialized.StringCollection" /> is greater than the available space from <paramref name="index" /> to the end of the destination <paramref name="array" />. </exception>
|
||||
/// <exception cref="T:System.InvalidCastException">The type of the source <see cref="T:System.Collections.Specialized.StringCollection" /> cannot be cast automatically to the type of the destination <paramref name="array" />. </exception>
|
||||
// Token: 0x06000278 RID: 632 RVA: 0x00009094 File Offset: 0x00007294
|
||||
public void CopyTo(string[] array, int index)
|
||||
{
|
||||
this.data.CopyTo(array, index);
|
||||
}
|
||||
|
||||
/// <summary>Returns a <see cref="T:System.Collections.Specialized.StringEnumerator" /> that iterates through the <see cref="T:System.Collections.Specialized.StringCollection" />.</summary>
|
||||
/// <returns>A <see cref="T:System.Collections.Specialized.StringEnumerator" /> for the <see cref="T:System.Collections.Specialized.StringCollection" />.</returns>
|
||||
// Token: 0x06000279 RID: 633 RVA: 0x000090A4 File Offset: 0x000072A4
|
||||
public StringEnumerator GetEnumerator()
|
||||
{
|
||||
return new StringEnumerator(this);
|
||||
}
|
||||
|
||||
/// <summary>Searches for the specified string and returns the zero-based index of the first occurrence within the <see cref="T:System.Collections.Specialized.StringCollection" />.</summary>
|
||||
/// <returns>The zero-based index of the first occurrence of <paramref name="value" /> in the <see cref="T:System.Collections.Specialized.StringCollection" />, if found; otherwise, -1.</returns>
|
||||
/// <param name="value">The string to locate. The value can be null. </param>
|
||||
// Token: 0x0600027A RID: 634 RVA: 0x000090AC File Offset: 0x000072AC
|
||||
public int IndexOf(string value)
|
||||
{
|
||||
return this.data.IndexOf(value);
|
||||
}
|
||||
|
||||
/// <summary>Inserts a string into the <see cref="T:System.Collections.Specialized.StringCollection" /> at the specified index.</summary>
|
||||
/// <param name="index">The zero-based index at which <paramref name="value" /> is inserted. </param>
|
||||
/// <param name="value">The string to insert. The value can be null. </param>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="index" /> is less than zero.-or- <paramref name="index" /> greater than <see cref="P:System.Collections.Specialized.StringCollection.Count" />. </exception>
|
||||
// Token: 0x0600027B RID: 635 RVA: 0x000090BC File Offset: 0x000072BC
|
||||
public void Insert(int index, string value)
|
||||
{
|
||||
this.data.Insert(index, value);
|
||||
}
|
||||
|
||||
/// <summary>Gets a value indicating whether the <see cref="T:System.Collections.Specialized.StringCollection" /> is read-only.</summary>
|
||||
/// <returns>This property always returns false.</returns>
|
||||
// Token: 0x170000AF RID: 175
|
||||
// (get) Token: 0x0600027C RID: 636 RVA: 0x000090CC File Offset: 0x000072CC
|
||||
public bool IsReadOnly
|
||||
{
|
||||
get
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a value indicating whether access to the <see cref="T:System.Collections.Specialized.StringCollection" /> is synchronized (thread safe).</summary>
|
||||
/// <returns>This property always returns false.</returns>
|
||||
// Token: 0x170000B0 RID: 176
|
||||
// (get) Token: 0x0600027D RID: 637 RVA: 0x000090D0 File Offset: 0x000072D0
|
||||
public bool IsSynchronized
|
||||
{
|
||||
get
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Removes the first occurrence of a specific string from the <see cref="T:System.Collections.Specialized.StringCollection" />.</summary>
|
||||
/// <param name="value">The string to remove from the <see cref="T:System.Collections.Specialized.StringCollection" />. The value can be null. </param>
|
||||
// Token: 0x0600027E RID: 638 RVA: 0x000090D4 File Offset: 0x000072D4
|
||||
public void Remove(string value)
|
||||
{
|
||||
this.data.Remove(value);
|
||||
}
|
||||
|
||||
/// <summary>Removes the string at the specified index of the <see cref="T:System.Collections.Specialized.StringCollection" />.</summary>
|
||||
/// <param name="index">The zero-based index of the string to remove. </param>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="index" /> is less than zero.-or- <paramref name="index" /> is equal to or greater than <see cref="P:System.Collections.Specialized.StringCollection.Count" />. </exception>
|
||||
// Token: 0x0600027F RID: 639 RVA: 0x000090E4 File Offset: 0x000072E4
|
||||
public void RemoveAt(int index)
|
||||
{
|
||||
this.data.RemoveAt(index);
|
||||
}
|
||||
|
||||
/// <summary>Gets an object that can be used to synchronize access to the <see cref="T:System.Collections.Specialized.StringCollection" />.</summary>
|
||||
/// <returns>An object that can be used to synchronize access to the <see cref="T:System.Collections.Specialized.StringCollection" />.</returns>
|
||||
// Token: 0x170000B1 RID: 177
|
||||
// (get) Token: 0x06000280 RID: 640 RVA: 0x000090F4 File Offset: 0x000072F4
|
||||
public object SyncRoot
|
||||
{
|
||||
get
|
||||
{
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x040000B2 RID: 178
|
||||
private ArrayList data = new ArrayList();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,192 @@
|
||||
using System;
|
||||
using System.Globalization;
|
||||
|
||||
namespace System.Collections.Specialized
|
||||
{
|
||||
/// <summary>Implements a hash table with the key and the value strongly typed to be strings rather than objects.</summary>
|
||||
// Token: 0x0200003A RID: 58
|
||||
[Serializable]
|
||||
public class StringDictionary : IEnumerable
|
||||
{
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Collections.Specialized.StringDictionary" /> class.</summary>
|
||||
// Token: 0x06000281 RID: 641 RVA: 0x000090F8 File Offset: 0x000072F8
|
||||
public StringDictionary()
|
||||
{
|
||||
this.contents = new Hashtable();
|
||||
}
|
||||
|
||||
/// <summary>Gets the number of key/value pairs in the <see cref="T:System.Collections.Specialized.StringDictionary" />.</summary>
|
||||
/// <returns>The number of key/value pairs in the <see cref="T:System.Collections.Specialized.StringDictionary" />.Retrieving the value of this property is an O(1) operation.</returns>
|
||||
// Token: 0x170000B2 RID: 178
|
||||
// (get) Token: 0x06000282 RID: 642 RVA: 0x0000910C File Offset: 0x0000730C
|
||||
public virtual int Count
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.contents.Count;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a value indicating whether access to the <see cref="T:System.Collections.Specialized.StringDictionary" /> is synchronized (thread safe).</summary>
|
||||
/// <returns>true if access to the <see cref="T:System.Collections.Specialized.StringDictionary" /> is synchronized (thread safe); otherwise, false.</returns>
|
||||
// Token: 0x170000B3 RID: 179
|
||||
// (get) Token: 0x06000283 RID: 643 RVA: 0x0000911C File Offset: 0x0000731C
|
||||
public virtual bool IsSynchronized
|
||||
{
|
||||
get
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets or sets the value associated with the specified key.</summary>
|
||||
/// <returns>The value associated with the specified key. If the specified key is not found, Get returns null, and Set creates a new entry with the specified key.</returns>
|
||||
/// <param name="key">The key whose value to get or set. </param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="key" /> is null.</exception>
|
||||
// Token: 0x170000B4 RID: 180
|
||||
public virtual string this[string key]
|
||||
{
|
||||
get
|
||||
{
|
||||
if (key == null)
|
||||
{
|
||||
throw new ArgumentNullException("key");
|
||||
}
|
||||
return (string)this.contents[key.ToLower(CultureInfo.InvariantCulture)];
|
||||
}
|
||||
set
|
||||
{
|
||||
if (key == null)
|
||||
{
|
||||
throw new ArgumentNullException("key");
|
||||
}
|
||||
this.contents[key.ToLower(CultureInfo.InvariantCulture)] = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a collection of keys in the <see cref="T:System.Collections.Specialized.StringDictionary" />.</summary>
|
||||
/// <returns>An <see cref="T:System.Collections.ICollection" /> that provides the keys in the <see cref="T:System.Collections.Specialized.StringDictionary" />.</returns>
|
||||
// Token: 0x170000B5 RID: 181
|
||||
// (get) Token: 0x06000286 RID: 646 RVA: 0x00009194 File Offset: 0x00007394
|
||||
public virtual ICollection Keys
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.contents.Keys;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a collection of values in the <see cref="T:System.Collections.Specialized.StringDictionary" />.</summary>
|
||||
/// <returns>An <see cref="T:System.Collections.ICollection" /> that provides the values in the <see cref="T:System.Collections.Specialized.StringDictionary" />.</returns>
|
||||
// Token: 0x170000B6 RID: 182
|
||||
// (get) Token: 0x06000287 RID: 647 RVA: 0x000091A4 File Offset: 0x000073A4
|
||||
public virtual ICollection Values
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.contents.Values;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets an object that can be used to synchronize access to the <see cref="T:System.Collections.Specialized.StringDictionary" />.</summary>
|
||||
/// <returns>An <see cref="T:System.Object" /> that can be used to synchronize access to the <see cref="T:System.Collections.Specialized.StringDictionary" />.</returns>
|
||||
// Token: 0x170000B7 RID: 183
|
||||
// (get) Token: 0x06000288 RID: 648 RVA: 0x000091B4 File Offset: 0x000073B4
|
||||
public virtual object SyncRoot
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.contents.SyncRoot;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Adds an entry with the specified key and value into the <see cref="T:System.Collections.Specialized.StringDictionary" />.</summary>
|
||||
/// <param name="key">The key of the entry to add. </param>
|
||||
/// <param name="value">The value of the entry to add. The value can be null. </param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="key" /> is null. </exception>
|
||||
/// <exception cref="T:System.ArgumentException">An entry with the same key already exists in the <see cref="T:System.Collections.Specialized.StringDictionary" />. </exception>
|
||||
/// <exception cref="T:System.NotSupportedException">The <see cref="T:System.Collections.Specialized.StringDictionary" /> is read-only. </exception>
|
||||
// Token: 0x06000289 RID: 649 RVA: 0x000091C4 File Offset: 0x000073C4
|
||||
public virtual void Add(string key, string value)
|
||||
{
|
||||
if (key == null)
|
||||
{
|
||||
throw new ArgumentNullException("key");
|
||||
}
|
||||
this.contents.Add(key.ToLower(CultureInfo.InvariantCulture), value);
|
||||
}
|
||||
|
||||
/// <summary>Removes all entries from the <see cref="T:System.Collections.Specialized.StringDictionary" />.</summary>
|
||||
/// <exception cref="T:System.NotSupportedException">The <see cref="T:System.Collections.Specialized.StringDictionary" /> is read-only. </exception>
|
||||
// Token: 0x0600028A RID: 650 RVA: 0x000091FC File Offset: 0x000073FC
|
||||
public virtual void Clear()
|
||||
{
|
||||
this.contents.Clear();
|
||||
}
|
||||
|
||||
/// <summary>Determines if the <see cref="T:System.Collections.Specialized.StringDictionary" /> contains a specific key.</summary>
|
||||
/// <returns>true if the <see cref="T:System.Collections.Specialized.StringDictionary" /> contains an entry with the specified key; otherwise, false.</returns>
|
||||
/// <param name="key">The key to locate in the <see cref="T:System.Collections.Specialized.StringDictionary" />. </param>
|
||||
/// <exception cref="T:System.ArgumentNullException">The key is null. </exception>
|
||||
// Token: 0x0600028B RID: 651 RVA: 0x0000920C File Offset: 0x0000740C
|
||||
public virtual bool ContainsKey(string key)
|
||||
{
|
||||
if (key == null)
|
||||
{
|
||||
throw new ArgumentNullException("key");
|
||||
}
|
||||
return this.contents.ContainsKey(key.ToLower(CultureInfo.InvariantCulture));
|
||||
}
|
||||
|
||||
/// <summary>Determines if the <see cref="T:System.Collections.Specialized.StringDictionary" /> contains a specific value.</summary>
|
||||
/// <returns>true if the <see cref="T:System.Collections.Specialized.StringDictionary" /> contains an element with the specified value; otherwise, false.</returns>
|
||||
/// <param name="value">The value to locate in the <see cref="T:System.Collections.Specialized.StringDictionary" />. The value can be null. </param>
|
||||
// Token: 0x0600028C RID: 652 RVA: 0x00009238 File Offset: 0x00007438
|
||||
public virtual bool ContainsValue(string value)
|
||||
{
|
||||
return this.contents.ContainsValue(value);
|
||||
}
|
||||
|
||||
/// <summary>Copies the string dictionary values to a one-dimensional <see cref="T:System.Array" /> instance at the specified index.</summary>
|
||||
/// <param name="array">The one-dimensional <see cref="T:System.Array" /> that is the destination of the values copied from the <see cref="T:System.Collections.Specialized.StringDictionary" />. </param>
|
||||
/// <param name="index">The index in the array where copying begins. </param>
|
||||
/// <exception cref="T:System.ArgumentException">
|
||||
/// <paramref name="array" /> is multidimensional.-or- The number of elements in the <see cref="T:System.Collections.Specialized.StringDictionary" /> is greater than the available space from <paramref name="index" /> to the end of <paramref name="array" />. </exception>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="array" /> is null. </exception>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="index" /> is less than the lower bound of <paramref name="array" />. </exception>
|
||||
// Token: 0x0600028D RID: 653 RVA: 0x00009248 File Offset: 0x00007448
|
||||
public virtual void CopyTo(Array array, int index)
|
||||
{
|
||||
this.contents.CopyTo(array, index);
|
||||
}
|
||||
|
||||
/// <summary>Returns an enumerator that iterates through the string dictionary.</summary>
|
||||
/// <returns>An <see cref="T:System.Collections.IEnumerator" /> that iterates through the string dictionary.</returns>
|
||||
// Token: 0x0600028E RID: 654 RVA: 0x00009258 File Offset: 0x00007458
|
||||
public virtual IEnumerator GetEnumerator()
|
||||
{
|
||||
return this.contents.GetEnumerator();
|
||||
}
|
||||
|
||||
/// <summary>Removes the entry with the specified key from the string dictionary.</summary>
|
||||
/// <param name="key">The key of the entry to remove. </param>
|
||||
/// <exception cref="T:System.ArgumentNullException">The key is null. </exception>
|
||||
/// <exception cref="T:System.NotSupportedException">The <see cref="T:System.Collections.Specialized.StringDictionary" /> is read-only. </exception>
|
||||
// Token: 0x0600028F RID: 655 RVA: 0x00009268 File Offset: 0x00007468
|
||||
public virtual void Remove(string key)
|
||||
{
|
||||
if (key == null)
|
||||
{
|
||||
throw new ArgumentNullException("key");
|
||||
}
|
||||
this.contents.Remove(key.ToLower(CultureInfo.InvariantCulture));
|
||||
}
|
||||
|
||||
// Token: 0x040000B3 RID: 179
|
||||
private Hashtable contents;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
using System;
|
||||
|
||||
namespace System.Collections.Specialized
|
||||
{
|
||||
/// <summary>Supports a simple iteration over a <see cref="T:System.Collections.Specialized.StringCollection" />.</summary>
|
||||
// Token: 0x0200003B RID: 59
|
||||
public class StringEnumerator
|
||||
{
|
||||
// Token: 0x06000290 RID: 656 RVA: 0x00009294 File Offset: 0x00007494
|
||||
internal StringEnumerator(StringCollection coll)
|
||||
{
|
||||
this.enumerable = ((IEnumerable)coll).GetEnumerator();
|
||||
}
|
||||
|
||||
/// <summary>Gets the current element in the collection.</summary>
|
||||
/// <returns>The current element in the collection.</returns>
|
||||
/// <exception cref="T:System.InvalidOperationException">The enumerator is positioned before the first element of the collection or after the last element. </exception>
|
||||
// Token: 0x170000B8 RID: 184
|
||||
// (get) Token: 0x06000291 RID: 657 RVA: 0x000092A8 File Offset: 0x000074A8
|
||||
public string Current
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)this.enumerable.Current;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Advances the enumerator to the next element of the collection.</summary>
|
||||
/// <returns>true if the enumerator was successfully advanced to the next element; false if the enumerator has passed the end of the collection.</returns>
|
||||
/// <exception cref="T:System.InvalidOperationException">The collection was modified after the enumerator was created. </exception>
|
||||
// Token: 0x06000292 RID: 658 RVA: 0x000092BC File Offset: 0x000074BC
|
||||
public bool MoveNext()
|
||||
{
|
||||
return this.enumerable.MoveNext();
|
||||
}
|
||||
|
||||
/// <summary>Sets the enumerator to its initial position, which is before the first element in the collection.</summary>
|
||||
/// <exception cref="T:System.InvalidOperationException">The collection was modified after the enumerator was created. </exception>
|
||||
// Token: 0x06000293 RID: 659 RVA: 0x000092CC File Offset: 0x000074CC
|
||||
public void Reset()
|
||||
{
|
||||
this.enumerable.Reset();
|
||||
}
|
||||
|
||||
// Token: 0x040000B4 RID: 180
|
||||
private IEnumerator enumerable;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,151 @@
|
||||
using System;
|
||||
using System.Globalization;
|
||||
|
||||
namespace System.ComponentModel
|
||||
{
|
||||
/// <summary>Provides a type converter to convert <see cref="T:System.Array" /> objects to and from various other representations.</summary>
|
||||
// Token: 0x02000052 RID: 82
|
||||
public class ArrayConverter : CollectionConverter
|
||||
{
|
||||
/// <summary>Converts the given value object to the specified destination type.</summary>
|
||||
/// <returns>An <see cref="T:System.Object" /> that represents the converted value.</returns>
|
||||
/// <param name="context">An <see cref="T:System.ComponentModel.ITypeDescriptorContext" /> that provides a format context. </param>
|
||||
/// <param name="culture">The culture into which <paramref name="value" /> will be converted.</param>
|
||||
/// <param name="value">The <see cref="T:System.Object" /> to convert. </param>
|
||||
/// <param name="destinationType">The <see cref="T:System.Type" /> to convert the value to. </param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="destinationType" /> is null. </exception>
|
||||
/// <exception cref="T:System.NotSupportedException">The conversion cannot be performed. </exception>
|
||||
// Token: 0x06000337 RID: 823 RVA: 0x0000A140 File Offset: 0x00008340
|
||||
public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
|
||||
{
|
||||
if (destinationType == null)
|
||||
{
|
||||
throw new ArgumentNullException("destinationType");
|
||||
}
|
||||
if (destinationType == typeof(string) && value is Array)
|
||||
{
|
||||
return value.GetType().Name + " Array";
|
||||
}
|
||||
return base.ConvertTo(context, culture, value, destinationType);
|
||||
}
|
||||
|
||||
/// <summary>Gets a collection of properties for the type of array specified by the value parameter.</summary>
|
||||
/// <returns>A <see cref="T:System.ComponentModel.PropertyDescriptorCollection" /> with the properties that are exposed for an array, or null if there are no properties.</returns>
|
||||
/// <param name="context">An <see cref="T:System.ComponentModel.ITypeDescriptorContext" /> that provides a format context. </param>
|
||||
/// <param name="value">An <see cref="T:System.Object" /> that specifies the type of array to get the properties for. </param>
|
||||
/// <param name="attributes">An array of type <see cref="T:System.Attribute" /> that will be used as a filter. </param>
|
||||
// Token: 0x06000338 RID: 824 RVA: 0x0000A19C File Offset: 0x0000839C
|
||||
public override PropertyDescriptorCollection GetProperties(ITypeDescriptorContext context, object value, Attribute[] attributes)
|
||||
{
|
||||
if (value == null)
|
||||
{
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
PropertyDescriptorCollection propertyDescriptorCollection = new PropertyDescriptorCollection(null);
|
||||
if (value is Array)
|
||||
{
|
||||
Array array = (Array)value;
|
||||
for (int i = 0; i < array.Length; i++)
|
||||
{
|
||||
propertyDescriptorCollection.Add(new ArrayConverter.ArrayPropertyDescriptor(i, array.GetType()));
|
||||
}
|
||||
}
|
||||
return propertyDescriptorCollection;
|
||||
}
|
||||
|
||||
/// <summary>Gets a value indicating whether this object supports properties.</summary>
|
||||
/// <returns>true because <see cref="M:System.ComponentModel.ArrayConverter.GetProperties(System.ComponentModel.ITypeDescriptorContext,System.Object,System.Attribute[])" /> should be called to find the properties of this object. This method never returns false.</returns>
|
||||
/// <param name="context">An <see cref="T:System.ComponentModel.ITypeDescriptorContext" /> that provides a format context. </param>
|
||||
// Token: 0x06000339 RID: 825 RVA: 0x0000A1FC File Offset: 0x000083FC
|
||||
public override bool GetPropertiesSupported(ITypeDescriptorContext context)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
// Token: 0x02000053 RID: 83
|
||||
internal class ArrayPropertyDescriptor : PropertyDescriptor
|
||||
{
|
||||
// Token: 0x0600033A RID: 826 RVA: 0x0000A200 File Offset: 0x00008400
|
||||
public ArrayPropertyDescriptor(int index, Type array_type)
|
||||
: base(string.Format("[{0}]", index), null)
|
||||
{
|
||||
this.index = index;
|
||||
this.array_type = array_type;
|
||||
}
|
||||
|
||||
// Token: 0x170000E0 RID: 224
|
||||
// (get) Token: 0x0600033B RID: 827 RVA: 0x0000A228 File Offset: 0x00008428
|
||||
public override Type ComponentType
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.array_type;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170000E1 RID: 225
|
||||
// (get) Token: 0x0600033C RID: 828 RVA: 0x0000A230 File Offset: 0x00008430
|
||||
public override Type PropertyType
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.array_type.GetElementType();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x170000E2 RID: 226
|
||||
// (get) Token: 0x0600033D RID: 829 RVA: 0x0000A240 File Offset: 0x00008440
|
||||
public override bool IsReadOnly
|
||||
{
|
||||
get
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600033E RID: 830 RVA: 0x0000A244 File Offset: 0x00008444
|
||||
public override object GetValue(object component)
|
||||
{
|
||||
if (component == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
return ((Array)component).GetValue(this.index);
|
||||
}
|
||||
|
||||
// Token: 0x0600033F RID: 831 RVA: 0x0000A260 File Offset: 0x00008460
|
||||
public override void SetValue(object component, object value)
|
||||
{
|
||||
if (component == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
((Array)component).SetValue(value, this.index);
|
||||
}
|
||||
|
||||
// Token: 0x06000340 RID: 832 RVA: 0x0000A27C File Offset: 0x0000847C
|
||||
public override void ResetValue(object component)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x06000341 RID: 833 RVA: 0x0000A280 File Offset: 0x00008480
|
||||
public override bool CanResetValue(object component)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// Token: 0x06000342 RID: 834 RVA: 0x0000A284 File Offset: 0x00008484
|
||||
public override bool ShouldSerializeValue(object component)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// Token: 0x04000110 RID: 272
|
||||
private int index;
|
||||
|
||||
// Token: 0x04000111 RID: 273
|
||||
private Type array_type;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
using System;
|
||||
using System.Reflection;
|
||||
|
||||
namespace System.ComponentModel
|
||||
{
|
||||
/// <summary>Provides data for the MethodNameCompleted event.</summary>
|
||||
// Token: 0x02000054 RID: 84
|
||||
public class AsyncCompletedEventArgs : EventArgs
|
||||
{
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.AsyncCompletedEventArgs" /> class. </summary>
|
||||
/// <param name="error">Any error that occurred during the asynchronous operation.</param>
|
||||
/// <param name="cancelled">A value indicating whether the asynchronous operation was canceled.</param>
|
||||
/// <param name="userState">The optional user-supplied state object passed to the <see cref="M:System.ComponentModel.BackgroundWorker.RunWorkerAsync(System.Object)" /> method.</param>
|
||||
// Token: 0x06000343 RID: 835 RVA: 0x0000A288 File Offset: 0x00008488
|
||||
public AsyncCompletedEventArgs(Exception error, bool cancelled, object userState)
|
||||
{
|
||||
this._error = error;
|
||||
this._cancelled = cancelled;
|
||||
this._userState = userState;
|
||||
}
|
||||
|
||||
/// <summary>Raises a user-supplied exception if an asynchronous operation failed.</summary>
|
||||
/// <exception cref="T:System.InvalidOperationException">The <see cref="P:System.ComponentModel.AsyncCompletedEventArgs.Cancelled" /> property is true. </exception>
|
||||
/// <exception cref="T:System.Reflection.TargetInvocationException">The <see cref="P:System.ComponentModel.AsyncCompletedEventArgs.Error" /> property has been set by the asynchronous operation. The <see cref="P:System.Exception.InnerException" /> property holds a reference to <see cref="P:System.ComponentModel.AsyncCompletedEventArgs.Error" />. </exception>
|
||||
// Token: 0x06000344 RID: 836 RVA: 0x0000A2A8 File Offset: 0x000084A8
|
||||
protected void RaiseExceptionIfNecessary()
|
||||
{
|
||||
if (this._error != null)
|
||||
{
|
||||
throw new TargetInvocationException(this._error);
|
||||
}
|
||||
if (this._cancelled)
|
||||
{
|
||||
throw new InvalidOperationException("The operation was cancelled");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a value indicating whether an asynchronous operation has been canceled.</summary>
|
||||
/// <returns>true if the background operation has been canceled; otherwise false. The default is false.</returns>
|
||||
// Token: 0x170000E3 RID: 227
|
||||
// (get) Token: 0x06000345 RID: 837 RVA: 0x0000A2D8 File Offset: 0x000084D8
|
||||
public bool Cancelled
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._cancelled;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a value indicating which error occurred during an asynchronous operation.</summary>
|
||||
/// <returns>An <see cref="T:System.Exception" /> instance, if an error occurred during an asynchronous operation; otherwise null.</returns>
|
||||
// Token: 0x170000E4 RID: 228
|
||||
// (get) Token: 0x06000346 RID: 838 RVA: 0x0000A2E0 File Offset: 0x000084E0
|
||||
public Exception Error
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._error;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets the unique identifier for the asynchronous task.</summary>
|
||||
/// <returns>An object reference that uniquely identifies the asynchronous task; otherwise, null if no value has been set.</returns>
|
||||
// Token: 0x170000E5 RID: 229
|
||||
// (get) Token: 0x06000347 RID: 839 RVA: 0x0000A2E8 File Offset: 0x000084E8
|
||||
public object UserState
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._userState;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04000112 RID: 274
|
||||
private Exception _error;
|
||||
|
||||
// Token: 0x04000113 RID: 275
|
||||
private bool _cancelled;
|
||||
|
||||
// Token: 0x04000114 RID: 276
|
||||
private object _userState;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
using System;
|
||||
|
||||
namespace System.ComponentModel
|
||||
{
|
||||
/// <summary>Represents the method that will handle the MethodNameCompleted event of an asynchronous operation.</summary>
|
||||
/// <param name="sender">The source of the event. </param>
|
||||
/// <param name="e">An <see cref="T:System.ComponentModel.AsyncCompletedEventArgs" /> that contains the event data. </param>
|
||||
// Token: 0x02000321 RID: 801
|
||||
// (Invoke) Token: 0x06001C5D RID: 7261
|
||||
public delegate void AsyncCompletedEventHandler(object sender, AsyncCompletedEventArgs e);
|
||||
}
|
||||
@@ -0,0 +1,111 @@
|
||||
using System;
|
||||
using System.Threading;
|
||||
|
||||
namespace System.ComponentModel
|
||||
{
|
||||
/// <summary>Tracks the lifetime of an asynchronous operation.</summary>
|
||||
// Token: 0x02000055 RID: 85
|
||||
public sealed class AsyncOperation
|
||||
{
|
||||
// Token: 0x06000348 RID: 840 RVA: 0x0000A2F0 File Offset: 0x000084F0
|
||||
internal AsyncOperation(SynchronizationContext ctx, object state)
|
||||
{
|
||||
this.ctx = ctx;
|
||||
this.state = state;
|
||||
ctx.OperationStarted();
|
||||
}
|
||||
|
||||
// Token: 0x06000349 RID: 841 RVA: 0x0000A30C File Offset: 0x0000850C
|
||||
~AsyncOperation()
|
||||
{
|
||||
if (!this.done && this.ctx != null)
|
||||
{
|
||||
this.ctx.OperationCompleted();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets the <see cref="T:System.Threading.SynchronizationContext" /> object that was passed to the constructor.</summary>
|
||||
/// <returns>The <see cref="T:System.Threading.SynchronizationContext" /> object that was passed to the constructor.</returns>
|
||||
// Token: 0x170000E6 RID: 230
|
||||
// (get) Token: 0x0600034A RID: 842 RVA: 0x0000A364 File Offset: 0x00008564
|
||||
public SynchronizationContext SynchronizationContext
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.ctx;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets or sets an object used to uniquely identify an asynchronous operation.</summary>
|
||||
/// <returns>The state object passed to the asynchronous method invocation.</returns>
|
||||
// Token: 0x170000E7 RID: 231
|
||||
// (get) Token: 0x0600034B RID: 843 RVA: 0x0000A36C File Offset: 0x0000856C
|
||||
public object UserSuppliedState
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.state;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Ends the lifetime of an asynchronous operation.</summary>
|
||||
/// <exception cref="T:System.InvalidOperationException">
|
||||
/// <see cref="M:System.ComponentModel.AsyncOperation.OperationCompleted" /> has been called previously for this task. </exception>
|
||||
/// <PermissionSet>
|
||||
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="UnmanagedCode, ControlEvidence" />
|
||||
/// </PermissionSet>
|
||||
// Token: 0x0600034C RID: 844 RVA: 0x0000A374 File Offset: 0x00008574
|
||||
public void OperationCompleted()
|
||||
{
|
||||
if (this.done)
|
||||
{
|
||||
throw new InvalidOperationException("This task is already completed. Multiple call to OperationCompleted is not allowed.");
|
||||
}
|
||||
this.ctx.OperationCompleted();
|
||||
this.done = true;
|
||||
}
|
||||
|
||||
/// <summary>Invokes a delegate on the thread or context appropriate for the application model.</summary>
|
||||
/// <param name="d">A <see cref="T:System.Threading.SendOrPostCallback" /> object that wraps the delegate to be called when the operation ends. </param>
|
||||
/// <param name="arg">An argument for the delegate contained in the <paramref name="d" /> parameter. </param>
|
||||
/// <exception cref="T:System.InvalidOperationException">The <see cref="M:System.ComponentModel.AsyncOperation.PostOperationCompleted(System.Threading.SendOrPostCallback,System.Object)" /> method has been called previously for this task. </exception>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="d" /> is null. </exception>
|
||||
// Token: 0x0600034D RID: 845 RVA: 0x0000A3AC File Offset: 0x000085AC
|
||||
public void Post(SendOrPostCallback d, object arg)
|
||||
{
|
||||
if (this.done)
|
||||
{
|
||||
throw new InvalidOperationException("This task is already completed. Multiple call to Post is not allowed.");
|
||||
}
|
||||
this.ctx.Post(d, arg);
|
||||
}
|
||||
|
||||
/// <summary>Ends the lifetime of an asynchronous operation.</summary>
|
||||
/// <param name="d">A <see cref="T:System.Threading.SendOrPostCallback" /> object that wraps the delegate to be called when the operation ends. </param>
|
||||
/// <param name="arg">An argument for the delegate contained in the <paramref name="d" /> parameter. </param>
|
||||
/// <exception cref="T:System.InvalidOperationException">
|
||||
/// <see cref="M:System.ComponentModel.AsyncOperation.OperationCompleted" /> has been called previously for this task. </exception>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="d" /> is null. </exception>
|
||||
// Token: 0x0600034E RID: 846 RVA: 0x0000A3D4 File Offset: 0x000085D4
|
||||
public void PostOperationCompleted(SendOrPostCallback d, object arg)
|
||||
{
|
||||
if (this.done)
|
||||
{
|
||||
throw new InvalidOperationException("This task is already completed. Multiple call to PostOperationCompleted is not allowed.");
|
||||
}
|
||||
this.Post(d, arg);
|
||||
this.OperationCompleted();
|
||||
}
|
||||
|
||||
// Token: 0x04000115 RID: 277
|
||||
private SynchronizationContext ctx;
|
||||
|
||||
// Token: 0x04000116 RID: 278
|
||||
private object state;
|
||||
|
||||
// Token: 0x04000117 RID: 279
|
||||
private bool done;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
using System;
|
||||
using System.Threading;
|
||||
|
||||
namespace System.ComponentModel
|
||||
{
|
||||
/// <summary>Provides concurrency management for classes that support asynchronous method calls. This class cannot be inherited.</summary>
|
||||
// Token: 0x02000056 RID: 86
|
||||
public static class AsyncOperationManager
|
||||
{
|
||||
/// <summary>Gets or sets the synchronization context for the asynchronous operation.</summary>
|
||||
/// <returns>The synchronization context for the asynchronous operation.</returns>
|
||||
// Token: 0x170000E8 RID: 232
|
||||
// (get) Token: 0x06000350 RID: 848 RVA: 0x0000A40C File Offset: 0x0000860C
|
||||
// (set) Token: 0x06000351 RID: 849 RVA: 0x0000A428 File Offset: 0x00008628
|
||||
[EditorBrowsable(EditorBrowsableState.Advanced)]
|
||||
public static SynchronizationContext SynchronizationContext
|
||||
{
|
||||
get
|
||||
{
|
||||
if (SynchronizationContext.Current == null)
|
||||
{
|
||||
SynchronizationContext.SetSynchronizationContext(new SynchronizationContext());
|
||||
}
|
||||
return SynchronizationContext.Current;
|
||||
}
|
||||
set
|
||||
{
|
||||
SynchronizationContext.SetSynchronizationContext(value);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Returns an <see cref="T:System.ComponentModel.AsyncOperation" /> for tracking the duration of a particular asynchronous operation.</summary>
|
||||
/// <returns>An <see cref="T:System.ComponentModel.AsyncOperation" /> that you can use to track the duration of an asynchronous method invocation.</returns>
|
||||
/// <param name="userSuppliedState">An object used to associate a piece of client state, such as a task ID, with a particular asynchronous operation. </param>
|
||||
// Token: 0x06000352 RID: 850 RVA: 0x0000A430 File Offset: 0x00008630
|
||||
public static AsyncOperation CreateOperation(object userSuppliedState)
|
||||
{
|
||||
return new AsyncOperation(AsyncOperationManager.SynchronizationContext, userSuppliedState);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,272 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.ComponentModel
|
||||
{
|
||||
/// <summary>Represents a collection of attributes.</summary>
|
||||
// Token: 0x02000057 RID: 87
|
||||
[ComVisible(true)]
|
||||
public class AttributeCollection : ICollection, IEnumerable
|
||||
{
|
||||
// Token: 0x06000353 RID: 851 RVA: 0x0000A440 File Offset: 0x00008640
|
||||
internal AttributeCollection(ArrayList attributes)
|
||||
{
|
||||
if (attributes != null)
|
||||
{
|
||||
this.attrList = attributes;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.AttributeCollection" /> class.</summary>
|
||||
/// <param name="attributes">An array of type <see cref="T:System.Attribute" /> that provides the attributes for this collection. </param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="attributes" /> is null.</exception>
|
||||
// Token: 0x06000354 RID: 852 RVA: 0x0000A460 File Offset: 0x00008660
|
||||
public AttributeCollection(params Attribute[] attributes)
|
||||
{
|
||||
if (attributes != null)
|
||||
{
|
||||
for (int i = 0; i < attributes.Length; i++)
|
||||
{
|
||||
this.attrList.Add(attributes[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Returns an <see cref="T:System.Collections.IEnumerator" /> for the <see cref="T:System.Collections.IDictionary" />. </summary>
|
||||
/// <returns>An <see cref="T:System.Collections.IEnumerator" /> for the <see cref="T:System.Collections.IDictionary" />.</returns>
|
||||
// Token: 0x06000356 RID: 854 RVA: 0x0000A4B8 File Offset: 0x000086B8
|
||||
IEnumerator IEnumerable.GetEnumerator()
|
||||
{
|
||||
return this.GetEnumerator();
|
||||
}
|
||||
|
||||
/// <summary>Gets a value indicating whether access to the collection is synchronized (thread-safe).</summary>
|
||||
/// <returns>true if access to the collection is synchronized (thread-safe); otherwise, false.</returns>
|
||||
// Token: 0x170000E9 RID: 233
|
||||
// (get) Token: 0x06000357 RID: 855 RVA: 0x0000A4C0 File Offset: 0x000086C0
|
||||
bool ICollection.IsSynchronized
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.attrList.IsSynchronized;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets an object that can be used to synchronize access to the collection.</summary>
|
||||
/// <returns>An object that can be used to synchronize access to the collection.</returns>
|
||||
// Token: 0x170000EA RID: 234
|
||||
// (get) Token: 0x06000358 RID: 856 RVA: 0x0000A4D0 File Offset: 0x000086D0
|
||||
object ICollection.SyncRoot
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.attrList.SyncRoot;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets the number of elements contained in the collection.</summary>
|
||||
/// <returns>The number of elements contained in the collection.</returns>
|
||||
// Token: 0x170000EB RID: 235
|
||||
// (get) Token: 0x06000359 RID: 857 RVA: 0x0000A4E0 File Offset: 0x000086E0
|
||||
int ICollection.Count
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Count;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Creates a new <see cref="T:System.ComponentModel.AttributeCollection" /> from an existing <see cref="T:System.ComponentModel.AttributeCollection" />.</summary>
|
||||
/// <returns>A new <see cref="T:System.ComponentModel.AttributeCollection" /> that is a copy of <paramref name="existing" />.</returns>
|
||||
/// <param name="existing">An <see cref="T:System.ComponentModel.AttributeCollection" /> from which to create the copy.</param>
|
||||
/// <param name="newAttributes">An array of type <see cref="T:System.Attribute" /> that provides the attributes for this collection. Can be null.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="existing" /> is null.</exception>
|
||||
// Token: 0x0600035A RID: 858 RVA: 0x0000A4E8 File Offset: 0x000086E8
|
||||
public static AttributeCollection FromExisting(AttributeCollection existing, params Attribute[] newAttributes)
|
||||
{
|
||||
if (existing == null)
|
||||
{
|
||||
throw new ArgumentNullException("existing");
|
||||
}
|
||||
AttributeCollection attributeCollection = new AttributeCollection(new Attribute[0]);
|
||||
attributeCollection.attrList.AddRange(existing.attrList);
|
||||
if (newAttributes != null)
|
||||
{
|
||||
attributeCollection.attrList.AddRange(newAttributes);
|
||||
}
|
||||
return attributeCollection;
|
||||
}
|
||||
|
||||
/// <summary>Determines whether this collection of attributes has the specified attribute.</summary>
|
||||
/// <returns>true if the collection contains the attribute or is the default attribute for the type of attribute; otherwise, false.</returns>
|
||||
/// <param name="attribute">An <see cref="T:System.Attribute" /> to find in the collection. </param>
|
||||
// Token: 0x0600035B RID: 859 RVA: 0x0000A538 File Offset: 0x00008738
|
||||
public bool Contains(Attribute attr)
|
||||
{
|
||||
Attribute attribute = this[attr.GetType()];
|
||||
return attribute != null && attr.Equals(attribute);
|
||||
}
|
||||
|
||||
/// <summary>Determines whether this attribute collection contains all the specified attributes in the attribute array.</summary>
|
||||
/// <returns>true if the collection contains all the attributes; otherwise, false.</returns>
|
||||
/// <param name="attributes">An array of type <see cref="T:System.Attribute" /> to find in the collection. </param>
|
||||
// Token: 0x0600035C RID: 860 RVA: 0x0000A564 File Offset: 0x00008764
|
||||
public bool Contains(Attribute[] attributes)
|
||||
{
|
||||
if (attributes == null)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
foreach (Attribute attribute in attributes)
|
||||
{
|
||||
if (!this.Contains(attribute))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>Copies the collection to an array, starting at the specified index.</summary>
|
||||
/// <param name="array">The <see cref="T:System.Array" /> to copy the collection to. </param>
|
||||
/// <param name="index">The index to start from. </param>
|
||||
// Token: 0x0600035D RID: 861 RVA: 0x0000A5A4 File Offset: 0x000087A4
|
||||
public void CopyTo(Array array, int index)
|
||||
{
|
||||
this.attrList.CopyTo(array, index);
|
||||
}
|
||||
|
||||
/// <summary>Gets an enumerator for this collection.</summary>
|
||||
/// <returns>An enumerator of type <see cref="T:System.Collections.IEnumerator" />.</returns>
|
||||
// Token: 0x0600035E RID: 862 RVA: 0x0000A5B4 File Offset: 0x000087B4
|
||||
public IEnumerator GetEnumerator()
|
||||
{
|
||||
return this.attrList.GetEnumerator();
|
||||
}
|
||||
|
||||
/// <summary>Determines whether a specified attribute is the same as an attribute in the collection.</summary>
|
||||
/// <returns>true if the attribute is contained within the collection and has the same value as the attribute in the collection; otherwise, false.</returns>
|
||||
/// <param name="attribute">An instance of <see cref="T:System.Attribute" /> to compare with the attributes in this collection. </param>
|
||||
// Token: 0x0600035F RID: 863 RVA: 0x0000A5C4 File Offset: 0x000087C4
|
||||
public bool Matches(Attribute attr)
|
||||
{
|
||||
foreach (object obj in this.attrList)
|
||||
{
|
||||
Attribute attribute = (Attribute)obj;
|
||||
if (attribute.Match(attr))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/// <summary>Determines whether the attributes in the specified array are the same as the attributes in the collection.</summary>
|
||||
/// <returns>true if all the attributes in the array are contained in the collection and have the same values as the attributes in the collection; otherwise, false.</returns>
|
||||
/// <param name="attributes">An array of <see cref="T:System.CodeDom.MemberAttributes" /> to compare with the attributes in this collection. </param>
|
||||
// Token: 0x06000360 RID: 864 RVA: 0x0000A644 File Offset: 0x00008844
|
||||
public bool Matches(Attribute[] attributes)
|
||||
{
|
||||
foreach (Attribute attribute in attributes)
|
||||
{
|
||||
if (!this.Matches(attribute))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>Returns the default <see cref="T:System.Attribute" /> of a given <see cref="T:System.Type" />.</summary>
|
||||
/// <returns>An <see cref="T:System.Attribute" />.</returns>
|
||||
/// <param name="attributeType">The <see cref="T:System.Type" /> of the attribute to retrieve. </param>
|
||||
// Token: 0x06000361 RID: 865 RVA: 0x0000A67C File Offset: 0x0000887C
|
||||
protected Attribute GetDefaultAttribute(Type attributeType)
|
||||
{
|
||||
Attribute attribute = null;
|
||||
BindingFlags bindingFlags = BindingFlags.Static | BindingFlags.Public;
|
||||
FieldInfo field = attributeType.GetField("Default", bindingFlags);
|
||||
if (field == null)
|
||||
{
|
||||
ConstructorInfo constructor = attributeType.GetConstructor(Type.EmptyTypes);
|
||||
if (constructor != null)
|
||||
{
|
||||
attribute = constructor.Invoke(null) as Attribute;
|
||||
}
|
||||
if (attribute != null && !attribute.IsDefaultAttribute())
|
||||
{
|
||||
attribute = null;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
attribute = (Attribute)field.GetValue(null);
|
||||
}
|
||||
return attribute;
|
||||
}
|
||||
|
||||
/// <summary>Gets the number of attributes.</summary>
|
||||
/// <returns>The number of attributes.</returns>
|
||||
// Token: 0x170000EC RID: 236
|
||||
// (get) Token: 0x06000362 RID: 866 RVA: 0x0000A6E8 File Offset: 0x000088E8
|
||||
public int Count
|
||||
{
|
||||
get
|
||||
{
|
||||
return (this.attrList == null) ? 0 : this.attrList.Count;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets the attribute with the specified type.</summary>
|
||||
/// <returns>The <see cref="T:System.Attribute" /> with the specified type or, if the attribute does not exist, the default value for the attribute type.</returns>
|
||||
/// <param name="attributeType">The <see cref="T:System.Type" /> of the <see cref="T:System.Attribute" /> to get from the collection. </param>
|
||||
// Token: 0x170000ED RID: 237
|
||||
public virtual Attribute this[Type type]
|
||||
{
|
||||
get
|
||||
{
|
||||
Attribute attribute = null;
|
||||
if (this.attrList != null)
|
||||
{
|
||||
foreach (object obj in this.attrList)
|
||||
{
|
||||
Attribute attribute2 = (Attribute)obj;
|
||||
if (type.IsAssignableFrom(attribute2.GetType()))
|
||||
{
|
||||
attribute = attribute2;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (attribute == null)
|
||||
{
|
||||
attribute = this.GetDefaultAttribute(type);
|
||||
}
|
||||
return attribute;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets the attribute with the specified index number.</summary>
|
||||
/// <returns>The <see cref="T:System.Attribute" /> with the specified index number.</returns>
|
||||
/// <param name="index">The zero-based index of <see cref="T:System.ComponentModel.AttributeCollection" />. </param>
|
||||
// Token: 0x170000EE RID: 238
|
||||
public virtual Attribute this[int index]
|
||||
{
|
||||
get
|
||||
{
|
||||
return (Attribute)this.attrList[index];
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04000118 RID: 280
|
||||
private ArrayList attrList = new ArrayList();
|
||||
|
||||
/// <summary>Specifies an empty collection that you can use, rather than creating a new one. This field is read-only.</summary>
|
||||
// Token: 0x04000119 RID: 281
|
||||
public static readonly AttributeCollection Empty = new AttributeCollection(null);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,252 @@
|
||||
using System;
|
||||
using System.Threading;
|
||||
|
||||
namespace System.ComponentModel
|
||||
{
|
||||
/// <summary>Executes an operation on a separate thread.</summary>
|
||||
// Token: 0x02000058 RID: 88
|
||||
public class BackgroundWorker
|
||||
{
|
||||
/// <summary>Occurs when <see cref="M:System.ComponentModel.BackgroundWorker.RunWorkerAsync" /> is called.</summary>
|
||||
// Token: 0x14000010 RID: 16
|
||||
// (add) Token: 0x06000366 RID: 870 RVA: 0x0000A7C0 File Offset: 0x000089C0
|
||||
// (remove) Token: 0x06000367 RID: 871 RVA: 0x0000A7DC File Offset: 0x000089DC
|
||||
public event DoWorkEventHandler DoWork;
|
||||
|
||||
/// <summary>Occurs when <see cref="M:System.ComponentModel.BackgroundWorker.ReportProgress(System.Int32)" /> is called.</summary>
|
||||
// Token: 0x14000011 RID: 17
|
||||
// (add) Token: 0x06000368 RID: 872 RVA: 0x0000A7F8 File Offset: 0x000089F8
|
||||
// (remove) Token: 0x06000369 RID: 873 RVA: 0x0000A814 File Offset: 0x00008A14
|
||||
public event ProgressChangedEventHandler ProgressChanged;
|
||||
|
||||
/// <summary>Occurs when the background operation has completed, has been canceled, or has raised an exception.</summary>
|
||||
// Token: 0x14000012 RID: 18
|
||||
// (add) Token: 0x0600036A RID: 874 RVA: 0x0000A830 File Offset: 0x00008A30
|
||||
// (remove) Token: 0x0600036B RID: 875 RVA: 0x0000A84C File Offset: 0x00008A4C
|
||||
public event RunWorkerCompletedEventHandler RunWorkerCompleted;
|
||||
|
||||
/// <summary>Gets a value indicating whether the application has requested cancellation of a background operation.</summary>
|
||||
/// <returns>true if the application has requested cancellation of a background operation; otherwise, false. The default is false.</returns>
|
||||
// Token: 0x170000EF RID: 239
|
||||
// (get) Token: 0x0600036C RID: 876 RVA: 0x0000A868 File Offset: 0x00008A68
|
||||
public bool CancellationPending
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.cancel_pending;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a value indicating whether the <see cref="T:System.ComponentModel.BackgroundWorker" /> is running an asynchronous operation.</summary>
|
||||
/// <returns>true, if the <see cref="T:System.ComponentModel.BackgroundWorker" /> is running an asynchronous operation; otherwise, false.</returns>
|
||||
// Token: 0x170000F0 RID: 240
|
||||
// (get) Token: 0x0600036D RID: 877 RVA: 0x0000A870 File Offset: 0x00008A70
|
||||
public bool IsBusy
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.async != null;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets or sets a value indicating whether the <see cref="T:System.ComponentModel.BackgroundWorker" /> can report progress updates.</summary>
|
||||
/// <returns>true if the <see cref="T:System.ComponentModel.BackgroundWorker" /> supports progress updates; otherwise false. The default is false.</returns>
|
||||
// Token: 0x170000F1 RID: 241
|
||||
// (get) Token: 0x0600036E RID: 878 RVA: 0x0000A880 File Offset: 0x00008A80
|
||||
// (set) Token: 0x0600036F RID: 879 RVA: 0x0000A888 File Offset: 0x00008A88
|
||||
[DefaultValue(false)]
|
||||
public bool WorkerReportsProgress
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.report_progress;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.report_progress = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets or sets a value indicating whether the <see cref="T:System.ComponentModel.BackgroundWorker" /> supports asynchronous cancellation.</summary>
|
||||
/// <returns>true if the <see cref="T:System.ComponentModel.BackgroundWorker" /> supports cancellation; otherwise false. The default is false.</returns>
|
||||
// Token: 0x170000F2 RID: 242
|
||||
// (get) Token: 0x06000370 RID: 880 RVA: 0x0000A894 File Offset: 0x00008A94
|
||||
// (set) Token: 0x06000371 RID: 881 RVA: 0x0000A89C File Offset: 0x00008A9C
|
||||
[DefaultValue(false)]
|
||||
public bool WorkerSupportsCancellation
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.support_cancel;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.support_cancel = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Requests cancellation of a pending background operation.</summary>
|
||||
/// <exception cref="T:System.InvalidOperationException">
|
||||
/// <see cref="P:System.ComponentModel.BackgroundWorker.WorkerSupportsCancellation" /> is false. </exception>
|
||||
/// <PermissionSet>
|
||||
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="UnmanagedCode, ControlEvidence" />
|
||||
/// </PermissionSet>
|
||||
// Token: 0x06000372 RID: 882 RVA: 0x0000A8A8 File Offset: 0x00008AA8
|
||||
public void CancelAsync()
|
||||
{
|
||||
if (!this.support_cancel)
|
||||
{
|
||||
throw new InvalidOperationException("This background worker does not support cancellation.");
|
||||
}
|
||||
if (!this.IsBusy)
|
||||
{
|
||||
return;
|
||||
}
|
||||
this.cancel_pending = true;
|
||||
}
|
||||
|
||||
/// <summary>Raises the <see cref="E:System.ComponentModel.BackgroundWorker.ProgressChanged" /> event.</summary>
|
||||
/// <param name="percentProgress">The percentage, from 0 to 100, of the background operation that is complete. </param>
|
||||
/// <exception cref="T:System.InvalidOperationException">The <see cref="P:System.ComponentModel.BackgroundWorker.WorkerReportsProgress" /> property is set to false. </exception>
|
||||
// Token: 0x06000373 RID: 883 RVA: 0x0000A8D4 File Offset: 0x00008AD4
|
||||
public void ReportProgress(int percentProgress)
|
||||
{
|
||||
this.ReportProgress(percentProgress, null);
|
||||
}
|
||||
|
||||
/// <summary>Raises the <see cref="E:System.ComponentModel.BackgroundWorker.ProgressChanged" /> event.</summary>
|
||||
/// <param name="percentProgress">The percentage, from 0 to 100, of the background operation that is complete.</param>
|
||||
/// <param name="userState">The state object passed to <see cref="M:System.ComponentModel.BackgroundWorker.RunWorkerAsync(System.Object)" />.</param>
|
||||
/// <exception cref="T:System.InvalidOperationException">The <see cref="P:System.ComponentModel.BackgroundWorker.WorkerReportsProgress" /> property is set to false. </exception>
|
||||
// Token: 0x06000374 RID: 884 RVA: 0x0000A8E0 File Offset: 0x00008AE0
|
||||
public void ReportProgress(int percentProgress, object userState)
|
||||
{
|
||||
if (!this.WorkerReportsProgress)
|
||||
{
|
||||
throw new InvalidOperationException("This background worker does not report progress.");
|
||||
}
|
||||
if (!this.IsBusy)
|
||||
{
|
||||
return;
|
||||
}
|
||||
this.async.Post(delegate(object o)
|
||||
{
|
||||
ProgressChangedEventArgs progressChangedEventArgs = o as ProgressChangedEventArgs;
|
||||
this.OnProgressChanged(progressChangedEventArgs);
|
||||
}, new ProgressChangedEventArgs(percentProgress, userState));
|
||||
}
|
||||
|
||||
/// <summary>Starts execution of a background operation.</summary>
|
||||
/// <exception cref="T:System.InvalidOperationException">
|
||||
/// <see cref="P:System.ComponentModel.BackgroundWorker.IsBusy" /> is true.</exception>
|
||||
/// <PermissionSet>
|
||||
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="UnmanagedCode, ControlEvidence" />
|
||||
/// </PermissionSet>
|
||||
// Token: 0x06000375 RID: 885 RVA: 0x0000A930 File Offset: 0x00008B30
|
||||
public void RunWorkerAsync()
|
||||
{
|
||||
this.RunWorkerAsync(null);
|
||||
}
|
||||
|
||||
// Token: 0x06000376 RID: 886 RVA: 0x0000A93C File Offset: 0x00008B3C
|
||||
private void ProcessWorker(object argument, AsyncOperation async, SendOrPostCallback callback)
|
||||
{
|
||||
Exception ex = null;
|
||||
DoWorkEventArgs doWorkEventArgs = new DoWorkEventArgs(argument);
|
||||
try
|
||||
{
|
||||
this.OnDoWork(doWorkEventArgs);
|
||||
}
|
||||
catch (Exception ex2)
|
||||
{
|
||||
ex = ex2;
|
||||
doWorkEventArgs.Cancel = false;
|
||||
}
|
||||
callback(new object[]
|
||||
{
|
||||
new RunWorkerCompletedEventArgs(doWorkEventArgs.Result, ex, doWorkEventArgs.Cancel),
|
||||
async
|
||||
});
|
||||
}
|
||||
|
||||
// Token: 0x06000377 RID: 887 RVA: 0x0000A9B0 File Offset: 0x00008BB0
|
||||
private void CompleteWorker(object state)
|
||||
{
|
||||
object[] array = (object[])state;
|
||||
RunWorkerCompletedEventArgs runWorkerCompletedEventArgs = array[0] as RunWorkerCompletedEventArgs;
|
||||
AsyncOperation asyncOperation = array[1] as AsyncOperation;
|
||||
SendOrPostCallback sendOrPostCallback = delegate(object darg)
|
||||
{
|
||||
this.async = null;
|
||||
this.OnRunWorkerCompleted(darg as RunWorkerCompletedEventArgs);
|
||||
};
|
||||
asyncOperation.PostOperationCompleted(sendOrPostCallback, runWorkerCompletedEventArgs);
|
||||
this.cancel_pending = false;
|
||||
}
|
||||
|
||||
/// <summary>Starts execution of a background operation.</summary>
|
||||
/// <param name="argument">A parameter for use by the background operation to be executed in the <see cref="E:System.ComponentModel.BackgroundWorker.DoWork" /> event handler. </param>
|
||||
/// <exception cref="T:System.InvalidOperationException">
|
||||
/// <see cref="P:System.ComponentModel.BackgroundWorker.IsBusy" /> is true. </exception>
|
||||
// Token: 0x06000378 RID: 888 RVA: 0x0000A9F4 File Offset: 0x00008BF4
|
||||
public void RunWorkerAsync(object argument)
|
||||
{
|
||||
if (this.IsBusy)
|
||||
{
|
||||
throw new InvalidOperationException("The background worker is busy.");
|
||||
}
|
||||
this.async = AsyncOperationManager.CreateOperation(this);
|
||||
BackgroundWorker.ProcessWorkerEventHandler processWorkerEventHandler = new BackgroundWorker.ProcessWorkerEventHandler(this.ProcessWorker);
|
||||
processWorkerEventHandler.BeginInvoke(argument, this.async, new SendOrPostCallback(this.CompleteWorker), null, null);
|
||||
}
|
||||
|
||||
/// <summary>Raises the <see cref="E:System.ComponentModel.BackgroundWorker.DoWork" /> event. </summary>
|
||||
/// <param name="e">An <see cref="T:System.EventArgs" /> that contains the event data.</param>
|
||||
// Token: 0x06000379 RID: 889 RVA: 0x0000AA4C File Offset: 0x00008C4C
|
||||
protected virtual void OnDoWork(DoWorkEventArgs e)
|
||||
{
|
||||
if (this.DoWork != null)
|
||||
{
|
||||
this.DoWork(this, e);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Raises the <see cref="E:System.ComponentModel.BackgroundWorker.ProgressChanged" /> event.</summary>
|
||||
/// <param name="e">An <see cref="T:System.EventArgs" /> that contains the event data. </param>
|
||||
// Token: 0x0600037A RID: 890 RVA: 0x0000AA68 File Offset: 0x00008C68
|
||||
protected virtual void OnProgressChanged(ProgressChangedEventArgs e)
|
||||
{
|
||||
if (this.ProgressChanged != null)
|
||||
{
|
||||
this.ProgressChanged(this, e);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Raises the <see cref="E:System.ComponentModel.BackgroundWorker.RunWorkerCompleted" /> event.</summary>
|
||||
/// <param name="e">An <see cref="T:System.EventArgs" /> that contains the event data. </param>
|
||||
// Token: 0x0600037B RID: 891 RVA: 0x0000AA84 File Offset: 0x00008C84
|
||||
protected virtual void OnRunWorkerCompleted(RunWorkerCompletedEventArgs e)
|
||||
{
|
||||
if (this.RunWorkerCompleted != null)
|
||||
{
|
||||
this.RunWorkerCompleted(this, e);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0400011A RID: 282
|
||||
private AsyncOperation async;
|
||||
|
||||
// Token: 0x0400011B RID: 283
|
||||
private bool cancel_pending;
|
||||
|
||||
// Token: 0x0400011C RID: 284
|
||||
private bool report_progress;
|
||||
|
||||
// Token: 0x0400011D RID: 285
|
||||
private bool support_cancel;
|
||||
|
||||
// Token: 0x02000307 RID: 775
|
||||
// (Invoke) Token: 0x06001BF5 RID: 7157
|
||||
private delegate void ProcessWorkerEventHandler(object argument, AsyncOperation async, SendOrPostCallback callback);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,126 @@
|
||||
using System;
|
||||
using System.Globalization;
|
||||
|
||||
namespace System.ComponentModel
|
||||
{
|
||||
/// <summary>Provides a base type converter for nonfloating-point numerical types.</summary>
|
||||
// Token: 0x02000059 RID: 89
|
||||
public abstract class BaseNumberConverter : TypeConverter
|
||||
{
|
||||
// Token: 0x170000F3 RID: 243
|
||||
// (get) Token: 0x0600037F RID: 895
|
||||
internal abstract bool SupportHex { get; }
|
||||
|
||||
/// <summary>Determines if this converter can convert an object in the given source type to the native type of the converter.</summary>
|
||||
/// <returns>true if this converter can perform the operation; otherwise, false.</returns>
|
||||
/// <param name="context">An <see cref="T:System.ComponentModel.ITypeDescriptorContext" /> that provides a format context. </param>
|
||||
/// <param name="sourceType">A <see cref="T:System.Type" /> that represents the type from which you want to convert. </param>
|
||||
// Token: 0x06000380 RID: 896 RVA: 0x0000AADC File Offset: 0x00008CDC
|
||||
public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType)
|
||||
{
|
||||
return sourceType == typeof(string) || base.CanConvertFrom(context, sourceType);
|
||||
}
|
||||
|
||||
/// <summary>Returns a value indicating whether this converter can convert an object to the given destination type using the context.</summary>
|
||||
/// <returns>true if this converter can perform the operation; otherwise, false.</returns>
|
||||
/// <param name="context">An <see cref="T:System.ComponentModel.ITypeDescriptorContext" /> that provides a format context. </param>
|
||||
/// <param name="t">A <see cref="T:System.Type" /> that represents the type to which you want to convert. </param>
|
||||
// Token: 0x06000381 RID: 897 RVA: 0x0000AAFC File Offset: 0x00008CFC
|
||||
public override bool CanConvertTo(ITypeDescriptorContext context, Type t)
|
||||
{
|
||||
return t.IsPrimitive || base.CanConvertTo(context, t);
|
||||
}
|
||||
|
||||
/// <summary>Converts the given object to the converter's native type.</summary>
|
||||
/// <returns>An <see cref="T:System.Object" /> that represents the converted value.</returns>
|
||||
/// <param name="context">An <see cref="T:System.ComponentModel.ITypeDescriptorContext" /> that provides a format context. </param>
|
||||
/// <param name="culture">A <see cref="T:System.Globalization.CultureInfo" /> that specifies the culture to represent the number. </param>
|
||||
/// <param name="value">The object to convert. </param>
|
||||
/// <exception cref="T:System.Exception">
|
||||
/// <paramref name="value" /> is not a valid value for the target type.</exception>
|
||||
/// <exception cref="T:System.NotSupportedException">The conversion cannot be performed. </exception>
|
||||
// Token: 0x06000382 RID: 898 RVA: 0x0000AB14 File Offset: 0x00008D14
|
||||
public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value)
|
||||
{
|
||||
if (culture == null)
|
||||
{
|
||||
culture = CultureInfo.CurrentCulture;
|
||||
}
|
||||
string text = value as string;
|
||||
if (text != null)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (this.SupportHex)
|
||||
{
|
||||
if (text.Length >= 1 && text[0] == '#')
|
||||
{
|
||||
return this.ConvertFromString(text.Substring(1), 16);
|
||||
}
|
||||
if (text.StartsWith("0x") || text.StartsWith("0X"))
|
||||
{
|
||||
return this.ConvertFromString(text, 16);
|
||||
}
|
||||
}
|
||||
NumberFormatInfo numberFormatInfo = (NumberFormatInfo)culture.GetFormat(typeof(NumberFormatInfo));
|
||||
return this.ConvertFromString(text, numberFormatInfo);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
throw new Exception(value.ToString() + " is not a valid value for " + this.InnerType.Name + ".", ex);
|
||||
}
|
||||
}
|
||||
return base.ConvertFrom(context, culture, value);
|
||||
}
|
||||
|
||||
/// <summary>Converts the specified object to another type.</summary>
|
||||
/// <returns>An <see cref="T:System.Object" /> that represents the converted value.</returns>
|
||||
/// <param name="context">An <see cref="T:System.ComponentModel.ITypeDescriptorContext" /> that provides a format context. </param>
|
||||
/// <param name="culture">A <see cref="T:System.Globalization.CultureInfo" /> that specifies the culture to represent the number. </param>
|
||||
/// <param name="value">The object to convert. </param>
|
||||
/// <param name="destinationType">The type to convert the object to. </param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="destinationType" /> is null.</exception>
|
||||
/// <exception cref="T:System.NotSupportedException">The conversion cannot be performed. </exception>
|
||||
// Token: 0x06000383 RID: 899 RVA: 0x0000AC24 File Offset: 0x00008E24
|
||||
public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
|
||||
{
|
||||
if (value == null)
|
||||
{
|
||||
throw new ArgumentNullException("value");
|
||||
}
|
||||
if (culture == null)
|
||||
{
|
||||
culture = CultureInfo.CurrentCulture;
|
||||
}
|
||||
if (destinationType == typeof(string) && value is IConvertible)
|
||||
{
|
||||
return ((IConvertible)value).ToType(destinationType, culture);
|
||||
}
|
||||
if (destinationType.IsPrimitive)
|
||||
{
|
||||
return Convert.ChangeType(value, destinationType, culture);
|
||||
}
|
||||
return base.ConvertTo(context, culture, value, destinationType);
|
||||
}
|
||||
|
||||
// Token: 0x06000384 RID: 900
|
||||
internal abstract string ConvertToString(object value, NumberFormatInfo format);
|
||||
|
||||
// Token: 0x06000385 RID: 901
|
||||
internal abstract object ConvertFromString(string value, NumberFormatInfo format);
|
||||
|
||||
// Token: 0x06000386 RID: 902 RVA: 0x0000AC9C File Offset: 0x00008E9C
|
||||
internal virtual object ConvertFromString(string value, int fromBase)
|
||||
{
|
||||
if (this.SupportHex)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
throw new InvalidOperationException();
|
||||
}
|
||||
|
||||
// Token: 0x04000121 RID: 289
|
||||
internal Type InnerType;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
using System;
|
||||
|
||||
namespace System.ComponentModel
|
||||
{
|
||||
/// <summary>Specifies values to indicate whether a property can be bound to a data element or another property.</summary>
|
||||
// Token: 0x0200005A RID: 90
|
||||
public enum BindableSupport
|
||||
{
|
||||
/// <summary>The property is not bindable at design time.</summary>
|
||||
// Token: 0x04000123 RID: 291
|
||||
No,
|
||||
/// <summary>The property is bindable at design time.</summary>
|
||||
// Token: 0x04000124 RID: 292
|
||||
Yes,
|
||||
/// <summary>The property is set to the default.</summary>
|
||||
// Token: 0x04000125 RID: 293
|
||||
Default
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
using System;
|
||||
using System.Globalization;
|
||||
|
||||
namespace System.ComponentModel
|
||||
{
|
||||
/// <summary>Provides a type converter to convert <see cref="T:System.Boolean" /> objects to and from various other representations.</summary>
|
||||
// Token: 0x0200005B RID: 91
|
||||
public class BooleanConverter : TypeConverter
|
||||
{
|
||||
/// <summary>Gets a value indicating whether this converter can convert an object in the given source type to a Boolean object using the specified context.</summary>
|
||||
/// <returns>true if this object can perform the conversion; otherwise, false.</returns>
|
||||
/// <param name="context">An <see cref="T:System.ComponentModel.ITypeDescriptorContext" /> that provides a format context. </param>
|
||||
/// <param name="sourceType">A <see cref="T:System.Type" /> that represents the type you wish to convert from. </param>
|
||||
// Token: 0x06000388 RID: 904 RVA: 0x0000ACBC File Offset: 0x00008EBC
|
||||
public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType)
|
||||
{
|
||||
return sourceType == typeof(string) || base.CanConvertFrom(context, sourceType);
|
||||
}
|
||||
|
||||
/// <summary>Converts the given value object to a Boolean object.</summary>
|
||||
/// <returns>An <see cref="T:System.Object" /> that represents the converted <paramref name="value" />.</returns>
|
||||
/// <param name="context">An <see cref="T:System.ComponentModel.ITypeDescriptorContext" /> that provides a format context. </param>
|
||||
/// <param name="culture">A <see cref="T:System.Globalization.CultureInfo" /> that specifies the culture to which to convert.</param>
|
||||
/// <param name="value">The <see cref="T:System.Object" /> to convert. </param>
|
||||
/// <exception cref="T:System.FormatException">
|
||||
/// <paramref name="value" /> is not a valid value for the target type. </exception>
|
||||
/// <exception cref="T:System.NotSupportedException">The conversion cannot be performed. </exception>
|
||||
// Token: 0x06000389 RID: 905 RVA: 0x0000ACD8 File Offset: 0x00008ED8
|
||||
public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value)
|
||||
{
|
||||
if (value is string)
|
||||
{
|
||||
return bool.Parse((string)value);
|
||||
}
|
||||
return base.ConvertFrom(context, culture, value);
|
||||
}
|
||||
|
||||
/// <summary>Gets a collection of standard values for the Boolean data type.</summary>
|
||||
/// <returns>A <see cref="T:System.ComponentModel.TypeConverter.StandardValuesCollection" /> that holds a standard set of valid values.</returns>
|
||||
/// <param name="context">An <see cref="T:System.ComponentModel.ITypeDescriptorContext" /> that provides a format context. </param>
|
||||
// Token: 0x0600038A RID: 906 RVA: 0x0000AD00 File Offset: 0x00008F00
|
||||
public override TypeConverter.StandardValuesCollection GetStandardValues(ITypeDescriptorContext context)
|
||||
{
|
||||
bool[] array = new bool[2];
|
||||
array[0] = true;
|
||||
return new TypeConverter.StandardValuesCollection(array);
|
||||
}
|
||||
|
||||
/// <summary>Gets a value indicating whether the list of standard values returned from the <see cref="M:System.ComponentModel.BooleanConverter.GetStandardValues(System.ComponentModel.ITypeDescriptorContext)" /> method is an exclusive list.</summary>
|
||||
/// <returns>true because the <see cref="T:System.ComponentModel.TypeConverter.StandardValuesCollection" /> returned from <see cref="M:System.ComponentModel.BooleanConverter.GetStandardValues(System.ComponentModel.ITypeDescriptorContext)" /> is an exhaustive list of possible values. This method never returns false.</returns>
|
||||
/// <param name="context">An <see cref="T:System.ComponentModel.ITypeDescriptorContext" /> that provides a format context. </param>
|
||||
// Token: 0x0600038B RID: 907 RVA: 0x0000AD14 File Offset: 0x00008F14
|
||||
public override bool GetStandardValuesExclusive(ITypeDescriptorContext context)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>Gets a value indicating whether this object supports a standard set of values that can be picked from a list.</summary>
|
||||
/// <returns>true because <see cref="M:System.ComponentModel.BooleanConverter.GetStandardValues(System.ComponentModel.ITypeDescriptorContext)" /> can be called to find a common set of values the object supports. This method never returns false.</returns>
|
||||
/// <param name="context">An <see cref="T:System.ComponentModel.ITypeDescriptorContext" /> that provides a format context. </param>
|
||||
// Token: 0x0600038C RID: 908 RVA: 0x0000AD18 File Offset: 0x00008F18
|
||||
public override bool GetStandardValuesSupported(ITypeDescriptorContext context)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
using System;
|
||||
|
||||
namespace System.ComponentModel
|
||||
{
|
||||
/// <summary>Specifies whether a property or event should be displayed in a Properties window.</summary>
|
||||
// Token: 0x0200005C RID: 92
|
||||
[AttributeUsage(AttributeTargets.All)]
|
||||
public sealed class BrowsableAttribute : Attribute
|
||||
{
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.BrowsableAttribute" /> class.</summary>
|
||||
/// <param name="browsable">true if a property or event can be modified at design time; otherwise, false. The default is true. </param>
|
||||
// Token: 0x0600038D RID: 909 RVA: 0x0000AD1C File Offset: 0x00008F1C
|
||||
public BrowsableAttribute(bool browsable)
|
||||
{
|
||||
this.browsable = browsable;
|
||||
}
|
||||
|
||||
/// <summary>Gets a value indicating whether an object is browsable.</summary>
|
||||
/// <returns>true if the object is browsable; otherwise, false.</returns>
|
||||
// Token: 0x170000F4 RID: 244
|
||||
// (get) Token: 0x0600038F RID: 911 RVA: 0x0000AD50 File Offset: 0x00008F50
|
||||
public bool Browsable
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.browsable;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Indicates whether this instance and a specified object are equal.</summary>
|
||||
/// <returns>true if <paramref name="obj" /> is equal to this instance; otherwise, false.</returns>
|
||||
/// <param name="obj">Another object to compare to. </param>
|
||||
// Token: 0x06000390 RID: 912 RVA: 0x0000AD58 File Offset: 0x00008F58
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
return obj is BrowsableAttribute && (obj == this || ((BrowsableAttribute)obj).Browsable == this.browsable);
|
||||
}
|
||||
|
||||
/// <summary>Returns the hash code for this instance.</summary>
|
||||
/// <returns>A 32-bit signed integer hash code.</returns>
|
||||
// Token: 0x06000391 RID: 913 RVA: 0x0000AD84 File Offset: 0x00008F84
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return this.browsable.GetHashCode();
|
||||
}
|
||||
|
||||
/// <summary>Determines if this attribute is the default.</summary>
|
||||
/// <returns>true if the attribute is the default value for this attribute class; otherwise, false.</returns>
|
||||
// Token: 0x06000392 RID: 914 RVA: 0x0000AD94 File Offset: 0x00008F94
|
||||
public override bool IsDefaultAttribute()
|
||||
{
|
||||
return this.browsable == BrowsableAttribute.Default.Browsable;
|
||||
}
|
||||
|
||||
// Token: 0x04000126 RID: 294
|
||||
private bool browsable;
|
||||
|
||||
/// <summary>Specifies the default value for the <see cref="T:System.ComponentModel.BrowsableAttribute" />, which is <see cref="F:System.ComponentModel.BrowsableAttribute.Yes" />. This static field is read-only.</summary>
|
||||
// Token: 0x04000127 RID: 295
|
||||
public static readonly BrowsableAttribute Default = new BrowsableAttribute(true);
|
||||
|
||||
/// <summary>Specifies that a property or event cannot be modified at design time. This static field is read-only.</summary>
|
||||
// Token: 0x04000128 RID: 296
|
||||
public static readonly BrowsableAttribute No = new BrowsableAttribute(false);
|
||||
|
||||
/// <summary>Specifies that a property or event can be modified at design time. This static field is read-only.</summary>
|
||||
// Token: 0x04000129 RID: 297
|
||||
public static readonly BrowsableAttribute Yes = new BrowsableAttribute(true);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
using System;
|
||||
using System.Globalization;
|
||||
|
||||
namespace System.ComponentModel
|
||||
{
|
||||
/// <summary>Provides a type converter to convert 8-bit unsigned integer objects to and from various other representations.</summary>
|
||||
// Token: 0x0200005D RID: 93
|
||||
public class ByteConverter : BaseNumberConverter
|
||||
{
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.ByteConverter" /> class. </summary>
|
||||
// Token: 0x06000393 RID: 915 RVA: 0x0000ADA8 File Offset: 0x00008FA8
|
||||
public ByteConverter()
|
||||
{
|
||||
this.InnerType = typeof(byte);
|
||||
}
|
||||
|
||||
// Token: 0x170000F5 RID: 245
|
||||
// (get) Token: 0x06000394 RID: 916 RVA: 0x0000ADC0 File Offset: 0x00008FC0
|
||||
internal override bool SupportHex
|
||||
{
|
||||
get
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000395 RID: 917 RVA: 0x0000ADC4 File Offset: 0x00008FC4
|
||||
internal override string ConvertToString(object value, NumberFormatInfo format)
|
||||
{
|
||||
return ((byte)value).ToString("G", format);
|
||||
}
|
||||
|
||||
// Token: 0x06000396 RID: 918 RVA: 0x0000ADE8 File Offset: 0x00008FE8
|
||||
internal override object ConvertFromString(string value, NumberFormatInfo format)
|
||||
{
|
||||
return byte.Parse(value, NumberStyles.Integer, format);
|
||||
}
|
||||
|
||||
// Token: 0x06000397 RID: 919 RVA: 0x0000ADF8 File Offset: 0x00008FF8
|
||||
internal override object ConvertFromString(string value, int fromBase)
|
||||
{
|
||||
return Convert.ToByte(value, fromBase);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
using System;
|
||||
|
||||
namespace System.ComponentModel
|
||||
{
|
||||
/// <summary>Provides data for a cancelable event.</summary>
|
||||
// Token: 0x0200005E RID: 94
|
||||
public class CancelEventArgs : EventArgs
|
||||
{
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.CancelEventArgs" /> class with the <see cref="P:System.ComponentModel.CancelEventArgs.Cancel" /> property set to false.</summary>
|
||||
// Token: 0x06000398 RID: 920 RVA: 0x0000AE08 File Offset: 0x00009008
|
||||
public CancelEventArgs()
|
||||
{
|
||||
this.cancel = false;
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.CancelEventArgs" /> class with the <see cref="P:System.ComponentModel.CancelEventArgs.Cancel" /> property set to the given value.</summary>
|
||||
/// <param name="cancel">true to cancel the event; otherwise, false. </param>
|
||||
// Token: 0x06000399 RID: 921 RVA: 0x0000AE18 File Offset: 0x00009018
|
||||
public CancelEventArgs(bool cancel)
|
||||
{
|
||||
this.cancel = cancel;
|
||||
}
|
||||
|
||||
/// <summary>Gets or sets a value indicating whether the event should be canceled.</summary>
|
||||
/// <returns>true if the event should be canceled; otherwise, false.</returns>
|
||||
// Token: 0x170000F6 RID: 246
|
||||
// (get) Token: 0x0600039A RID: 922 RVA: 0x0000AE28 File Offset: 0x00009028
|
||||
// (set) Token: 0x0600039B RID: 923 RVA: 0x0000AE30 File Offset: 0x00009030
|
||||
public bool Cancel
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.cancel;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.cancel = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0400012A RID: 298
|
||||
private bool cancel;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,473 @@
|
||||
using System;
|
||||
|
||||
namespace System.ComponentModel
|
||||
{
|
||||
/// <summary>Specifies the name of the category in which to group the property or event when displayed in a <see cref="T:System.Windows.Forms.PropertyGrid" /> control set to Categorized mode.</summary>
|
||||
// Token: 0x0200005F RID: 95
|
||||
[AttributeUsage(AttributeTargets.All)]
|
||||
public class CategoryAttribute : Attribute
|
||||
{
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.CategoryAttribute" /> class using the category name Default.</summary>
|
||||
// Token: 0x0600039C RID: 924 RVA: 0x0000AE3C File Offset: 0x0000903C
|
||||
public CategoryAttribute()
|
||||
{
|
||||
this.category = "Misc";
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.CategoryAttribute" /> class using the specified category name.</summary>
|
||||
/// <param name="category">The name of the category. </param>
|
||||
// Token: 0x0600039D RID: 925 RVA: 0x0000AE50 File Offset: 0x00009050
|
||||
public CategoryAttribute(string category)
|
||||
{
|
||||
this.category = category;
|
||||
}
|
||||
|
||||
/// <summary>Gets a <see cref="T:System.ComponentModel.CategoryAttribute" /> representing the Action category.</summary>
|
||||
/// <returns>A <see cref="T:System.ComponentModel.CategoryAttribute" /> for the action category.</returns>
|
||||
// Token: 0x170000F7 RID: 247
|
||||
// (get) Token: 0x0600039F RID: 927 RVA: 0x0000AE6C File Offset: 0x0000906C
|
||||
public static CategoryAttribute Action
|
||||
{
|
||||
get
|
||||
{
|
||||
if (CategoryAttribute.action != null)
|
||||
{
|
||||
return CategoryAttribute.action;
|
||||
}
|
||||
object obj = CategoryAttribute.lockobj;
|
||||
lock (obj)
|
||||
{
|
||||
if (CategoryAttribute.action == null)
|
||||
{
|
||||
CategoryAttribute.action = new CategoryAttribute("Action");
|
||||
}
|
||||
}
|
||||
return CategoryAttribute.action;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a <see cref="T:System.ComponentModel.CategoryAttribute" /> representing the Appearance category.</summary>
|
||||
/// <returns>A <see cref="T:System.ComponentModel.CategoryAttribute" /> for the appearance category.</returns>
|
||||
// Token: 0x170000F8 RID: 248
|
||||
// (get) Token: 0x060003A0 RID: 928 RVA: 0x0000AEE8 File Offset: 0x000090E8
|
||||
public static CategoryAttribute Appearance
|
||||
{
|
||||
get
|
||||
{
|
||||
if (CategoryAttribute.appearance != null)
|
||||
{
|
||||
return CategoryAttribute.appearance;
|
||||
}
|
||||
object obj = CategoryAttribute.lockobj;
|
||||
lock (obj)
|
||||
{
|
||||
if (CategoryAttribute.appearance == null)
|
||||
{
|
||||
CategoryAttribute.appearance = new CategoryAttribute("Appearance");
|
||||
}
|
||||
}
|
||||
return CategoryAttribute.appearance;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a <see cref="T:System.ComponentModel.CategoryAttribute" /> representing the Asynchronous category.</summary>
|
||||
/// <returns>A <see cref="T:System.ComponentModel.CategoryAttribute" /> for the asynchronous category.</returns>
|
||||
// Token: 0x170000F9 RID: 249
|
||||
// (get) Token: 0x060003A1 RID: 929 RVA: 0x0000AF64 File Offset: 0x00009164
|
||||
public static CategoryAttribute Asynchronous
|
||||
{
|
||||
get
|
||||
{
|
||||
if (CategoryAttribute.behaviour != null)
|
||||
{
|
||||
return CategoryAttribute.behaviour;
|
||||
}
|
||||
object obj = CategoryAttribute.lockobj;
|
||||
lock (obj)
|
||||
{
|
||||
if (CategoryAttribute.async == null)
|
||||
{
|
||||
CategoryAttribute.async = new CategoryAttribute("Asynchronous");
|
||||
}
|
||||
}
|
||||
return CategoryAttribute.async;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a <see cref="T:System.ComponentModel.CategoryAttribute" /> representing the Behavior category.</summary>
|
||||
/// <returns>A <see cref="T:System.ComponentModel.CategoryAttribute" /> for the behavior category.</returns>
|
||||
// Token: 0x170000FA RID: 250
|
||||
// (get) Token: 0x060003A2 RID: 930 RVA: 0x0000AFE0 File Offset: 0x000091E0
|
||||
public static CategoryAttribute Behavior
|
||||
{
|
||||
get
|
||||
{
|
||||
if (CategoryAttribute.behaviour != null)
|
||||
{
|
||||
return CategoryAttribute.behaviour;
|
||||
}
|
||||
object obj = CategoryAttribute.lockobj;
|
||||
lock (obj)
|
||||
{
|
||||
if (CategoryAttribute.behaviour == null)
|
||||
{
|
||||
CategoryAttribute.behaviour = new CategoryAttribute("Behavior");
|
||||
}
|
||||
}
|
||||
return CategoryAttribute.behaviour;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a <see cref="T:System.ComponentModel.CategoryAttribute" /> representing the Data category.</summary>
|
||||
/// <returns>A <see cref="T:System.ComponentModel.CategoryAttribute" /> for the data category.</returns>
|
||||
// Token: 0x170000FB RID: 251
|
||||
// (get) Token: 0x060003A3 RID: 931 RVA: 0x0000B05C File Offset: 0x0000925C
|
||||
public static CategoryAttribute Data
|
||||
{
|
||||
get
|
||||
{
|
||||
if (CategoryAttribute.data != null)
|
||||
{
|
||||
return CategoryAttribute.data;
|
||||
}
|
||||
object obj = CategoryAttribute.lockobj;
|
||||
lock (obj)
|
||||
{
|
||||
if (CategoryAttribute.data == null)
|
||||
{
|
||||
CategoryAttribute.data = new CategoryAttribute("Data");
|
||||
}
|
||||
}
|
||||
return CategoryAttribute.data;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a <see cref="T:System.ComponentModel.CategoryAttribute" /> representing the Default category.</summary>
|
||||
/// <returns>A <see cref="T:System.ComponentModel.CategoryAttribute" /> for the default category.</returns>
|
||||
// Token: 0x170000FC RID: 252
|
||||
// (get) Token: 0x060003A4 RID: 932 RVA: 0x0000B0D8 File Offset: 0x000092D8
|
||||
public static CategoryAttribute Default
|
||||
{
|
||||
get
|
||||
{
|
||||
if (CategoryAttribute.def != null)
|
||||
{
|
||||
return CategoryAttribute.def;
|
||||
}
|
||||
object obj = CategoryAttribute.lockobj;
|
||||
lock (obj)
|
||||
{
|
||||
if (CategoryAttribute.def == null)
|
||||
{
|
||||
CategoryAttribute.def = new CategoryAttribute("Default");
|
||||
}
|
||||
}
|
||||
return CategoryAttribute.def;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a <see cref="T:System.ComponentModel.CategoryAttribute" /> representing the Design category.</summary>
|
||||
/// <returns>A <see cref="T:System.ComponentModel.CategoryAttribute" /> for the design category.</returns>
|
||||
// Token: 0x170000FD RID: 253
|
||||
// (get) Token: 0x060003A5 RID: 933 RVA: 0x0000B154 File Offset: 0x00009354
|
||||
public static CategoryAttribute Design
|
||||
{
|
||||
get
|
||||
{
|
||||
if (CategoryAttribute.design != null)
|
||||
{
|
||||
return CategoryAttribute.design;
|
||||
}
|
||||
object obj = CategoryAttribute.lockobj;
|
||||
lock (obj)
|
||||
{
|
||||
if (CategoryAttribute.design == null)
|
||||
{
|
||||
CategoryAttribute.design = new CategoryAttribute("Design");
|
||||
}
|
||||
}
|
||||
return CategoryAttribute.design;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a <see cref="T:System.ComponentModel.CategoryAttribute" /> representing the DragDrop category.</summary>
|
||||
/// <returns>A <see cref="T:System.ComponentModel.CategoryAttribute" /> for the drag-and-drop category.</returns>
|
||||
// Token: 0x170000FE RID: 254
|
||||
// (get) Token: 0x060003A6 RID: 934 RVA: 0x0000B1D0 File Offset: 0x000093D0
|
||||
public static CategoryAttribute DragDrop
|
||||
{
|
||||
get
|
||||
{
|
||||
if (CategoryAttribute.drag_drop != null)
|
||||
{
|
||||
return CategoryAttribute.drag_drop;
|
||||
}
|
||||
object obj = CategoryAttribute.lockobj;
|
||||
lock (obj)
|
||||
{
|
||||
if (CategoryAttribute.drag_drop == null)
|
||||
{
|
||||
CategoryAttribute.drag_drop = new CategoryAttribute("DragDrop");
|
||||
}
|
||||
}
|
||||
return CategoryAttribute.drag_drop;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a <see cref="T:System.ComponentModel.CategoryAttribute" /> representing the Focus category.</summary>
|
||||
/// <returns>A <see cref="T:System.ComponentModel.CategoryAttribute" /> for the focus category.</returns>
|
||||
// Token: 0x170000FF RID: 255
|
||||
// (get) Token: 0x060003A7 RID: 935 RVA: 0x0000B24C File Offset: 0x0000944C
|
||||
public static CategoryAttribute Focus
|
||||
{
|
||||
get
|
||||
{
|
||||
if (CategoryAttribute.focus != null)
|
||||
{
|
||||
return CategoryAttribute.focus;
|
||||
}
|
||||
object obj = CategoryAttribute.lockobj;
|
||||
lock (obj)
|
||||
{
|
||||
if (CategoryAttribute.focus == null)
|
||||
{
|
||||
CategoryAttribute.focus = new CategoryAttribute("Focus");
|
||||
}
|
||||
}
|
||||
return CategoryAttribute.focus;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a <see cref="T:System.ComponentModel.CategoryAttribute" /> representing the Format category.</summary>
|
||||
/// <returns>A <see cref="T:System.ComponentModel.CategoryAttribute" /> for the format category.</returns>
|
||||
// Token: 0x17000100 RID: 256
|
||||
// (get) Token: 0x060003A8 RID: 936 RVA: 0x0000B2C8 File Offset: 0x000094C8
|
||||
public static CategoryAttribute Format
|
||||
{
|
||||
get
|
||||
{
|
||||
if (CategoryAttribute.format != null)
|
||||
{
|
||||
return CategoryAttribute.format;
|
||||
}
|
||||
object obj = CategoryAttribute.lockobj;
|
||||
lock (obj)
|
||||
{
|
||||
if (CategoryAttribute.format == null)
|
||||
{
|
||||
CategoryAttribute.format = new CategoryAttribute("Format");
|
||||
}
|
||||
}
|
||||
return CategoryAttribute.format;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a <see cref="T:System.ComponentModel.CategoryAttribute" /> representing the Key category.</summary>
|
||||
/// <returns>A <see cref="T:System.ComponentModel.CategoryAttribute" /> for the key category.</returns>
|
||||
// Token: 0x17000101 RID: 257
|
||||
// (get) Token: 0x060003A9 RID: 937 RVA: 0x0000B344 File Offset: 0x00009544
|
||||
public static CategoryAttribute Key
|
||||
{
|
||||
get
|
||||
{
|
||||
if (CategoryAttribute.key != null)
|
||||
{
|
||||
return CategoryAttribute.key;
|
||||
}
|
||||
object obj = CategoryAttribute.lockobj;
|
||||
lock (obj)
|
||||
{
|
||||
if (CategoryAttribute.key == null)
|
||||
{
|
||||
CategoryAttribute.key = new CategoryAttribute("Key");
|
||||
}
|
||||
}
|
||||
return CategoryAttribute.key;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a <see cref="T:System.ComponentModel.CategoryAttribute" /> representing the Layout category.</summary>
|
||||
/// <returns>A <see cref="T:System.ComponentModel.CategoryAttribute" /> for the layout category.</returns>
|
||||
// Token: 0x17000102 RID: 258
|
||||
// (get) Token: 0x060003AA RID: 938 RVA: 0x0000B3C0 File Offset: 0x000095C0
|
||||
public static CategoryAttribute Layout
|
||||
{
|
||||
get
|
||||
{
|
||||
if (CategoryAttribute.layout != null)
|
||||
{
|
||||
return CategoryAttribute.layout;
|
||||
}
|
||||
object obj = CategoryAttribute.lockobj;
|
||||
lock (obj)
|
||||
{
|
||||
if (CategoryAttribute.layout == null)
|
||||
{
|
||||
CategoryAttribute.layout = new CategoryAttribute("Layout");
|
||||
}
|
||||
}
|
||||
return CategoryAttribute.layout;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a <see cref="T:System.ComponentModel.CategoryAttribute" /> representing the Mouse category.</summary>
|
||||
/// <returns>A <see cref="T:System.ComponentModel.CategoryAttribute" /> for the mouse category.</returns>
|
||||
// Token: 0x17000103 RID: 259
|
||||
// (get) Token: 0x060003AB RID: 939 RVA: 0x0000B43C File Offset: 0x0000963C
|
||||
public static CategoryAttribute Mouse
|
||||
{
|
||||
get
|
||||
{
|
||||
if (CategoryAttribute.mouse != null)
|
||||
{
|
||||
return CategoryAttribute.mouse;
|
||||
}
|
||||
object obj = CategoryAttribute.lockobj;
|
||||
lock (obj)
|
||||
{
|
||||
if (CategoryAttribute.mouse == null)
|
||||
{
|
||||
CategoryAttribute.mouse = new CategoryAttribute("Mouse");
|
||||
}
|
||||
}
|
||||
return CategoryAttribute.mouse;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a <see cref="T:System.ComponentModel.CategoryAttribute" /> representing the WindowStyle category.</summary>
|
||||
/// <returns>A <see cref="T:System.ComponentModel.CategoryAttribute" /> for the window style category.</returns>
|
||||
// Token: 0x17000104 RID: 260
|
||||
// (get) Token: 0x060003AC RID: 940 RVA: 0x0000B4B8 File Offset: 0x000096B8
|
||||
public static CategoryAttribute WindowStyle
|
||||
{
|
||||
get
|
||||
{
|
||||
if (CategoryAttribute.window_style != null)
|
||||
{
|
||||
return CategoryAttribute.window_style;
|
||||
}
|
||||
object obj = CategoryAttribute.lockobj;
|
||||
lock (obj)
|
||||
{
|
||||
if (CategoryAttribute.window_style == null)
|
||||
{
|
||||
CategoryAttribute.window_style = new CategoryAttribute("WindowStyle");
|
||||
}
|
||||
}
|
||||
return CategoryAttribute.window_style;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Looks up the localized name of the specified category.</summary>
|
||||
/// <returns>The localized name of the category, or null if a localized name does not exist.</returns>
|
||||
/// <param name="value">The identifer for the category to look up. </param>
|
||||
// Token: 0x060003AD RID: 941 RVA: 0x0000B534 File Offset: 0x00009734
|
||||
protected virtual string GetLocalizedString(string value)
|
||||
{
|
||||
return global::Locale.GetText(value);
|
||||
}
|
||||
|
||||
/// <summary>Gets the name of the category for the property or event that this attribute is applied to.</summary>
|
||||
/// <returns>The name of the category for the property or event that this attribute is applied to.</returns>
|
||||
// Token: 0x17000105 RID: 261
|
||||
// (get) Token: 0x060003AE RID: 942 RVA: 0x0000B53C File Offset: 0x0000973C
|
||||
public string Category
|
||||
{
|
||||
get
|
||||
{
|
||||
if (!this.IsLocalized)
|
||||
{
|
||||
this.IsLocalized = true;
|
||||
string localizedString = this.GetLocalizedString(this.category);
|
||||
if (localizedString != null)
|
||||
{
|
||||
this.category = localizedString;
|
||||
}
|
||||
}
|
||||
return this.category;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Returns whether the value of the given object is equal to the current <see cref="T:System.ComponentModel.CategoryAttribute" />..</summary>
|
||||
/// <returns>true if the value of the given object is equal to that of the current; otherwise, false.</returns>
|
||||
/// <param name="obj">The object to test the value equality of. </param>
|
||||
// Token: 0x060003AF RID: 943 RVA: 0x0000B57C File Offset: 0x0000977C
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
return obj is CategoryAttribute && (obj == this || ((CategoryAttribute)obj).Category == this.category);
|
||||
}
|
||||
|
||||
/// <summary>Returns the hash code for this attribute.</summary>
|
||||
/// <returns>A 32-bit signed integer hash code.</returns>
|
||||
/// <PermissionSet>
|
||||
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="UnmanagedCode, ControlEvidence" />
|
||||
/// </PermissionSet>
|
||||
// Token: 0x060003B0 RID: 944 RVA: 0x0000B5B8 File Offset: 0x000097B8
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return this.category.GetHashCode();
|
||||
}
|
||||
|
||||
/// <summary>Determines if this attribute is the default.</summary>
|
||||
/// <returns>true if the attribute is the default value for this attribute class; otherwise, false.</returns>
|
||||
/// <PermissionSet>
|
||||
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="UnmanagedCode, ControlEvidence" />
|
||||
/// </PermissionSet>
|
||||
// Token: 0x060003B1 RID: 945 RVA: 0x0000B5C8 File Offset: 0x000097C8
|
||||
public override bool IsDefaultAttribute()
|
||||
{
|
||||
return this.category == CategoryAttribute.Default.Category;
|
||||
}
|
||||
|
||||
// Token: 0x0400012B RID: 299
|
||||
private string category;
|
||||
|
||||
// Token: 0x0400012C RID: 300
|
||||
private bool IsLocalized;
|
||||
|
||||
// Token: 0x0400012D RID: 301
|
||||
private static volatile CategoryAttribute action;
|
||||
|
||||
// Token: 0x0400012E RID: 302
|
||||
private static volatile CategoryAttribute appearance;
|
||||
|
||||
// Token: 0x0400012F RID: 303
|
||||
private static volatile CategoryAttribute behaviour;
|
||||
|
||||
// Token: 0x04000130 RID: 304
|
||||
private static volatile CategoryAttribute data;
|
||||
|
||||
// Token: 0x04000131 RID: 305
|
||||
private static volatile CategoryAttribute def;
|
||||
|
||||
// Token: 0x04000132 RID: 306
|
||||
private static volatile CategoryAttribute design;
|
||||
|
||||
// Token: 0x04000133 RID: 307
|
||||
private static volatile CategoryAttribute drag_drop;
|
||||
|
||||
// Token: 0x04000134 RID: 308
|
||||
private static volatile CategoryAttribute focus;
|
||||
|
||||
// Token: 0x04000135 RID: 309
|
||||
private static volatile CategoryAttribute format;
|
||||
|
||||
// Token: 0x04000136 RID: 310
|
||||
private static volatile CategoryAttribute key;
|
||||
|
||||
// Token: 0x04000137 RID: 311
|
||||
private static volatile CategoryAttribute layout;
|
||||
|
||||
// Token: 0x04000138 RID: 312
|
||||
private static volatile CategoryAttribute mouse;
|
||||
|
||||
// Token: 0x04000139 RID: 313
|
||||
private static volatile CategoryAttribute window_style;
|
||||
|
||||
// Token: 0x0400013A RID: 314
|
||||
private static volatile CategoryAttribute async;
|
||||
|
||||
// Token: 0x0400013B RID: 315
|
||||
private static object lockobj = new object();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
using System;
|
||||
using System.Globalization;
|
||||
|
||||
namespace System.ComponentModel
|
||||
{
|
||||
/// <summary>Provides a type converter to convert Unicode character objects to and from various other representations.</summary>
|
||||
// Token: 0x02000060 RID: 96
|
||||
public class CharConverter : TypeConverter
|
||||
{
|
||||
/// <summary>Gets a value indicating whether this converter can convert an object in the given source type to a Unicode character object using the specified context.</summary>
|
||||
/// <returns>true if this converter can perform the conversion; otherwise, false.</returns>
|
||||
/// <param name="context">An <see cref="T:System.ComponentModel.ITypeDescriptorContext" /> that provides a format context. </param>
|
||||
/// <param name="sourceType">A <see cref="T:System.Type" /> that represents the type you want to convert from. </param>
|
||||
// Token: 0x060003B3 RID: 947 RVA: 0x0000B5E8 File Offset: 0x000097E8
|
||||
public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType)
|
||||
{
|
||||
return sourceType == typeof(string) || base.CanConvertFrom(context, sourceType);
|
||||
}
|
||||
|
||||
/// <summary>Converts the given object to a Unicode character object.</summary>
|
||||
/// <returns>An <see cref="T:System.Object" /> that represents the converted <paramref name="value" />.</returns>
|
||||
/// <param name="context">An <see cref="T:System.ComponentModel.ITypeDescriptorContext" /> that provides a format context. </param>
|
||||
/// <param name="culture">The culture into which <paramref name="value" /> will be converted.</param>
|
||||
/// <param name="value">The <see cref="T:System.Object" /> to convert. </param>
|
||||
/// <exception cref="T:System.FormatException">
|
||||
/// <paramref name="value" /> is not a valid value for the target type. </exception>
|
||||
/// <exception cref="T:System.NotSupportedException">The conversion cannot be performed. </exception>
|
||||
// Token: 0x060003B4 RID: 948 RVA: 0x0000B604 File Offset: 0x00009804
|
||||
public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value)
|
||||
{
|
||||
string text = value as string;
|
||||
if (text == null)
|
||||
{
|
||||
return base.ConvertFrom(context, culture, value);
|
||||
}
|
||||
if (text.Length > 1)
|
||||
{
|
||||
text = text.Trim();
|
||||
}
|
||||
if (text.Length > 1)
|
||||
{
|
||||
throw new FormatException(string.Format("String {0} is not a valid Char: it has to be less than or equal to one char long.", text));
|
||||
}
|
||||
if (text.Length == 0)
|
||||
{
|
||||
return '\0';
|
||||
}
|
||||
return text[0];
|
||||
}
|
||||
|
||||
/// <summary>Converts the given value object to a Unicode character object using the arguments.</summary>
|
||||
/// <returns>An <see cref="T:System.Object" /> that represents the converted value.</returns>
|
||||
/// <param name="context">An <see cref="T:System.ComponentModel.ITypeDescriptorContext" /> that provides a format context. </param>
|
||||
/// <param name="culture">The culture into which <paramref name="value" /> will be converted.</param>
|
||||
/// <param name="value">The <see cref="T:System.Object" /> to convert. </param>
|
||||
/// <param name="destinationType">The <see cref="T:System.Type" /> to convert the value to. </param>
|
||||
/// <exception cref="T:System.NotSupportedException">The conversion cannot be performed. </exception>
|
||||
// Token: 0x060003B5 RID: 949 RVA: 0x0000B678 File Offset: 0x00009878
|
||||
public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
|
||||
{
|
||||
if (destinationType != typeof(string) || value == null || !(value is char))
|
||||
{
|
||||
return base.ConvertTo(context, culture, value, destinationType);
|
||||
}
|
||||
char c = (char)value;
|
||||
if (c == '\0')
|
||||
{
|
||||
return string.Empty;
|
||||
}
|
||||
return new string(c, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
using System;
|
||||
|
||||
namespace System.ComponentModel
|
||||
{
|
||||
/// <summary>Specifies how the collection is changed.</summary>
|
||||
// Token: 0x02000061 RID: 97
|
||||
public enum CollectionChangeAction
|
||||
{
|
||||
/// <summary>Specifies that an element was added to the collection.</summary>
|
||||
// Token: 0x0400013D RID: 317
|
||||
Add = 1,
|
||||
/// <summary>Specifies that an element was removed from the collection.</summary>
|
||||
// Token: 0x0400013E RID: 318
|
||||
Remove,
|
||||
/// <summary>Specifies that the entire collection has changed. This is caused by using methods that manipulate the entire collection, such as <see cref="M:System.Collections.CollectionBase.Clear" />.</summary>
|
||||
// Token: 0x0400013F RID: 319
|
||||
Refresh
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
using System;
|
||||
|
||||
namespace System.ComponentModel
|
||||
{
|
||||
/// <summary>Provides data for the <see cref="E:System.Data.DataColumnCollection.CollectionChanged" /> event.</summary>
|
||||
// Token: 0x02000062 RID: 98
|
||||
public class CollectionChangeEventArgs : EventArgs
|
||||
{
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.CollectionChangeEventArgs" /> class.</summary>
|
||||
/// <param name="action">One of the <see cref="T:System.ComponentModel.CollectionChangeAction" /> values that specifies how the collection changed. </param>
|
||||
/// <param name="element">An <see cref="T:System.Object" /> that specifies the instance of the collection where the change occurred. </param>
|
||||
// Token: 0x060003B6 RID: 950 RVA: 0x0000B6D0 File Offset: 0x000098D0
|
||||
public CollectionChangeEventArgs(CollectionChangeAction action, object element)
|
||||
{
|
||||
this.changeAction = action;
|
||||
this.theElement = element;
|
||||
}
|
||||
|
||||
/// <summary>Gets an action that specifies how the collection changed.</summary>
|
||||
/// <returns>One of the <see cref="T:System.ComponentModel.CollectionChangeAction" /> values.</returns>
|
||||
// Token: 0x17000106 RID: 262
|
||||
// (get) Token: 0x060003B7 RID: 951 RVA: 0x0000B6E8 File Offset: 0x000098E8
|
||||
public virtual CollectionChangeAction Action
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.changeAction;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets the instance of the collection with the change.</summary>
|
||||
/// <returns>An <see cref="T:System.Object" /> that represents the instance of the collection with the change, or null if you refresh the collection.</returns>
|
||||
// Token: 0x17000107 RID: 263
|
||||
// (get) Token: 0x060003B8 RID: 952 RVA: 0x0000B6F0 File Offset: 0x000098F0
|
||||
public virtual object Element
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.theElement;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04000140 RID: 320
|
||||
private CollectionChangeAction changeAction;
|
||||
|
||||
// Token: 0x04000141 RID: 321
|
||||
private object theElement;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
using System;
|
||||
|
||||
namespace System.ComponentModel
|
||||
{
|
||||
/// <summary>Represents the method that handles the <see cref="E:System.Data.DataColumnCollection.CollectionChanged" /> event raised when adding elements to or removing elements from a collection.</summary>
|
||||
/// <param name="sender">The source of the event. </param>
|
||||
/// <param name="e">A <see cref="T:System.ComponentModel.CollectionChangeEventArgs" /> that contains the event data. </param>
|
||||
// Token: 0x02000322 RID: 802
|
||||
// (Invoke) Token: 0x06001C61 RID: 7265
|
||||
public delegate void CollectionChangeEventHandler(object sender, CollectionChangeEventArgs e);
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Globalization;
|
||||
|
||||
namespace System.ComponentModel
|
||||
{
|
||||
/// <summary>Provides a type converter to convert collection objects to and from various other representations.</summary>
|
||||
// Token: 0x02000063 RID: 99
|
||||
public class CollectionConverter : TypeConverter
|
||||
{
|
||||
/// <summary>Converts the given value object to the specified destination type.</summary>
|
||||
/// <returns>An <see cref="T:System.Object" /> that represents the converted value.</returns>
|
||||
/// <param name="context">An <see cref="T:System.ComponentModel.ITypeDescriptorContext" /> that provides a format context. </param>
|
||||
/// <param name="culture">The culture to which <paramref name="value" /> will be converted.</param>
|
||||
/// <param name="value">The <see cref="T:System.Object" /> to convert. This parameter must inherit from <see cref="T:System.Collections.ICollection" />. </param>
|
||||
/// <param name="destinationType">The <see cref="T:System.Type" /> to convert the value to. </param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="destinationType" /> is null. </exception>
|
||||
/// <exception cref="T:System.NotSupportedException">The conversion cannot be performed. </exception>
|
||||
// Token: 0x060003BA RID: 954 RVA: 0x0000B700 File Offset: 0x00009900
|
||||
public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
|
||||
{
|
||||
if (destinationType == typeof(string) && value != null && value is ICollection)
|
||||
{
|
||||
return "(Collection)";
|
||||
}
|
||||
return base.ConvertTo(context, culture, value, destinationType);
|
||||
}
|
||||
|
||||
/// <summary>Gets a collection of properties for the type of array specified by the value parameter using the specified context and attributes.</summary>
|
||||
/// <returns>A <see cref="T:System.ComponentModel.PropertyDescriptorCollection" /> with the properties that are exposed for this data type, or null if there are no properties. This method always returns null.</returns>
|
||||
/// <param name="context">An <see cref="T:System.ComponentModel.ITypeDescriptorContext" /> that provides a format context. </param>
|
||||
/// <param name="value">An <see cref="T:System.Object" /> that specifies the type of array to get the properties for. </param>
|
||||
/// <param name="attributes">An array of type <see cref="T:System.Attribute" /> that will be used as a filter. </param>
|
||||
// Token: 0x060003BB RID: 955 RVA: 0x0000B738 File Offset: 0x00009938
|
||||
public override PropertyDescriptorCollection GetProperties(ITypeDescriptorContext context, object value, Attribute[] attributes)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/// <summary>Gets a value indicating whether this object supports properties.</summary>
|
||||
/// <returns>false because <see cref="M:System.ComponentModel.CollectionConverter.GetProperties(System.ComponentModel.ITypeDescriptorContext,System.Object,System.Attribute[])" /> should not be called to find the properties of this object. This method never returns true.</returns>
|
||||
/// <param name="context">An <see cref="T:System.ComponentModel.ITypeDescriptorContext" /> that provides a format context. </param>
|
||||
// Token: 0x060003BC RID: 956 RVA: 0x0000B73C File Offset: 0x0000993C
|
||||
public override bool GetPropertiesSupported(ITypeDescriptorContext context)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,185 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.ComponentModel
|
||||
{
|
||||
/// <summary>Provides the base implementation for the <see cref="T:System.ComponentModel.IComponent" /> interface and enables object sharing between applications.</summary>
|
||||
// Token: 0x02000064 RID: 100
|
||||
[ClassInterface(ClassInterfaceType.AutoDispatch)]
|
||||
[DesignerCategory("Component")]
|
||||
[ComVisible(true)]
|
||||
public class Component : MarshalByRefObject, IDisposable, IComponent
|
||||
{
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.Component" /> class. </summary>
|
||||
// Token: 0x060003BD RID: 957 RVA: 0x0000B740 File Offset: 0x00009940
|
||||
public Component()
|
||||
{
|
||||
this.event_handlers = null;
|
||||
}
|
||||
|
||||
/// <summary>Occurs when the component is disposed by a call to the <see cref="M:System.ComponentModel.Component.Dispose" /> method. </summary>
|
||||
// Token: 0x14000013 RID: 19
|
||||
// (add) Token: 0x060003BE RID: 958 RVA: 0x0000B75C File Offset: 0x0000995C
|
||||
// (remove) Token: 0x060003BF RID: 959 RVA: 0x0000B770 File Offset: 0x00009970
|
||||
[Browsable(false)]
|
||||
[EditorBrowsable(EditorBrowsableState.Advanced)]
|
||||
public event EventHandler Disposed
|
||||
{
|
||||
add
|
||||
{
|
||||
this.Events.AddHandler(this.disposedEvent, value);
|
||||
}
|
||||
remove
|
||||
{
|
||||
this.Events.RemoveHandler(this.disposedEvent, value);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a value indicating whether the component can raise an event.</summary>
|
||||
/// <returns>true if the component can raise events; otherwise, false. The default is true.</returns>
|
||||
// Token: 0x17000108 RID: 264
|
||||
// (get) Token: 0x060003C0 RID: 960 RVA: 0x0000B784 File Offset: 0x00009984
|
||||
protected virtual bool CanRaiseEvents
|
||||
{
|
||||
get
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets or sets the <see cref="T:System.ComponentModel.ISite" /> of the <see cref="T:System.ComponentModel.Component" />.</summary>
|
||||
/// <returns>The <see cref="T:System.ComponentModel.ISite" /> associated with the <see cref="T:System.ComponentModel.Component" />, or null if the <see cref="T:System.ComponentModel.Component" /> is not encapsulated in an <see cref="T:System.ComponentModel.IContainer" />, the <see cref="T:System.ComponentModel.Component" /> does not have an <see cref="T:System.ComponentModel.ISite" /> associated with it, or the <see cref="T:System.ComponentModel.Component" /> is removed from its <see cref="T:System.ComponentModel.IContainer" />.</returns>
|
||||
// Token: 0x17000109 RID: 265
|
||||
// (get) Token: 0x060003C1 RID: 961 RVA: 0x0000B788 File Offset: 0x00009988
|
||||
// (set) Token: 0x060003C2 RID: 962 RVA: 0x0000B790 File Offset: 0x00009990
|
||||
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
|
||||
[Browsable(false)]
|
||||
public virtual ISite Site
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.mySite;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.mySite = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets the <see cref="T:System.ComponentModel.IContainer" /> that contains the <see cref="T:System.ComponentModel.Component" />.</summary>
|
||||
/// <returns>The <see cref="T:System.ComponentModel.IContainer" /> that contains the <see cref="T:System.ComponentModel.Component" />, if any, or null if the <see cref="T:System.ComponentModel.Component" /> is not encapsulated in an <see cref="T:System.ComponentModel.IContainer" />.</returns>
|
||||
// Token: 0x1700010A RID: 266
|
||||
// (get) Token: 0x060003C3 RID: 963 RVA: 0x0000B79C File Offset: 0x0000999C
|
||||
[Browsable(false)]
|
||||
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
|
||||
public IContainer Container
|
||||
{
|
||||
get
|
||||
{
|
||||
if (this.mySite == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
return this.mySite.Container;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a value that indicates whether the <see cref="T:System.ComponentModel.Component" /> is currently in design mode.</summary>
|
||||
/// <returns>true if the <see cref="T:System.ComponentModel.Component" /> is in design mode; otherwise, false.</returns>
|
||||
// Token: 0x1700010B RID: 267
|
||||
// (get) Token: 0x060003C4 RID: 964 RVA: 0x0000B7B8 File Offset: 0x000099B8
|
||||
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
|
||||
[Browsable(false)]
|
||||
protected bool DesignMode
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.mySite != null && this.mySite.DesignMode;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets the list of event handlers that are attached to this <see cref="T:System.ComponentModel.Component" />.</summary>
|
||||
/// <returns>An <see cref="T:System.ComponentModel.EventHandlerList" /> that provides the delegates for this component.</returns>
|
||||
// Token: 0x1700010C RID: 268
|
||||
// (get) Token: 0x060003C5 RID: 965 RVA: 0x0000B7D4 File Offset: 0x000099D4
|
||||
protected EventHandlerList Events
|
||||
{
|
||||
get
|
||||
{
|
||||
if (this.event_handlers == null)
|
||||
{
|
||||
this.event_handlers = new EventHandlerList();
|
||||
}
|
||||
return this.event_handlers;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Releases unmanaged resources and performs other cleanup operations before the <see cref="T:System.ComponentModel.Component" /> is reclaimed by garbage collection.</summary>
|
||||
// Token: 0x060003C6 RID: 966 RVA: 0x0000B7F4 File Offset: 0x000099F4
|
||||
~Component()
|
||||
{
|
||||
this.Dispose(false);
|
||||
}
|
||||
|
||||
/// <summary>Releases all resources used by the <see cref="T:System.ComponentModel.Component" />.</summary>
|
||||
// Token: 0x060003C7 RID: 967 RVA: 0x0000B830 File Offset: 0x00009A30
|
||||
public void Dispose()
|
||||
{
|
||||
this.Dispose(true);
|
||||
GC.SuppressFinalize(this);
|
||||
}
|
||||
|
||||
/// <summary>Releases the unmanaged resources used by the <see cref="T:System.ComponentModel.Component" /> and optionally releases the managed resources.</summary>
|
||||
/// <param name="disposing">true to release both managed and unmanaged resources; false to release only unmanaged resources. </param>
|
||||
// Token: 0x060003C8 RID: 968 RVA: 0x0000B840 File Offset: 0x00009A40
|
||||
protected virtual void Dispose(bool release_all)
|
||||
{
|
||||
if (release_all)
|
||||
{
|
||||
if (this.mySite != null && this.mySite.Container != null)
|
||||
{
|
||||
this.mySite.Container.Remove(this);
|
||||
}
|
||||
EventHandler eventHandler = (EventHandler)this.Events[this.disposedEvent];
|
||||
if (eventHandler != null)
|
||||
{
|
||||
eventHandler(this, EventArgs.Empty);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Returns an object that represents a service provided by the <see cref="T:System.ComponentModel.Component" /> or by its <see cref="T:System.ComponentModel.Container" />.</summary>
|
||||
/// <returns>An <see cref="T:System.Object" /> that represents a service provided by the <see cref="T:System.ComponentModel.Component" />, or null if the <see cref="T:System.ComponentModel.Component" /> does not provide the specified service.</returns>
|
||||
/// <param name="service">A service provided by the <see cref="T:System.ComponentModel.Component" />. </param>
|
||||
// Token: 0x060003C9 RID: 969 RVA: 0x0000B8A8 File Offset: 0x00009AA8
|
||||
protected virtual object GetService(Type service)
|
||||
{
|
||||
if (this.mySite != null)
|
||||
{
|
||||
return this.mySite.GetService(service);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// <summary>Returns a <see cref="T:System.String" /> containing the name of the <see cref="T:System.ComponentModel.Component" />, if any. This method should not be overridden.</summary>
|
||||
/// <returns>A <see cref="T:System.String" /> containing the name of the <see cref="T:System.ComponentModel.Component" />, if any, or null if the <see cref="T:System.ComponentModel.Component" /> is unnamed.</returns>
|
||||
// Token: 0x060003CA RID: 970 RVA: 0x0000B8C4 File Offset: 0x00009AC4
|
||||
public override string ToString()
|
||||
{
|
||||
if (this.mySite == null)
|
||||
{
|
||||
return base.GetType().ToString();
|
||||
}
|
||||
return string.Format("{0} [{1}]", this.mySite.Name, base.GetType().ToString());
|
||||
}
|
||||
|
||||
// Token: 0x04000142 RID: 322
|
||||
private EventHandlerList event_handlers;
|
||||
|
||||
// Token: 0x04000143 RID: 323
|
||||
private ISite mySite;
|
||||
|
||||
// Token: 0x04000144 RID: 324
|
||||
private object disposedEvent = new object();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.ComponentModel
|
||||
{
|
||||
/// <summary>Provides a read-only container for a collection of <see cref="T:System.ComponentModel.IComponent" /> objects.</summary>
|
||||
// Token: 0x02000065 RID: 101
|
||||
[ComVisible(true)]
|
||||
public class ComponentCollection : ReadOnlyCollectionBase
|
||||
{
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.ComponentCollection" /> class using the specified array of components.</summary>
|
||||
/// <param name="components">An array of <see cref="T:System.ComponentModel.IComponent" /> objects to initialize the collection with. </param>
|
||||
// Token: 0x060003CB RID: 971 RVA: 0x0000B908 File Offset: 0x00009B08
|
||||
public ComponentCollection(IComponent[] components)
|
||||
{
|
||||
base.InnerList.AddRange(components);
|
||||
}
|
||||
|
||||
/// <summary>Gets the <see cref="T:System.ComponentModel.Component" /> in the collection at the specified collection index.</summary>
|
||||
/// <returns>The <see cref="T:System.ComponentModel.IComponent" /> at the specified index.</returns>
|
||||
/// <param name="index">The collection index of the <see cref="T:System.ComponentModel.Component" /> to get. </param>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">If the specified index is not within the index range of the collection. </exception>
|
||||
// Token: 0x1700010D RID: 269
|
||||
public virtual IComponent this[int index]
|
||||
{
|
||||
get
|
||||
{
|
||||
return (IComponent)base.InnerList[index];
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets any component in the collection matching the specified name.</summary>
|
||||
/// <returns>A component with a name matching the name specified by the <paramref name="name" /> parameter, or null if the named component cannot be found in the collection.</returns>
|
||||
/// <param name="name">The name of the <see cref="T:System.ComponentModel.IComponent" /> to get. </param>
|
||||
// Token: 0x1700010E RID: 270
|
||||
public virtual IComponent this[string name]
|
||||
{
|
||||
get
|
||||
{
|
||||
foreach (object obj in base.InnerList)
|
||||
{
|
||||
IComponent component = (IComponent)obj;
|
||||
if (component.Site != null && component.Site.Name == name)
|
||||
{
|
||||
return component;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Copies the entire collection to an array, starting writing at the specified array index.</summary>
|
||||
/// <param name="array">An <see cref="T:System.ComponentModel.IComponent" /> array to copy the objects in the collection to. </param>
|
||||
/// <param name="index">The index of the <paramref name="array" /> at which copying to should begin. </param>
|
||||
// Token: 0x060003CE RID: 974 RVA: 0x0000B9C4 File Offset: 0x00009BC4
|
||||
public void CopyTo(IComponent[] array, int index)
|
||||
{
|
||||
base.InnerList.CopyTo(array, index);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
using System;
|
||||
|
||||
namespace System.ComponentModel
|
||||
{
|
||||
/// <summary>Provides a type converter to convert components to and from various other representations.</summary>
|
||||
// Token: 0x02000066 RID: 102
|
||||
public class ComponentConverter : ReferenceConverter
|
||||
{
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.ComponentConverter" /> class.</summary>
|
||||
/// <param name="type">A <see cref="T:System.Type" /> that represents the type to associate with this component converter. </param>
|
||||
// Token: 0x060003CF RID: 975 RVA: 0x0000B9D4 File Offset: 0x00009BD4
|
||||
public ComponentConverter(Type type)
|
||||
: base(type)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Gets a collection of properties for the type of component specified by the value parameter.</summary>
|
||||
/// <returns>A <see cref="T:System.ComponentModel.PropertyDescriptorCollection" /> with the properties that are exposed for the component, or null if there are no properties.</returns>
|
||||
/// <param name="context">An <see cref="T:System.ComponentModel.ITypeDescriptorContext" /> that provides a format context. </param>
|
||||
/// <param name="value">An <see cref="T:System.Object" /> that specifies the type of component to get the properties for. </param>
|
||||
/// <param name="attributes">An array of type <see cref="T:System.Attribute" /> that will be used as a filter. </param>
|
||||
// Token: 0x060003D0 RID: 976 RVA: 0x0000B9E0 File Offset: 0x00009BE0
|
||||
public override PropertyDescriptorCollection GetProperties(ITypeDescriptorContext context, object value, Attribute[] attributes)
|
||||
{
|
||||
return TypeDescriptor.GetProperties(value, attributes);
|
||||
}
|
||||
|
||||
/// <summary>Gets a value indicating whether this object supports properties using the specified context.</summary>
|
||||
/// <returns>true because <see cref="M:System.ComponentModel.TypeConverter.GetProperties(System.Object)" /> should be called to find the properties of this object. This method never returns false.</returns>
|
||||
/// <param name="context">An <see cref="T:System.ComponentModel.ITypeDescriptorContext" /> that provides a format context. </param>
|
||||
// Token: 0x060003D1 RID: 977 RVA: 0x0000B9EC File Offset: 0x00009BEC
|
||||
public override bool GetPropertiesSupported(ITypeDescriptorContext context)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,97 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.ComponentModel.Design;
|
||||
using System.Reflection;
|
||||
|
||||
namespace System.ComponentModel
|
||||
{
|
||||
// Token: 0x020000D4 RID: 212
|
||||
internal class ComponentInfo : Info
|
||||
{
|
||||
// Token: 0x06000739 RID: 1849 RVA: 0x000137E0 File Offset: 0x000119E0
|
||||
public ComponentInfo(IComponent component)
|
||||
: base(component.GetType())
|
||||
{
|
||||
this._component = component;
|
||||
}
|
||||
|
||||
// Token: 0x0600073A RID: 1850 RVA: 0x000137F8 File Offset: 0x000119F8
|
||||
public override AttributeCollection GetAttributes()
|
||||
{
|
||||
return base.GetAttributes(this._component);
|
||||
}
|
||||
|
||||
// Token: 0x0600073B RID: 1851 RVA: 0x00013808 File Offset: 0x00011A08
|
||||
public override EventDescriptorCollection GetEvents()
|
||||
{
|
||||
if (this._events != null)
|
||||
{
|
||||
return this._events;
|
||||
}
|
||||
bool flag = true;
|
||||
EventInfo[] events = this._component.GetType().GetEvents();
|
||||
Hashtable hashtable = new Hashtable();
|
||||
foreach (EventInfo eventInfo in events)
|
||||
{
|
||||
hashtable[eventInfo.Name] = new ReflectionEventDescriptor(eventInfo);
|
||||
}
|
||||
if (this._component.Site != null)
|
||||
{
|
||||
global::System.ComponentModel.Design.ITypeDescriptorFilterService typeDescriptorFilterService = (global::System.ComponentModel.Design.ITypeDescriptorFilterService)this._component.Site.GetService(typeof(global::System.ComponentModel.Design.ITypeDescriptorFilterService));
|
||||
if (typeDescriptorFilterService != null)
|
||||
{
|
||||
flag = typeDescriptorFilterService.FilterEvents(this._component, hashtable);
|
||||
}
|
||||
}
|
||||
ArrayList arrayList = new ArrayList();
|
||||
arrayList.AddRange(hashtable.Values);
|
||||
EventDescriptorCollection eventDescriptorCollection = new EventDescriptorCollection(arrayList);
|
||||
if (flag)
|
||||
{
|
||||
this._events = eventDescriptorCollection;
|
||||
}
|
||||
return eventDescriptorCollection;
|
||||
}
|
||||
|
||||
// Token: 0x0600073C RID: 1852 RVA: 0x000138E8 File Offset: 0x00011AE8
|
||||
public override PropertyDescriptorCollection GetProperties()
|
||||
{
|
||||
if (this._properties != null)
|
||||
{
|
||||
return this._properties;
|
||||
}
|
||||
bool flag = true;
|
||||
PropertyInfo[] properties = this._component.GetType().GetProperties(BindingFlags.Instance | BindingFlags.Public);
|
||||
Hashtable hashtable = new Hashtable();
|
||||
for (int i = properties.Length - 1; i >= 0; i--)
|
||||
{
|
||||
hashtable[properties[i].Name] = new ReflectionPropertyDescriptor(properties[i]);
|
||||
}
|
||||
if (this._component.Site != null)
|
||||
{
|
||||
global::System.ComponentModel.Design.ITypeDescriptorFilterService typeDescriptorFilterService = (global::System.ComponentModel.Design.ITypeDescriptorFilterService)this._component.Site.GetService(typeof(global::System.ComponentModel.Design.ITypeDescriptorFilterService));
|
||||
if (typeDescriptorFilterService != null)
|
||||
{
|
||||
flag = typeDescriptorFilterService.FilterProperties(this._component, hashtable);
|
||||
}
|
||||
}
|
||||
PropertyDescriptor[] array = new PropertyDescriptor[hashtable.Values.Count];
|
||||
hashtable.Values.CopyTo(array, 0);
|
||||
PropertyDescriptorCollection propertyDescriptorCollection = new PropertyDescriptorCollection(array, true);
|
||||
if (flag)
|
||||
{
|
||||
this._properties = propertyDescriptorCollection;
|
||||
}
|
||||
return propertyDescriptorCollection;
|
||||
}
|
||||
|
||||
// Token: 0x0400020D RID: 525
|
||||
private IComponent _component;
|
||||
|
||||
// Token: 0x0400020E RID: 526
|
||||
private EventDescriptorCollection _events;
|
||||
|
||||
// Token: 0x0400020F RID: 527
|
||||
private PropertyDescriptorCollection _properties;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,170 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.ComponentModel.Design.Serialization;
|
||||
using System.Globalization;
|
||||
using System.Reflection;
|
||||
|
||||
namespace System.ComponentModel
|
||||
{
|
||||
/// <summary>Provides a type converter to convert <see cref="T:System.Globalization.CultureInfo" /> objects to and from various other representations.</summary>
|
||||
// Token: 0x02000067 RID: 103
|
||||
public class CultureInfoConverter : TypeConverter
|
||||
{
|
||||
/// <summary>Gets a value indicating whether this converter can convert an object in the given source type to a <see cref="T:System.Globalization.CultureInfo" /> using the specified context.</summary>
|
||||
/// <returns>true if this converter can perform the conversion; otherwise, false.</returns>
|
||||
/// <param name="context">An <see cref="T:System.ComponentModel.ITypeDescriptorContext" /> that provides a format context. </param>
|
||||
/// <param name="sourceType">A <see cref="T:System.Type" /> that represents the type you wish to convert from. </param>
|
||||
// Token: 0x060003D3 RID: 979 RVA: 0x0000B9F8 File Offset: 0x00009BF8
|
||||
public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType)
|
||||
{
|
||||
return sourceType == typeof(string) || base.CanConvertFrom(context, sourceType);
|
||||
}
|
||||
|
||||
/// <summary>Gets a value indicating whether this converter can convert an object to the given destination type using the context.</summary>
|
||||
/// <returns>true if this converter can perform the conversion; otherwise, false.</returns>
|
||||
/// <param name="context">An <see cref="T:System.ComponentModel.ITypeDescriptorContext" /> that provides a format context. </param>
|
||||
/// <param name="destinationType">A <see cref="T:System.Type" /> that represents the type you wish to convert to. </param>
|
||||
// Token: 0x060003D4 RID: 980 RVA: 0x0000BA14 File Offset: 0x00009C14
|
||||
public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType)
|
||||
{
|
||||
return destinationType == typeof(string) || destinationType == typeof(global::System.ComponentModel.Design.Serialization.InstanceDescriptor) || base.CanConvertTo(context, destinationType);
|
||||
}
|
||||
|
||||
/// <summary>Converts the specified value object to a <see cref="T:System.Globalization.CultureInfo" />.</summary>
|
||||
/// <returns>An <see cref="T:System.Object" /> that represents the converted value.</returns>
|
||||
/// <param name="context">An <see cref="T:System.ComponentModel.ITypeDescriptorContext" /> that provides a format context.</param>
|
||||
/// <param name="culture">A <see cref="T:System.Globalization.CultureInfo" /> that specifies the culture to which to convert.</param>
|
||||
/// <param name="value">The <see cref="T:System.Object" /> to convert.</param>
|
||||
/// <exception cref="T:System.ArgumentException">
|
||||
/// <paramref name="value" /> specifies a culture that is not valid. </exception>
|
||||
/// <exception cref="T:System.NotSupportedException">The conversion cannot be performed. </exception>
|
||||
// Token: 0x060003D5 RID: 981 RVA: 0x0000BA50 File Offset: 0x00009C50
|
||||
public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value)
|
||||
{
|
||||
string text = value as string;
|
||||
if (text == null)
|
||||
{
|
||||
return base.ConvertFrom(context, culture, value);
|
||||
}
|
||||
if (string.Compare(text, "(Default)", false) == 0)
|
||||
{
|
||||
return CultureInfo.InvariantCulture;
|
||||
}
|
||||
try
|
||||
{
|
||||
return new CultureInfo(text);
|
||||
}
|
||||
catch
|
||||
{
|
||||
foreach (CultureInfo cultureInfo in CultureInfo.GetCultures(CultureTypes.AllCultures))
|
||||
{
|
||||
if (string.Compare(cultureInfo.DisplayName, 0, text, 0, text.Length, true) == 0)
|
||||
{
|
||||
return cultureInfo;
|
||||
}
|
||||
}
|
||||
}
|
||||
throw new ArgumentException(string.Format("Culture {0} cannot be converted to a CultureInfo or is not available in this environment.", value));
|
||||
}
|
||||
|
||||
/// <summary>Converts the given value object to the specified destination type.</summary>
|
||||
/// <returns>An <see cref="T:System.Object" /> that represents the converted <paramref name="value" />.</returns>
|
||||
/// <param name="context">An <see cref="T:System.ComponentModel.ITypeDescriptorContext" /> that provides a format context. </param>
|
||||
/// <param name="culture">A <see cref="T:System.Globalization.CultureInfo" /> that specifies the culture to which to convert.</param>
|
||||
/// <param name="value">The <see cref="T:System.Object" /> to convert. </param>
|
||||
/// <param name="destinationType">The <see cref="T:System.Type" /> to convert the value to. </param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="destinationType" /> is null. </exception>
|
||||
/// <exception cref="T:System.NotSupportedException">The conversion cannot be performed. </exception>
|
||||
// Token: 0x060003D6 RID: 982 RVA: 0x0000BB14 File Offset: 0x00009D14
|
||||
public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
|
||||
{
|
||||
if (destinationType == typeof(string))
|
||||
{
|
||||
if (value == null || !(value is CultureInfo))
|
||||
{
|
||||
return "(Default)";
|
||||
}
|
||||
if (value == CultureInfo.InvariantCulture)
|
||||
{
|
||||
return "(Default)";
|
||||
}
|
||||
return ((CultureInfo)value).DisplayName;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (destinationType == typeof(global::System.ComponentModel.Design.Serialization.InstanceDescriptor) && value is CultureInfo)
|
||||
{
|
||||
CultureInfo cultureInfo = (CultureInfo)value;
|
||||
ConstructorInfo constructor = typeof(CultureInfo).GetConstructor(new Type[] { typeof(int) });
|
||||
return new global::System.ComponentModel.Design.Serialization.InstanceDescriptor(constructor, new object[] { cultureInfo.LCID });
|
||||
}
|
||||
return base.ConvertTo(context, culture, value, destinationType);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a collection of standard values for a <see cref="T:System.Globalization.CultureInfo" /> object using the specified context.</summary>
|
||||
/// <returns>A <see cref="T:System.ComponentModel.TypeConverter.StandardValuesCollection" /> containing a standard set of valid values, or null if the data type does not support a standard set of values.</returns>
|
||||
/// <param name="context">An <see cref="T:System.ComponentModel.ITypeDescriptorContext" /> that provides a format context. </param>
|
||||
// Token: 0x060003D7 RID: 983 RVA: 0x0000BBD4 File Offset: 0x00009DD4
|
||||
public override TypeConverter.StandardValuesCollection GetStandardValues(ITypeDescriptorContext context)
|
||||
{
|
||||
if (this._standardValues == null)
|
||||
{
|
||||
CultureInfo[] cultures = CultureInfo.GetCultures(CultureTypes.AllCultures);
|
||||
Array.Sort(cultures, new CultureInfoConverter.CultureInfoComparer());
|
||||
CultureInfo[] array = new CultureInfo[cultures.Length + 1];
|
||||
array[0] = CultureInfo.InvariantCulture;
|
||||
Array.Copy(cultures, 0, array, 1, cultures.Length);
|
||||
this._standardValues = new TypeConverter.StandardValuesCollection(array);
|
||||
}
|
||||
return this._standardValues;
|
||||
}
|
||||
|
||||
/// <summary>Gets a value indicating whether the list of standard values returned from <see cref="M:System.ComponentModel.CultureInfoConverter.GetStandardValues(System.ComponentModel.ITypeDescriptorContext)" /> is an exhaustive list.</summary>
|
||||
/// <returns>false because the <see cref="T:System.ComponentModel.TypeConverter.StandardValuesCollection" /> returned from <see cref="M:System.ComponentModel.CultureInfoConverter.GetStandardValues(System.ComponentModel.ITypeDescriptorContext)" /> is not an exhaustive list of possible values (that is, other values are possible). This method never returns true.</returns>
|
||||
/// <param name="context">An <see cref="T:System.ComponentModel.ITypeDescriptorContext" /> that provides a format context. </param>
|
||||
// Token: 0x060003D8 RID: 984 RVA: 0x0000BC30 File Offset: 0x00009E30
|
||||
public override bool GetStandardValuesExclusive(ITypeDescriptorContext context)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/// <summary>Gets a value indicating whether this object supports a standard set of values that can be picked from a list using the specified context.</summary>
|
||||
/// <returns>true because <see cref="M:System.ComponentModel.CultureInfoConverter.GetStandardValues(System.ComponentModel.ITypeDescriptorContext)" /> should be called to find a common set of values the object supports. This method never returns false.</returns>
|
||||
/// <param name="context">An <see cref="T:System.ComponentModel.ITypeDescriptorContext" /> that provides a format context. </param>
|
||||
// Token: 0x060003D9 RID: 985 RVA: 0x0000BC34 File Offset: 0x00009E34
|
||||
public override bool GetStandardValuesSupported(ITypeDescriptorContext context)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
// Token: 0x04000145 RID: 325
|
||||
private TypeConverter.StandardValuesCollection _standardValues;
|
||||
|
||||
// Token: 0x02000068 RID: 104
|
||||
private class CultureInfoComparer : IComparer
|
||||
{
|
||||
// Token: 0x060003DB RID: 987 RVA: 0x0000BC40 File Offset: 0x00009E40
|
||||
public int Compare(object first, object second)
|
||||
{
|
||||
if (first == null)
|
||||
{
|
||||
if (second == null)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (second == null)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
return string.Compare(((CultureInfo)first).DisplayName, ((CultureInfo)second).DisplayName, false, CultureInfo.CurrentCulture);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,174 @@
|
||||
using System;
|
||||
|
||||
namespace System.ComponentModel
|
||||
{
|
||||
/// <summary>Provides a simple default implementation of the <see cref="T:System.ComponentModel.ICustomTypeDescriptor" /> interface.</summary>
|
||||
// Token: 0x02000069 RID: 105
|
||||
public abstract class CustomTypeDescriptor : ICustomTypeDescriptor
|
||||
{
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.CustomTypeDescriptor" /> class.</summary>
|
||||
// Token: 0x060003DC RID: 988 RVA: 0x0000BC88 File Offset: 0x00009E88
|
||||
protected CustomTypeDescriptor()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.CustomTypeDescriptor" /> class using a parent custom type descriptor.</summary>
|
||||
/// <param name="parent">The parent custom type descriptor.</param>
|
||||
// Token: 0x060003DD RID: 989 RVA: 0x0000BC90 File Offset: 0x00009E90
|
||||
protected CustomTypeDescriptor(ICustomTypeDescriptor parent)
|
||||
{
|
||||
this._parent = parent;
|
||||
}
|
||||
|
||||
/// <summary>Returns a collection of custom attributes for the type represented by this type descriptor.</summary>
|
||||
/// <returns>An <see cref="T:System.ComponentModel.AttributeCollection" /> containing the attributes for the type. The default is <see cref="F:System.ComponentModel.AttributeCollection.Empty" />.</returns>
|
||||
// Token: 0x060003DE RID: 990 RVA: 0x0000BCA0 File Offset: 0x00009EA0
|
||||
public virtual AttributeCollection GetAttributes()
|
||||
{
|
||||
if (this._parent != null)
|
||||
{
|
||||
return this._parent.GetAttributes();
|
||||
}
|
||||
return AttributeCollection.Empty;
|
||||
}
|
||||
|
||||
/// <summary>Returns the fully qualified name of the class represented by this type descriptor.</summary>
|
||||
/// <returns>A <see cref="T:System.String" /> containing the fully qualified class name of the type this type descriptor is describing. The default is null.</returns>
|
||||
// Token: 0x060003DF RID: 991 RVA: 0x0000BCC0 File Offset: 0x00009EC0
|
||||
public virtual string GetClassName()
|
||||
{
|
||||
if (this._parent != null)
|
||||
{
|
||||
return this._parent.GetClassName();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// <summary>Returns the name of the class represented by this type descriptor.</summary>
|
||||
/// <returns>A <see cref="T:System.String" /> containing the name of the component instance this type descriptor is describing. The default is null.</returns>
|
||||
// Token: 0x060003E0 RID: 992 RVA: 0x0000BCDC File Offset: 0x00009EDC
|
||||
public virtual string GetComponentName()
|
||||
{
|
||||
if (this._parent != null)
|
||||
{
|
||||
return this._parent.GetComponentName();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// <summary>Returns a type converter for the type represented by this type descriptor.</summary>
|
||||
/// <returns>A <see cref="T:System.ComponentModel.TypeConverter" /> for the type represented by this type descriptor. The default is a newly created <see cref="T:System.ComponentModel.TypeConverter" />.</returns>
|
||||
// Token: 0x060003E1 RID: 993 RVA: 0x0000BCF8 File Offset: 0x00009EF8
|
||||
public virtual TypeConverter GetConverter()
|
||||
{
|
||||
if (this._parent != null)
|
||||
{
|
||||
return this._parent.GetConverter();
|
||||
}
|
||||
return new TypeConverter();
|
||||
}
|
||||
|
||||
/// <summary>Returns the event descriptor for the default event of the object represented by this type descriptor.</summary>
|
||||
/// <returns>The <see cref="T:System.ComponentModel.EventDescriptor" /> for the default event on the object represented by this type descriptor. The default is null.</returns>
|
||||
// Token: 0x060003E2 RID: 994 RVA: 0x0000BD18 File Offset: 0x00009F18
|
||||
public virtual EventDescriptor GetDefaultEvent()
|
||||
{
|
||||
if (this._parent != null)
|
||||
{
|
||||
return this._parent.GetDefaultEvent();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// <summary>Returns the property descriptor for the default property of the object represented by this type descriptor.</summary>
|
||||
/// <returns>A <see cref="T:System.ComponentModel.PropertyDescriptor" /> for the default property on the object represented by this type descriptor. The default is null.</returns>
|
||||
// Token: 0x060003E3 RID: 995 RVA: 0x0000BD34 File Offset: 0x00009F34
|
||||
public virtual PropertyDescriptor GetDefaultProperty()
|
||||
{
|
||||
if (this._parent != null)
|
||||
{
|
||||
return this._parent.GetDefaultProperty();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// <summary>Returns an editor of the specified type that is to be associated with the class represented by this type descriptor.</summary>
|
||||
/// <returns>An editor of the given type that is to be associated with the class represented by this type descriptor. The default is null.</returns>
|
||||
/// <param name="editorBaseType">The base type of the editor to retrieve.</param>
|
||||
// Token: 0x060003E4 RID: 996 RVA: 0x0000BD50 File Offset: 0x00009F50
|
||||
public virtual object GetEditor(Type editorBaseType)
|
||||
{
|
||||
if (this._parent != null)
|
||||
{
|
||||
return this._parent.GetEditor(editorBaseType);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// <summary>Returns a collection of event descriptors for the object represented by this type descriptor.</summary>
|
||||
/// <returns>An <see cref="T:System.ComponentModel.EventDescriptorCollection" /> containing the event descriptors for the object represented by this type descriptor. The default is <see cref="F:System.ComponentModel.EventDescriptorCollection.Empty" />.</returns>
|
||||
// Token: 0x060003E5 RID: 997 RVA: 0x0000BD6C File Offset: 0x00009F6C
|
||||
public virtual EventDescriptorCollection GetEvents()
|
||||
{
|
||||
if (this._parent != null)
|
||||
{
|
||||
return this._parent.GetEvents();
|
||||
}
|
||||
return EventDescriptorCollection.Empty;
|
||||
}
|
||||
|
||||
/// <summary>Returns a filtered collection of event descriptors for the object represented by this type descriptor.</summary>
|
||||
/// <returns>An <see cref="T:System.ComponentModel.EventDescriptorCollection" /> containing the event descriptions for the object represented by this type descriptor. The default is <see cref="F:System.ComponentModel.EventDescriptorCollection.Empty" />.</returns>
|
||||
/// <param name="attributes">An array of attributes to use as a filter. This can be null.</param>
|
||||
// Token: 0x060003E6 RID: 998 RVA: 0x0000BD8C File Offset: 0x00009F8C
|
||||
public virtual EventDescriptorCollection GetEvents(Attribute[] attributes)
|
||||
{
|
||||
if (this._parent != null)
|
||||
{
|
||||
return this._parent.GetEvents(attributes);
|
||||
}
|
||||
return EventDescriptorCollection.Empty;
|
||||
}
|
||||
|
||||
/// <summary>Returns a collection of property descriptors for the object represented by this type descriptor.</summary>
|
||||
/// <returns>A <see cref="T:System.ComponentModel.PropertyDescriptorCollection" /> containing the property descriptions for the object represented by this type descriptor. The default is <see cref="F:System.ComponentModel.PropertyDescriptorCollection.Empty" />.</returns>
|
||||
// Token: 0x060003E7 RID: 999 RVA: 0x0000BDAC File Offset: 0x00009FAC
|
||||
public virtual PropertyDescriptorCollection GetProperties()
|
||||
{
|
||||
if (this._parent != null)
|
||||
{
|
||||
return this._parent.GetProperties();
|
||||
}
|
||||
return PropertyDescriptorCollection.Empty;
|
||||
}
|
||||
|
||||
/// <summary>Returns a filtered collection of property descriptors for the object represented by this type descriptor.</summary>
|
||||
/// <returns>A <see cref="T:System.ComponentModel.PropertyDescriptorCollection" /> containing the property descriptions for the object represented by this type descriptor. The default is <see cref="F:System.ComponentModel.PropertyDescriptorCollection.Empty" />.</returns>
|
||||
/// <param name="attributes">An array of attributes to use as a filter. This can be null.</param>
|
||||
// Token: 0x060003E8 RID: 1000 RVA: 0x0000BDCC File Offset: 0x00009FCC
|
||||
public virtual PropertyDescriptorCollection GetProperties(Attribute[] attributes)
|
||||
{
|
||||
if (this._parent != null)
|
||||
{
|
||||
return this._parent.GetProperties(attributes);
|
||||
}
|
||||
return PropertyDescriptorCollection.Empty;
|
||||
}
|
||||
|
||||
/// <summary>Returns an object that contains the property described by the specified property descriptor.</summary>
|
||||
/// <returns>An <see cref="T:System.Object" /> that owns the given property specified by the type descriptor. The default is null.</returns>
|
||||
/// <param name="pd">The property descriptor for which to retrieve the owning object.</param>
|
||||
// Token: 0x060003E9 RID: 1001 RVA: 0x0000BDEC File Offset: 0x00009FEC
|
||||
public virtual object GetPropertyOwner(PropertyDescriptor pd)
|
||||
{
|
||||
if (this._parent != null)
|
||||
{
|
||||
return this._parent.GetPropertyOwner(pd);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
// Token: 0x04000146 RID: 326
|
||||
private ICustomTypeDescriptor _parent;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,117 @@
|
||||
using System;
|
||||
using System.ComponentModel.Design.Serialization;
|
||||
using System.Globalization;
|
||||
using System.Reflection;
|
||||
|
||||
namespace System.ComponentModel
|
||||
{
|
||||
/// <summary>Provides a type converter to convert <see cref="T:System.DateTime" /> objects to and from various other representations.</summary>
|
||||
// Token: 0x0200006A RID: 106
|
||||
public class DateTimeConverter : TypeConverter
|
||||
{
|
||||
/// <summary>Gets a value indicating whether this converter can convert an object in the given source type to a <see cref="T:System.DateTime" /> using the specified context.</summary>
|
||||
/// <returns>true if this object can perform the conversion; otherwise, false.</returns>
|
||||
/// <param name="context">An <see cref="T:System.ComponentModel.ITypeDescriptorContext" /> that provides a format context. </param>
|
||||
/// <param name="sourceType">A <see cref="T:System.Type" /> that represents the type you wish to convert from. </param>
|
||||
// Token: 0x060003EB RID: 1003 RVA: 0x0000BE10 File Offset: 0x0000A010
|
||||
public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType)
|
||||
{
|
||||
return sourceType == typeof(string) || base.CanConvertFrom(context, sourceType);
|
||||
}
|
||||
|
||||
/// <summary>Gets a value indicating whether this converter can convert an object to the given destination type using the context.</summary>
|
||||
/// <returns>true if this converter can perform the conversion; otherwise, false.</returns>
|
||||
/// <param name="context">An <see cref="T:System.ComponentModel.ITypeDescriptorContext" /> that provides a format context. </param>
|
||||
/// <param name="destinationType">A <see cref="T:System.Type" /> that represents the type you wish to convert to. </param>
|
||||
// Token: 0x060003EC RID: 1004 RVA: 0x0000BE2C File Offset: 0x0000A02C
|
||||
public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType)
|
||||
{
|
||||
return destinationType == typeof(global::System.ComponentModel.Design.Serialization.InstanceDescriptor) || base.CanConvertTo(context, destinationType);
|
||||
}
|
||||
|
||||
/// <summary>Converts the given value object to a <see cref="T:System.DateTime" />.</summary>
|
||||
/// <returns>An <see cref="T:System.Object" /> that represents the converted <paramref name="value" />.</returns>
|
||||
/// <param name="context">An <see cref="T:System.ComponentModel.ITypeDescriptorContext" /> that provides a format context. </param>
|
||||
/// <param name="culture">An optional <see cref="T:System.Globalization.CultureInfo" />. If not supplied, the current culture is assumed. </param>
|
||||
/// <param name="value">The <see cref="T:System.Object" /> to convert. </param>
|
||||
/// <exception cref="T:System.FormatException">
|
||||
/// <paramref name="value" /> is not a valid value for the target type. </exception>
|
||||
/// <exception cref="T:System.NotSupportedException">The conversion cannot be performed. </exception>
|
||||
// Token: 0x060003ED RID: 1005 RVA: 0x0000BE48 File Offset: 0x0000A048
|
||||
public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value)
|
||||
{
|
||||
if (value is string)
|
||||
{
|
||||
string text = (string)value;
|
||||
try
|
||||
{
|
||||
if (text != null && text.Trim().Length == 0)
|
||||
{
|
||||
return DateTime.MinValue;
|
||||
}
|
||||
if (culture == null)
|
||||
{
|
||||
return DateTime.Parse(text);
|
||||
}
|
||||
DateTimeFormatInfo dateTimeFormatInfo = (DateTimeFormatInfo)culture.GetFormat(typeof(DateTimeFormatInfo));
|
||||
return DateTime.Parse(text, dateTimeFormatInfo);
|
||||
}
|
||||
catch
|
||||
{
|
||||
throw new FormatException(text + " is not a valid DateTime value.");
|
||||
}
|
||||
}
|
||||
return base.ConvertFrom(context, culture, value);
|
||||
}
|
||||
|
||||
/// <summary>Converts the given value object to a <see cref="T:System.DateTime" /> using the arguments.</summary>
|
||||
/// <returns>An <see cref="T:System.Object" /> that represents the converted <paramref name="value" />.</returns>
|
||||
/// <param name="context">An <see cref="T:System.ComponentModel.ITypeDescriptorContext" /> that provides a format context. </param>
|
||||
/// <param name="culture">An optional <see cref="T:System.Globalization.CultureInfo" />. If not supplied, the current culture is assumed. </param>
|
||||
/// <param name="value">The <see cref="T:System.Object" /> to convert. </param>
|
||||
/// <param name="destinationType">The <see cref="T:System.Type" /> to convert the value to. </param>
|
||||
/// <exception cref="T:System.NotSupportedException">The conversion cannot be performed. </exception>
|
||||
// Token: 0x060003EE RID: 1006 RVA: 0x0000BF10 File Offset: 0x0000A110
|
||||
public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
|
||||
{
|
||||
if (value is DateTime)
|
||||
{
|
||||
DateTime dateTime = (DateTime)value;
|
||||
if (destinationType == typeof(string))
|
||||
{
|
||||
if (culture == null)
|
||||
{
|
||||
culture = CultureInfo.CurrentCulture;
|
||||
}
|
||||
if (dateTime == DateTime.MinValue)
|
||||
{
|
||||
return string.Empty;
|
||||
}
|
||||
DateTimeFormatInfo dateTimeFormatInfo = (DateTimeFormatInfo)culture.GetFormat(typeof(DateTimeFormatInfo));
|
||||
if (culture == CultureInfo.InvariantCulture)
|
||||
{
|
||||
if (dateTime.Equals(dateTime.Date))
|
||||
{
|
||||
return dateTime.ToString("yyyy-MM-dd", culture);
|
||||
}
|
||||
return dateTime.ToString(culture);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (dateTime == dateTime.Date)
|
||||
{
|
||||
return dateTime.ToString(dateTimeFormatInfo.ShortDatePattern, culture);
|
||||
}
|
||||
return dateTime.ToString(dateTimeFormatInfo.ShortDatePattern + " " + dateTimeFormatInfo.ShortTimePattern, culture);
|
||||
}
|
||||
}
|
||||
else if (destinationType == typeof(global::System.ComponentModel.Design.Serialization.InstanceDescriptor))
|
||||
{
|
||||
ConstructorInfo constructor = typeof(DateTime).GetConstructor(new Type[] { typeof(long) });
|
||||
return new global::System.ComponentModel.Design.Serialization.InstanceDescriptor(constructor, new object[] { dateTime.Ticks });
|
||||
}
|
||||
}
|
||||
return base.ConvertTo(context, culture, value, destinationType);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
using System;
|
||||
using System.ComponentModel.Design.Serialization;
|
||||
using System.Globalization;
|
||||
using System.Reflection;
|
||||
|
||||
namespace System.ComponentModel
|
||||
{
|
||||
/// <summary>Provides a type converter to convert <see cref="T:System.Decimal" /> objects to and from various other representations.</summary>
|
||||
// Token: 0x0200006B RID: 107
|
||||
public class DecimalConverter : BaseNumberConverter
|
||||
{
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.DecimalConverter" /> class. </summary>
|
||||
// Token: 0x060003EF RID: 1007 RVA: 0x0000C04C File Offset: 0x0000A24C
|
||||
public DecimalConverter()
|
||||
{
|
||||
this.InnerType = typeof(decimal);
|
||||
}
|
||||
|
||||
// Token: 0x1700010F RID: 271
|
||||
// (get) Token: 0x060003F0 RID: 1008 RVA: 0x0000C064 File Offset: 0x0000A264
|
||||
internal override bool SupportHex
|
||||
{
|
||||
get
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a value indicating whether this converter can convert an object to the given destination type using the context.</summary>
|
||||
/// <returns>true if this converter can perform the conversion; otherwise, false.</returns>
|
||||
/// <param name="context">An <see cref="T:System.ComponentModel.ITypeDescriptorContext" /> that provides a format context. </param>
|
||||
/// <param name="destinationType">A <see cref="T:System.Type" /> that represents the type you wish to convert to. </param>
|
||||
// Token: 0x060003F1 RID: 1009 RVA: 0x0000C068 File Offset: 0x0000A268
|
||||
public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType)
|
||||
{
|
||||
return destinationType == typeof(global::System.ComponentModel.Design.Serialization.InstanceDescriptor) || base.CanConvertTo(context, destinationType);
|
||||
}
|
||||
|
||||
/// <summary>Converts the given value object to a <see cref="T:System.Decimal" /> using the arguments.</summary>
|
||||
/// <returns>An <see cref="T:System.Object" /> that represents the converted value.</returns>
|
||||
/// <param name="context">An <see cref="T:System.ComponentModel.ITypeDescriptorContext" /> that provides a format context. </param>
|
||||
/// <param name="culture">An optional <see cref="T:System.Globalization.CultureInfo" />. If not supplied, the current culture is assumed. </param>
|
||||
/// <param name="value">The <see cref="T:System.Object" /> to convert. </param>
|
||||
/// <param name="destinationType">The <see cref="T:System.Type" /> to convert the value to. </param>
|
||||
/// <exception cref="T:System.ArgumentNullException">The <paramref name="destinationType" /> is null. </exception>
|
||||
/// <exception cref="T:System.NotSupportedException">The conversion cannot be performed. </exception>
|
||||
// Token: 0x060003F2 RID: 1010 RVA: 0x0000C084 File Offset: 0x0000A284
|
||||
public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
|
||||
{
|
||||
if (destinationType == typeof(global::System.ComponentModel.Design.Serialization.InstanceDescriptor) && value is decimal)
|
||||
{
|
||||
decimal num = (decimal)value;
|
||||
ConstructorInfo constructor = typeof(decimal).GetConstructor(new Type[] { typeof(int[]) });
|
||||
return new global::System.ComponentModel.Design.Serialization.InstanceDescriptor(constructor, new object[] { decimal.GetBits(num) });
|
||||
}
|
||||
return base.ConvertTo(context, culture, value, destinationType);
|
||||
}
|
||||
|
||||
// Token: 0x060003F3 RID: 1011 RVA: 0x0000C0F8 File Offset: 0x0000A2F8
|
||||
internal override string ConvertToString(object value, NumberFormatInfo format)
|
||||
{
|
||||
return ((decimal)value).ToString("G", format);
|
||||
}
|
||||
|
||||
// Token: 0x060003F4 RID: 1012 RVA: 0x0000C11C File Offset: 0x0000A31C
|
||||
internal override object ConvertFromString(string value, NumberFormatInfo format)
|
||||
{
|
||||
return decimal.Parse(value, NumberStyles.Float, format);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
using System;
|
||||
|
||||
namespace System.ComponentModel
|
||||
{
|
||||
/// <summary>Specifies the default event for a component.</summary>
|
||||
// Token: 0x0200006C RID: 108
|
||||
[AttributeUsage(AttributeTargets.Class)]
|
||||
public sealed class DefaultEventAttribute : Attribute
|
||||
{
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.DefaultEventAttribute" /> class.</summary>
|
||||
/// <param name="name">The name of the default event for the component this attribute is bound to. </param>
|
||||
// Token: 0x060003F5 RID: 1013 RVA: 0x0000C130 File Offset: 0x0000A330
|
||||
public DefaultEventAttribute(string name)
|
||||
{
|
||||
this.eventName = name;
|
||||
}
|
||||
|
||||
/// <summary>Gets the name of the default event for the component this attribute is bound to.</summary>
|
||||
/// <returns>The name of the default event for the component this attribute is bound to. The default value is null.</returns>
|
||||
// Token: 0x17000110 RID: 272
|
||||
// (get) Token: 0x060003F7 RID: 1015 RVA: 0x0000C150 File Offset: 0x0000A350
|
||||
public string Name
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.eventName;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Returns whether the value of the given object is equal to the current <see cref="T:System.ComponentModel.DefaultEventAttribute" />.</summary>
|
||||
/// <returns>true if the value of the given object is equal to that of the current; otherwise, false.</returns>
|
||||
/// <param name="obj">The object to test the value equality of. </param>
|
||||
// Token: 0x060003F8 RID: 1016 RVA: 0x0000C158 File Offset: 0x0000A358
|
||||
public override bool Equals(object o)
|
||||
{
|
||||
return o is DefaultEventAttribute && ((DefaultEventAttribute)o).eventName == this.eventName;
|
||||
}
|
||||
|
||||
/// <summary>Returns the hash code for this instance.</summary>
|
||||
/// <returns>A 32-bit signed integer hash code.</returns>
|
||||
// Token: 0x060003F9 RID: 1017 RVA: 0x0000C180 File Offset: 0x0000A380
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return base.GetHashCode();
|
||||
}
|
||||
|
||||
// Token: 0x04000147 RID: 327
|
||||
private string eventName;
|
||||
|
||||
/// <summary>Specifies the default value for the <see cref="T:System.ComponentModel.DefaultEventAttribute" />, which is null. This static field is read-only.</summary>
|
||||
// Token: 0x04000148 RID: 328
|
||||
public static readonly DefaultEventAttribute Default = new DefaultEventAttribute(null);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
using System;
|
||||
|
||||
namespace System.ComponentModel
|
||||
{
|
||||
/// <summary>Specifies the default property for a component.</summary>
|
||||
// Token: 0x0200006D RID: 109
|
||||
[AttributeUsage(AttributeTargets.Class)]
|
||||
public sealed class DefaultPropertyAttribute : Attribute
|
||||
{
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.DefaultPropertyAttribute" /> class.</summary>
|
||||
/// <param name="name">The name of the default property for the component this attribute is bound to. </param>
|
||||
// Token: 0x060003FA RID: 1018 RVA: 0x0000C188 File Offset: 0x0000A388
|
||||
public DefaultPropertyAttribute(string name)
|
||||
{
|
||||
this.property_name = name;
|
||||
}
|
||||
|
||||
/// <summary>Gets the name of the default property for the component this attribute is bound to.</summary>
|
||||
/// <returns>The name of the default property for the component this attribute is bound to. The default value is null.</returns>
|
||||
// Token: 0x17000111 RID: 273
|
||||
// (get) Token: 0x060003FC RID: 1020 RVA: 0x0000C1A8 File Offset: 0x0000A3A8
|
||||
public string Name
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.property_name;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Returns whether the value of the given object is equal to the current <see cref="T:System.ComponentModel.DefaultPropertyAttribute" />.</summary>
|
||||
/// <returns>true if the value of the given object is equal to that of the current; otherwise, false.</returns>
|
||||
/// <param name="obj">The object to test the value equality of. </param>
|
||||
// Token: 0x060003FD RID: 1021 RVA: 0x0000C1B0 File Offset: 0x0000A3B0
|
||||
public override bool Equals(object o)
|
||||
{
|
||||
return o is DefaultPropertyAttribute && ((DefaultPropertyAttribute)o).Name == this.property_name;
|
||||
}
|
||||
|
||||
/// <summary>Returns the hash code for this instance.</summary>
|
||||
/// <returns>A 32-bit signed integer hash code.</returns>
|
||||
// Token: 0x060003FE RID: 1022 RVA: 0x0000C1D8 File Offset: 0x0000A3D8
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return base.GetHashCode();
|
||||
}
|
||||
|
||||
// Token: 0x04000149 RID: 329
|
||||
private string property_name;
|
||||
|
||||
/// <summary>Specifies the default value for the <see cref="T:System.ComponentModel.DefaultPropertyAttribute" />, which is null. This static field is read-only.</summary>
|
||||
// Token: 0x0400014A RID: 330
|
||||
public static readonly DefaultPropertyAttribute Default = new DefaultPropertyAttribute(null);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,167 @@
|
||||
using System;
|
||||
|
||||
namespace System.ComponentModel
|
||||
{
|
||||
/// <summary>Specifies the default value for a property.</summary>
|
||||
// Token: 0x0200006E RID: 110
|
||||
[AttributeUsage(AttributeTargets.All)]
|
||||
public class DefaultValueAttribute : Attribute
|
||||
{
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.DefaultValueAttribute" /> class using a <see cref="T:System.Boolean" /> value.</summary>
|
||||
/// <param name="value">A <see cref="T:System.Boolean" /> that is the default value. </param>
|
||||
// Token: 0x060003FF RID: 1023 RVA: 0x0000C1E0 File Offset: 0x0000A3E0
|
||||
public DefaultValueAttribute(bool value)
|
||||
{
|
||||
this.DefaultValue = value;
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.DefaultValueAttribute" /> class using an 8-bit unsigned integer.</summary>
|
||||
/// <param name="value">An 8-bit unsigned integer that is the default value. </param>
|
||||
// Token: 0x06000400 RID: 1024 RVA: 0x0000C1F4 File Offset: 0x0000A3F4
|
||||
public DefaultValueAttribute(byte value)
|
||||
{
|
||||
this.DefaultValue = value;
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.DefaultValueAttribute" /> class using a Unicode character.</summary>
|
||||
/// <param name="value">A Unicode character that is the default value. </param>
|
||||
// Token: 0x06000401 RID: 1025 RVA: 0x0000C208 File Offset: 0x0000A408
|
||||
public DefaultValueAttribute(char value)
|
||||
{
|
||||
this.DefaultValue = value;
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.DefaultValueAttribute" /> class using a double-precision floating point number.</summary>
|
||||
/// <param name="value">A double-precision floating point number that is the default value. </param>
|
||||
// Token: 0x06000402 RID: 1026 RVA: 0x0000C21C File Offset: 0x0000A41C
|
||||
public DefaultValueAttribute(double value)
|
||||
{
|
||||
this.DefaultValue = value;
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.DefaultValueAttribute" /> class using a 16-bit signed integer.</summary>
|
||||
/// <param name="value">A 16-bit signed integer that is the default value. </param>
|
||||
// Token: 0x06000403 RID: 1027 RVA: 0x0000C230 File Offset: 0x0000A430
|
||||
public DefaultValueAttribute(short value)
|
||||
{
|
||||
this.DefaultValue = value;
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.DefaultValueAttribute" /> class using a 32-bit signed integer.</summary>
|
||||
/// <param name="value">A 32-bit signed integer that is the default value. </param>
|
||||
// Token: 0x06000404 RID: 1028 RVA: 0x0000C244 File Offset: 0x0000A444
|
||||
public DefaultValueAttribute(int value)
|
||||
{
|
||||
this.DefaultValue = value;
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.DefaultValueAttribute" /> class using a 64-bit signed integer.</summary>
|
||||
/// <param name="value">A 64-bit signed integer that is the default value. </param>
|
||||
// Token: 0x06000405 RID: 1029 RVA: 0x0000C258 File Offset: 0x0000A458
|
||||
public DefaultValueAttribute(long value)
|
||||
{
|
||||
this.DefaultValue = value;
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.DefaultValueAttribute" /> class.</summary>
|
||||
/// <param name="value">An <see cref="T:System.Object" /> that represents the default value. </param>
|
||||
// Token: 0x06000406 RID: 1030 RVA: 0x0000C26C File Offset: 0x0000A46C
|
||||
public DefaultValueAttribute(object value)
|
||||
{
|
||||
this.DefaultValue = value;
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.DefaultValueAttribute" /> class using a single-precision floating point number.</summary>
|
||||
/// <param name="value">A single-precision floating point number that is the default value. </param>
|
||||
// Token: 0x06000407 RID: 1031 RVA: 0x0000C27C File Offset: 0x0000A47C
|
||||
public DefaultValueAttribute(float value)
|
||||
{
|
||||
this.DefaultValue = value;
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.DefaultValueAttribute" /> class using a <see cref="T:System.String" />.</summary>
|
||||
/// <param name="value">A <see cref="T:System.String" /> that is the default value. </param>
|
||||
// Token: 0x06000408 RID: 1032 RVA: 0x0000C290 File Offset: 0x0000A490
|
||||
public DefaultValueAttribute(string value)
|
||||
{
|
||||
this.DefaultValue = value;
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.DefaultValueAttribute" /> class, converting the specified value to the specified type, and using an invariant culture as the translation context.</summary>
|
||||
/// <param name="type">A <see cref="T:System.Type" /> that represents the type to convert the value to. </param>
|
||||
/// <param name="value">A <see cref="T:System.String" /> that can be converted to the type using the <see cref="T:System.ComponentModel.TypeConverter" /> for the type and the U.S. English culture. </param>
|
||||
// Token: 0x06000409 RID: 1033 RVA: 0x0000C2A0 File Offset: 0x0000A4A0
|
||||
public DefaultValueAttribute(Type type, string value)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (type.IsEnum)
|
||||
{
|
||||
this.DefaultValue = Enum.Parse(type, value);
|
||||
}
|
||||
else if (type == typeof(TimeSpan))
|
||||
{
|
||||
this.DefaultValue = TimeSpan.Parse(value);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.DefaultValue = Convert.ChangeType(value, type, null);
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets the default value of the property this attribute is bound to.</summary>
|
||||
/// <returns>An <see cref="T:System.Object" /> that represents the default value of the property this attribute is bound to.</returns>
|
||||
// Token: 0x17000112 RID: 274
|
||||
// (get) Token: 0x0600040A RID: 1034 RVA: 0x0000C32C File Offset: 0x0000A52C
|
||||
public virtual object Value
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.DefaultValue;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Sets the default value for the property to which this attribute is bound.</summary>
|
||||
/// <param name="value">The default value.</param>
|
||||
// Token: 0x0600040B RID: 1035 RVA: 0x0000C334 File Offset: 0x0000A534
|
||||
protected void SetValue(object value)
|
||||
{
|
||||
this.DefaultValue = value;
|
||||
}
|
||||
|
||||
/// <summary>Returns whether the value of the given object is equal to the current <see cref="T:System.ComponentModel.DefaultValueAttribute" />.</summary>
|
||||
/// <returns>true if the value of the given object is equal to that of the current; otherwise, false.</returns>
|
||||
/// <param name="obj">The object to test the value equality of. </param>
|
||||
// Token: 0x0600040C RID: 1036 RVA: 0x0000C340 File Offset: 0x0000A540
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
DefaultValueAttribute defaultValueAttribute = obj as DefaultValueAttribute;
|
||||
if (defaultValueAttribute == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (this.DefaultValue == null)
|
||||
{
|
||||
return defaultValueAttribute.Value == null;
|
||||
}
|
||||
return this.DefaultValue.Equals(defaultValueAttribute.Value);
|
||||
}
|
||||
|
||||
// Token: 0x0600040D RID: 1037 RVA: 0x0000C384 File Offset: 0x0000A584
|
||||
public override int GetHashCode()
|
||||
{
|
||||
if (this.DefaultValue == null)
|
||||
{
|
||||
return base.GetHashCode();
|
||||
}
|
||||
return this.DefaultValue.GetHashCode();
|
||||
}
|
||||
|
||||
// Token: 0x0400014B RID: 331
|
||||
private object DefaultValue;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,84 @@
|
||||
using System;
|
||||
|
||||
namespace System.ComponentModel
|
||||
{
|
||||
/// <summary>Specifies a description for a property or event.</summary>
|
||||
// Token: 0x0200006F RID: 111
|
||||
[AttributeUsage(AttributeTargets.All)]
|
||||
public class DescriptionAttribute : Attribute
|
||||
{
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.DescriptionAttribute" /> class with no parameters.</summary>
|
||||
// Token: 0x0600040E RID: 1038 RVA: 0x0000C3A4 File Offset: 0x0000A5A4
|
||||
public DescriptionAttribute()
|
||||
{
|
||||
this.desc = string.Empty;
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.DescriptionAttribute" /> class with a description.</summary>
|
||||
/// <param name="description">The description text. </param>
|
||||
// Token: 0x0600040F RID: 1039 RVA: 0x0000C3B8 File Offset: 0x0000A5B8
|
||||
public DescriptionAttribute(string name)
|
||||
{
|
||||
this.desc = name;
|
||||
}
|
||||
|
||||
/// <summary>Gets the description stored in this attribute.</summary>
|
||||
/// <returns>The description stored in this attribute.</returns>
|
||||
// Token: 0x17000113 RID: 275
|
||||
// (get) Token: 0x06000411 RID: 1041 RVA: 0x0000C3D4 File Offset: 0x0000A5D4
|
||||
public virtual string Description
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.DescriptionValue;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets or sets the string stored as the description.</summary>
|
||||
/// <returns>The string stored as the description. The default value is an empty string ("").</returns>
|
||||
// Token: 0x17000114 RID: 276
|
||||
// (get) Token: 0x06000412 RID: 1042 RVA: 0x0000C3DC File Offset: 0x0000A5DC
|
||||
// (set) Token: 0x06000413 RID: 1043 RVA: 0x0000C3E4 File Offset: 0x0000A5E4
|
||||
protected string DescriptionValue
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.desc;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.desc = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Returns whether the value of the given object is equal to the current <see cref="T:System.ComponentModel.DescriptionAttribute" />.</summary>
|
||||
/// <returns>true if the value of the given object is equal to that of the current; otherwise, false.</returns>
|
||||
/// <param name="obj">The object to test the value equality of. </param>
|
||||
// Token: 0x06000414 RID: 1044 RVA: 0x0000C3F0 File Offset: 0x0000A5F0
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
return obj is DescriptionAttribute && (obj == this || ((DescriptionAttribute)obj).Description == this.desc);
|
||||
}
|
||||
|
||||
// Token: 0x06000415 RID: 1045 RVA: 0x0000C42C File Offset: 0x0000A62C
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return this.desc.GetHashCode();
|
||||
}
|
||||
|
||||
/// <summary>Returns a value indicating whether this is the default <see cref="T:System.ComponentModel.DescriptionAttribute" /> instance.</summary>
|
||||
/// <returns>true, if this is the default <see cref="T:System.ComponentModel.DescriptionAttribute" /> instance; otherwise, false.</returns>
|
||||
// Token: 0x06000416 RID: 1046 RVA: 0x0000C43C File Offset: 0x0000A63C
|
||||
public override bool IsDefaultAttribute()
|
||||
{
|
||||
return this == DescriptionAttribute.Default;
|
||||
}
|
||||
|
||||
// Token: 0x0400014C RID: 332
|
||||
private string desc;
|
||||
|
||||
/// <summary>Specifies the default value for the <see cref="T:System.ComponentModel.DescriptionAttribute" />, which is an empty string (""). This static field is read-only.</summary>
|
||||
// Token: 0x0400014D RID: 333
|
||||
public static readonly DescriptionAttribute Default = new DescriptionAttribute();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.ComponentModel.Design
|
||||
{
|
||||
/// <summary>Represents a unique command identifier that consists of a numeric command ID and a GUID menu group identifier.</summary>
|
||||
// Token: 0x0200003D RID: 61
|
||||
[ComVisible(true)]
|
||||
public class CommandID
|
||||
{
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.Design.CommandID" /> class using the specified menu group GUID and command ID number.</summary>
|
||||
/// <param name="menuGroup">The GUID of the group that this menu command belongs to. </param>
|
||||
/// <param name="commandID">The numeric identifier of this menu command. </param>
|
||||
// Token: 0x0600029B RID: 667 RVA: 0x00009598 File Offset: 0x00007798
|
||||
public CommandID(Guid menuGroup, int commandID)
|
||||
{
|
||||
this.cID = commandID;
|
||||
this.guid = menuGroup;
|
||||
}
|
||||
|
||||
/// <summary>Gets the GUID of the menu group that the menu command identified by this <see cref="T:System.ComponentModel.Design.CommandID" /> belongs to.</summary>
|
||||
/// <returns>The GUID of the command group for this command.</returns>
|
||||
// Token: 0x170000BC RID: 188
|
||||
// (get) Token: 0x0600029C RID: 668 RVA: 0x000095B0 File Offset: 0x000077B0
|
||||
public virtual Guid Guid
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.guid;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets the numeric command ID.</summary>
|
||||
/// <returns>The command ID number.</returns>
|
||||
// Token: 0x170000BD RID: 189
|
||||
// (get) Token: 0x0600029D RID: 669 RVA: 0x000095B8 File Offset: 0x000077B8
|
||||
public virtual int ID
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.cID;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Determines whether two <see cref="T:System.ComponentModel.Design.CommandID" /> instances are equal.</summary>
|
||||
/// <returns>true if the specified object is equivalent to this one; otherwise, false.</returns>
|
||||
/// <param name="obj">The object to compare. </param>
|
||||
// Token: 0x0600029E RID: 670 RVA: 0x000095C0 File Offset: 0x000077C0
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
return obj is CommandID && (obj == this || (((CommandID)obj).Guid.Equals(this.guid) && ((CommandID)obj).ID.Equals(this.cID)));
|
||||
}
|
||||
|
||||
/// <returns>A hash code for the current <see cref="T:System.Object" />.</returns>
|
||||
// Token: 0x0600029F RID: 671 RVA: 0x00009620 File Offset: 0x00007820
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return this.guid.GetHashCode() ^ this.cID.GetHashCode();
|
||||
}
|
||||
|
||||
/// <summary>Returns a <see cref="T:System.String" /> that represents the current object.</summary>
|
||||
/// <returns>A string that contains the command ID information, both the GUID and integer identifier. </returns>
|
||||
// Token: 0x060002A0 RID: 672 RVA: 0x0000963C File Offset: 0x0000783C
|
||||
public override string ToString()
|
||||
{
|
||||
return this.guid.ToString() + " : " + this.cID.ToString();
|
||||
}
|
||||
|
||||
// Token: 0x040000B8 RID: 184
|
||||
private int cID;
|
||||
|
||||
// Token: 0x040000B9 RID: 185
|
||||
private Guid guid;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,85 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.ComponentModel.Design
|
||||
{
|
||||
/// <summary>Provides data for the <see cref="E:System.ComponentModel.Design.IComponentChangeService.ComponentChanged" /> event. This class cannot be inherited.</summary>
|
||||
// Token: 0x0200003E RID: 62
|
||||
[ComVisible(true)]
|
||||
public sealed class ComponentChangedEventArgs : EventArgs
|
||||
{
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.Design.ComponentChangedEventArgs" /> class.</summary>
|
||||
/// <param name="component">The component that was changed. </param>
|
||||
/// <param name="member">A <see cref="T:System.ComponentModel.MemberDescriptor" /> that represents the member that was changed. </param>
|
||||
/// <param name="oldValue">The old value of the changed member. </param>
|
||||
/// <param name="newValue">The new value of the changed member. </param>
|
||||
// Token: 0x060002A1 RID: 673 RVA: 0x0000966C File Offset: 0x0000786C
|
||||
public ComponentChangedEventArgs(object component, MemberDescriptor member, object oldValue, object newValue)
|
||||
{
|
||||
this.component = component;
|
||||
this.member = member;
|
||||
this.oldValue = oldValue;
|
||||
this.newValue = newValue;
|
||||
}
|
||||
|
||||
/// <summary>Gets the component that was modified.</summary>
|
||||
/// <returns>An <see cref="T:System.Object" /> that represents the component that was modified.</returns>
|
||||
// Token: 0x170000BE RID: 190
|
||||
// (get) Token: 0x060002A2 RID: 674 RVA: 0x00009694 File Offset: 0x00007894
|
||||
public object Component
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.component;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets the member that has been changed.</summary>
|
||||
/// <returns>A <see cref="T:System.ComponentModel.MemberDescriptor" /> that indicates the member that has been changed.</returns>
|
||||
// Token: 0x170000BF RID: 191
|
||||
// (get) Token: 0x060002A3 RID: 675 RVA: 0x0000969C File Offset: 0x0000789C
|
||||
public MemberDescriptor Member
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.member;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets the new value of the changed member.</summary>
|
||||
/// <returns>The new value of the changed member. This property can be null.</returns>
|
||||
// Token: 0x170000C0 RID: 192
|
||||
// (get) Token: 0x060002A4 RID: 676 RVA: 0x000096A4 File Offset: 0x000078A4
|
||||
public object NewValue
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.oldValue;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets the old value of the changed member.</summary>
|
||||
/// <returns>The old value of the changed member. This property can be null.</returns>
|
||||
// Token: 0x170000C1 RID: 193
|
||||
// (get) Token: 0x060002A5 RID: 677 RVA: 0x000096AC File Offset: 0x000078AC
|
||||
public object OldValue
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.newValue;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x040000BA RID: 186
|
||||
private object component;
|
||||
|
||||
// Token: 0x040000BB RID: 187
|
||||
private MemberDescriptor member;
|
||||
|
||||
// Token: 0x040000BC RID: 188
|
||||
private object oldValue;
|
||||
|
||||
// Token: 0x040000BD RID: 189
|
||||
private object newValue;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.ComponentModel.Design
|
||||
{
|
||||
/// <summary>Represents the method that will handle a <see cref="E:System.ComponentModel.Design.IComponentChangeService.ComponentChanged" /> event.</summary>
|
||||
/// <param name="sender">The source of the event. </param>
|
||||
/// <param name="e">A <see cref="T:System.ComponentModel.Design.ComponentChangedEventArgs" /> that contains the event data. </param>
|
||||
// Token: 0x0200031B RID: 795
|
||||
// (Invoke) Token: 0x06001C45 RID: 7237
|
||||
[ComVisible(true)]
|
||||
public delegate void ComponentChangedEventHandler(object sender, ComponentChangedEventArgs e);
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.ComponentModel.Design
|
||||
{
|
||||
/// <summary>Provides data for the <see cref="E:System.ComponentModel.Design.IComponentChangeService.ComponentChanging" /> event. This class cannot be inherited.</summary>
|
||||
// Token: 0x0200003F RID: 63
|
||||
[ComVisible(true)]
|
||||
public sealed class ComponentChangingEventArgs : EventArgs
|
||||
{
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.Design.ComponentChangingEventArgs" /> class.</summary>
|
||||
/// <param name="component">The component that is about to be changed. </param>
|
||||
/// <param name="member">A <see cref="T:System.ComponentModel.MemberDescriptor" /> indicating the member of the component that is about to be changed. </param>
|
||||
// Token: 0x060002A6 RID: 678 RVA: 0x000096B4 File Offset: 0x000078B4
|
||||
public ComponentChangingEventArgs(object component, MemberDescriptor member)
|
||||
{
|
||||
this.component = component;
|
||||
this.member = member;
|
||||
}
|
||||
|
||||
/// <summary>Gets the component that is about to be changed or the component that is the parent container of the member that is about to be changed.</summary>
|
||||
/// <returns>The component that is about to have a member changed.</returns>
|
||||
// Token: 0x170000C2 RID: 194
|
||||
// (get) Token: 0x060002A7 RID: 679 RVA: 0x000096CC File Offset: 0x000078CC
|
||||
public object Component
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.component;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets the member that is about to be changed.</summary>
|
||||
/// <returns>A <see cref="T:System.ComponentModel.MemberDescriptor" /> indicating the member that is about to be changed, if known, or null otherwise.</returns>
|
||||
// Token: 0x170000C3 RID: 195
|
||||
// (get) Token: 0x060002A8 RID: 680 RVA: 0x000096D4 File Offset: 0x000078D4
|
||||
public MemberDescriptor Member
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.member;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x040000BE RID: 190
|
||||
private object component;
|
||||
|
||||
// Token: 0x040000BF RID: 191
|
||||
private MemberDescriptor member;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.ComponentModel.Design
|
||||
{
|
||||
/// <summary>Represents the method that will handle a <see cref="E:System.ComponentModel.Design.IComponentChangeService.ComponentChanging" /> event.</summary>
|
||||
/// <param name="sender">The source of the event. </param>
|
||||
/// <param name="e">A <see cref="T:System.ComponentModel.Design.ComponentChangingEventArgs" /> event that contains the event data. </param>
|
||||
// Token: 0x0200031C RID: 796
|
||||
// (Invoke) Token: 0x06001C49 RID: 7241
|
||||
[ComVisible(true)]
|
||||
public delegate void ComponentChangingEventHandler(object sender, ComponentChangingEventArgs e);
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.ComponentModel.Design
|
||||
{
|
||||
/// <summary>Provides data for the <see cref="E:System.ComponentModel.Design.IComponentChangeService.ComponentAdded" />, <see cref="E:System.ComponentModel.Design.IComponentChangeService.ComponentAdding" />, <see cref="E:System.ComponentModel.Design.IComponentChangeService.ComponentRemoved" />, and <see cref="E:System.ComponentModel.Design.IComponentChangeService.ComponentRemoving" /> events.</summary>
|
||||
// Token: 0x02000040 RID: 64
|
||||
[ComVisible(true)]
|
||||
public class ComponentEventArgs : EventArgs
|
||||
{
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.Design.ComponentEventArgs" /> class.</summary>
|
||||
/// <param name="component">The component that is the source of the event. </param>
|
||||
// Token: 0x060002A9 RID: 681 RVA: 0x000096DC File Offset: 0x000078DC
|
||||
public ComponentEventArgs(IComponent component)
|
||||
{
|
||||
this.icomp = component;
|
||||
}
|
||||
|
||||
/// <summary>Gets the component associated with the event.</summary>
|
||||
/// <returns>The component associated with the event.</returns>
|
||||
// Token: 0x170000C4 RID: 196
|
||||
// (get) Token: 0x060002AA RID: 682 RVA: 0x000096EC File Offset: 0x000078EC
|
||||
public virtual IComponent Component
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.icomp;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x040000C0 RID: 192
|
||||
private IComponent icomp;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.ComponentModel.Design
|
||||
{
|
||||
/// <summary>Represents the method that will handle the <see cref="E:System.ComponentModel.Design.IComponentChangeService.ComponentAdding" />, <see cref="E:System.ComponentModel.Design.IComponentChangeService.ComponentAdded" />, <see cref="E:System.ComponentModel.Design.IComponentChangeService.ComponentRemoving" />, and <see cref="E:System.ComponentModel.Design.IComponentChangeService.ComponentRemoved" /> events raised for component-level events.</summary>
|
||||
/// <param name="sender">The source of the event. </param>
|
||||
/// <param name="e">A <see cref="T:System.ComponentModel.Design.ComponentEventArgs" /> that contains the event data. </param>
|
||||
// Token: 0x0200031D RID: 797
|
||||
// (Invoke) Token: 0x06001C4D RID: 7245
|
||||
[ComVisible(true)]
|
||||
public delegate void ComponentEventHandler(object sender, ComponentEventArgs e);
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.ComponentModel.Design
|
||||
{
|
||||
/// <summary>Provides data for the <see cref="E:System.ComponentModel.Design.IComponentChangeService.ComponentRename" /> event.</summary>
|
||||
// Token: 0x02000041 RID: 65
|
||||
[ComVisible(true)]
|
||||
public class ComponentRenameEventArgs : EventArgs
|
||||
{
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.Design.ComponentRenameEventArgs" /> class.</summary>
|
||||
/// <param name="component">The component to be renamed. </param>
|
||||
/// <param name="oldName">The old name of the component. </param>
|
||||
/// <param name="newName">The new name of the component. </param>
|
||||
// Token: 0x060002AB RID: 683 RVA: 0x000096F4 File Offset: 0x000078F4
|
||||
public ComponentRenameEventArgs(object component, string oldName, string newName)
|
||||
{
|
||||
this.component = component;
|
||||
this.oldName = oldName;
|
||||
this.newName = newName;
|
||||
}
|
||||
|
||||
/// <summary>Gets the component that is being renamed.</summary>
|
||||
/// <returns>The component that is being renamed.</returns>
|
||||
// Token: 0x170000C5 RID: 197
|
||||
// (get) Token: 0x060002AC RID: 684 RVA: 0x00009714 File Offset: 0x00007914
|
||||
public object Component
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.component;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets the name of the component after the rename event.</summary>
|
||||
/// <returns>The name of the component after the rename event.</returns>
|
||||
// Token: 0x170000C6 RID: 198
|
||||
// (get) Token: 0x060002AD RID: 685 RVA: 0x0000971C File Offset: 0x0000791C
|
||||
public virtual string NewName
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.newName;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets the name of the component before the rename event.</summary>
|
||||
/// <returns>The previous name of the component.</returns>
|
||||
// Token: 0x170000C7 RID: 199
|
||||
// (get) Token: 0x060002AE RID: 686 RVA: 0x00009724 File Offset: 0x00007924
|
||||
public virtual string OldName
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.oldName;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x040000C1 RID: 193
|
||||
private object component;
|
||||
|
||||
// Token: 0x040000C2 RID: 194
|
||||
private string oldName;
|
||||
|
||||
// Token: 0x040000C3 RID: 195
|
||||
private string newName;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.ComponentModel.Design
|
||||
{
|
||||
/// <summary>Represents the method that will handle a <see cref="E:System.ComponentModel.Design.IComponentChangeService.ComponentRename" /> event.</summary>
|
||||
/// <param name="sender">The source of the event. </param>
|
||||
/// <param name="e">A <see cref="T:System.ComponentModel.Design.ComponentRenameEventArgs" /> that contains the event data. </param>
|
||||
// Token: 0x0200031E RID: 798
|
||||
// (Invoke) Token: 0x06001C51 RID: 7249
|
||||
[ComVisible(true)]
|
||||
public delegate void ComponentRenameEventHandler(object sender, ComponentRenameEventArgs e);
|
||||
}
|
||||
@@ -0,0 +1,127 @@
|
||||
using System;
|
||||
|
||||
namespace System.ComponentModel.Design
|
||||
{
|
||||
/// <summary>Provides a way to group a series of design-time actions to improve performance and enable most types of changes to be undone.</summary>
|
||||
// Token: 0x02000042 RID: 66
|
||||
public abstract class DesignerTransaction : IDisposable
|
||||
{
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.Design.DesignerTransaction" /> class with no description.</summary>
|
||||
// Token: 0x060002AF RID: 687 RVA: 0x0000972C File Offset: 0x0000792C
|
||||
protected DesignerTransaction()
|
||||
: this(string.Empty)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.Design.DesignerTransaction" /> class using the specified transaction description.</summary>
|
||||
/// <param name="description">A description for this transaction. </param>
|
||||
// Token: 0x060002B0 RID: 688 RVA: 0x0000973C File Offset: 0x0000793C
|
||||
protected DesignerTransaction(string description)
|
||||
{
|
||||
this.description = description;
|
||||
this.committed = false;
|
||||
this.canceled = false;
|
||||
}
|
||||
|
||||
/// <summary>Releases all resources used by the <see cref="T:System.ComponentModel.Design.DesignerTransaction" />. </summary>
|
||||
// Token: 0x060002B1 RID: 689 RVA: 0x0000975C File Offset: 0x0000795C
|
||||
void IDisposable.Dispose()
|
||||
{
|
||||
this.Dispose(true);
|
||||
}
|
||||
|
||||
/// <summary>Releases the unmanaged resources used by the <see cref="T:System.ComponentModel.Design.DesignerTransaction" /> and optionally releases the managed resources.</summary>
|
||||
/// <param name="disposing">true to release both managed and unmanaged resources; false to release only unmanaged resources. </param>
|
||||
// Token: 0x060002B2 RID: 690 RVA: 0x00009768 File Offset: 0x00007968
|
||||
protected virtual void Dispose(bool disposing)
|
||||
{
|
||||
this.Cancel();
|
||||
if (disposing)
|
||||
{
|
||||
GC.SuppressFinalize(true);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Raises the Cancel event.</summary>
|
||||
// Token: 0x060002B3 RID: 691
|
||||
protected abstract void OnCancel();
|
||||
|
||||
/// <summary>Performs the actual work of committing a transaction.</summary>
|
||||
// Token: 0x060002B4 RID: 692
|
||||
protected abstract void OnCommit();
|
||||
|
||||
/// <summary>Cancels the transaction and attempts to roll back the changes made by the events of the transaction.</summary>
|
||||
// Token: 0x060002B5 RID: 693 RVA: 0x00009784 File Offset: 0x00007984
|
||||
public void Cancel()
|
||||
{
|
||||
if (!this.Canceled && !this.Committed)
|
||||
{
|
||||
this.canceled = true;
|
||||
this.OnCancel();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Commits this transaction.</summary>
|
||||
// Token: 0x060002B6 RID: 694 RVA: 0x000097AC File Offset: 0x000079AC
|
||||
public void Commit()
|
||||
{
|
||||
if (!this.Canceled && !this.Committed)
|
||||
{
|
||||
this.committed = true;
|
||||
this.OnCommit();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a value indicating whether the transaction was canceled.</summary>
|
||||
/// <returns>true if the transaction was canceled; otherwise, false.</returns>
|
||||
// Token: 0x170000C8 RID: 200
|
||||
// (get) Token: 0x060002B7 RID: 695 RVA: 0x000097D4 File Offset: 0x000079D4
|
||||
public bool Canceled
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.canceled;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a value indicating whether the transaction was committed.</summary>
|
||||
/// <returns>true if the transaction was committed; otherwise, false.</returns>
|
||||
// Token: 0x170000C9 RID: 201
|
||||
// (get) Token: 0x060002B8 RID: 696 RVA: 0x000097DC File Offset: 0x000079DC
|
||||
public bool Committed
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.committed;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a description for the transaction.</summary>
|
||||
/// <returns>A description for the transaction.</returns>
|
||||
// Token: 0x170000CA RID: 202
|
||||
// (get) Token: 0x060002B9 RID: 697 RVA: 0x000097E4 File Offset: 0x000079E4
|
||||
public string Description
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.description;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Releases the resources associated with this object. This override commits this transaction if it was not already committed.</summary>
|
||||
// Token: 0x060002BA RID: 698 RVA: 0x000097EC File Offset: 0x000079EC
|
||||
~DesignerTransaction()
|
||||
{
|
||||
this.Dispose(false);
|
||||
}
|
||||
|
||||
// Token: 0x040000C4 RID: 196
|
||||
private string description;
|
||||
|
||||
// Token: 0x040000C5 RID: 197
|
||||
private bool committed;
|
||||
|
||||
// Token: 0x040000C6 RID: 198
|
||||
private bool canceled;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.ComponentModel.Design
|
||||
{
|
||||
/// <summary>Provides data for the <see cref="E:System.ComponentModel.Design.IDesignerHost.TransactionClosed" /> and <see cref="E:System.ComponentModel.Design.IDesignerHost.TransactionClosing" /> events.</summary>
|
||||
// Token: 0x02000043 RID: 67
|
||||
[ComVisible(true)]
|
||||
public class DesignerTransactionCloseEventArgs : EventArgs
|
||||
{
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.Design.DesignerTransactionCloseEventArgs" /> class. </summary>
|
||||
/// <param name="commit">A value indicating whether the transaction was committed.</param>
|
||||
/// <param name="lastTransaction">true if this is the last transaction to close; otherwise, false.</param>
|
||||
// Token: 0x060002BB RID: 699 RVA: 0x00009828 File Offset: 0x00007A28
|
||||
public DesignerTransactionCloseEventArgs(bool commit, bool lastTransaction)
|
||||
{
|
||||
this.commit = commit;
|
||||
this.last_transaction = lastTransaction;
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.Design.DesignerTransactionCloseEventArgs" /> class, using the specified value that indicates whether the designer called <see cref="M:System.ComponentModel.Design.DesignerTransaction.Commit" /> on the transaction.</summary>
|
||||
/// <param name="commit">A value indicating whether the transaction was committed.</param>
|
||||
// Token: 0x060002BC RID: 700 RVA: 0x00009840 File Offset: 0x00007A40
|
||||
[Obsolete("Use another constructor that indicates lastTransaction")]
|
||||
public DesignerTransactionCloseEventArgs(bool commit)
|
||||
{
|
||||
this.commit = commit;
|
||||
}
|
||||
|
||||
/// <summary>Gets a value indicating whether this is the last transaction to close.</summary>
|
||||
/// <returns>true, if this is the last transaction to close; otherwise, false. </returns>
|
||||
// Token: 0x170000CB RID: 203
|
||||
// (get) Token: 0x060002BD RID: 701 RVA: 0x00009850 File Offset: 0x00007A50
|
||||
public bool LastTransaction
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.last_transaction;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Indicates whether the designer called <see cref="M:System.ComponentModel.Design.DesignerTransaction.Commit" /> on the transaction.</summary>
|
||||
/// <returns>true if the designer called <see cref="M:System.ComponentModel.Design.DesignerTransaction.Commit" /> on the transaction; otherwise, false.</returns>
|
||||
// Token: 0x170000CC RID: 204
|
||||
// (get) Token: 0x060002BE RID: 702 RVA: 0x00009858 File Offset: 0x00007A58
|
||||
public bool TransactionCommitted
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.commit;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x040000C7 RID: 199
|
||||
private bool commit;
|
||||
|
||||
// Token: 0x040000C8 RID: 200
|
||||
private bool last_transaction;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.ComponentModel.Design
|
||||
{
|
||||
/// <summary>Represents the method that handles the <see cref="E:System.ComponentModel.Design.IDesignerHost.TransactionClosed" /> and <see cref="E:System.ComponentModel.Design.IDesignerHost.TransactionClosing" /> events of a designer.</summary>
|
||||
/// <param name="sender">The source of the event. </param>
|
||||
/// <param name="e">A <see cref="T:System.ComponentModel.Design.DesignerTransactionCloseEventArgs" /> that contains the event data. </param>
|
||||
// Token: 0x0200031F RID: 799
|
||||
// (Invoke) Token: 0x06001C55 RID: 7253
|
||||
[ComVisible(true)]
|
||||
public delegate void DesignerTransactionCloseEventHandler(object sender, DesignerTransactionCloseEventArgs e);
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.ComponentModel.Design
|
||||
{
|
||||
/// <summary>Represents a verb that can be invoked from a designer.</summary>
|
||||
// Token: 0x02000044 RID: 68
|
||||
[ComVisible(true)]
|
||||
public class DesignerVerb : MenuCommand
|
||||
{
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.Design.DesignerVerb" /> class.</summary>
|
||||
/// <param name="text">The text of the menu command that is shown to the user. </param>
|
||||
/// <param name="handler">The event handler that performs the actions of the verb. </param>
|
||||
// Token: 0x060002BF RID: 703 RVA: 0x00009860 File Offset: 0x00007A60
|
||||
public DesignerVerb(string text, EventHandler handler)
|
||||
: this(text, handler, StandardCommands.VerbFirst)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.Design.DesignerVerb" /> class.</summary>
|
||||
/// <param name="text">The text of the menu command that is shown to the user. </param>
|
||||
/// <param name="handler">The event handler that performs the actions of the verb. </param>
|
||||
/// <param name="startCommandID">The starting command ID for this verb. By default, the designer architecture sets aside a range of command IDs for verbs. You can override this by providing a custom command ID. </param>
|
||||
// Token: 0x060002C0 RID: 704 RVA: 0x00009870 File Offset: 0x00007A70
|
||||
public DesignerVerb(string text, EventHandler handler, CommandID startCommandID)
|
||||
: base(handler, startCommandID)
|
||||
{
|
||||
this.text = text;
|
||||
}
|
||||
|
||||
/// <summary>Gets the text description for the verb command on the menu.</summary>
|
||||
/// <returns>A description for the verb command.</returns>
|
||||
// Token: 0x170000CD RID: 205
|
||||
// (get) Token: 0x060002C1 RID: 705 RVA: 0x00009884 File Offset: 0x00007A84
|
||||
public string Text
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.text;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets or sets the description of the menu item for the verb.</summary>
|
||||
/// <returns>A string describing the menu item. </returns>
|
||||
// Token: 0x170000CE RID: 206
|
||||
// (get) Token: 0x060002C2 RID: 706 RVA: 0x0000988C File Offset: 0x00007A8C
|
||||
// (set) Token: 0x060002C3 RID: 707 RVA: 0x00009894 File Offset: 0x00007A94
|
||||
public string Description
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.description;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.description = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Overrides <see cref="M:System.Object.ToString" />.</summary>
|
||||
/// <returns>The verb's text, or an empty string ("") if the text field is empty.</returns>
|
||||
// Token: 0x060002C4 RID: 708 RVA: 0x000098A0 File Offset: 0x00007AA0
|
||||
public override string ToString()
|
||||
{
|
||||
return this.text + " : " + base.ToString();
|
||||
}
|
||||
|
||||
// Token: 0x040000C9 RID: 201
|
||||
private string text;
|
||||
|
||||
// Token: 0x040000CA RID: 202
|
||||
private string description;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,155 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.ComponentModel.Design
|
||||
{
|
||||
/// <summary>Represents a collection of <see cref="T:System.ComponentModel.Design.DesignerVerb" /> objects.</summary>
|
||||
// Token: 0x02000045 RID: 69
|
||||
[ComVisible(true)]
|
||||
public class DesignerVerbCollection : CollectionBase
|
||||
{
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.Design.DesignerVerbCollection" /> class.</summary>
|
||||
// Token: 0x060002C5 RID: 709 RVA: 0x000098B8 File Offset: 0x00007AB8
|
||||
public DesignerVerbCollection()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.Design.DesignerVerbCollection" /> class using the specified array of <see cref="T:System.ComponentModel.Design.DesignerVerb" /> objects.</summary>
|
||||
/// <param name="value">A <see cref="T:System.ComponentModel.Design.DesignerVerb" /> array that indicates the verbs to contain within the collection. </param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="value" /> is null.</exception>
|
||||
// Token: 0x060002C6 RID: 710 RVA: 0x000098C0 File Offset: 0x00007AC0
|
||||
public DesignerVerbCollection(DesignerVerb[] value)
|
||||
{
|
||||
base.InnerList.AddRange(value);
|
||||
}
|
||||
|
||||
/// <summary>Gets or sets the <see cref="T:System.ComponentModel.Design.DesignerVerb" /> at the specified index.</summary>
|
||||
/// <returns>A <see cref="T:System.ComponentModel.Design.DesignerVerb" /> at each valid index in the collection.</returns>
|
||||
/// <param name="index">The index at which to get or set the <see cref="T:System.ComponentModel.Design.DesignerVerb" />. </param>
|
||||
// Token: 0x170000CF RID: 207
|
||||
public DesignerVerb this[int index]
|
||||
{
|
||||
get
|
||||
{
|
||||
return (DesignerVerb)base.InnerList[index];
|
||||
}
|
||||
set
|
||||
{
|
||||
base.InnerList[index] = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Adds the specified <see cref="T:System.ComponentModel.Design.DesignerVerb" /> to the collection.</summary>
|
||||
/// <returns>The index in the collection at which the verb was added.</returns>
|
||||
/// <param name="value">The <see cref="T:System.ComponentModel.Design.DesignerVerb" /> to add to the collection. </param>
|
||||
// Token: 0x060002C9 RID: 713 RVA: 0x000098F8 File Offset: 0x00007AF8
|
||||
public int Add(DesignerVerb value)
|
||||
{
|
||||
return base.InnerList.Add(value);
|
||||
}
|
||||
|
||||
/// <summary>Adds the specified set of designer verbs to the collection.</summary>
|
||||
/// <param name="value">An array of <see cref="T:System.ComponentModel.Design.DesignerVerb" /> objects to add to the collection. </param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="value" /> is null.</exception>
|
||||
// Token: 0x060002CA RID: 714 RVA: 0x00009908 File Offset: 0x00007B08
|
||||
public void AddRange(DesignerVerb[] value)
|
||||
{
|
||||
base.InnerList.AddRange(value);
|
||||
}
|
||||
|
||||
/// <summary>Adds the specified collection of designer verbs to the collection.</summary>
|
||||
/// <param name="value">A <see cref="T:System.ComponentModel.Design.DesignerVerbCollection" /> to add to the collection. </param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="value" /> is null.</exception>
|
||||
// Token: 0x060002CB RID: 715 RVA: 0x00009918 File Offset: 0x00007B18
|
||||
public void AddRange(DesignerVerbCollection value)
|
||||
{
|
||||
base.InnerList.AddRange(value);
|
||||
}
|
||||
|
||||
/// <summary>Gets a value indicating whether the specified <see cref="T:System.ComponentModel.Design.DesignerVerb" /> exists in the collection.</summary>
|
||||
/// <returns>true if the specified object exists in the collection; otherwise, false.</returns>
|
||||
/// <param name="value">The <see cref="T:System.ComponentModel.Design.DesignerVerb" /> to search for in the collection. </param>
|
||||
// Token: 0x060002CC RID: 716 RVA: 0x00009928 File Offset: 0x00007B28
|
||||
public bool Contains(DesignerVerb value)
|
||||
{
|
||||
return base.InnerList.Contains(value);
|
||||
}
|
||||
|
||||
/// <summary>Copies the collection members to the specified <see cref="T:System.ComponentModel.Design.DesignerVerb" /> array beginning at the specified destination index.</summary>
|
||||
/// <param name="array">The array to copy collection members to. </param>
|
||||
/// <param name="index">The destination index to begin copying to. </param>
|
||||
// Token: 0x060002CD RID: 717 RVA: 0x00009938 File Offset: 0x00007B38
|
||||
public void CopyTo(DesignerVerb[] array, int index)
|
||||
{
|
||||
base.InnerList.CopyTo(array, index);
|
||||
}
|
||||
|
||||
/// <summary>Gets the index of the specified <see cref="T:System.ComponentModel.Design.DesignerVerb" />.</summary>
|
||||
/// <returns>The index of the specified object if it is found in the list; otherwise, -1.</returns>
|
||||
/// <param name="value">The <see cref="T:System.ComponentModel.Design.DesignerVerb" /> whose index to get in the collection. </param>
|
||||
// Token: 0x060002CE RID: 718 RVA: 0x00009948 File Offset: 0x00007B48
|
||||
public int IndexOf(DesignerVerb value)
|
||||
{
|
||||
return base.InnerList.IndexOf(value);
|
||||
}
|
||||
|
||||
/// <summary>Inserts the specified <see cref="T:System.ComponentModel.Design.DesignerVerb" /> at the specified index.</summary>
|
||||
/// <param name="index">The index in the collection at which to insert the verb. </param>
|
||||
/// <param name="value">The <see cref="T:System.ComponentModel.Design.DesignerVerb" /> to insert in the collection. </param>
|
||||
// Token: 0x060002CF RID: 719 RVA: 0x00009958 File Offset: 0x00007B58
|
||||
public void Insert(int index, DesignerVerb value)
|
||||
{
|
||||
base.InnerList.Insert(index, value);
|
||||
}
|
||||
|
||||
/// <summary>Raises the Clear event.</summary>
|
||||
// Token: 0x060002D0 RID: 720 RVA: 0x00009968 File Offset: 0x00007B68
|
||||
protected override void OnClear()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Raises the Insert event.</summary>
|
||||
/// <param name="index">The index at which to insert an item. </param>
|
||||
/// <param name="value">The object to insert. </param>
|
||||
// Token: 0x060002D1 RID: 721 RVA: 0x0000996C File Offset: 0x00007B6C
|
||||
protected override void OnInsert(int index, object value)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Raises the Remove event.</summary>
|
||||
/// <param name="index">The index at which to remove the item. </param>
|
||||
/// <param name="value">The object to remove. </param>
|
||||
// Token: 0x060002D2 RID: 722 RVA: 0x00009970 File Offset: 0x00007B70
|
||||
protected override void OnRemove(int index, object value)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Raises the Set event.</summary>
|
||||
/// <param name="index">The index at which to set the item. </param>
|
||||
/// <param name="oldValue">The old object. </param>
|
||||
/// <param name="newValue">The new object. </param>
|
||||
// Token: 0x060002D3 RID: 723 RVA: 0x00009974 File Offset: 0x00007B74
|
||||
protected override void OnSet(int index, object oldValue, object newValue)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Raises the Validate event.</summary>
|
||||
/// <param name="value">The object to validate. </param>
|
||||
// Token: 0x060002D4 RID: 724 RVA: 0x00009978 File Offset: 0x00007B78
|
||||
protected override void OnValidate(object value)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Removes the specified <see cref="T:System.ComponentModel.Design.DesignerVerb" /> from the collection.</summary>
|
||||
/// <param name="value">The <see cref="T:System.ComponentModel.Design.DesignerVerb" /> to remove from the collection. </param>
|
||||
// Token: 0x060002D5 RID: 725 RVA: 0x0000997C File Offset: 0x00007B7C
|
||||
public void Remove(DesignerVerb value)
|
||||
{
|
||||
base.InnerList.Remove(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.ComponentModel.Design
|
||||
{
|
||||
/// <summary>Provides an interface to add and remove the event handlers for events that add, change, remove or rename components, and provides methods to raise a <see cref="E:System.ComponentModel.Design.IComponentChangeService.ComponentChanged" /> or <see cref="E:System.ComponentModel.Design.IComponentChangeService.ComponentChanging" /> event.</summary>
|
||||
// Token: 0x02000046 RID: 70
|
||||
[ComVisible(true)]
|
||||
public interface IComponentChangeService
|
||||
{
|
||||
/// <summary>Occurs when a component has been added.</summary>
|
||||
// Token: 0x14000001 RID: 1
|
||||
// (add) Token: 0x060002D6 RID: 726
|
||||
// (remove) Token: 0x060002D7 RID: 727
|
||||
event ComponentEventHandler ComponentAdded;
|
||||
|
||||
/// <summary>Occurs when a component is in the process of being added.</summary>
|
||||
// Token: 0x14000002 RID: 2
|
||||
// (add) Token: 0x060002D8 RID: 728
|
||||
// (remove) Token: 0x060002D9 RID: 729
|
||||
event ComponentEventHandler ComponentAdding;
|
||||
|
||||
/// <summary>Occurs when a component has been changed.</summary>
|
||||
// Token: 0x14000003 RID: 3
|
||||
// (add) Token: 0x060002DA RID: 730
|
||||
// (remove) Token: 0x060002DB RID: 731
|
||||
event ComponentChangedEventHandler ComponentChanged;
|
||||
|
||||
/// <summary>Occurs when a component is in the process of being changed.</summary>
|
||||
// Token: 0x14000004 RID: 4
|
||||
// (add) Token: 0x060002DC RID: 732
|
||||
// (remove) Token: 0x060002DD RID: 733
|
||||
event ComponentChangingEventHandler ComponentChanging;
|
||||
|
||||
/// <summary>Occurs when a component has been removed.</summary>
|
||||
// Token: 0x14000005 RID: 5
|
||||
// (add) Token: 0x060002DE RID: 734
|
||||
// (remove) Token: 0x060002DF RID: 735
|
||||
event ComponentEventHandler ComponentRemoved;
|
||||
|
||||
/// <summary>Occurs when a component is in the process of being removed.</summary>
|
||||
// Token: 0x14000006 RID: 6
|
||||
// (add) Token: 0x060002E0 RID: 736
|
||||
// (remove) Token: 0x060002E1 RID: 737
|
||||
event ComponentEventHandler ComponentRemoving;
|
||||
|
||||
/// <summary>Occurs when a component is renamed.</summary>
|
||||
// Token: 0x14000007 RID: 7
|
||||
// (add) Token: 0x060002E2 RID: 738
|
||||
// (remove) Token: 0x060002E3 RID: 739
|
||||
event ComponentRenameEventHandler ComponentRename;
|
||||
|
||||
/// <summary>Announces to the component change service that a particular component has changed.</summary>
|
||||
/// <param name="component">The component that has changed. </param>
|
||||
/// <param name="member">The member that has changed. This is null if this change is not related to a single member. </param>
|
||||
/// <param name="oldValue">The old value of the member. This is valid only if the member is not null. </param>
|
||||
/// <param name="newValue">The new value of the member. This is valid only if the member is not null. </param>
|
||||
// Token: 0x060002E4 RID: 740
|
||||
void OnComponentChanged(object component, MemberDescriptor member, object oldValue, object newValue);
|
||||
|
||||
/// <summary>Announces to the component change service that a particular component is changing.</summary>
|
||||
/// <param name="component">The component that is about to change. </param>
|
||||
/// <param name="member">The member that is changing. This is null if this change is not related to a single member. </param>
|
||||
// Token: 0x060002E5 RID: 741
|
||||
void OnComponentChanging(object component, MemberDescriptor member);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.ComponentModel.Design
|
||||
{
|
||||
/// <summary>Provides the basic framework for building a custom designer.</summary>
|
||||
// Token: 0x02000047 RID: 71
|
||||
[ComVisible(true)]
|
||||
public interface IDesigner : IDisposable
|
||||
{
|
||||
/// <summary>Gets the base component that this designer is designing.</summary>
|
||||
/// <returns>An <see cref="T:System.ComponentModel.IComponent" /> indicating the base component that this designer is designing.</returns>
|
||||
// Token: 0x170000D0 RID: 208
|
||||
// (get) Token: 0x060002E6 RID: 742
|
||||
IComponent Component { get; }
|
||||
|
||||
/// <summary>Gets a collection of the design-time verbs supported by the designer.</summary>
|
||||
/// <returns>A <see cref="T:System.ComponentModel.Design.DesignerVerbCollection" /> that contains the verbs supported by the designer, or null if the component has no verbs.</returns>
|
||||
// Token: 0x170000D1 RID: 209
|
||||
// (get) Token: 0x060002E7 RID: 743
|
||||
DesignerVerbCollection Verbs { get; }
|
||||
|
||||
/// <summary>Performs the default action for this designer.</summary>
|
||||
// Token: 0x060002E8 RID: 744
|
||||
void DoDefaultAction();
|
||||
|
||||
/// <summary>Initializes the designer with the specified component.</summary>
|
||||
/// <param name="component">The component to associate with this designer. </param>
|
||||
// Token: 0x060002E9 RID: 745
|
||||
void Initialize(IComponent component);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,134 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.ComponentModel.Design
|
||||
{
|
||||
/// <summary>Provides an interface for managing designer transactions and components.</summary>
|
||||
// Token: 0x02000048 RID: 72
|
||||
[ComVisible(true)]
|
||||
public interface IDesignerHost : IServiceContainer, IServiceProvider
|
||||
{
|
||||
/// <summary>Occurs when this designer is activated.</summary>
|
||||
// Token: 0x14000008 RID: 8
|
||||
// (add) Token: 0x060002EA RID: 746
|
||||
// (remove) Token: 0x060002EB RID: 747
|
||||
event EventHandler Activated;
|
||||
|
||||
/// <summary>Occurs when this designer is deactivated.</summary>
|
||||
// Token: 0x14000009 RID: 9
|
||||
// (add) Token: 0x060002EC RID: 748
|
||||
// (remove) Token: 0x060002ED RID: 749
|
||||
event EventHandler Deactivated;
|
||||
|
||||
/// <summary>Occurs when this designer completes loading its document.</summary>
|
||||
// Token: 0x1400000A RID: 10
|
||||
// (add) Token: 0x060002EE RID: 750
|
||||
// (remove) Token: 0x060002EF RID: 751
|
||||
event EventHandler LoadComplete;
|
||||
|
||||
/// <summary>Adds an event handler for the <see cref="E:System.ComponentModel.Design.IDesignerHost.TransactionClosed" /> event.</summary>
|
||||
// Token: 0x1400000B RID: 11
|
||||
// (add) Token: 0x060002F0 RID: 752
|
||||
// (remove) Token: 0x060002F1 RID: 753
|
||||
event DesignerTransactionCloseEventHandler TransactionClosed;
|
||||
|
||||
/// <summary>Adds an event handler for the <see cref="E:System.ComponentModel.Design.IDesignerHost.TransactionClosing" /> event.</summary>
|
||||
// Token: 0x1400000C RID: 12
|
||||
// (add) Token: 0x060002F2 RID: 754
|
||||
// (remove) Token: 0x060002F3 RID: 755
|
||||
event DesignerTransactionCloseEventHandler TransactionClosing;
|
||||
|
||||
/// <summary>Adds an event handler for the <see cref="E:System.ComponentModel.Design.IDesignerHost.TransactionOpened" /> event.</summary>
|
||||
// Token: 0x1400000D RID: 13
|
||||
// (add) Token: 0x060002F4 RID: 756
|
||||
// (remove) Token: 0x060002F5 RID: 757
|
||||
event EventHandler TransactionOpened;
|
||||
|
||||
/// <summary>Adds an event handler for the <see cref="E:System.ComponentModel.Design.IDesignerHost.TransactionOpening" /> event.</summary>
|
||||
// Token: 0x1400000E RID: 14
|
||||
// (add) Token: 0x060002F6 RID: 758
|
||||
// (remove) Token: 0x060002F7 RID: 759
|
||||
event EventHandler TransactionOpening;
|
||||
|
||||
/// <summary>Gets the container for this designer host.</summary>
|
||||
/// <returns>The <see cref="T:System.ComponentModel.IContainer" /> for this host.</returns>
|
||||
// Token: 0x170000D2 RID: 210
|
||||
// (get) Token: 0x060002F8 RID: 760
|
||||
IContainer Container { get; }
|
||||
|
||||
/// <summary>Gets a value indicating whether the designer host is currently in a transaction.</summary>
|
||||
/// <returns>true if a transaction is in progress; otherwise, false.</returns>
|
||||
// Token: 0x170000D3 RID: 211
|
||||
// (get) Token: 0x060002F9 RID: 761
|
||||
bool InTransaction { get; }
|
||||
|
||||
/// <summary>Gets a value indicating whether the designer host is currently loading the document.</summary>
|
||||
/// <returns>true if the designer host is currently loading the document; otherwise, false.</returns>
|
||||
// Token: 0x170000D4 RID: 212
|
||||
// (get) Token: 0x060002FA RID: 762
|
||||
bool Loading { get; }
|
||||
|
||||
/// <summary>Gets the instance of the base class used as the root component for the current design.</summary>
|
||||
/// <returns>The instance of the root component class.</returns>
|
||||
// Token: 0x170000D5 RID: 213
|
||||
// (get) Token: 0x060002FB RID: 763
|
||||
IComponent RootComponent { get; }
|
||||
|
||||
/// <summary>Gets the fully qualified name of the class being designed.</summary>
|
||||
/// <returns>The fully qualified name of the base component class.</returns>
|
||||
// Token: 0x170000D6 RID: 214
|
||||
// (get) Token: 0x060002FC RID: 764
|
||||
string RootComponentClassName { get; }
|
||||
|
||||
/// <summary>Gets the description of the current transaction.</summary>
|
||||
/// <returns>A description of the current transaction.</returns>
|
||||
// Token: 0x170000D7 RID: 215
|
||||
// (get) Token: 0x060002FD RID: 765
|
||||
string TransactionDescription { get; }
|
||||
|
||||
/// <summary>Activates the designer that this host is hosting.</summary>
|
||||
// Token: 0x060002FE RID: 766
|
||||
void Activate();
|
||||
|
||||
/// <summary>Creates a component of the specified type and adds it to the design document.</summary>
|
||||
/// <returns>The newly created component.</returns>
|
||||
/// <param name="componentClass">The type of the component to create. </param>
|
||||
// Token: 0x060002FF RID: 767
|
||||
IComponent CreateComponent(Type componentClass);
|
||||
|
||||
/// <summary>Creates a component of the specified type and name, and adds it to the design document.</summary>
|
||||
/// <returns>The newly created component.</returns>
|
||||
/// <param name="componentClass">The type of the component to create. </param>
|
||||
/// <param name="name">The name for the component. </param>
|
||||
// Token: 0x06000300 RID: 768
|
||||
IComponent CreateComponent(Type componentClass, string name);
|
||||
|
||||
/// <summary>Creates a <see cref="T:System.ComponentModel.Design.DesignerTransaction" /> that can encapsulate event sequences to improve performance and enable undo and redo support functionality.</summary>
|
||||
/// <returns>A new instance of <see cref="T:System.ComponentModel.Design.DesignerTransaction" />. When you complete the steps in your transaction, you should call <see cref="M:System.ComponentModel.Design.DesignerTransaction.Commit" /> on this object.</returns>
|
||||
// Token: 0x06000301 RID: 769
|
||||
DesignerTransaction CreateTransaction();
|
||||
|
||||
/// <summary>Creates a <see cref="T:System.ComponentModel.Design.DesignerTransaction" /> that can encapsulate event sequences to improve performance and enable undo and redo support functionality, using the specified transaction description.</summary>
|
||||
/// <returns>A new <see cref="T:System.ComponentModel.Design.DesignerTransaction" />. When you have completed the steps in your transaction, you should call <see cref="M:System.ComponentModel.Design.DesignerTransaction.Commit" /> on this object.</returns>
|
||||
/// <param name="description">A title or description for the newly created transaction. </param>
|
||||
// Token: 0x06000302 RID: 770
|
||||
DesignerTransaction CreateTransaction(string description);
|
||||
|
||||
/// <summary>Destroys the specified component and removes it from the designer container.</summary>
|
||||
/// <param name="component">The component to destroy. </param>
|
||||
// Token: 0x06000303 RID: 771
|
||||
void DestroyComponent(IComponent component);
|
||||
|
||||
/// <summary>Gets the designer instance that contains the specified component.</summary>
|
||||
/// <returns>An <see cref="T:System.ComponentModel.Design.IDesigner" />, or null if there is no designer for the specified component.</returns>
|
||||
/// <param name="component">The <see cref="T:System.ComponentModel.IComponent" /> to retrieve the designer for. </param>
|
||||
// Token: 0x06000304 RID: 772
|
||||
IDesigner GetDesigner(IComponent component);
|
||||
|
||||
/// <summary>Gets an instance of the specified, fully qualified type name.</summary>
|
||||
/// <returns>The type object for the specified type name, or null if the type cannot be found.</returns>
|
||||
/// <param name="typeName">The name of the type to load. </param>
|
||||
// Token: 0x06000305 RID: 773
|
||||
Type GetType(string typeName);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
using System;
|
||||
|
||||
namespace System.ComponentModel.Design
|
||||
{
|
||||
/// <summary>Provides an interface for obtaining references to objects within a project by name or type, obtaining the name of a specified object, and for locating the parent of a specified object within a designer project.</summary>
|
||||
// Token: 0x02000049 RID: 73
|
||||
public interface IReferenceService
|
||||
{
|
||||
/// <summary>Gets the component that contains the specified component.</summary>
|
||||
/// <returns>The base <see cref="T:System.ComponentModel.IComponent" /> that contains the specified object, or null if no parent component exists.</returns>
|
||||
/// <param name="reference">The object to retrieve the parent component for. </param>
|
||||
// Token: 0x06000306 RID: 774
|
||||
IComponent GetComponent(object reference);
|
||||
|
||||
/// <summary>Gets the name of the specified component.</summary>
|
||||
/// <returns>The name of the object referenced, or null if the object reference is not valid.</returns>
|
||||
/// <param name="reference">The object to return the name of. </param>
|
||||
// Token: 0x06000307 RID: 775
|
||||
string GetName(object reference);
|
||||
|
||||
/// <summary>Gets a reference to the component whose name matches the specified name.</summary>
|
||||
/// <returns>An object the specified name refers to, or null if no reference is found.</returns>
|
||||
/// <param name="name">The name of the component to return a reference to. </param>
|
||||
// Token: 0x06000308 RID: 776
|
||||
object GetReference(string name);
|
||||
|
||||
/// <summary>Gets all available references to project components.</summary>
|
||||
/// <returns>An array of all objects with references available to the <see cref="T:System.ComponentModel.Design.IReferenceService" />.</returns>
|
||||
// Token: 0x06000309 RID: 777
|
||||
object[] GetReferences();
|
||||
|
||||
/// <summary>Gets all available references to components of the specified type.</summary>
|
||||
/// <returns>An array of all available objects of the specified type.</returns>
|
||||
/// <param name="baseType">The type of object to return references to instances of. </param>
|
||||
// Token: 0x0600030A RID: 778
|
||||
object[] GetReferences(Type baseType);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.ComponentModel.Design
|
||||
{
|
||||
/// <summary>Provides support for root-level designer view technologies.</summary>
|
||||
// Token: 0x0200004A RID: 74
|
||||
[ComVisible(true)]
|
||||
public interface IRootDesigner : IDisposable, IDesigner
|
||||
{
|
||||
/// <summary>Gets the set of technologies that this designer can support for its display.</summary>
|
||||
/// <returns>An array of supported <see cref="T:System.ComponentModel.Design.ViewTechnology" /> values.</returns>
|
||||
// Token: 0x170000D8 RID: 216
|
||||
// (get) Token: 0x0600030B RID: 779
|
||||
ViewTechnology[] SupportedTechnologies { get; }
|
||||
|
||||
/// <summary>Gets a view object for the specified view technology.</summary>
|
||||
/// <returns>An object that represents the view for this designer.</returns>
|
||||
/// <param name="technology">A <see cref="T:System.ComponentModel.Design.ViewTechnology" /> that indicates a particular view technology.</param>
|
||||
/// <exception cref="T:System.ArgumentException">The specified view technology is not supported or does not exist. </exception>
|
||||
// Token: 0x0600030C RID: 780
|
||||
object GetView(ViewTechnology technology);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.ComponentModel.Design
|
||||
{
|
||||
/// <summary>Provides a container for services.</summary>
|
||||
// Token: 0x0200004B RID: 75
|
||||
[ComVisible(true)]
|
||||
public interface IServiceContainer : IServiceProvider
|
||||
{
|
||||
/// <summary>Adds the specified service to the service container.</summary>
|
||||
/// <param name="serviceType">The type of service to add. </param>
|
||||
/// <param name="serviceInstance">An instance of the service type to add. This object must implement or inherit from the type indicated by the <paramref name="serviceType" /> parameter. </param>
|
||||
// Token: 0x0600030D RID: 781
|
||||
void AddService(Type serviceType, object serviceInstance);
|
||||
|
||||
/// <summary>Adds the specified service to the service container.</summary>
|
||||
/// <param name="serviceType">The type of service to add. </param>
|
||||
/// <param name="callback">A callback object that is used to create the service. This allows a service to be declared as available, but delays the creation of the object until the service is requested. </param>
|
||||
// Token: 0x0600030E RID: 782
|
||||
void AddService(Type serviceType, ServiceCreatorCallback callback);
|
||||
|
||||
/// <summary>Adds the specified service to the service container, and optionally promotes the service to any parent service containers.</summary>
|
||||
/// <param name="serviceType">The type of service to add. </param>
|
||||
/// <param name="serviceInstance">An instance of the service type to add. This object must implement or inherit from the type indicated by the <paramref name="serviceType" /> parameter. </param>
|
||||
/// <param name="promote">true to promote this request to any parent service containers; otherwise, false. </param>
|
||||
// Token: 0x0600030F RID: 783
|
||||
void AddService(Type serviceType, object serviceInstance, bool promote);
|
||||
|
||||
/// <summary>Adds the specified service to the service container, and optionally promotes the service to parent service containers.</summary>
|
||||
/// <param name="serviceType">The type of service to add. </param>
|
||||
/// <param name="callback">A callback object that is used to create the service. This allows a service to be declared as available, but delays the creation of the object until the service is requested. </param>
|
||||
/// <param name="promote">true to promote this request to any parent service containers; otherwise, false. </param>
|
||||
// Token: 0x06000310 RID: 784
|
||||
void AddService(Type serviceType, ServiceCreatorCallback callback, bool promote);
|
||||
|
||||
/// <summary>Removes the specified service type from the service container.</summary>
|
||||
/// <param name="serviceType">The type of service to remove. </param>
|
||||
// Token: 0x06000311 RID: 785
|
||||
void RemoveService(Type serviceType);
|
||||
|
||||
/// <summary>Removes the specified service type from the service container, and optionally promotes the service to parent service containers.</summary>
|
||||
/// <param name="serviceType">The type of service to remove. </param>
|
||||
/// <param name="promote">true to promote this request to any parent service containers; otherwise, false. </param>
|
||||
// Token: 0x06000312 RID: 786
|
||||
void RemoveService(Type serviceType, bool promote);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
|
||||
namespace System.ComponentModel.Design
|
||||
{
|
||||
/// <summary>Provides an interface to modify the set of member descriptors for a component in design mode.</summary>
|
||||
// Token: 0x0200004C RID: 76
|
||||
public interface ITypeDescriptorFilterService
|
||||
{
|
||||
/// <summary>Filters the attributes that a component exposes through a <see cref="T:System.ComponentModel.TypeDescriptor" />.</summary>
|
||||
/// <returns>true if the set of filtered attributes is to be cached; false if the filter service must query again.</returns>
|
||||
/// <param name="component">The component to filter the attributes of. </param>
|
||||
/// <param name="attributes">A dictionary of attributes that can be modified. </param>
|
||||
// Token: 0x06000313 RID: 787
|
||||
bool FilterAttributes(IComponent component, IDictionary attributes);
|
||||
|
||||
/// <summary>Filters the events that a component exposes through a <see cref="T:System.ComponentModel.TypeDescriptor" />.</summary>
|
||||
/// <returns>true if the set of filtered events is to be cached; false if the filter service must query again.</returns>
|
||||
/// <param name="component">The component to filter events for. </param>
|
||||
/// <param name="events">A dictionary of events that can be modified. </param>
|
||||
// Token: 0x06000314 RID: 788
|
||||
bool FilterEvents(IComponent component, IDictionary events);
|
||||
|
||||
/// <summary>Filters the properties that a component exposes through a <see cref="T:System.ComponentModel.TypeDescriptor" />.</summary>
|
||||
/// <returns>true if the set of filtered properties is to be cached; false if the filter service must query again.</returns>
|
||||
/// <param name="component">The component to filter properties for. </param>
|
||||
/// <param name="properties">A dictionary of properties that can be modified. </param>
|
||||
// Token: 0x06000315 RID: 789
|
||||
bool FilterProperties(IComponent component, IDictionary properties);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
using System;
|
||||
using System.Reflection;
|
||||
|
||||
namespace System.ComponentModel.Design
|
||||
{
|
||||
/// <summary>Provides an interface to retrieve an assembly or type by name.</summary>
|
||||
// Token: 0x0200004D RID: 77
|
||||
public interface ITypeResolutionService
|
||||
{
|
||||
/// <summary>Gets the requested assembly.</summary>
|
||||
/// <returns>An instance of the requested assembly, or null if no assembly can be located.</returns>
|
||||
/// <param name="name">The name of the assembly to retrieve. </param>
|
||||
// Token: 0x06000316 RID: 790
|
||||
Assembly GetAssembly(AssemblyName name);
|
||||
|
||||
/// <summary>Gets the requested assembly.</summary>
|
||||
/// <returns>An instance of the requested assembly, or null if no assembly can be located.</returns>
|
||||
/// <param name="name">The name of the assembly to retrieve. </param>
|
||||
/// <param name="throwOnError">true if this method should throw an exception if the assembly cannot be located; otherwise, false, and this method returns null if the assembly cannot be located. </param>
|
||||
// Token: 0x06000317 RID: 791
|
||||
Assembly GetAssembly(AssemblyName name, bool throwOnError);
|
||||
|
||||
/// <summary>Gets the path to the file from which the assembly was loaded.</summary>
|
||||
/// <returns>The path to the file from which the assembly was loaded.</returns>
|
||||
/// <param name="name">The name of the assembly. </param>
|
||||
// Token: 0x06000318 RID: 792
|
||||
string GetPathOfAssembly(AssemblyName name);
|
||||
|
||||
/// <summary>Loads a type with the specified name.</summary>
|
||||
/// <returns>An instance of <see cref="T:System.Type" /> that corresponds to the specified name, or null if no type can be found.</returns>
|
||||
/// <param name="name">The name of the type. If the type name is not a fully qualified name that indicates an assembly, this service will search its internal set of referenced assemblies. </param>
|
||||
// Token: 0x06000319 RID: 793
|
||||
Type GetType(string name);
|
||||
|
||||
/// <summary>Loads a type with the specified name.</summary>
|
||||
/// <returns>An instance of <see cref="T:System.Type" /> that corresponds to the specified name, or null if no type can be found.</returns>
|
||||
/// <param name="name">The name of the type. If the type name is not a fully qualified name that indicates an assembly, this service will search its internal set of referenced assemblies. </param>
|
||||
/// <param name="throwOnError">true if this method should throw an exception if the assembly cannot be located; otherwise, false, and this method returns null if the assembly cannot be located. </param>
|
||||
// Token: 0x0600031A RID: 794
|
||||
Type GetType(string name, bool throwOnError);
|
||||
|
||||
/// <summary>Loads a type with the specified name.</summary>
|
||||
/// <returns>An instance of <see cref="T:System.Type" /> that corresponds to the specified name, or null if no type can be found.</returns>
|
||||
/// <param name="name">The name of the type. If the type name is not a fully qualified name that indicates an assembly, this service will search its internal set of referenced assemblies. </param>
|
||||
/// <param name="throwOnError">true if this method should throw an exception if the assembly cannot be located; otherwise, false, and this method returns null if the assembly cannot be located. </param>
|
||||
/// <param name="ignoreCase">true to ignore case when searching for types; otherwise, false. </param>
|
||||
// Token: 0x0600031B RID: 795
|
||||
Type GetType(string name, bool throwOnError, bool ignoreCase);
|
||||
|
||||
/// <summary>Adds a reference to the specified assembly.</summary>
|
||||
/// <param name="name">An <see cref="T:System.Reflection.AssemblyName" /> that indicates the assembly to reference. </param>
|
||||
// Token: 0x0600031C RID: 796
|
||||
void ReferenceAssembly(AssemblyName name);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,225 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.ComponentModel.Design
|
||||
{
|
||||
/// <summary>Represents a Windows menu or toolbar command item.</summary>
|
||||
// Token: 0x0200004E RID: 78
|
||||
[ComVisible(true)]
|
||||
public class MenuCommand
|
||||
{
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.Design.MenuCommand" /> class.</summary>
|
||||
/// <param name="handler">The event to raise when the user selects the menu item or toolbar button. </param>
|
||||
/// <param name="command">The unique command ID that links this menu command to the environment's menu. </param>
|
||||
// Token: 0x0600031D RID: 797 RVA: 0x0000998C File Offset: 0x00007B8C
|
||||
public MenuCommand(EventHandler handler, CommandID command)
|
||||
{
|
||||
this.handler = handler;
|
||||
this.command = command;
|
||||
}
|
||||
|
||||
/// <summary>Occurs when the menu command changes.</summary>
|
||||
// Token: 0x1400000F RID: 15
|
||||
// (add) Token: 0x0600031E RID: 798 RVA: 0x000099B8 File Offset: 0x00007BB8
|
||||
// (remove) Token: 0x0600031F RID: 799 RVA: 0x000099D4 File Offset: 0x00007BD4
|
||||
public event EventHandler CommandChanged;
|
||||
|
||||
/// <summary>Gets or sets a value indicating whether this menu item is checked.</summary>
|
||||
/// <returns>true if the item is checked; otherwise, false.</returns>
|
||||
// Token: 0x170000D9 RID: 217
|
||||
// (get) Token: 0x06000320 RID: 800 RVA: 0x000099F0 File Offset: 0x00007BF0
|
||||
// (set) Token: 0x06000321 RID: 801 RVA: 0x000099F8 File Offset: 0x00007BF8
|
||||
public virtual bool Checked
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.ischecked;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (this.ischecked != value)
|
||||
{
|
||||
this.ischecked = value;
|
||||
this.OnCommandChanged(EventArgs.Empty);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets the <see cref="T:System.ComponentModel.Design.CommandID" /> associated with this menu command.</summary>
|
||||
/// <returns>The <see cref="T:System.ComponentModel.Design.CommandID" /> associated with the menu command.</returns>
|
||||
// Token: 0x170000DA RID: 218
|
||||
// (get) Token: 0x06000322 RID: 802 RVA: 0x00009A18 File Offset: 0x00007C18
|
||||
public virtual CommandID CommandID
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.command;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a value indicating whether this menu item is available.</summary>
|
||||
/// <returns>true if the item is enabled; otherwise, false.</returns>
|
||||
// Token: 0x170000DB RID: 219
|
||||
// (get) Token: 0x06000323 RID: 803 RVA: 0x00009A20 File Offset: 0x00007C20
|
||||
// (set) Token: 0x06000324 RID: 804 RVA: 0x00009A28 File Offset: 0x00007C28
|
||||
public virtual bool Enabled
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.enabled;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (this.enabled != value)
|
||||
{
|
||||
this.enabled = value;
|
||||
this.OnCommandChanged(EventArgs.Empty);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets the OLE command status code for this menu item.</summary>
|
||||
/// <returns>An integer containing a mixture of status flags that reflect the state of this menu item.</returns>
|
||||
// Token: 0x170000DC RID: 220
|
||||
// (get) Token: 0x06000325 RID: 805 RVA: 0x00009A48 File Offset: 0x00007C48
|
||||
[global::System.MonoTODO]
|
||||
public virtual int OleStatus
|
||||
{
|
||||
get
|
||||
{
|
||||
return 3;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets the public properties associated with the <see cref="T:System.ComponentModel.Design.MenuCommand" />.</summary>
|
||||
/// <returns>An <see cref="T:System.Collections.IDictionary" /> containing the public properties of the <see cref="T:System.ComponentModel.Design.MenuCommand" />. </returns>
|
||||
// Token: 0x170000DD RID: 221
|
||||
// (get) Token: 0x06000326 RID: 806 RVA: 0x00009A4C File Offset: 0x00007C4C
|
||||
public virtual IDictionary Properties
|
||||
{
|
||||
get
|
||||
{
|
||||
if (this.properties == null)
|
||||
{
|
||||
this.properties = new Hashtable();
|
||||
}
|
||||
return this.properties;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets or sets a value indicating whether this menu item is supported.</summary>
|
||||
/// <returns>true if the item is supported, which is the default; otherwise, false.</returns>
|
||||
// Token: 0x170000DE RID: 222
|
||||
// (get) Token: 0x06000327 RID: 807 RVA: 0x00009A6C File Offset: 0x00007C6C
|
||||
// (set) Token: 0x06000328 RID: 808 RVA: 0x00009A74 File Offset: 0x00007C74
|
||||
public virtual bool Supported
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.issupported;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.issupported = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets or sets a value indicating whether this menu item is visible.</summary>
|
||||
/// <returns>true if the item is visible; otherwise, false.</returns>
|
||||
// Token: 0x170000DF RID: 223
|
||||
// (get) Token: 0x06000329 RID: 809 RVA: 0x00009A80 File Offset: 0x00007C80
|
||||
// (set) Token: 0x0600032A RID: 810 RVA: 0x00009A88 File Offset: 0x00007C88
|
||||
public virtual bool Visible
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.visible;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.visible = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Invokes the command.</summary>
|
||||
// Token: 0x0600032B RID: 811 RVA: 0x00009A94 File Offset: 0x00007C94
|
||||
public virtual void Invoke()
|
||||
{
|
||||
if (this.handler != null)
|
||||
{
|
||||
this.handler(this, EventArgs.Empty);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Invokes the command with the given parameter.</summary>
|
||||
/// <param name="arg">An optional argument for use by the command.</param>
|
||||
// Token: 0x0600032C RID: 812 RVA: 0x00009AB4 File Offset: 0x00007CB4
|
||||
public virtual void Invoke(object arg)
|
||||
{
|
||||
this.Invoke();
|
||||
}
|
||||
|
||||
/// <summary>Raises the <see cref="E:System.ComponentModel.Design.MenuCommand.CommandChanged" /> event.</summary>
|
||||
/// <param name="e">An <see cref="T:System.EventArgs" /> that contains the event data. </param>
|
||||
// Token: 0x0600032D RID: 813 RVA: 0x00009ABC File Offset: 0x00007CBC
|
||||
protected virtual void OnCommandChanged(EventArgs e)
|
||||
{
|
||||
if (this.CommandChanged != null)
|
||||
{
|
||||
this.CommandChanged(this, e);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Returns a string representation of this menu command.</summary>
|
||||
/// <returns>A string containing the value of the <see cref="P:System.ComponentModel.Design.MenuCommand.CommandID" /> property appended with the names of any flags that are set, separated by pipe bars (|). These flag properties include <see cref="P:System.ComponentModel.Design.MenuCommand.Checked" />, <see cref="P:System.ComponentModel.Design.MenuCommand.Enabled" />, <see cref="P:System.ComponentModel.Design.MenuCommand.Supported" />, and <see cref="P:System.ComponentModel.Design.MenuCommand.Visible" />.</returns>
|
||||
// Token: 0x0600032E RID: 814 RVA: 0x00009AD8 File Offset: 0x00007CD8
|
||||
public override string ToString()
|
||||
{
|
||||
string text = string.Empty;
|
||||
if (this.command != null)
|
||||
{
|
||||
text = this.command.ToString();
|
||||
}
|
||||
text += " : ";
|
||||
if (this.Supported)
|
||||
{
|
||||
text += "Supported";
|
||||
}
|
||||
if (this.Enabled)
|
||||
{
|
||||
text += "|Enabled";
|
||||
}
|
||||
if (this.Visible)
|
||||
{
|
||||
text += "|Visible";
|
||||
}
|
||||
if (this.Checked)
|
||||
{
|
||||
text += "|Checked";
|
||||
}
|
||||
return text;
|
||||
}
|
||||
|
||||
// Token: 0x040000CB RID: 203
|
||||
private EventHandler handler;
|
||||
|
||||
// Token: 0x040000CC RID: 204
|
||||
private CommandID command;
|
||||
|
||||
// Token: 0x040000CD RID: 205
|
||||
private bool ischecked;
|
||||
|
||||
// Token: 0x040000CE RID: 206
|
||||
private bool enabled = true;
|
||||
|
||||
// Token: 0x040000CF RID: 207
|
||||
private bool issupported = true;
|
||||
|
||||
// Token: 0x040000D0 RID: 208
|
||||
private bool visible = true;
|
||||
|
||||
// Token: 0x040000D1 RID: 209
|
||||
private Hashtable properties;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,115 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
using System.Reflection.Emit;
|
||||
using System.Runtime.Serialization.Formatters.Binary;
|
||||
|
||||
namespace System.ComponentModel.Design
|
||||
{
|
||||
// Token: 0x0200004F RID: 79
|
||||
internal class RuntimeLicenseContext : LicenseContext
|
||||
{
|
||||
// Token: 0x06000330 RID: 816 RVA: 0x00009B74 File Offset: 0x00007D74
|
||||
private void LoadKeys()
|
||||
{
|
||||
if (this.keys != null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
this.keys = new Hashtable();
|
||||
Assembly entryAssembly = Assembly.GetEntryAssembly();
|
||||
if (entryAssembly != null)
|
||||
{
|
||||
this.LoadAssemblyLicenses(this.keys, entryAssembly);
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach (Assembly assembly in AppDomain.CurrentDomain.GetAssemblies())
|
||||
{
|
||||
this.LoadAssemblyLicenses(this.keys, assembly);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000331 RID: 817 RVA: 0x00009BE8 File Offset: 0x00007DE8
|
||||
private void LoadAssemblyLicenses(Hashtable targetkeys, Assembly asm)
|
||||
{
|
||||
if (asm is AssemblyBuilder)
|
||||
{
|
||||
return;
|
||||
}
|
||||
string fileName = Path.GetFileName(asm.Location);
|
||||
string text = fileName + ".licenses";
|
||||
try
|
||||
{
|
||||
foreach (string text2 in asm.GetManifestResourceNames())
|
||||
{
|
||||
if (!(text2 != text))
|
||||
{
|
||||
using (Stream manifestResourceStream = asm.GetManifestResourceStream(text2))
|
||||
{
|
||||
BinaryFormatter binaryFormatter = new BinaryFormatter();
|
||||
object[] array = binaryFormatter.Deserialize(manifestResourceStream) as object[];
|
||||
if (string.Compare((string)array[0], fileName, true) == 0)
|
||||
{
|
||||
Hashtable hashtable = (Hashtable)array[1];
|
||||
foreach (object obj in hashtable)
|
||||
{
|
||||
DictionaryEntry dictionaryEntry = (DictionaryEntry)obj;
|
||||
targetkeys.Add(dictionaryEntry.Key, dictionaryEntry.Value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (InvalidCastException)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000332 RID: 818 RVA: 0x00009D50 File Offset: 0x00007F50
|
||||
public override string GetSavedLicenseKey(Type type, Assembly resourceAssembly)
|
||||
{
|
||||
if (type == null)
|
||||
{
|
||||
throw new ArgumentNullException("type");
|
||||
}
|
||||
if (resourceAssembly != null)
|
||||
{
|
||||
if (this.extraassemblies == null)
|
||||
{
|
||||
this.extraassemblies = new Hashtable();
|
||||
}
|
||||
Hashtable hashtable = this.extraassemblies[resourceAssembly.FullName] as Hashtable;
|
||||
if (hashtable == null)
|
||||
{
|
||||
hashtable = new Hashtable();
|
||||
this.LoadAssemblyLicenses(hashtable, resourceAssembly);
|
||||
this.extraassemblies[resourceAssembly.FullName] = hashtable;
|
||||
}
|
||||
return (string)hashtable[type.AssemblyQualifiedName];
|
||||
}
|
||||
this.LoadKeys();
|
||||
return (string)this.keys[type.AssemblyQualifiedName];
|
||||
}
|
||||
|
||||
// Token: 0x06000333 RID: 819 RVA: 0x00009DF8 File Offset: 0x00007FF8
|
||||
public override void SetSavedLicenseKey(Type type, string key)
|
||||
{
|
||||
if (type == null)
|
||||
{
|
||||
throw new ArgumentNullException("type");
|
||||
}
|
||||
this.LoadKeys();
|
||||
this.keys[type.AssemblyQualifiedName] = key;
|
||||
}
|
||||
|
||||
// Token: 0x040000D3 RID: 211
|
||||
private Hashtable extraassemblies;
|
||||
|
||||
// Token: 0x040000D4 RID: 212
|
||||
private Hashtable keys;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,208 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Reflection;
|
||||
|
||||
namespace System.ComponentModel.Design.Serialization
|
||||
{
|
||||
/// <summary>Provides the information necessary to create an instance of an object. This class cannot be inherited.</summary>
|
||||
// Token: 0x0200003C RID: 60
|
||||
public sealed class InstanceDescriptor
|
||||
{
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.Design.Serialization.InstanceDescriptor" /> class using the specified member information and arguments.</summary>
|
||||
/// <param name="member">The member information for the descriptor. This can be a <see cref="T:System.Reflection.MethodInfo" />, <see cref="T:System.Reflection.ConstructorInfo" />, <see cref="T:System.Reflection.FieldInfo" />, or <see cref="T:System.Reflection.PropertyInfo" />. If this is a <see cref="T:System.Reflection.MethodInfo" />, <see cref="T:System.Reflection.FieldInfo" />, or <see cref="T:System.Reflection.PropertyInfo" />, it must represent a static member. </param>
|
||||
/// <param name="arguments">The collection of arguments to pass to the member. This parameter can be null or an empty collection if there are no arguments. The collection can also consist of other instances of <see cref="T:System.ComponentModel.Design.Serialization.InstanceDescriptor" />. </param>
|
||||
/// <exception cref="T:System.ArgumentException">
|
||||
/// <paramref name="member" /> is of type <see cref="T:System.Reflection.MethodInfo" />, <see cref="T:System.Reflection.FieldInfo" />, or <see cref="T:System.Reflection.PropertyInfo" />, and it does not represent a static member.<paramref name="member" /> is of type <see cref="T:System.Reflection.PropertyInfo" /> and is not readable.<paramref name="member" /> is of type <see cref="T:System.Reflection.MethodInfo" /> or <see cref="T:System.Reflection.ConstructorInfo" />, and the number of arguments in <paramref name="arguments" /> does not match the signature of <paramref name="member." /><paramref name="member" /> is of type <see cref="T:System.Reflection.ConstructorInfo" /> and represents a static member.<paramref name="member" /> is of type <see cref="T:System.Reflection.FieldInfo" />, and the number of arguments in <paramref name="arguments" /> is not zero. </exception>
|
||||
// Token: 0x06000294 RID: 660 RVA: 0x000092DC File Offset: 0x000074DC
|
||||
public InstanceDescriptor(MemberInfo member, ICollection arguments)
|
||||
: this(member, arguments, true)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.Design.Serialization.InstanceDescriptor" /> class using the specified member information, arguments, and value indicating whether the specified information completely describes the instance.</summary>
|
||||
/// <param name="member">The member information for the descriptor. This can be a <see cref="T:System.Reflection.MethodInfo" />, <see cref="T:System.Reflection.ConstructorInfo" />, <see cref="T:System.Reflection.FieldInfo" />, or <see cref="T:System.Reflection.PropertyInfo" />. If this is a <see cref="T:System.Reflection.MethodInfo" />, <see cref="T:System.Reflection.FieldInfo" />, or <see cref="T:System.Reflection.PropertyInfo" />, it must represent a static member. </param>
|
||||
/// <param name="arguments">The collection of arguments to pass to the member. This parameter can be null or an empty collection if there are no arguments. The collection can also consist of other instances of <see cref="T:System.ComponentModel.Design.Serialization.InstanceDescriptor" />. </param>
|
||||
/// <param name="isComplete">true if the specified information completely describes the instance; otherwise, false. </param>
|
||||
/// <exception cref="T:System.ArgumentException">
|
||||
/// <paramref name="member" /> is of type <see cref="T:System.Reflection.MethodInfo" />, <see cref="T:System.Reflection.FieldInfo" />, or <see cref="T:System.Reflection.PropertyInfo" />, and it does not represent a static member<paramref name="member" /> is of type <see cref="T:System.Reflection.PropertyInfo" /> and is not readable.<paramref name="member" /> is of type <see cref="T:System.Reflection.MethodInfo" /> or <see cref="T:System.Reflection.ConstructorInfo" /> and the number of arguments in <paramref name="arguments" /> does not match the signature of <paramref name="member" />.<paramref name="member" /> is of type <see cref="T:System.Reflection.ConstructorInfo" /> and represents a static member<paramref name="member" /> is of type <see cref="T:System.Reflection.FieldInfo" />, and the number of arguments in <paramref name="arguments" /> is not zero.</exception>
|
||||
// Token: 0x06000295 RID: 661 RVA: 0x000092E8 File Offset: 0x000074E8
|
||||
public InstanceDescriptor(MemberInfo member, ICollection arguments, bool isComplete)
|
||||
{
|
||||
this.isComplete = isComplete;
|
||||
this.ValidateMember(member, arguments);
|
||||
this.member = member;
|
||||
this.arguments = arguments;
|
||||
}
|
||||
|
||||
// Token: 0x06000296 RID: 662 RVA: 0x00009310 File Offset: 0x00007510
|
||||
private void ValidateMember(MemberInfo member, ICollection arguments)
|
||||
{
|
||||
if (member == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
MemberTypes memberType = member.MemberType;
|
||||
switch (memberType)
|
||||
{
|
||||
case MemberTypes.Constructor:
|
||||
{
|
||||
ConstructorInfo constructorInfo = (ConstructorInfo)member;
|
||||
if (arguments == null && constructorInfo.GetParameters().Length != 0)
|
||||
{
|
||||
throw new ArgumentException("Invalid number of arguments for this constructor");
|
||||
}
|
||||
if (arguments.Count != constructorInfo.GetParameters().Length)
|
||||
{
|
||||
throw new ArgumentException("Invalid number of arguments for this constructor");
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
if (memberType != MemberTypes.Method)
|
||||
{
|
||||
if (memberType == MemberTypes.Property)
|
||||
{
|
||||
PropertyInfo propertyInfo = (PropertyInfo)member;
|
||||
if (!propertyInfo.CanRead)
|
||||
{
|
||||
throw new ArgumentException("Parameter must be readable");
|
||||
}
|
||||
MethodInfo getMethod = propertyInfo.GetGetMethod();
|
||||
if (!getMethod.IsStatic)
|
||||
{
|
||||
throw new ArgumentException("Parameter must be static");
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
MethodInfo methodInfo = (MethodInfo)member;
|
||||
if (!methodInfo.IsStatic)
|
||||
{
|
||||
throw new ArgumentException("InstanceDescriptor only describes static (VB.Net: shared) members", "member");
|
||||
}
|
||||
if (arguments == null && methodInfo.GetParameters().Length != 0)
|
||||
{
|
||||
throw new ArgumentException("Invalid number of arguments for this method", "arguments");
|
||||
}
|
||||
if (arguments.Count != methodInfo.GetParameters().Length)
|
||||
{
|
||||
throw new ArgumentException("Invalid number of arguments for this method");
|
||||
}
|
||||
}
|
||||
break;
|
||||
case MemberTypes.Field:
|
||||
{
|
||||
FieldInfo fieldInfo = (FieldInfo)member;
|
||||
if (!fieldInfo.IsStatic)
|
||||
{
|
||||
throw new ArgumentException("Parameter must be static");
|
||||
}
|
||||
if (arguments != null && arguments.Count != 0)
|
||||
{
|
||||
throw new ArgumentException("Field members do not take any arguments");
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets the collection of arguments that can be used to reconstruct an instance of the object that this instance descriptor represents.</summary>
|
||||
/// <returns>An <see cref="T:System.Collections.ICollection" /> of arguments that can be used to create the object.</returns>
|
||||
// Token: 0x170000B9 RID: 185
|
||||
// (get) Token: 0x06000297 RID: 663 RVA: 0x0000948C File Offset: 0x0000768C
|
||||
public ICollection Arguments
|
||||
{
|
||||
get
|
||||
{
|
||||
if (this.arguments == null)
|
||||
{
|
||||
return new object[0];
|
||||
}
|
||||
return this.arguments;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a value indicating whether the contents of this <see cref="T:System.ComponentModel.Design.Serialization.InstanceDescriptor" /> completely identify the instance.</summary>
|
||||
/// <returns>true if the instance is completely described; otherwise, false.</returns>
|
||||
// Token: 0x170000BA RID: 186
|
||||
// (get) Token: 0x06000298 RID: 664 RVA: 0x000094A8 File Offset: 0x000076A8
|
||||
public bool IsComplete
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.isComplete;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets the member information that describes the instance this descriptor is associated with.</summary>
|
||||
/// <returns>A <see cref="T:System.Reflection.MemberInfo" /> that describes the instance that this object is associated with.</returns>
|
||||
// Token: 0x170000BB RID: 187
|
||||
// (get) Token: 0x06000299 RID: 665 RVA: 0x000094B0 File Offset: 0x000076B0
|
||||
public MemberInfo MemberInfo
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.member;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Invokes this instance descriptor and returns the object the descriptor describes.</summary>
|
||||
/// <returns>The object this instance descriptor describes.</returns>
|
||||
// Token: 0x0600029A RID: 666 RVA: 0x000094B8 File Offset: 0x000076B8
|
||||
public object Invoke()
|
||||
{
|
||||
if (this.member == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
object[] array;
|
||||
if (this.arguments == null)
|
||||
{
|
||||
array = new object[0];
|
||||
}
|
||||
else
|
||||
{
|
||||
array = new object[this.arguments.Count];
|
||||
this.arguments.CopyTo(array, 0);
|
||||
}
|
||||
MemberTypes memberType = this.member.MemberType;
|
||||
switch (memberType)
|
||||
{
|
||||
case MemberTypes.Constructor:
|
||||
{
|
||||
ConstructorInfo constructorInfo = (ConstructorInfo)this.member;
|
||||
return constructorInfo.Invoke(array);
|
||||
}
|
||||
default:
|
||||
{
|
||||
if (memberType == MemberTypes.Method)
|
||||
{
|
||||
MethodInfo methodInfo = (MethodInfo)this.member;
|
||||
return methodInfo.Invoke(null, array);
|
||||
}
|
||||
if (memberType != MemberTypes.Property)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
PropertyInfo propertyInfo = (PropertyInfo)this.member;
|
||||
return propertyInfo.GetValue(null, array);
|
||||
}
|
||||
case MemberTypes.Field:
|
||||
{
|
||||
FieldInfo fieldInfo = (FieldInfo)this.member;
|
||||
return fieldInfo.GetValue(null);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x040000B5 RID: 181
|
||||
private MemberInfo member;
|
||||
|
||||
// Token: 0x040000B6 RID: 182
|
||||
private ICollection arguments;
|
||||
|
||||
// Token: 0x040000B7 RID: 183
|
||||
private bool isComplete;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.ComponentModel.Design
|
||||
{
|
||||
/// <summary>Provides a callback mechanism that can create an instance of a service on demand.</summary>
|
||||
/// <returns>The service specified by <paramref name="serviceType" />, or null if the service could not be created. </returns>
|
||||
/// <param name="container">The service container that requested the creation of the service. </param>
|
||||
/// <param name="serviceType">The type of service to create. </param>
|
||||
// Token: 0x02000320 RID: 800
|
||||
// (Invoke) Token: 0x06001C59 RID: 7257
|
||||
[ComVisible(true)]
|
||||
public delegate object ServiceCreatorCallback(IServiceContainer container, Type serviceType);
|
||||
}
|
||||
@@ -0,0 +1,291 @@
|
||||
using System;
|
||||
|
||||
namespace System.ComponentModel.Design
|
||||
{
|
||||
/// <summary>Defines identifiers for the standard set of commands that are available to most applications.</summary>
|
||||
// Token: 0x02000050 RID: 80
|
||||
public class StandardCommands
|
||||
{
|
||||
// Token: 0x06000335 RID: 821 RVA: 0x00009E2C File Offset: 0x0000802C
|
||||
static StandardCommands()
|
||||
{
|
||||
Guid guid = new Guid("5efc7975-14bc-11cf-9b2b-00aa00573819");
|
||||
Guid guid2 = new Guid("74d21313-2aee-11d1-8bfb-00a0c90f26f7");
|
||||
StandardCommands.AlignBottom = new CommandID(guid, 1);
|
||||
StandardCommands.AlignHorizontalCenters = new CommandID(guid, 2);
|
||||
StandardCommands.AlignLeft = new CommandID(guid, 3);
|
||||
StandardCommands.AlignRight = new CommandID(guid, 4);
|
||||
StandardCommands.AlignToGrid = new CommandID(guid, 5);
|
||||
StandardCommands.AlignTop = new CommandID(guid, 6);
|
||||
StandardCommands.AlignVerticalCenters = new CommandID(guid, 7);
|
||||
StandardCommands.ArrangeBottom = new CommandID(guid, 8);
|
||||
StandardCommands.ArrangeIcons = new CommandID(guid2, 12298);
|
||||
StandardCommands.ArrangeRight = new CommandID(guid, 9);
|
||||
StandardCommands.BringForward = new CommandID(guid, 10);
|
||||
StandardCommands.BringToFront = new CommandID(guid, 11);
|
||||
StandardCommands.CenterHorizontally = new CommandID(guid, 12);
|
||||
StandardCommands.CenterVertically = new CommandID(guid, 13);
|
||||
StandardCommands.Copy = new CommandID(guid, 15);
|
||||
StandardCommands.Cut = new CommandID(guid, 16);
|
||||
StandardCommands.Delete = new CommandID(guid, 17);
|
||||
StandardCommands.F1Help = new CommandID(guid, 377);
|
||||
StandardCommands.Group = new CommandID(guid, 20);
|
||||
StandardCommands.HorizSpaceConcatenate = new CommandID(guid, 21);
|
||||
StandardCommands.HorizSpaceDecrease = new CommandID(guid, 22);
|
||||
StandardCommands.HorizSpaceIncrease = new CommandID(guid, 23);
|
||||
StandardCommands.HorizSpaceMakeEqual = new CommandID(guid, 24);
|
||||
StandardCommands.LineupIcons = new CommandID(guid2, 12299);
|
||||
StandardCommands.LockControls = new CommandID(guid, 369);
|
||||
StandardCommands.MultiLevelRedo = new CommandID(guid, 30);
|
||||
StandardCommands.MultiLevelUndo = new CommandID(guid, 44);
|
||||
StandardCommands.Paste = new CommandID(guid, 26);
|
||||
StandardCommands.Properties = new CommandID(guid, 28);
|
||||
StandardCommands.PropertiesWindow = new CommandID(guid, 235);
|
||||
StandardCommands.Redo = new CommandID(guid, 29);
|
||||
StandardCommands.Replace = new CommandID(guid, 230);
|
||||
StandardCommands.SelectAll = new CommandID(guid, 31);
|
||||
StandardCommands.SendBackward = new CommandID(guid, 32);
|
||||
StandardCommands.SendToBack = new CommandID(guid, 33);
|
||||
StandardCommands.ShowGrid = new CommandID(guid, 103);
|
||||
StandardCommands.ShowLargeIcons = new CommandID(guid2, 12300);
|
||||
StandardCommands.SizeToControl = new CommandID(guid, 35);
|
||||
StandardCommands.SizeToControlHeight = new CommandID(guid, 36);
|
||||
StandardCommands.SizeToControlWidth = new CommandID(guid, 37);
|
||||
StandardCommands.SizeToFit = new CommandID(guid, 38);
|
||||
StandardCommands.SizeToGrid = new CommandID(guid, 39);
|
||||
StandardCommands.SnapToGrid = new CommandID(guid, 40);
|
||||
StandardCommands.TabOrder = new CommandID(guid, 41);
|
||||
StandardCommands.Undo = new CommandID(guid, 43);
|
||||
StandardCommands.Ungroup = new CommandID(guid, 45);
|
||||
StandardCommands.VerbFirst = new CommandID(guid2, 8192);
|
||||
StandardCommands.VerbLast = new CommandID(guid2, 8448);
|
||||
StandardCommands.VertSpaceConcatenate = new CommandID(guid, 46);
|
||||
StandardCommands.VertSpaceDecrease = new CommandID(guid, 47);
|
||||
StandardCommands.VertSpaceIncrease = new CommandID(guid, 48);
|
||||
StandardCommands.VertSpaceMakeEqual = new CommandID(guid, 49);
|
||||
StandardCommands.ViewGrid = new CommandID(guid, 125);
|
||||
StandardCommands.DocumentOutline = new CommandID(guid, 239);
|
||||
StandardCommands.ViewCode = new CommandID(guid, 333);
|
||||
}
|
||||
|
||||
/// <summary>Gets the <see cref="T:System.ComponentModel.Design.CommandID" /> for the AlignBottom command. This field is read-only.</summary>
|
||||
// Token: 0x040000D5 RID: 213
|
||||
public static readonly CommandID AlignBottom;
|
||||
|
||||
/// <summary>Gets the <see cref="T:System.ComponentModel.Design.CommandID" /> for the AlignHorizontalCenters command. This field is read-only.</summary>
|
||||
// Token: 0x040000D6 RID: 214
|
||||
public static readonly CommandID AlignHorizontalCenters;
|
||||
|
||||
/// <summary>Gets the <see cref="T:System.ComponentModel.Design.CommandID" /> for the AlignLeft command. This field is read-only.</summary>
|
||||
// Token: 0x040000D7 RID: 215
|
||||
public static readonly CommandID AlignLeft;
|
||||
|
||||
/// <summary>Gets the <see cref="T:System.ComponentModel.Design.CommandID" /> for the AlignRight command. This field is read-only.</summary>
|
||||
// Token: 0x040000D8 RID: 216
|
||||
public static readonly CommandID AlignRight;
|
||||
|
||||
/// <summary>Gets the <see cref="T:System.ComponentModel.Design.CommandID" /> for the AlignToGrid command. This field is read-only.</summary>
|
||||
// Token: 0x040000D9 RID: 217
|
||||
public static readonly CommandID AlignToGrid;
|
||||
|
||||
/// <summary>Gets the <see cref="T:System.ComponentModel.Design.CommandID" /> for the AlignTop command. This field is read-only.</summary>
|
||||
// Token: 0x040000DA RID: 218
|
||||
public static readonly CommandID AlignTop;
|
||||
|
||||
/// <summary>Gets the <see cref="T:System.ComponentModel.Design.CommandID" /> for the AlignVerticalCenters command. This field is read-only.</summary>
|
||||
// Token: 0x040000DB RID: 219
|
||||
public static readonly CommandID AlignVerticalCenters;
|
||||
|
||||
/// <summary>Gets the <see cref="T:System.ComponentModel.Design.CommandID" /> for the ArrangeBottom command. This field is read-only.</summary>
|
||||
// Token: 0x040000DC RID: 220
|
||||
public static readonly CommandID ArrangeBottom;
|
||||
|
||||
/// <summary>Gets the <see cref="T:System.ComponentModel.Design.CommandID" /> for the ArrangeIcons command. This field is read-only.</summary>
|
||||
// Token: 0x040000DD RID: 221
|
||||
public static readonly CommandID ArrangeIcons;
|
||||
|
||||
/// <summary>Gets the <see cref="T:System.ComponentModel.Design.CommandID" /> for the ArrangeRight command. This field is read-only.</summary>
|
||||
// Token: 0x040000DE RID: 222
|
||||
public static readonly CommandID ArrangeRight;
|
||||
|
||||
/// <summary>Gets the <see cref="T:System.ComponentModel.Design.CommandID" /> for the BringForward command. This field is read-only.</summary>
|
||||
// Token: 0x040000DF RID: 223
|
||||
public static readonly CommandID BringForward;
|
||||
|
||||
/// <summary>Gets the <see cref="T:System.ComponentModel.Design.CommandID" /> for the BringToFront command. This field is read-only.</summary>
|
||||
// Token: 0x040000E0 RID: 224
|
||||
public static readonly CommandID BringToFront;
|
||||
|
||||
/// <summary>Gets the <see cref="T:System.ComponentModel.Design.CommandID" /> for the CenterHorizontally command. This field is read-only.</summary>
|
||||
// Token: 0x040000E1 RID: 225
|
||||
public static readonly CommandID CenterHorizontally;
|
||||
|
||||
/// <summary>Gets the <see cref="T:System.ComponentModel.Design.CommandID" /> for the CenterVertically command. This field is read-only.</summary>
|
||||
// Token: 0x040000E2 RID: 226
|
||||
public static readonly CommandID CenterVertically;
|
||||
|
||||
/// <summary>Gets the <see cref="T:System.ComponentModel.Design.CommandID" /> for the Copy command. This field is read-only.</summary>
|
||||
// Token: 0x040000E3 RID: 227
|
||||
public static readonly CommandID Copy;
|
||||
|
||||
/// <summary>Gets the <see cref="T:System.ComponentModel.Design.CommandID" /> for the Cut command. This field is read-only.</summary>
|
||||
// Token: 0x040000E4 RID: 228
|
||||
public static readonly CommandID Cut;
|
||||
|
||||
/// <summary>Gets the <see cref="T:System.ComponentModel.Design.CommandID" /> for the Delete command. This field is read-only.</summary>
|
||||
// Token: 0x040000E5 RID: 229
|
||||
public static readonly CommandID Delete;
|
||||
|
||||
/// <summary>Gets the <see cref="T:System.ComponentModel.Design.CommandID" /> for the F1Help command. This field is read-only.</summary>
|
||||
// Token: 0x040000E6 RID: 230
|
||||
public static readonly CommandID F1Help;
|
||||
|
||||
/// <summary>Gets the <see cref="T:System.ComponentModel.Design.CommandID" /> for the Group command. This field is read-only.</summary>
|
||||
// Token: 0x040000E7 RID: 231
|
||||
public static readonly CommandID Group;
|
||||
|
||||
/// <summary>Gets the <see cref="T:System.ComponentModel.Design.CommandID" /> for the HorizSpaceConcatenate command. This field is read-only.</summary>
|
||||
// Token: 0x040000E8 RID: 232
|
||||
public static readonly CommandID HorizSpaceConcatenate;
|
||||
|
||||
/// <summary>Gets the <see cref="T:System.ComponentModel.Design.CommandID" /> for the HorizSpaceDecrease command. This field is read-only.</summary>
|
||||
// Token: 0x040000E9 RID: 233
|
||||
public static readonly CommandID HorizSpaceDecrease;
|
||||
|
||||
/// <summary>Gets the <see cref="T:System.ComponentModel.Design.CommandID" /> for the HorizSpaceIncrease command. This field is read-only.</summary>
|
||||
// Token: 0x040000EA RID: 234
|
||||
public static readonly CommandID HorizSpaceIncrease;
|
||||
|
||||
/// <summary>Gets the <see cref="T:System.ComponentModel.Design.CommandID" /> for the HorizSpaceMakeEqual command. This field is read-only.</summary>
|
||||
// Token: 0x040000EB RID: 235
|
||||
public static readonly CommandID HorizSpaceMakeEqual;
|
||||
|
||||
/// <summary>Gets the <see cref="T:System.ComponentModel.Design.CommandID" /> for the LineupIcons command. This field is read-only.</summary>
|
||||
// Token: 0x040000EC RID: 236
|
||||
public static readonly CommandID LineupIcons;
|
||||
|
||||
/// <summary>Gets the <see cref="T:System.ComponentModel.Design.CommandID" /> for the LockControls command. This field is read-only.</summary>
|
||||
// Token: 0x040000ED RID: 237
|
||||
public static readonly CommandID LockControls;
|
||||
|
||||
/// <summary>Gets the <see cref="T:System.ComponentModel.Design.CommandID" /> for the MultiLevelRedo command. This field is read-only.</summary>
|
||||
// Token: 0x040000EE RID: 238
|
||||
public static readonly CommandID MultiLevelRedo;
|
||||
|
||||
/// <summary>Gets the <see cref="T:System.ComponentModel.Design.CommandID" /> for the MultiLevelUndo command. This field is read-only.</summary>
|
||||
// Token: 0x040000EF RID: 239
|
||||
public static readonly CommandID MultiLevelUndo;
|
||||
|
||||
/// <summary>Gets the <see cref="T:System.ComponentModel.Design.CommandID" /> for the Paste command. This field is read-only.</summary>
|
||||
// Token: 0x040000F0 RID: 240
|
||||
public static readonly CommandID Paste;
|
||||
|
||||
/// <summary>Gets the <see cref="T:System.ComponentModel.Design.CommandID" /> for the Properties command. This field is read-only.</summary>
|
||||
// Token: 0x040000F1 RID: 241
|
||||
public static readonly CommandID Properties;
|
||||
|
||||
/// <summary>Gets the <see cref="T:System.ComponentModel.Design.CommandID" /> for the PropertiesWindow command. This field is read-only.</summary>
|
||||
// Token: 0x040000F2 RID: 242
|
||||
public static readonly CommandID PropertiesWindow;
|
||||
|
||||
/// <summary>Gets the <see cref="T:System.ComponentModel.Design.CommandID" /> for the Redo command. This field is read-only.</summary>
|
||||
// Token: 0x040000F3 RID: 243
|
||||
public static readonly CommandID Redo;
|
||||
|
||||
/// <summary>Gets the <see cref="T:System.ComponentModel.Design.CommandID" /> for the Replace command. This field is read-only.</summary>
|
||||
// Token: 0x040000F4 RID: 244
|
||||
public static readonly CommandID Replace;
|
||||
|
||||
/// <summary>Gets the <see cref="T:System.ComponentModel.Design.CommandID" /> for the SelectAll command. This field is read-only.</summary>
|
||||
// Token: 0x040000F5 RID: 245
|
||||
public static readonly CommandID SelectAll;
|
||||
|
||||
/// <summary>Gets the <see cref="T:System.ComponentModel.Design.CommandID" /> for the SendBackward command. This field is read-only.</summary>
|
||||
// Token: 0x040000F6 RID: 246
|
||||
public static readonly CommandID SendBackward;
|
||||
|
||||
/// <summary>Gets the <see cref="T:System.ComponentModel.Design.CommandID" /> for the SendToBack command. This field is read-only.</summary>
|
||||
// Token: 0x040000F7 RID: 247
|
||||
public static readonly CommandID SendToBack;
|
||||
|
||||
/// <summary>Gets the <see cref="T:System.ComponentModel.Design.CommandID" /> for the ShowGrid command. This field is read-only.</summary>
|
||||
// Token: 0x040000F8 RID: 248
|
||||
public static readonly CommandID ShowGrid;
|
||||
|
||||
/// <summary>Gets the <see cref="T:System.ComponentModel.Design.CommandID" /> for the ShowLargeIcons command. This field is read-only.</summary>
|
||||
// Token: 0x040000F9 RID: 249
|
||||
public static readonly CommandID ShowLargeIcons;
|
||||
|
||||
/// <summary>Gets the <see cref="T:System.ComponentModel.Design.CommandID" /> for the SizeToControl command. This field is read-only.</summary>
|
||||
// Token: 0x040000FA RID: 250
|
||||
public static readonly CommandID SizeToControl;
|
||||
|
||||
/// <summary>Gets the <see cref="T:System.ComponentModel.Design.CommandID" /> for the SizeToControlHeight command. This field is read-only.</summary>
|
||||
// Token: 0x040000FB RID: 251
|
||||
public static readonly CommandID SizeToControlHeight;
|
||||
|
||||
/// <summary>Gets the <see cref="T:System.ComponentModel.Design.CommandID" /> for the SizeToControlWidth command. This field is read-only.</summary>
|
||||
// Token: 0x040000FC RID: 252
|
||||
public static readonly CommandID SizeToControlWidth;
|
||||
|
||||
/// <summary>Gets the <see cref="T:System.ComponentModel.Design.CommandID" /> for the SizeToFit command. This field is read-only.</summary>
|
||||
// Token: 0x040000FD RID: 253
|
||||
public static readonly CommandID SizeToFit;
|
||||
|
||||
/// <summary>Gets the <see cref="T:System.ComponentModel.Design.CommandID" /> for the SizeToGrid command. This field is read-only.</summary>
|
||||
// Token: 0x040000FE RID: 254
|
||||
public static readonly CommandID SizeToGrid;
|
||||
|
||||
/// <summary>Gets the <see cref="T:System.ComponentModel.Design.CommandID" /> for the SnapToGrid command. This field is read-only.</summary>
|
||||
// Token: 0x040000FF RID: 255
|
||||
public static readonly CommandID SnapToGrid;
|
||||
|
||||
/// <summary>Gets the <see cref="T:System.ComponentModel.Design.CommandID" /> for the TabOrder command. This field is read-only.</summary>
|
||||
// Token: 0x04000100 RID: 256
|
||||
public static readonly CommandID TabOrder;
|
||||
|
||||
/// <summary>Gets the <see cref="T:System.ComponentModel.Design.CommandID" /> for the Undo command. This field is read-only.</summary>
|
||||
// Token: 0x04000101 RID: 257
|
||||
public static readonly CommandID Undo;
|
||||
|
||||
/// <summary>Gets the <see cref="T:System.ComponentModel.Design.CommandID" /> for the Ungroup command. This field is read-only.</summary>
|
||||
// Token: 0x04000102 RID: 258
|
||||
public static readonly CommandID Ungroup;
|
||||
|
||||
/// <summary>Gets the first of a set of verbs. This field is read-only.</summary>
|
||||
// Token: 0x04000103 RID: 259
|
||||
public static readonly CommandID VerbFirst;
|
||||
|
||||
/// <summary>Gets the last of a set of verbs. This field is read-only.</summary>
|
||||
// Token: 0x04000104 RID: 260
|
||||
public static readonly CommandID VerbLast;
|
||||
|
||||
/// <summary>Gets the <see cref="T:System.ComponentModel.Design.CommandID" /> for the VertSpaceConcatenate command. This field is read-only.</summary>
|
||||
// Token: 0x04000105 RID: 261
|
||||
public static readonly CommandID VertSpaceConcatenate;
|
||||
|
||||
/// <summary>Gets the <see cref="T:System.ComponentModel.Design.CommandID" /> for the VertSpaceDecrease command. This field is read-only.</summary>
|
||||
// Token: 0x04000106 RID: 262
|
||||
public static readonly CommandID VertSpaceDecrease;
|
||||
|
||||
/// <summary>Gets the <see cref="T:System.ComponentModel.Design.CommandID" /> for the VertSpaceIncrease command. This field is read-only.</summary>
|
||||
// Token: 0x04000107 RID: 263
|
||||
public static readonly CommandID VertSpaceIncrease;
|
||||
|
||||
/// <summary>Gets the <see cref="T:System.ComponentModel.Design.CommandID" /> for the VertSpaceMakeEqual command. This field is read-only.</summary>
|
||||
// Token: 0x04000108 RID: 264
|
||||
public static readonly CommandID VertSpaceMakeEqual;
|
||||
|
||||
/// <summary>Gets the <see cref="T:System.ComponentModel.Design.CommandID" /> for the ViewGrid command. This field is read-only.</summary>
|
||||
// Token: 0x04000109 RID: 265
|
||||
public static readonly CommandID ViewGrid;
|
||||
|
||||
/// <summary>Gets the <see cref="T:System.ComponentModel.Design.CommandID" /> for the Document Outline command. This field is read-only.</summary>
|
||||
// Token: 0x0400010A RID: 266
|
||||
public static readonly CommandID DocumentOutline;
|
||||
|
||||
/// <summary>Gets the <see cref="T:System.ComponentModel.Design.CommandID" /> for the ViewCode command. This field is read-only.</summary>
|
||||
// Token: 0x0400010B RID: 267
|
||||
public static readonly CommandID ViewCode;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.ComponentModel.Design
|
||||
{
|
||||
/// <summary>Defines identifiers for a set of technologies that designer hosts support.</summary>
|
||||
// Token: 0x02000051 RID: 81
|
||||
[ComVisible(true)]
|
||||
public enum ViewTechnology
|
||||
{
|
||||
/// <summary>Represents a mode in which the view object is passed directly to the development environment. </summary>
|
||||
// Token: 0x0400010D RID: 269
|
||||
[Obsolete("Use ViewTechnology.Default.")]
|
||||
Passthrough,
|
||||
/// <summary>Represents a mode in which a Windows Forms control object provides the display for the root designer. </summary>
|
||||
// Token: 0x0400010E RID: 270
|
||||
[Obsolete("Use ViewTechnology.Default.")]
|
||||
WindowsForms,
|
||||
/// <summary>Specifies the default view technology support. </summary>
|
||||
// Token: 0x0400010F RID: 271
|
||||
Default
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
using System;
|
||||
|
||||
namespace System.ComponentModel
|
||||
{
|
||||
/// <summary>Specifies whether a property can only be set at design time.</summary>
|
||||
// Token: 0x02000070 RID: 112
|
||||
[AttributeUsage(AttributeTargets.All)]
|
||||
public sealed class DesignOnlyAttribute : Attribute
|
||||
{
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.DesignOnlyAttribute" /> class.</summary>
|
||||
/// <param name="isDesignOnly">true if a property can be set only at design time; false if the property can be set at design time and at run time. </param>
|
||||
// Token: 0x06000417 RID: 1047 RVA: 0x0000C448 File Offset: 0x0000A648
|
||||
public DesignOnlyAttribute(bool design_only)
|
||||
{
|
||||
this.design_only = design_only;
|
||||
}
|
||||
|
||||
/// <summary>Gets a value indicating whether a property can be set only at design time.</summary>
|
||||
/// <returns>true if a property can be set only at design time; otherwise, false.</returns>
|
||||
// Token: 0x17000115 RID: 277
|
||||
// (get) Token: 0x06000419 RID: 1049 RVA: 0x0000C47C File Offset: 0x0000A67C
|
||||
public bool IsDesignOnly
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.design_only;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Returns whether the value of the given object is equal to the current <see cref="T:System.ComponentModel.DesignOnlyAttribute" />.</summary>
|
||||
/// <returns>true if the value of the given object is equal to that of the current; otherwise, false.</returns>
|
||||
/// <param name="obj">The object to test the value equality of. </param>
|
||||
// Token: 0x0600041A RID: 1050 RVA: 0x0000C484 File Offset: 0x0000A684
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
return obj is DesignOnlyAttribute && (obj == this || ((DesignOnlyAttribute)obj).IsDesignOnly == this.design_only);
|
||||
}
|
||||
|
||||
// Token: 0x0600041B RID: 1051 RVA: 0x0000C4B0 File Offset: 0x0000A6B0
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return this.design_only.GetHashCode();
|
||||
}
|
||||
|
||||
/// <summary>Determines if this attribute is the default.</summary>
|
||||
/// <returns>true if the attribute is the default value for this attribute class; otherwise, false.</returns>
|
||||
// Token: 0x0600041C RID: 1052 RVA: 0x0000C4C0 File Offset: 0x0000A6C0
|
||||
public override bool IsDefaultAttribute()
|
||||
{
|
||||
return this.design_only == DesignOnlyAttribute.Default.IsDesignOnly;
|
||||
}
|
||||
|
||||
// Token: 0x0400014E RID: 334
|
||||
private bool design_only;
|
||||
|
||||
/// <summary>Specifies the default value for the <see cref="T:System.ComponentModel.DesignOnlyAttribute" />, which is <see cref="F:System.ComponentModel.DesignOnlyAttribute.No" />. This static field is read-only.</summary>
|
||||
// Token: 0x0400014F RID: 335
|
||||
public static readonly DesignOnlyAttribute Default = new DesignOnlyAttribute(false);
|
||||
|
||||
/// <summary>Specifies that a property can be set at design time or at run time. This static field is read-only.</summary>
|
||||
// Token: 0x04000150 RID: 336
|
||||
public static readonly DesignOnlyAttribute No = new DesignOnlyAttribute(false);
|
||||
|
||||
/// <summary>Specifies that a property can be set only at design time. This static field is read-only.</summary>
|
||||
// Token: 0x04000151 RID: 337
|
||||
public static readonly DesignOnlyAttribute Yes = new DesignOnlyAttribute(true);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
using System;
|
||||
|
||||
namespace System.ComponentModel
|
||||
{
|
||||
/// <summary>
|
||||
/// <see cref="T:System.ComponentModel.DesignTimeVisibleAttribute" /> marks a component's visibility. If <see cref="F:System.ComponentModel.DesignTimeVisibleAttribute.Yes" /> is present, a visual designer can show this component on a designer.</summary>
|
||||
// Token: 0x02000071 RID: 113
|
||||
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Interface)]
|
||||
public sealed class DesignTimeVisibleAttribute : Attribute
|
||||
{
|
||||
/// <summary>Creates a new <see cref="T:System.ComponentModel.DesignTimeVisibleAttribute" /> set to the default value of false.</summary>
|
||||
// Token: 0x0600041D RID: 1053 RVA: 0x0000C4D4 File Offset: 0x0000A6D4
|
||||
public DesignTimeVisibleAttribute()
|
||||
: this(true)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Creates a new <see cref="T:System.ComponentModel.DesignTimeVisibleAttribute" /> with the <see cref="P:System.ComponentModel.DesignTimeVisibleAttribute.Visible" /> property set to the given value in <paramref name="visible" />.</summary>
|
||||
/// <param name="visible">The value that the <see cref="P:System.ComponentModel.DesignTimeVisibleAttribute.Visible" /> property will be set against. </param>
|
||||
// Token: 0x0600041E RID: 1054 RVA: 0x0000C4E0 File Offset: 0x0000A6E0
|
||||
public DesignTimeVisibleAttribute(bool visible)
|
||||
{
|
||||
this.visible = visible;
|
||||
}
|
||||
|
||||
/// <summary>Gets or sets whether the component should be shown at design time.</summary>
|
||||
/// <returns>true if this component should be shown at design time, or false if it shouldn't.</returns>
|
||||
// Token: 0x17000116 RID: 278
|
||||
// (get) Token: 0x06000420 RID: 1056 RVA: 0x0000C514 File Offset: 0x0000A714
|
||||
public bool Visible
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.visible;
|
||||
}
|
||||
}
|
||||
|
||||
/// <param name="obj">The object to compare.</param>
|
||||
// Token: 0x06000421 RID: 1057 RVA: 0x0000C51C File Offset: 0x0000A71C
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
return obj is DesignTimeVisibleAttribute && (obj == this || ((DesignTimeVisibleAttribute)obj).Visible == this.visible);
|
||||
}
|
||||
|
||||
// Token: 0x06000422 RID: 1058 RVA: 0x0000C548 File Offset: 0x0000A748
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return this.visible.GetHashCode();
|
||||
}
|
||||
|
||||
/// <summary>Gets a value indicating if this instance is equal to the <see cref="F:System.ComponentModel.DesignTimeVisibleAttribute.Default" /> value.</summary>
|
||||
/// <returns>true, if this instance is equal to the <see cref="F:System.ComponentModel.DesignTimeVisibleAttribute.Default" /> value; otherwise, false.</returns>
|
||||
// Token: 0x06000423 RID: 1059 RVA: 0x0000C558 File Offset: 0x0000A758
|
||||
public override bool IsDefaultAttribute()
|
||||
{
|
||||
return this.visible == DesignTimeVisibleAttribute.Default.Visible;
|
||||
}
|
||||
|
||||
// Token: 0x04000152 RID: 338
|
||||
private bool visible;
|
||||
|
||||
/// <summary>The default visibility which is Yes.</summary>
|
||||
// Token: 0x04000153 RID: 339
|
||||
public static readonly DesignTimeVisibleAttribute Default = new DesignTimeVisibleAttribute(true);
|
||||
|
||||
/// <summary>Marks a component as not visible in a visual designer.</summary>
|
||||
// Token: 0x04000154 RID: 340
|
||||
public static readonly DesignTimeVisibleAttribute No = new DesignTimeVisibleAttribute(false);
|
||||
|
||||
/// <summary>Marks a component as visible in a visual designer.</summary>
|
||||
// Token: 0x04000155 RID: 341
|
||||
public static readonly DesignTimeVisibleAttribute Yes = new DesignTimeVisibleAttribute(true);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,127 @@
|
||||
using System;
|
||||
using System.ComponentModel.Design;
|
||||
|
||||
namespace System.ComponentModel
|
||||
{
|
||||
/// <summary>Specifies the class used to implement design-time services for a component.</summary>
|
||||
// Token: 0x02000072 RID: 114
|
||||
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Interface, AllowMultiple = true, Inherited = true)]
|
||||
public sealed class DesignerAttribute : Attribute
|
||||
{
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.DesignerAttribute" /> class using the name of the type that provides design-time services.</summary>
|
||||
/// <param name="designerTypeName">The concatenation of the fully qualified name of the type that provides design-time services for the component this attribute is bound to, and the name of the assembly this type resides in. </param>
|
||||
// Token: 0x06000424 RID: 1060 RVA: 0x0000C56C File Offset: 0x0000A76C
|
||||
public DesignerAttribute(string designerTypeName)
|
||||
{
|
||||
if (designerTypeName == null)
|
||||
{
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
this.name = designerTypeName;
|
||||
this.basetypename = typeof(global::System.ComponentModel.Design.IDesigner).FullName;
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.DesignerAttribute" /> class using the type that provides design-time services.</summary>
|
||||
/// <param name="designerType">A <see cref="T:System.Type" /> that represents the class that provides design-time services for the component this attribute is bound to. </param>
|
||||
// Token: 0x06000425 RID: 1061 RVA: 0x0000C5A8 File Offset: 0x0000A7A8
|
||||
public DesignerAttribute(Type designerType)
|
||||
: this(designerType.AssemblyQualifiedName)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.DesignerAttribute" /> class, using the name of the designer class and the base class for the designer.</summary>
|
||||
/// <param name="designerTypeName">The concatenation of the fully qualified name of the type that provides design-time services for the component this attribute is bound to, and the name of the assembly this type resides in. </param>
|
||||
/// <param name="designerBaseType">A <see cref="T:System.Type" /> that represents the base class to associate with the <paramref name="designerTypeName" />. </param>
|
||||
// Token: 0x06000426 RID: 1062 RVA: 0x0000C5B8 File Offset: 0x0000A7B8
|
||||
public DesignerAttribute(string designerTypeName, Type designerBaseType)
|
||||
: this(designerTypeName, designerBaseType.AssemblyQualifiedName)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.DesignerAttribute" /> class using the types of the designer and designer base class.</summary>
|
||||
/// <param name="designerType">A <see cref="T:System.Type" /> that represents the class that provides design-time services for the component this attribute is bound to. </param>
|
||||
/// <param name="designerBaseType">A <see cref="T:System.Type" /> that represents the base class to associate with the <paramref name="designerType" />. </param>
|
||||
// Token: 0x06000427 RID: 1063 RVA: 0x0000C5C8 File Offset: 0x0000A7C8
|
||||
public DesignerAttribute(Type designerType, Type designerBaseType)
|
||||
: this(designerType.AssemblyQualifiedName, designerBaseType.AssemblyQualifiedName)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.DesignerAttribute" /> class using the designer type and the base class for the designer.</summary>
|
||||
/// <param name="designerTypeName">The concatenation of the fully qualified name of the type that provides design-time services for the component this attribute is bound to, and the name of the assembly this type resides in. </param>
|
||||
/// <param name="designerBaseTypeName">The fully qualified name of the base class to associate with the designer class. </param>
|
||||
// Token: 0x06000428 RID: 1064 RVA: 0x0000C5DC File Offset: 0x0000A7DC
|
||||
public DesignerAttribute(string designerTypeName, string designerBaseTypeName)
|
||||
{
|
||||
if (designerTypeName == null)
|
||||
{
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
this.name = designerTypeName;
|
||||
this.basetypename = designerBaseTypeName;
|
||||
}
|
||||
|
||||
/// <summary>Gets the name of the base type of this designer.</summary>
|
||||
/// <returns>The name of the base type of this designer.</returns>
|
||||
// Token: 0x17000117 RID: 279
|
||||
// (get) Token: 0x06000429 RID: 1065 RVA: 0x0000C60C File Offset: 0x0000A80C
|
||||
public string DesignerBaseTypeName
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.basetypename;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets the name of the designer type associated with this designer attribute.</summary>
|
||||
/// <returns>The name of the designer type associated with this designer attribute.</returns>
|
||||
// Token: 0x17000118 RID: 280
|
||||
// (get) Token: 0x0600042A RID: 1066 RVA: 0x0000C614 File Offset: 0x0000A814
|
||||
public string DesignerTypeName
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.name;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a unique ID for this attribute type.</summary>
|
||||
/// <returns>A unique ID for this attribute type.</returns>
|
||||
// Token: 0x17000119 RID: 281
|
||||
// (get) Token: 0x0600042B RID: 1067 RVA: 0x0000C61C File Offset: 0x0000A81C
|
||||
public override object TypeId
|
||||
{
|
||||
get
|
||||
{
|
||||
string text = this.basetypename;
|
||||
int num = text.IndexOf(',');
|
||||
if (num != -1)
|
||||
{
|
||||
text = text.Substring(0, num);
|
||||
}
|
||||
return base.GetType().ToString() + text;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Returns whether the value of the given object is equal to the current <see cref="T:System.ComponentModel.DesignerAttribute" />.</summary>
|
||||
/// <returns>true if the value of the given object is equal to that of the current; otherwise, false.</returns>
|
||||
/// <param name="obj">The object to test the value equality of. </param>
|
||||
// Token: 0x0600042C RID: 1068 RVA: 0x0000C65C File Offset: 0x0000A85C
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
return obj is DesignerAttribute && ((DesignerAttribute)obj).DesignerBaseTypeName.Equals(this.basetypename) && ((DesignerAttribute)obj).DesignerTypeName.Equals(this.name);
|
||||
}
|
||||
|
||||
// Token: 0x0600042D RID: 1069 RVA: 0x0000C6AC File Offset: 0x0000A8AC
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return (this.name + this.basetypename).GetHashCode();
|
||||
}
|
||||
|
||||
// Token: 0x04000156 RID: 342
|
||||
private string name;
|
||||
|
||||
// Token: 0x04000157 RID: 343
|
||||
private string basetypename;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,93 @@
|
||||
using System;
|
||||
|
||||
namespace System.ComponentModel
|
||||
{
|
||||
/// <summary>Specifies that the designer for a class belongs to a certain category.</summary>
|
||||
// Token: 0x02000073 RID: 115
|
||||
[AttributeUsage(AttributeTargets.Class)]
|
||||
public sealed class DesignerCategoryAttribute : Attribute
|
||||
{
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.DesignerCategoryAttribute" /> class with an empty string ("").</summary>
|
||||
// Token: 0x0600042E RID: 1070 RVA: 0x0000C6C4 File Offset: 0x0000A8C4
|
||||
public DesignerCategoryAttribute()
|
||||
{
|
||||
this.category = string.Empty;
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.DesignerCategoryAttribute" /> class with the given category name.</summary>
|
||||
/// <param name="category">The name of the category. </param>
|
||||
// Token: 0x0600042F RID: 1071 RVA: 0x0000C6D8 File Offset: 0x0000A8D8
|
||||
public DesignerCategoryAttribute(string category)
|
||||
{
|
||||
this.category = category;
|
||||
}
|
||||
|
||||
/// <summary>Gets a unique identifier for this attribute.</summary>
|
||||
/// <returns>An <see cref="T:System.Object" /> that is a unique identifier for the attribute.</returns>
|
||||
// Token: 0x1700011A RID: 282
|
||||
// (get) Token: 0x06000431 RID: 1073 RVA: 0x0000C734 File Offset: 0x0000A934
|
||||
public override object TypeId
|
||||
{
|
||||
get
|
||||
{
|
||||
return base.GetType();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets the name of the category.</summary>
|
||||
/// <returns>The name of the category.</returns>
|
||||
// Token: 0x1700011B RID: 283
|
||||
// (get) Token: 0x06000432 RID: 1074 RVA: 0x0000C73C File Offset: 0x0000A93C
|
||||
public string Category
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.category;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Returns whether the value of the given object is equal to the current <see cref="T:System.ComponentModel.DesignOnlyAttribute" />.</summary>
|
||||
/// <returns>true if the value of the given object is equal to that of the current; otherwise, false.</returns>
|
||||
/// <param name="obj">The object to test the value equality of. </param>
|
||||
// Token: 0x06000433 RID: 1075 RVA: 0x0000C744 File Offset: 0x0000A944
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
return obj is DesignerCategoryAttribute && (obj == this || ((DesignerCategoryAttribute)obj).Category == this.category);
|
||||
}
|
||||
|
||||
/// <summary>Returns the hash code for this instance.</summary>
|
||||
/// <returns>A 32-bit signed integer hash code.</returns>
|
||||
// Token: 0x06000434 RID: 1076 RVA: 0x0000C780 File Offset: 0x0000A980
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return this.category.GetHashCode();
|
||||
}
|
||||
|
||||
/// <summary>Determines if this attribute is the default.</summary>
|
||||
/// <returns>true if the attribute is the default value for this attribute class; otherwise, false.</returns>
|
||||
// Token: 0x06000435 RID: 1077 RVA: 0x0000C790 File Offset: 0x0000A990
|
||||
public override bool IsDefaultAttribute()
|
||||
{
|
||||
return this.category == DesignerCategoryAttribute.Default.Category;
|
||||
}
|
||||
|
||||
// Token: 0x04000158 RID: 344
|
||||
private string category;
|
||||
|
||||
/// <summary>Specifies that a component marked with this category use a component designer. This field is read-only.</summary>
|
||||
// Token: 0x04000159 RID: 345
|
||||
public static readonly DesignerCategoryAttribute Component = new DesignerCategoryAttribute("Component");
|
||||
|
||||
/// <summary>Specifies that a component marked with this category use a form designer. This static field is read-only.</summary>
|
||||
// Token: 0x0400015A RID: 346
|
||||
public static readonly DesignerCategoryAttribute Form = new DesignerCategoryAttribute("Form");
|
||||
|
||||
/// <summary>Specifies that a component marked with this category use a generic designer. This static field is read-only.</summary>
|
||||
// Token: 0x0400015B RID: 347
|
||||
public static readonly DesignerCategoryAttribute Generic = new DesignerCategoryAttribute("Designer");
|
||||
|
||||
/// <summary>Specifies that a component marked with this category cannot use a visual designer. This static field is read-only.</summary>
|
||||
// Token: 0x0400015C RID: 348
|
||||
public static readonly DesignerCategoryAttribute Default = new DesignerCategoryAttribute(string.Empty);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.ComponentModel
|
||||
{
|
||||
/// <summary>Specifies the visibility a property has to the design-time serializer.</summary>
|
||||
// Token: 0x02000074 RID: 116
|
||||
[ComVisible(true)]
|
||||
public enum DesignerSerializationVisibility
|
||||
{
|
||||
/// <summary>The code generator does not produce code for the object.</summary>
|
||||
// Token: 0x0400015E RID: 350
|
||||
Hidden,
|
||||
/// <summary>The code generator produces code for the object.</summary>
|
||||
// Token: 0x0400015F RID: 351
|
||||
Visible,
|
||||
/// <summary>The code generator produces code for the contents of the object, rather than for the object itself.</summary>
|
||||
// Token: 0x04000160 RID: 352
|
||||
Content
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
using System;
|
||||
|
||||
namespace System.ComponentModel
|
||||
{
|
||||
/// <summary>Specifies the type of persistence to use when serializing a property on a component at design time.</summary>
|
||||
// Token: 0x02000075 RID: 117
|
||||
[AttributeUsage(AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event)]
|
||||
public sealed class DesignerSerializationVisibilityAttribute : Attribute
|
||||
{
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.DesignerSerializationVisibilityAttribute" /> class using the specified <see cref="T:System.ComponentModel.DesignerSerializationVisibility" /> value.</summary>
|
||||
/// <param name="visibility">One of the <see cref="T:System.ComponentModel.DesignerSerializationVisibility" /> values. </param>
|
||||
// Token: 0x06000436 RID: 1078 RVA: 0x0000C7A8 File Offset: 0x0000A9A8
|
||||
public DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility vis)
|
||||
{
|
||||
this.visibility = vis;
|
||||
}
|
||||
|
||||
/// <summary>Gets a value indicating the basic serialization mode a serializer should use when determining whether and how to persist the value of a property.</summary>
|
||||
/// <returns>One of the <see cref="T:System.ComponentModel.DesignerSerializationVisibility" /> values. The default is <see cref="F:System.ComponentModel.DesignerSerializationVisibility.Visible" />.</returns>
|
||||
// Token: 0x1700011C RID: 284
|
||||
// (get) Token: 0x06000438 RID: 1080 RVA: 0x0000C7F4 File Offset: 0x0000A9F4
|
||||
public DesignerSerializationVisibility Visibility
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.visibility;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Indicates whether this instance and a specified object are equal.</summary>
|
||||
/// <returns>true if <paramref name="obj" /> is equal to this instance; otherwise, false.</returns>
|
||||
/// <param name="obj">Another object to compare to. </param>
|
||||
// Token: 0x06000439 RID: 1081 RVA: 0x0000C7FC File Offset: 0x0000A9FC
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
return obj is DesignerSerializationVisibilityAttribute && (obj == this || ((DesignerSerializationVisibilityAttribute)obj).Visibility == this.visibility);
|
||||
}
|
||||
|
||||
/// <summary>Returns the hash code for this object.</summary>
|
||||
/// <returns>A 32-bit signed integer hash code.</returns>
|
||||
// Token: 0x0600043A RID: 1082 RVA: 0x0000C828 File Offset: 0x0000AA28
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return this.visibility.GetHashCode();
|
||||
}
|
||||
|
||||
/// <summary>Gets a value indicating whether the current value of the attribute is the default value for the attribute.</summary>
|
||||
/// <returns>true if the attribute is set to the default value; otherwise, false.</returns>
|
||||
// Token: 0x0600043B RID: 1083 RVA: 0x0000C83C File Offset: 0x0000AA3C
|
||||
public override bool IsDefaultAttribute()
|
||||
{
|
||||
return this.visibility == DesignerSerializationVisibilityAttribute.Default.Visibility;
|
||||
}
|
||||
|
||||
// Token: 0x04000161 RID: 353
|
||||
private DesignerSerializationVisibility visibility;
|
||||
|
||||
/// <summary>Specifies the default value, which is <see cref="F:System.ComponentModel.DesignerSerializationVisibilityAttribute.Visible" />, that is, a visual designer uses default rules to generate the value of a property. This static field is read-only.</summary>
|
||||
// Token: 0x04000162 RID: 354
|
||||
public static readonly DesignerSerializationVisibilityAttribute Default = new DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Visible);
|
||||
|
||||
/// <summary>Specifies that a serializer should serialize the contents of the property, rather than the property itself. This field is read-only.</summary>
|
||||
// Token: 0x04000163 RID: 355
|
||||
public static readonly DesignerSerializationVisibilityAttribute Content = new DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Content);
|
||||
|
||||
/// <summary>Specifies that a serializer should not serialize the value of the property. This static field is read-only.</summary>
|
||||
// Token: 0x04000164 RID: 356
|
||||
public static readonly DesignerSerializationVisibilityAttribute Hidden = new DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Hidden);
|
||||
|
||||
/// <summary>Specifies that a serializer should be allowed to serialize the value of the property. This static field is read-only.</summary>
|
||||
// Token: 0x04000165 RID: 357
|
||||
public static readonly DesignerSerializationVisibilityAttribute Visible = new DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Visible);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,91 @@
|
||||
using System;
|
||||
|
||||
namespace System.ComponentModel
|
||||
{
|
||||
/// <summary>Specifies the display name for a property, event, or public void method which takes no arguments. </summary>
|
||||
// Token: 0x02000076 RID: 118
|
||||
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Event)]
|
||||
public class DisplayNameAttribute : Attribute
|
||||
{
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.DisplayNameAttribute" /> class.</summary>
|
||||
// Token: 0x0600043C RID: 1084 RVA: 0x0000C850 File Offset: 0x0000AA50
|
||||
public DisplayNameAttribute()
|
||||
{
|
||||
this.attributeDisplayName = string.Empty;
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.DisplayNameAttribute" /> class using the display name.</summary>
|
||||
/// <param name="displayName">The display name.</param>
|
||||
// Token: 0x0600043D RID: 1085 RVA: 0x0000C864 File Offset: 0x0000AA64
|
||||
public DisplayNameAttribute(string displayName)
|
||||
{
|
||||
this.attributeDisplayName = displayName;
|
||||
}
|
||||
|
||||
/// <summary>Determines if this attribute is the default.</summary>
|
||||
/// <returns>true if the attribute is the default value for this attribute class; otherwise, false.</returns>
|
||||
// Token: 0x0600043F RID: 1087 RVA: 0x0000C880 File Offset: 0x0000AA80
|
||||
public override bool IsDefaultAttribute()
|
||||
{
|
||||
return this.attributeDisplayName != null && this.attributeDisplayName.Length == 0;
|
||||
}
|
||||
|
||||
/// <summary>Returns the hash code for this instance.</summary>
|
||||
/// <returns>A hash code for the current <see cref="T:System.ComponentModel.DisplayNameAttribute" />.</returns>
|
||||
// Token: 0x06000440 RID: 1088 RVA: 0x0000C8A0 File Offset: 0x0000AAA0
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return this.attributeDisplayName.GetHashCode();
|
||||
}
|
||||
|
||||
/// <summary>Determines whether two <see cref="T:System.ComponentModel.DisplayNameAttribute" /> instances are equal.</summary>
|
||||
/// <returns>true if the value of the given object is equal to that of the current object; otherwise, false.</returns>
|
||||
/// <param name="obj">The <see cref="T:System.ComponentModel.DisplayNameAttribute" /> to test the value equality of.</param>
|
||||
// Token: 0x06000441 RID: 1089 RVA: 0x0000C8B0 File Offset: 0x0000AAB0
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
if (obj == this)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
DisplayNameAttribute displayNameAttribute = obj as DisplayNameAttribute;
|
||||
return displayNameAttribute != null && displayNameAttribute.DisplayName == this.attributeDisplayName;
|
||||
}
|
||||
|
||||
/// <summary>Gets the display name for a property, event, or public void method that takes no arguments stored in this attribute.</summary>
|
||||
/// <returns>The display name.</returns>
|
||||
// Token: 0x1700011D RID: 285
|
||||
// (get) Token: 0x06000442 RID: 1090 RVA: 0x0000C8E8 File Offset: 0x0000AAE8
|
||||
public virtual string DisplayName
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.attributeDisplayName;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets or sets the display name.</summary>
|
||||
/// <returns>The display name.</returns>
|
||||
// Token: 0x1700011E RID: 286
|
||||
// (get) Token: 0x06000443 RID: 1091 RVA: 0x0000C8F0 File Offset: 0x0000AAF0
|
||||
// (set) Token: 0x06000444 RID: 1092 RVA: 0x0000C8F8 File Offset: 0x0000AAF8
|
||||
protected string DisplayNameValue
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.attributeDisplayName;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.attributeDisplayName = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Specifies the default value for the <see cref="T:System.ComponentModel.DisplayNameAttribute" />. This field is read-only.</summary>
|
||||
// Token: 0x04000166 RID: 358
|
||||
public static readonly DisplayNameAttribute Default = new DisplayNameAttribute();
|
||||
|
||||
// Token: 0x04000167 RID: 359
|
||||
private string attributeDisplayName;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
using System;
|
||||
|
||||
namespace System.ComponentModel
|
||||
{
|
||||
/// <summary>Provides data for the <see cref="E:System.ComponentModel.BackgroundWorker.DoWork" /> event handler.</summary>
|
||||
// Token: 0x02000077 RID: 119
|
||||
public class DoWorkEventArgs : EventArgs
|
||||
{
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.DoWorkEventArgs" /> class.</summary>
|
||||
/// <param name="argument">Specifies an argument for an asynchronous operation.</param>
|
||||
// Token: 0x06000445 RID: 1093 RVA: 0x0000C904 File Offset: 0x0000AB04
|
||||
public DoWorkEventArgs(object argument)
|
||||
{
|
||||
this.arg = argument;
|
||||
}
|
||||
|
||||
/// <summary>Gets a value that represents the argument of an asynchronous operation.</summary>
|
||||
/// <returns>An <see cref="T:System.Object" /> representing the argument of an asynchronous operation.</returns>
|
||||
// Token: 0x1700011F RID: 287
|
||||
// (get) Token: 0x06000446 RID: 1094 RVA: 0x0000C914 File Offset: 0x0000AB14
|
||||
public object Argument
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.arg;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets or sets a value that represents the result of an asynchronous operation.</summary>
|
||||
/// <returns>An <see cref="T:System.Object" /> representing the result of an asynchronous operation.</returns>
|
||||
// Token: 0x17000120 RID: 288
|
||||
// (get) Token: 0x06000447 RID: 1095 RVA: 0x0000C91C File Offset: 0x0000AB1C
|
||||
// (set) Token: 0x06000448 RID: 1096 RVA: 0x0000C924 File Offset: 0x0000AB24
|
||||
public object Result
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.result;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.result = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000121 RID: 289
|
||||
// (get) Token: 0x06000449 RID: 1097 RVA: 0x0000C930 File Offset: 0x0000AB30
|
||||
// (set) Token: 0x0600044A RID: 1098 RVA: 0x0000C938 File Offset: 0x0000AB38
|
||||
public bool Cancel
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.cancel;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.cancel = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04000168 RID: 360
|
||||
private object arg;
|
||||
|
||||
// Token: 0x04000169 RID: 361
|
||||
private object result;
|
||||
|
||||
// Token: 0x0400016A RID: 362
|
||||
private bool cancel;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
using System;
|
||||
|
||||
namespace System.ComponentModel
|
||||
{
|
||||
/// <summary>Represents the method that will handle the <see cref="E:System.ComponentModel.BackgroundWorker.DoWork" /> event. This class cannot be inherited.</summary>
|
||||
/// <param name="sender">The source of the event.</param>
|
||||
/// <param name="e">A <see cref="T:System.ComponentModel.DoWorkEventArgs" /> that contains the event data.</param>
|
||||
// Token: 0x02000323 RID: 803
|
||||
// (Invoke) Token: 0x06001C65 RID: 7269
|
||||
public delegate void DoWorkEventHandler(object sender, DoWorkEventArgs e);
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
using System;
|
||||
using System.Globalization;
|
||||
|
||||
namespace System.ComponentModel
|
||||
{
|
||||
/// <summary>Provides a type converter to convert double-precision, floating point number objects to and from various other representations.</summary>
|
||||
// Token: 0x02000078 RID: 120
|
||||
public class DoubleConverter : BaseNumberConverter
|
||||
{
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.DoubleConverter" /> class. </summary>
|
||||
// Token: 0x0600044B RID: 1099 RVA: 0x0000C944 File Offset: 0x0000AB44
|
||||
public DoubleConverter()
|
||||
{
|
||||
this.InnerType = typeof(double);
|
||||
}
|
||||
|
||||
// Token: 0x17000122 RID: 290
|
||||
// (get) Token: 0x0600044C RID: 1100 RVA: 0x0000C95C File Offset: 0x0000AB5C
|
||||
internal override bool SupportHex
|
||||
{
|
||||
get
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600044D RID: 1101 RVA: 0x0000C960 File Offset: 0x0000AB60
|
||||
internal override string ConvertToString(object value, NumberFormatInfo format)
|
||||
{
|
||||
return ((double)value).ToString("R", format);
|
||||
}
|
||||
|
||||
// Token: 0x0600044E RID: 1102 RVA: 0x0000C984 File Offset: 0x0000AB84
|
||||
internal override object ConvertFromString(string value, NumberFormatInfo format)
|
||||
{
|
||||
return double.Parse(value, NumberStyles.Float, format);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,102 @@
|
||||
using System;
|
||||
|
||||
namespace System.ComponentModel
|
||||
{
|
||||
/// <summary>Specifies the editor to use to change a property. This class cannot be inherited.</summary>
|
||||
// Token: 0x02000079 RID: 121
|
||||
[AttributeUsage(AttributeTargets.All, AllowMultiple = true, Inherited = true)]
|
||||
public sealed class EditorAttribute : Attribute
|
||||
{
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.EditorAttribute" /> class with the default editor, which is no editor.</summary>
|
||||
// Token: 0x0600044F RID: 1103 RVA: 0x0000C998 File Offset: 0x0000AB98
|
||||
public EditorAttribute()
|
||||
{
|
||||
this.name = string.Empty;
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.EditorAttribute" /> class with the type name and base type name of the editor.</summary>
|
||||
/// <param name="typeName">The fully qualified type name of the editor. </param>
|
||||
/// <param name="baseTypeName">The fully qualified type name of the base class or interface to use as a lookup key for the editor. This class must be or derive from <see cref="T:System.Drawing.Design.UITypeEditor" />. </param>
|
||||
// Token: 0x06000450 RID: 1104 RVA: 0x0000C9AC File Offset: 0x0000ABAC
|
||||
public EditorAttribute(string typeName, string baseTypeName)
|
||||
{
|
||||
this.name = typeName;
|
||||
this.basename = baseTypeName;
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.EditorAttribute" /> class with the type name and the base type.</summary>
|
||||
/// <param name="typeName">The fully qualified type name of the editor. </param>
|
||||
/// <param name="baseType">The <see cref="T:System.Type" /> of the base class or interface to use as a lookup key for the editor. This class must be or derive from <see cref="T:System.Drawing.Design.UITypeEditor" />. </param>
|
||||
// Token: 0x06000451 RID: 1105 RVA: 0x0000C9C4 File Offset: 0x0000ABC4
|
||||
public EditorAttribute(string typeName, Type baseType)
|
||||
: this(typeName, baseType.AssemblyQualifiedName)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.EditorAttribute" /> class with the type and the base type.</summary>
|
||||
/// <param name="type">A <see cref="T:System.Type" /> that represents the type of the editor. </param>
|
||||
/// <param name="baseType">The <see cref="T:System.Type" /> of the base class or interface to use as a lookup key for the editor. This class must be or derive from <see cref="T:System.Drawing.Design.UITypeEditor" />. </param>
|
||||
// Token: 0x06000452 RID: 1106 RVA: 0x0000C9D4 File Offset: 0x0000ABD4
|
||||
public EditorAttribute(Type type, Type baseType)
|
||||
: this(type.AssemblyQualifiedName, baseType.AssemblyQualifiedName)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Gets the name of the base class or interface serving as a lookup key for this editor.</summary>
|
||||
/// <returns>The name of the base class or interface serving as a lookup key for this editor.</returns>
|
||||
// Token: 0x17000123 RID: 291
|
||||
// (get) Token: 0x06000453 RID: 1107 RVA: 0x0000C9E8 File Offset: 0x0000ABE8
|
||||
public string EditorBaseTypeName
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.basename;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets the name of the editor class in the <see cref="P:System.Type.AssemblyQualifiedName" /> format.</summary>
|
||||
/// <returns>The name of the editor class in the <see cref="P:System.Type.AssemblyQualifiedName" /> format.</returns>
|
||||
// Token: 0x17000124 RID: 292
|
||||
// (get) Token: 0x06000454 RID: 1108 RVA: 0x0000C9F0 File Offset: 0x0000ABF0
|
||||
public string EditorTypeName
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.name;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a unique ID for this attribute type.</summary>
|
||||
/// <returns>A unique ID for this attribute type.</returns>
|
||||
// Token: 0x17000125 RID: 293
|
||||
// (get) Token: 0x06000455 RID: 1109 RVA: 0x0000C9F8 File Offset: 0x0000ABF8
|
||||
public override object TypeId
|
||||
{
|
||||
get
|
||||
{
|
||||
return base.GetType();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Returns whether the value of the given object is equal to the current <see cref="T:System.ComponentModel.EditorAttribute" />.</summary>
|
||||
/// <returns>true if the value of the given object is equal to that of the current object; otherwise, false.</returns>
|
||||
/// <param name="obj">The object to test the value equality of. </param>
|
||||
// Token: 0x06000456 RID: 1110 RVA: 0x0000CA00 File Offset: 0x0000AC00
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
return obj is EditorAttribute && ((EditorAttribute)obj).EditorBaseTypeName.Equals(this.basename) && ((EditorAttribute)obj).EditorTypeName.Equals(this.name);
|
||||
}
|
||||
|
||||
// Token: 0x06000457 RID: 1111 RVA: 0x0000CA50 File Offset: 0x0000AC50
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return (this.name + this.basename).GetHashCode();
|
||||
}
|
||||
|
||||
// Token: 0x0400016B RID: 363
|
||||
private string name;
|
||||
|
||||
// Token: 0x0400016C RID: 364
|
||||
private string basename;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
using System;
|
||||
|
||||
namespace System.ComponentModel
|
||||
{
|
||||
/// <summary>Specifies that a property or method is viewable in an editor. This class cannot be inherited.</summary>
|
||||
// Token: 0x0200007A RID: 122
|
||||
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Enum | AttributeTargets.Constructor | AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Interface | AttributeTargets.Delegate)]
|
||||
public sealed class EditorBrowsableAttribute : Attribute
|
||||
{
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.EditorBrowsableAttribute" /> class with <see cref="P:System.ComponentModel.EditorBrowsableAttribute.State" /> set to the default state.</summary>
|
||||
// Token: 0x06000458 RID: 1112 RVA: 0x0000CA68 File Offset: 0x0000AC68
|
||||
public EditorBrowsableAttribute()
|
||||
{
|
||||
this.state = EditorBrowsableState.Always;
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.EditorBrowsableAttribute" /> class with an <see cref="T:System.ComponentModel.EditorBrowsableState" />.</summary>
|
||||
/// <param name="state">The <see cref="T:System.ComponentModel.EditorBrowsableState" /> to set <see cref="P:System.ComponentModel.EditorBrowsableAttribute.State" /> to. </param>
|
||||
// Token: 0x06000459 RID: 1113 RVA: 0x0000CA78 File Offset: 0x0000AC78
|
||||
public EditorBrowsableAttribute(EditorBrowsableState state)
|
||||
{
|
||||
this.state = state;
|
||||
}
|
||||
|
||||
/// <summary>Gets the browsable state of the property or method.</summary>
|
||||
/// <returns>An <see cref="T:System.ComponentModel.EditorBrowsableState" /> that is the browsable state of the property or method.</returns>
|
||||
// Token: 0x17000126 RID: 294
|
||||
// (get) Token: 0x0600045A RID: 1114 RVA: 0x0000CA88 File Offset: 0x0000AC88
|
||||
public EditorBrowsableState State
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.state;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Returns whether the value of the given object is equal to the current <see cref="T:System.ComponentModel.EditorBrowsableAttribute" />.</summary>
|
||||
/// <returns>true if the value of the given object is equal to that of the current; otherwise, false.</returns>
|
||||
/// <param name="obj">The object to test the value equality of. </param>
|
||||
// Token: 0x0600045B RID: 1115 RVA: 0x0000CA90 File Offset: 0x0000AC90
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
return obj is EditorBrowsableAttribute && (obj == this || ((EditorBrowsableAttribute)obj).State == this.state);
|
||||
}
|
||||
|
||||
// Token: 0x0600045C RID: 1116 RVA: 0x0000CABC File Offset: 0x0000ACBC
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return this.state.GetHashCode();
|
||||
}
|
||||
|
||||
// Token: 0x0400016D RID: 365
|
||||
private EditorBrowsableState state;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
using System;
|
||||
|
||||
namespace System.ComponentModel
|
||||
{
|
||||
/// <summary>Specifies the browsable state of a property or method from within an editor.</summary>
|
||||
// Token: 0x0200007B RID: 123
|
||||
public enum EditorBrowsableState
|
||||
{
|
||||
/// <summary>The property or method is always browsable from within an editor.</summary>
|
||||
// Token: 0x0400016F RID: 367
|
||||
Always,
|
||||
/// <summary>The property or method is never browsable from within an editor.</summary>
|
||||
// Token: 0x04000170 RID: 368
|
||||
Never,
|
||||
/// <summary>The property or method is a feature that only advanced users should see. An editor can either show or hide such properties.</summary>
|
||||
// Token: 0x04000171 RID: 369
|
||||
Advanced
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,311 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.ComponentModel.Design.Serialization;
|
||||
using System.Globalization;
|
||||
using System.Reflection;
|
||||
|
||||
namespace System.ComponentModel
|
||||
{
|
||||
/// <summary>Provides a type converter to convert <see cref="T:System.Enum" /> objects to and from various other representations.</summary>
|
||||
// Token: 0x0200007C RID: 124
|
||||
public class EnumConverter : TypeConverter
|
||||
{
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.EnumConverter" /> class for the given type.</summary>
|
||||
/// <param name="type">A <see cref="T:System.Type" /> that represents the type of enumeration to associate with this enumeration converter. </param>
|
||||
// Token: 0x0600045D RID: 1117 RVA: 0x0000CAD0 File Offset: 0x0000ACD0
|
||||
public EnumConverter(Type type)
|
||||
{
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
/// <summary>Gets a value indicating whether this converter can convert an object to the given destination type using the context.</summary>
|
||||
/// <returns>true if this converter can perform the conversion; otherwise, false.</returns>
|
||||
/// <param name="context">An <see cref="T:System.ComponentModel.ITypeDescriptorContext" /> that provides a format context. </param>
|
||||
/// <param name="destinationType">A <see cref="T:System.Type" /> that represents the type you wish to convert to. </param>
|
||||
// Token: 0x0600045E RID: 1118 RVA: 0x0000CAE0 File Offset: 0x0000ACE0
|
||||
public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType)
|
||||
{
|
||||
return destinationType == typeof(global::System.ComponentModel.Design.Serialization.InstanceDescriptor) || destinationType == typeof(Enum[]) || base.CanConvertTo(context, destinationType);
|
||||
}
|
||||
|
||||
/// <summary>Converts the given value object to the specified destination type.</summary>
|
||||
/// <returns>An <see cref="T:System.Object" /> that represents the converted <paramref name="value" />.</returns>
|
||||
/// <param name="context">An <see cref="T:System.ComponentModel.ITypeDescriptorContext" /> that provides a format context. </param>
|
||||
/// <param name="culture">An optional <see cref="T:System.Globalization.CultureInfo" />. If not supplied, the current culture is assumed. </param>
|
||||
/// <param name="value">The <see cref="T:System.Object" /> to convert. </param>
|
||||
/// <param name="destinationType">The <see cref="T:System.Type" /> to convert the value to. </param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="destinationType" /> is null. </exception>
|
||||
/// <exception cref="T:System.ArgumentException">
|
||||
/// <paramref name="value" /> is not a valid value for the enumeration. </exception>
|
||||
/// <exception cref="T:System.NotSupportedException">The conversion cannot be performed. </exception>
|
||||
// Token: 0x0600045F RID: 1119 RVA: 0x0000CB1C File Offset: 0x0000AD1C
|
||||
public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
|
||||
{
|
||||
if (destinationType != typeof(string) || value == null)
|
||||
{
|
||||
if (destinationType == typeof(global::System.ComponentModel.Design.Serialization.InstanceDescriptor) && value != null)
|
||||
{
|
||||
string text = base.ConvertToString(context, culture, value);
|
||||
if (this.IsFlags && text.IndexOf(",") != -1)
|
||||
{
|
||||
if (value is IConvertible)
|
||||
{
|
||||
Type underlyingType = Enum.GetUnderlyingType(this.type);
|
||||
object obj = ((IConvertible)value).ToType(underlyingType, culture);
|
||||
MethodInfo method = typeof(Enum).GetMethod("ToObject", new Type[]
|
||||
{
|
||||
typeof(Type),
|
||||
underlyingType
|
||||
});
|
||||
return new global::System.ComponentModel.Design.Serialization.InstanceDescriptor(method, new object[] { this.type, obj });
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
FieldInfo field = this.type.GetField(text);
|
||||
if (field != null)
|
||||
{
|
||||
return new global::System.ComponentModel.Design.Serialization.InstanceDescriptor(field, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (destinationType == typeof(Enum[]) && value != null)
|
||||
{
|
||||
if (!this.IsFlags)
|
||||
{
|
||||
return new Enum[] { (Enum)Enum.ToObject(this.type, value) };
|
||||
}
|
||||
long num = Convert.ToInt64((Enum)value, culture);
|
||||
Array values = Enum.GetValues(this.type);
|
||||
long[] array = new long[values.Length];
|
||||
for (int i = 0; i < values.Length; i++)
|
||||
{
|
||||
array[i] = Convert.ToInt64(values.GetValue(i));
|
||||
}
|
||||
ArrayList arrayList = new ArrayList();
|
||||
bool flag = false;
|
||||
while (!flag)
|
||||
{
|
||||
flag = true;
|
||||
foreach (long num2 in array)
|
||||
{
|
||||
if ((num2 != 0L && (num2 & num) == num2) || num2 == num)
|
||||
{
|
||||
arrayList.Add(Enum.ToObject(this.type, num2));
|
||||
num &= ~num2;
|
||||
flag = false;
|
||||
}
|
||||
}
|
||||
if (num == 0L)
|
||||
{
|
||||
flag = true;
|
||||
}
|
||||
}
|
||||
if (num != 0L)
|
||||
{
|
||||
arrayList.Add(Enum.ToObject(this.type, num));
|
||||
}
|
||||
return arrayList.ToArray(typeof(Enum));
|
||||
}
|
||||
return base.ConvertTo(context, culture, value, destinationType);
|
||||
}
|
||||
if (value is IConvertible)
|
||||
{
|
||||
Type underlyingType2 = Enum.GetUnderlyingType(this.type);
|
||||
if (underlyingType2 != value.GetType())
|
||||
{
|
||||
value = ((IConvertible)value).ToType(underlyingType2, culture);
|
||||
}
|
||||
}
|
||||
if (!this.IsFlags && !this.IsValid(context, value))
|
||||
{
|
||||
throw this.CreateValueNotValidException(value);
|
||||
}
|
||||
return Enum.Format(this.type, value, "G");
|
||||
}
|
||||
|
||||
/// <summary>Gets a value indicating whether this converter can convert an object in the given source type to an enumeration object using the specified context.</summary>
|
||||
/// <returns>true if this converter can perform the conversion; otherwise, false.</returns>
|
||||
/// <param name="context">An <see cref="T:System.ComponentModel.ITypeDescriptorContext" /> that provides a format context. </param>
|
||||
/// <param name="sourceType">A <see cref="T:System.Type" /> that represents the type you wish to convert from. </param>
|
||||
// Token: 0x06000460 RID: 1120 RVA: 0x0000CDC8 File Offset: 0x0000AFC8
|
||||
public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType)
|
||||
{
|
||||
return sourceType == typeof(string) || sourceType == typeof(Enum[]) || base.CanConvertFrom(context, sourceType);
|
||||
}
|
||||
|
||||
/// <summary>Converts the specified value object to an enumeration object.</summary>
|
||||
/// <returns>An <see cref="T:System.Object" /> that represents the converted <paramref name="value" />.</returns>
|
||||
/// <param name="context">An <see cref="T:System.ComponentModel.ITypeDescriptorContext" /> that provides a format context. </param>
|
||||
/// <param name="culture">An optional <see cref="T:System.Globalization.CultureInfo" />. If not supplied, the current culture is assumed. </param>
|
||||
/// <param name="value">The <see cref="T:System.Object" /> to convert. </param>
|
||||
/// <exception cref="T:System.FormatException">
|
||||
/// <paramref name="value" /> is not a valid value for the target type. </exception>
|
||||
/// <exception cref="T:System.NotSupportedException">The conversion cannot be performed. </exception>
|
||||
// Token: 0x06000461 RID: 1121 RVA: 0x0000CE04 File Offset: 0x0000B004
|
||||
public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value)
|
||||
{
|
||||
if (value is string)
|
||||
{
|
||||
string text = value as string;
|
||||
try
|
||||
{
|
||||
if (text.IndexOf(',') == -1)
|
||||
{
|
||||
return Enum.Parse(this.type, text, true);
|
||||
}
|
||||
long num = 0L;
|
||||
string[] array = text.Split(new char[] { ',' });
|
||||
foreach (string text2 in array)
|
||||
{
|
||||
Enum @enum = (Enum)Enum.Parse(this.type, text2, true);
|
||||
num |= Convert.ToInt64(@enum, culture);
|
||||
}
|
||||
return Enum.ToObject(this.type, num);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
throw new FormatException(text + " is not a valid value for " + this.type.Name, ex);
|
||||
}
|
||||
}
|
||||
if (value is Enum[])
|
||||
{
|
||||
long num2 = 0L;
|
||||
foreach (Enum enum2 in (Enum[])value)
|
||||
{
|
||||
num2 |= Convert.ToInt64(enum2, culture);
|
||||
}
|
||||
return Enum.ToObject(this.type, num2);
|
||||
}
|
||||
return base.ConvertFrom(context, culture, value);
|
||||
}
|
||||
|
||||
/// <summary>Gets a value indicating whether the given object value is valid for this type.</summary>
|
||||
/// <returns>true if the specified value is valid for this object; otherwise, false.</returns>
|
||||
/// <param name="context">An <see cref="T:System.ComponentModel.ITypeDescriptorContext" /> that provides a format context. </param>
|
||||
/// <param name="value">The <see cref="T:System.Object" /> to test. </param>
|
||||
// Token: 0x06000462 RID: 1122 RVA: 0x0000CF54 File Offset: 0x0000B154
|
||||
public override bool IsValid(ITypeDescriptorContext context, object value)
|
||||
{
|
||||
return Enum.IsDefined(this.type, value);
|
||||
}
|
||||
|
||||
/// <summary>Gets a value indicating whether this object supports a standard set of values that can be picked from a list using the specified context.</summary>
|
||||
/// <returns>true because <see cref="M:System.ComponentModel.TypeConverter.GetStandardValues" /> should be called to find a common set of values the object supports. This method never returns false.</returns>
|
||||
/// <param name="context">An <see cref="T:System.ComponentModel.ITypeDescriptorContext" /> that provides a format context. </param>
|
||||
// Token: 0x06000463 RID: 1123 RVA: 0x0000CF64 File Offset: 0x0000B164
|
||||
public override bool GetStandardValuesSupported(ITypeDescriptorContext context)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>Gets a value indicating whether the list of standard values returned from <see cref="M:System.ComponentModel.TypeConverter.GetStandardValues" /> is an exclusive list using the specified context.</summary>
|
||||
/// <returns>true if the <see cref="T:System.ComponentModel.TypeConverter.StandardValuesCollection" /> returned from <see cref="M:System.ComponentModel.TypeConverter.GetStandardValues" /> is an exhaustive list of possible values; false if other values are possible.</returns>
|
||||
/// <param name="context">An <see cref="T:System.ComponentModel.ITypeDescriptorContext" /> that provides a format context. </param>
|
||||
// Token: 0x06000464 RID: 1124 RVA: 0x0000CF68 File Offset: 0x0000B168
|
||||
public override bool GetStandardValuesExclusive(ITypeDescriptorContext context)
|
||||
{
|
||||
return !this.IsFlags;
|
||||
}
|
||||
|
||||
/// <summary>Gets a collection of standard values for the data type this validator is designed for.</summary>
|
||||
/// <returns>A <see cref="T:System.ComponentModel.TypeConverter.StandardValuesCollection" /> that holds a standard set of valid values, or null if the data type does not support a standard set of values.</returns>
|
||||
/// <param name="context">An <see cref="T:System.ComponentModel.ITypeDescriptorContext" /> that provides a format context. </param>
|
||||
// Token: 0x06000465 RID: 1125 RVA: 0x0000CF74 File Offset: 0x0000B174
|
||||
public override TypeConverter.StandardValuesCollection GetStandardValues(ITypeDescriptorContext context)
|
||||
{
|
||||
if (this.stdValues == null)
|
||||
{
|
||||
Array values = Enum.GetValues(this.type);
|
||||
Array.Sort(values);
|
||||
this.stdValues = new TypeConverter.StandardValuesCollection(values);
|
||||
}
|
||||
return this.stdValues;
|
||||
}
|
||||
|
||||
/// <summary>Gets an <see cref="T:System.Collections.IComparer" /> that can be used to sort the values of the enumeration.</summary>
|
||||
/// <returns>An <see cref="T:System.Collections.IComparer" /> for sorting the enumeration values.</returns>
|
||||
// Token: 0x17000127 RID: 295
|
||||
// (get) Token: 0x06000466 RID: 1126 RVA: 0x0000CFB0 File Offset: 0x0000B1B0
|
||||
protected virtual IComparer Comparer
|
||||
{
|
||||
get
|
||||
{
|
||||
return new EnumConverter.EnumComparer();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Specifies the type of the enumerator this converter is associated with.</summary>
|
||||
/// <returns>The type of the enumerator this converter is associated with.</returns>
|
||||
// Token: 0x17000128 RID: 296
|
||||
// (get) Token: 0x06000467 RID: 1127 RVA: 0x0000CFB8 File Offset: 0x0000B1B8
|
||||
protected Type EnumType
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.type;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets or sets a <see cref="T:System.ComponentModel.TypeConverter.StandardValuesCollection" /> that specifies the possible values for the enumeration.</summary>
|
||||
/// <returns>A <see cref="T:System.ComponentModel.TypeConverter.StandardValuesCollection" /> that specifies the possible values for the enumeration.</returns>
|
||||
// Token: 0x17000129 RID: 297
|
||||
// (get) Token: 0x06000468 RID: 1128 RVA: 0x0000CFC0 File Offset: 0x0000B1C0
|
||||
// (set) Token: 0x06000469 RID: 1129 RVA: 0x0000CFC8 File Offset: 0x0000B1C8
|
||||
protected TypeConverter.StandardValuesCollection Values
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.stdValues;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.stdValues = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600046A RID: 1130 RVA: 0x0000CFD4 File Offset: 0x0000B1D4
|
||||
private ArgumentException CreateValueNotValidException(object value)
|
||||
{
|
||||
string text = string.Format(CultureInfo.InvariantCulture, "The value '{0}' is not a valid value for the enum '{1}'", new object[]
|
||||
{
|
||||
value,
|
||||
this.type.Name
|
||||
});
|
||||
return new ArgumentException(text);
|
||||
}
|
||||
|
||||
// Token: 0x1700012A RID: 298
|
||||
// (get) Token: 0x0600046B RID: 1131 RVA: 0x0000D010 File Offset: 0x0000B210
|
||||
private bool IsFlags
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.type.IsDefined(typeof(FlagsAttribute), false);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04000172 RID: 370
|
||||
private Type type;
|
||||
|
||||
// Token: 0x04000173 RID: 371
|
||||
private TypeConverter.StandardValuesCollection stdValues;
|
||||
|
||||
// Token: 0x0200007D RID: 125
|
||||
private class EnumComparer : IComparer
|
||||
{
|
||||
// Token: 0x0600046D RID: 1133 RVA: 0x0000D030 File Offset: 0x0000B230
|
||||
int IComparer.Compare(object compareObject1, object compareObject2)
|
||||
{
|
||||
string text = compareObject1 as string;
|
||||
string text2 = compareObject2 as string;
|
||||
if (text == null || text2 == null)
|
||||
{
|
||||
return global::System.Collections.Comparer.Default.Compare(compareObject1, compareObject2);
|
||||
}
|
||||
return CultureInfo.InvariantCulture.CompareInfo.Compare(text, text2);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.ComponentModel
|
||||
{
|
||||
/// <summary>Provides information about an event.</summary>
|
||||
// Token: 0x0200007E RID: 126
|
||||
[ComVisible(true)]
|
||||
public abstract class EventDescriptor : MemberDescriptor
|
||||
{
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.EventDescriptor" /> class with the name and attributes in the specified <see cref="T:System.ComponentModel.MemberDescriptor" />.</summary>
|
||||
/// <param name="descr">A <see cref="T:System.ComponentModel.MemberDescriptor" /> that contains the name of the event and its attributes. </param>
|
||||
// Token: 0x0600046E RID: 1134 RVA: 0x0000D078 File Offset: 0x0000B278
|
||||
protected EventDescriptor(MemberDescriptor desc)
|
||||
: base(desc)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.EventDescriptor" /> class with the name in the specified <see cref="T:System.ComponentModel.MemberDescriptor" /> and the attributes in both the <see cref="T:System.ComponentModel.MemberDescriptor" /> and the <see cref="T:System.Attribute" /> array.</summary>
|
||||
/// <param name="descr">A <see cref="T:System.ComponentModel.MemberDescriptor" /> that has the name of the member and its attributes. </param>
|
||||
/// <param name="attrs">An <see cref="T:System.Attribute" /> array with the attributes you want to add to this event description. </param>
|
||||
// Token: 0x0600046F RID: 1135 RVA: 0x0000D084 File Offset: 0x0000B284
|
||||
protected EventDescriptor(MemberDescriptor desc, Attribute[] attrs)
|
||||
: base(desc, attrs)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.EventDescriptor" /> class with the specified name and attribute array.</summary>
|
||||
/// <param name="name">The name of the event. </param>
|
||||
/// <param name="attrs">An array of type <see cref="T:System.Attribute" /> that contains the event attributes. </param>
|
||||
// Token: 0x06000470 RID: 1136 RVA: 0x0000D090 File Offset: 0x0000B290
|
||||
protected EventDescriptor(string str, Attribute[] attrs)
|
||||
: base(str, attrs)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>When overridden in a derived class, binds the event to the component.</summary>
|
||||
/// <param name="component">A component that provides events to the delegate. </param>
|
||||
/// <param name="value">A delegate that represents the method that handles the event. </param>
|
||||
// Token: 0x06000471 RID: 1137
|
||||
public abstract void AddEventHandler(object component, Delegate value);
|
||||
|
||||
/// <summary>When overridden in a derived class, unbinds the delegate from the component so that the delegate will no longer receive events from the component.</summary>
|
||||
/// <param name="component">The component that the delegate is bound to. </param>
|
||||
/// <param name="value">The delegate to unbind from the component. </param>
|
||||
// Token: 0x06000472 RID: 1138
|
||||
public abstract void RemoveEventHandler(object component, Delegate value);
|
||||
|
||||
/// <summary>When overridden in a derived class, gets the type of component this event is bound to.</summary>
|
||||
/// <returns>A <see cref="T:System.Type" /> that represents the type of component the event is bound to.</returns>
|
||||
// Token: 0x1700012B RID: 299
|
||||
// (get) Token: 0x06000473 RID: 1139
|
||||
public abstract Type ComponentType { get; }
|
||||
|
||||
/// <summary>When overridden in a derived class, gets the type of delegate for the event.</summary>
|
||||
/// <returns>A <see cref="T:System.Type" /> that represents the type of delegate for the event.</returns>
|
||||
// Token: 0x1700012C RID: 300
|
||||
// (get) Token: 0x06000474 RID: 1140
|
||||
public abstract Type EventType { get; }
|
||||
|
||||
/// <summary>When overridden in a derived class, gets a value indicating whether the event delegate is a multicast delegate.</summary>
|
||||
/// <returns>true if the event delegate is multicast; otherwise, false.</returns>
|
||||
// Token: 0x1700012D RID: 301
|
||||
// (get) Token: 0x06000475 RID: 1141
|
||||
public abstract bool IsMulticast { get; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,511 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.ComponentModel
|
||||
{
|
||||
/// <summary>Represents a collection of <see cref="T:System.ComponentModel.EventDescriptor" /> objects.</summary>
|
||||
// Token: 0x0200007F RID: 127
|
||||
[ComVisible(true)]
|
||||
public class EventDescriptorCollection : ICollection, IEnumerable, IList
|
||||
{
|
||||
// Token: 0x06000476 RID: 1142 RVA: 0x0000D09C File Offset: 0x0000B29C
|
||||
private EventDescriptorCollection()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x06000477 RID: 1143 RVA: 0x0000D0B0 File Offset: 0x0000B2B0
|
||||
internal EventDescriptorCollection(ArrayList list)
|
||||
{
|
||||
this.eventList = list;
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.EventDescriptorCollection" /> class with the given array of <see cref="T:System.ComponentModel.EventDescriptor" /> objects.</summary>
|
||||
/// <param name="events">An array of type <see cref="T:System.ComponentModel.EventDescriptor" /> that provides the events for this collection. </param>
|
||||
// Token: 0x06000478 RID: 1144 RVA: 0x0000D0CC File Offset: 0x0000B2CC
|
||||
public EventDescriptorCollection(EventDescriptor[] events)
|
||||
: this(events, false)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.EventDescriptorCollection" /> class with the given array of <see cref="T:System.ComponentModel.EventDescriptor" /> objects. The collection is optionally read-only.</summary>
|
||||
/// <param name="events">An array of type <see cref="T:System.ComponentModel.EventDescriptor" /> that provides the events for this collection. </param>
|
||||
/// <param name="readOnly">true to specify a read-only collection; otherwise, false.</param>
|
||||
// Token: 0x06000479 RID: 1145 RVA: 0x0000D0D8 File Offset: 0x0000B2D8
|
||||
public EventDescriptorCollection(EventDescriptor[] events, bool readOnly)
|
||||
{
|
||||
this.isReadOnly = readOnly;
|
||||
if (events == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
for (int i = 0; i < events.Length; i++)
|
||||
{
|
||||
this.Add(events[i]);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Removes all the items from the collection.</summary>
|
||||
/// <exception cref="T:System.NotSupportedException">The collection is read-only.</exception>
|
||||
// Token: 0x0600047B RID: 1147 RVA: 0x0000D134 File Offset: 0x0000B334
|
||||
void IList.Clear()
|
||||
{
|
||||
this.Clear();
|
||||
}
|
||||
|
||||
/// <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: 0x0600047C RID: 1148 RVA: 0x0000D13C File Offset: 0x0000B33C
|
||||
IEnumerator IEnumerable.GetEnumerator()
|
||||
{
|
||||
return this.GetEnumerator();
|
||||
}
|
||||
|
||||
/// <summary>Removes the item at the specified index.</summary>
|
||||
/// <param name="index">The zero-based index of the item to remove.</param>
|
||||
/// <exception cref="T:System.NotSupportedException">The collection is read-only.</exception>
|
||||
// Token: 0x0600047D RID: 1149 RVA: 0x0000D144 File Offset: 0x0000B344
|
||||
void IList.RemoveAt(int index)
|
||||
{
|
||||
this.RemoveAt(index);
|
||||
}
|
||||
|
||||
/// <summary>Gets the number of elements contained in the collection.</summary>
|
||||
/// <returns>The number of elements contained in the collection.</returns>
|
||||
// Token: 0x1700012E RID: 302
|
||||
// (get) Token: 0x0600047E RID: 1150 RVA: 0x0000D150 File Offset: 0x0000B350
|
||||
int ICollection.Count
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Count;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Adds an item to the collection.</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 collection.</param>
|
||||
/// <exception cref="T:System.NotSupportedException">The collection is read-only.</exception>
|
||||
// Token: 0x0600047F RID: 1151 RVA: 0x0000D158 File Offset: 0x0000B358
|
||||
int IList.Add(object value)
|
||||
{
|
||||
return this.Add((EventDescriptor)value);
|
||||
}
|
||||
|
||||
/// <summary>Determines whether the collection contains a specific value.</summary>
|
||||
/// <returns>true if the <see cref="T:System.Object" /> is found in the collection; otherwise, false.</returns>
|
||||
/// <param name="value">The <see cref="T:System.Object" /> to locate in the collection.</param>
|
||||
// Token: 0x06000480 RID: 1152 RVA: 0x0000D168 File Offset: 0x0000B368
|
||||
bool IList.Contains(object value)
|
||||
{
|
||||
return this.Contains((EventDescriptor)value);
|
||||
}
|
||||
|
||||
/// <summary>Determines the index of a specific item in the collection.</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 collection.</param>
|
||||
// Token: 0x06000481 RID: 1153 RVA: 0x0000D178 File Offset: 0x0000B378
|
||||
int IList.IndexOf(object value)
|
||||
{
|
||||
return this.IndexOf((EventDescriptor)value);
|
||||
}
|
||||
|
||||
/// <summary>Inserts an item to the collection 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 collection.</param>
|
||||
/// <exception cref="T:System.NotSupportedException">The collection is read-only.</exception>
|
||||
// Token: 0x06000482 RID: 1154 RVA: 0x0000D188 File Offset: 0x0000B388
|
||||
void IList.Insert(int index, object value)
|
||||
{
|
||||
this.Insert(index, (EventDescriptor)value);
|
||||
}
|
||||
|
||||
/// <summary>Removes the first occurrence of a specific object from the collection.</summary>
|
||||
/// <param name="value">The <see cref="T:System.Object" /> to remove from the collection.</param>
|
||||
/// <exception cref="T:System.NotSupportedException">The collection is read-only.</exception>
|
||||
// Token: 0x06000483 RID: 1155 RVA: 0x0000D198 File Offset: 0x0000B398
|
||||
void IList.Remove(object value)
|
||||
{
|
||||
this.Remove((EventDescriptor)value);
|
||||
}
|
||||
|
||||
/// <summary>Gets a value indicating whether the collection has a fixed size.</summary>
|
||||
/// <returns>true if the collection has a fixed size; otherwise, false.</returns>
|
||||
// Token: 0x1700012F RID: 303
|
||||
// (get) Token: 0x06000484 RID: 1156 RVA: 0x0000D1A8 File Offset: 0x0000B3A8
|
||||
bool IList.IsFixedSize
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.isReadOnly;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a value indicating whether the collection is read-only.</summary>
|
||||
/// <returns>true if the collection is read-only; otherwise, false.</returns>
|
||||
// Token: 0x17000130 RID: 304
|
||||
// (get) Token: 0x06000485 RID: 1157 RVA: 0x0000D1B0 File Offset: 0x0000B3B0
|
||||
bool IList.IsReadOnly
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.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.NotSupportedException">The collection is read-only.</exception>
|
||||
/// <exception cref="T:System.IndexOutOfRangeException">
|
||||
/// <paramref name="index" /> is less than 0. -or-<paramref name="index" /> is equal to or greater than <see cref="P:System.ComponentModel.EventDescriptorCollection.Count" />.</exception>
|
||||
// Token: 0x17000131 RID: 305
|
||||
object IList.this[int index]
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.eventList[index];
|
||||
}
|
||||
set
|
||||
{
|
||||
if (this.isReadOnly)
|
||||
{
|
||||
throw new NotSupportedException("The collection is read-only");
|
||||
}
|
||||
this.eventList[index] = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Copies the elements of the collection 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 collection. The <see cref="T:System.Array" /> must have zero-based indexing.</param>
|
||||
/// <param name="index">The zero-based index in <paramref name="array" /> at which copying begins.</param>
|
||||
// Token: 0x06000488 RID: 1160 RVA: 0x0000D1F0 File Offset: 0x0000B3F0
|
||||
void ICollection.CopyTo(Array array, int index)
|
||||
{
|
||||
this.eventList.CopyTo(array, index);
|
||||
}
|
||||
|
||||
/// <summary>Gets a value indicating whether access to the collection is synchronized.</summary>
|
||||
/// <returns>true if access to the collection is synchronized; otherwise, false.</returns>
|
||||
// Token: 0x17000132 RID: 306
|
||||
// (get) Token: 0x06000489 RID: 1161 RVA: 0x0000D200 File Offset: 0x0000B400
|
||||
bool ICollection.IsSynchronized
|
||||
{
|
||||
get
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets an object that can be used to synchronize access to the collection.</summary>
|
||||
/// <returns>An object that can be used to synchronize access to the collection.</returns>
|
||||
// Token: 0x17000133 RID: 307
|
||||
// (get) Token: 0x0600048A RID: 1162 RVA: 0x0000D204 File Offset: 0x0000B404
|
||||
object ICollection.SyncRoot
|
||||
{
|
||||
get
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Adds an <see cref="T:System.ComponentModel.EventDescriptor" /> to the end of the collection.</summary>
|
||||
/// <returns>The position of the <see cref="T:System.ComponentModel.EventDescriptor" /> within the collection.</returns>
|
||||
/// <param name="value">An <see cref="T:System.ComponentModel.EventDescriptor" /> to add to the collection. </param>
|
||||
/// <exception cref="T:System.NotSupportedException">The collection is read-only.</exception>
|
||||
// Token: 0x0600048B RID: 1163 RVA: 0x0000D208 File Offset: 0x0000B408
|
||||
public int Add(EventDescriptor value)
|
||||
{
|
||||
if (this.isReadOnly)
|
||||
{
|
||||
throw new NotSupportedException("The collection is read-only");
|
||||
}
|
||||
return this.eventList.Add(value);
|
||||
}
|
||||
|
||||
/// <summary>Removes all objects from the collection.</summary>
|
||||
/// <exception cref="T:System.NotSupportedException">The collection is read-only.</exception>
|
||||
// Token: 0x0600048C RID: 1164 RVA: 0x0000D238 File Offset: 0x0000B438
|
||||
public void Clear()
|
||||
{
|
||||
if (this.isReadOnly)
|
||||
{
|
||||
throw new NotSupportedException("The collection is read-only");
|
||||
}
|
||||
this.eventList.Clear();
|
||||
}
|
||||
|
||||
/// <summary>Returns whether the collection contains the given <see cref="T:System.ComponentModel.EventDescriptor" />.</summary>
|
||||
/// <returns>true if the collection contains the <paramref name="value" /> parameter given; otherwise, false.</returns>
|
||||
/// <param name="value">The <see cref="T:System.ComponentModel.EventDescriptor" /> to find within the collection. </param>
|
||||
// Token: 0x0600048D RID: 1165 RVA: 0x0000D25C File Offset: 0x0000B45C
|
||||
public bool Contains(EventDescriptor value)
|
||||
{
|
||||
return this.eventList.Contains(value);
|
||||
}
|
||||
|
||||
/// <summary>Gets the description of the event with the specified name in the collection.</summary>
|
||||
/// <returns>The <see cref="T:System.ComponentModel.EventDescriptor" /> with the specified name, or null if the event does not exist.</returns>
|
||||
/// <param name="name">The name of the event to get from the collection. </param>
|
||||
/// <param name="ignoreCase">true if you want to ignore the case of the event; otherwise, false. </param>
|
||||
// Token: 0x0600048E RID: 1166 RVA: 0x0000D26C File Offset: 0x0000B46C
|
||||
public virtual EventDescriptor Find(string name, bool ignoreCase)
|
||||
{
|
||||
foreach (object obj in this.eventList)
|
||||
{
|
||||
EventDescriptor eventDescriptor = (EventDescriptor)obj;
|
||||
if (ignoreCase)
|
||||
{
|
||||
if (string.Compare(name, eventDescriptor.Name, StringComparison.OrdinalIgnoreCase) == 0)
|
||||
{
|
||||
return eventDescriptor;
|
||||
}
|
||||
}
|
||||
else if (string.Compare(name, eventDescriptor.Name, StringComparison.Ordinal) == 0)
|
||||
{
|
||||
return eventDescriptor;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// <summary>Gets an enumerator for this <see cref="T:System.ComponentModel.EventDescriptorCollection" />.</summary>
|
||||
/// <returns>An enumerator that implements <see cref="T:System.Collections.IEnumerator" />.</returns>
|
||||
// Token: 0x0600048F RID: 1167 RVA: 0x0000D314 File Offset: 0x0000B514
|
||||
public IEnumerator GetEnumerator()
|
||||
{
|
||||
return this.eventList.GetEnumerator();
|
||||
}
|
||||
|
||||
/// <summary>Returns the index of the given <see cref="T:System.ComponentModel.EventDescriptor" />.</summary>
|
||||
/// <returns>The index of the given <see cref="T:System.ComponentModel.EventDescriptor" /> within the collection.</returns>
|
||||
/// <param name="value">The <see cref="T:System.ComponentModel.EventDescriptor" /> to find within the collection. </param>
|
||||
// Token: 0x06000490 RID: 1168 RVA: 0x0000D324 File Offset: 0x0000B524
|
||||
public int IndexOf(EventDescriptor value)
|
||||
{
|
||||
return this.eventList.IndexOf(value);
|
||||
}
|
||||
|
||||
/// <summary>Inserts an <see cref="T:System.ComponentModel.EventDescriptor" /> to the collection at a specified index.</summary>
|
||||
/// <param name="index">The index within the collection in which to insert the <paramref name="value" /> parameter. </param>
|
||||
/// <param name="value">An <see cref="T:System.ComponentModel.EventDescriptor" /> to insert into the collection. </param>
|
||||
/// <exception cref="T:System.NotSupportedException">The collection is read-only.</exception>
|
||||
// Token: 0x06000491 RID: 1169 RVA: 0x0000D334 File Offset: 0x0000B534
|
||||
public void Insert(int index, EventDescriptor value)
|
||||
{
|
||||
if (this.isReadOnly)
|
||||
{
|
||||
throw new NotSupportedException("The collection is read-only");
|
||||
}
|
||||
this.eventList.Insert(index, value);
|
||||
}
|
||||
|
||||
/// <summary>Removes the specified <see cref="T:System.ComponentModel.EventDescriptor" /> from the collection.</summary>
|
||||
/// <param name="value">The <see cref="T:System.ComponentModel.EventDescriptor" /> to remove from the collection. </param>
|
||||
/// <exception cref="T:System.NotSupportedException">The collection is read-only.</exception>
|
||||
// Token: 0x06000492 RID: 1170 RVA: 0x0000D35C File Offset: 0x0000B55C
|
||||
public void Remove(EventDescriptor value)
|
||||
{
|
||||
if (this.isReadOnly)
|
||||
{
|
||||
throw new NotSupportedException("The collection is read-only");
|
||||
}
|
||||
this.eventList.Remove(value);
|
||||
}
|
||||
|
||||
/// <summary>Removes the <see cref="T:System.ComponentModel.EventDescriptor" /> at the specified index from the collection.</summary>
|
||||
/// <param name="index">The index of the <see cref="T:System.ComponentModel.EventDescriptor" /> to remove. </param>
|
||||
/// <exception cref="T:System.NotSupportedException">The collection is read-only.</exception>
|
||||
// Token: 0x06000493 RID: 1171 RVA: 0x0000D38C File Offset: 0x0000B58C
|
||||
public void RemoveAt(int index)
|
||||
{
|
||||
if (this.isReadOnly)
|
||||
{
|
||||
throw new NotSupportedException("The collection is read-only");
|
||||
}
|
||||
this.eventList.RemoveAt(index);
|
||||
}
|
||||
|
||||
/// <summary>Sorts the members of this <see cref="T:System.ComponentModel.EventDescriptorCollection" />, using the default sort for this collection, which is usually alphabetical.</summary>
|
||||
/// <returns>The new <see cref="T:System.ComponentModel.EventDescriptorCollection" />.</returns>
|
||||
// Token: 0x06000494 RID: 1172 RVA: 0x0000D3BC File Offset: 0x0000B5BC
|
||||
public virtual EventDescriptorCollection Sort()
|
||||
{
|
||||
EventDescriptorCollection eventDescriptorCollection = this.CloneCollection();
|
||||
eventDescriptorCollection.InternalSort(null);
|
||||
return eventDescriptorCollection;
|
||||
}
|
||||
|
||||
/// <summary>Sorts the members of this <see cref="T:System.ComponentModel.EventDescriptorCollection" />, using the specified <see cref="T:System.Collections.IComparer" />.</summary>
|
||||
/// <returns>The new <see cref="T:System.ComponentModel.EventDescriptorCollection" />.</returns>
|
||||
/// <param name="comparer">An <see cref="T:System.Collections.IComparer" /> to use to sort the <see cref="T:System.ComponentModel.EventDescriptor" /> objects in this collection. </param>
|
||||
// Token: 0x06000495 RID: 1173 RVA: 0x0000D3D8 File Offset: 0x0000B5D8
|
||||
public virtual EventDescriptorCollection Sort(IComparer comparer)
|
||||
{
|
||||
EventDescriptorCollection eventDescriptorCollection = this.CloneCollection();
|
||||
eventDescriptorCollection.InternalSort(comparer);
|
||||
return eventDescriptorCollection;
|
||||
}
|
||||
|
||||
/// <summary>Sorts the members of this <see cref="T:System.ComponentModel.EventDescriptorCollection" />, given a specified sort order.</summary>
|
||||
/// <returns>The new <see cref="T:System.ComponentModel.EventDescriptorCollection" />.</returns>
|
||||
/// <param name="names">An array of strings describing the order in which to sort the <see cref="T:System.ComponentModel.EventDescriptor" /> objects in the collection. </param>
|
||||
// Token: 0x06000496 RID: 1174 RVA: 0x0000D3F4 File Offset: 0x0000B5F4
|
||||
public virtual EventDescriptorCollection Sort(string[] order)
|
||||
{
|
||||
EventDescriptorCollection eventDescriptorCollection = this.CloneCollection();
|
||||
eventDescriptorCollection.InternalSort(order);
|
||||
return eventDescriptorCollection;
|
||||
}
|
||||
|
||||
/// <summary>Sorts the members of this <see cref="T:System.ComponentModel.EventDescriptorCollection" />, given a specified sort order and an <see cref="T:System.Collections.IComparer" />.</summary>
|
||||
/// <returns>The new <see cref="T:System.ComponentModel.EventDescriptorCollection" />.</returns>
|
||||
/// <param name="names">An array of strings describing the order in which to sort the <see cref="T:System.ComponentModel.EventDescriptor" /> objects in the collection. </param>
|
||||
/// <param name="comparer">An <see cref="T:System.Collections.IComparer" /> to use to sort the <see cref="T:System.ComponentModel.EventDescriptor" /> objects in this collection. </param>
|
||||
// Token: 0x06000497 RID: 1175 RVA: 0x0000D410 File Offset: 0x0000B610
|
||||
public virtual EventDescriptorCollection Sort(string[] order, IComparer comparer)
|
||||
{
|
||||
EventDescriptorCollection eventDescriptorCollection = this.CloneCollection();
|
||||
if (order != null)
|
||||
{
|
||||
ArrayList arrayList = eventDescriptorCollection.ExtractItems(order);
|
||||
eventDescriptorCollection.InternalSort(comparer);
|
||||
arrayList.AddRange(eventDescriptorCollection.eventList);
|
||||
eventDescriptorCollection.eventList = arrayList;
|
||||
}
|
||||
else
|
||||
{
|
||||
eventDescriptorCollection.InternalSort(comparer);
|
||||
}
|
||||
return eventDescriptorCollection;
|
||||
}
|
||||
|
||||
/// <summary>Sorts the members of this <see cref="T:System.ComponentModel.EventDescriptorCollection" />, using the specified <see cref="T:System.Collections.IComparer" />.</summary>
|
||||
/// <param name="sorter">A comparer to use to sort the <see cref="T:System.ComponentModel.EventDescriptor" /> objects in this collection. </param>
|
||||
// Token: 0x06000498 RID: 1176 RVA: 0x0000D45C File Offset: 0x0000B65C
|
||||
protected void InternalSort(IComparer comparer)
|
||||
{
|
||||
if (comparer == null)
|
||||
{
|
||||
comparer = MemberDescriptor.DefaultComparer;
|
||||
}
|
||||
this.eventList.Sort(comparer);
|
||||
}
|
||||
|
||||
/// <summary>Sorts the members of this <see cref="T:System.ComponentModel.EventDescriptorCollection" />. The specified order is applied first, followed by the default sort for this collection, which is usually alphabetical.</summary>
|
||||
/// <param name="names">An array of strings describing the order in which to sort the <see cref="T:System.ComponentModel.EventDescriptor" /> objects in this collection. </param>
|
||||
// Token: 0x06000499 RID: 1177 RVA: 0x0000D478 File Offset: 0x0000B678
|
||||
protected void InternalSort(string[] order)
|
||||
{
|
||||
if (order != null)
|
||||
{
|
||||
ArrayList arrayList = this.ExtractItems(order);
|
||||
this.InternalSort(null);
|
||||
arrayList.AddRange(this.eventList);
|
||||
this.eventList = arrayList;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.InternalSort(null);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600049A RID: 1178 RVA: 0x0000D4BC File Offset: 0x0000B6BC
|
||||
private ArrayList ExtractItems(string[] names)
|
||||
{
|
||||
ArrayList arrayList = new ArrayList(this.eventList.Count);
|
||||
object[] array = new object[names.Length];
|
||||
for (int i = 0; i < this.eventList.Count; i++)
|
||||
{
|
||||
EventDescriptor eventDescriptor = (EventDescriptor)this.eventList[i];
|
||||
int num = Array.IndexOf<string>(names, eventDescriptor.Name);
|
||||
if (num != -1)
|
||||
{
|
||||
array[num] = eventDescriptor;
|
||||
this.eventList.RemoveAt(i);
|
||||
i--;
|
||||
}
|
||||
}
|
||||
foreach (object obj in array)
|
||||
{
|
||||
if (obj != null)
|
||||
{
|
||||
arrayList.Add(obj);
|
||||
}
|
||||
}
|
||||
return arrayList;
|
||||
}
|
||||
|
||||
// Token: 0x0600049B RID: 1179 RVA: 0x0000D570 File Offset: 0x0000B770
|
||||
private EventDescriptorCollection CloneCollection()
|
||||
{
|
||||
return new EventDescriptorCollection
|
||||
{
|
||||
eventList = (ArrayList)this.eventList.Clone()
|
||||
};
|
||||
}
|
||||
|
||||
// Token: 0x0600049C RID: 1180 RVA: 0x0000D59C File Offset: 0x0000B79C
|
||||
internal EventDescriptorCollection Filter(Attribute[] attributes)
|
||||
{
|
||||
EventDescriptorCollection eventDescriptorCollection = new EventDescriptorCollection();
|
||||
foreach (object obj in this.eventList)
|
||||
{
|
||||
EventDescriptor eventDescriptor = (EventDescriptor)obj;
|
||||
if (eventDescriptor.Attributes.Contains(attributes))
|
||||
{
|
||||
eventDescriptorCollection.eventList.Add(eventDescriptor);
|
||||
}
|
||||
}
|
||||
return eventDescriptorCollection;
|
||||
}
|
||||
|
||||
/// <summary>Gets the number of event descriptors in the collection.</summary>
|
||||
/// <returns>The number of event descriptors in the collection.</returns>
|
||||
// Token: 0x17000134 RID: 308
|
||||
// (get) Token: 0x0600049D RID: 1181 RVA: 0x0000D62C File Offset: 0x0000B82C
|
||||
public int Count
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.eventList.Count;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets or sets the event with the specified name.</summary>
|
||||
/// <returns>The <see cref="T:System.ComponentModel.EventDescriptor" /> with the specified name, or null if the event does not exist.</returns>
|
||||
/// <param name="name">The name of the <see cref="T:System.ComponentModel.EventDescriptor" /> to get or set. </param>
|
||||
// Token: 0x17000135 RID: 309
|
||||
public virtual EventDescriptor this[string name]
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Find(name, false);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets or sets the event with the specified index number.</summary>
|
||||
/// <returns>The <see cref="T:System.ComponentModel.EventDescriptor" /> with the specified index number.</returns>
|
||||
/// <param name="index">The zero-based index number of the <see cref="T:System.ComponentModel.EventDescriptor" /> to get or set. </param>
|
||||
/// <exception cref="T:System.IndexOutOfRangeException">
|
||||
/// <paramref name="index" /> is not a valid index for <see cref="P:System.ComponentModel.EventDescriptorCollection.Item(System.Int32)" />. </exception>
|
||||
// Token: 0x17000136 RID: 310
|
||||
public virtual EventDescriptor this[int index]
|
||||
{
|
||||
get
|
||||
{
|
||||
return (EventDescriptor)this.eventList[index];
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04000174 RID: 372
|
||||
private ArrayList eventList = new ArrayList();
|
||||
|
||||
// Token: 0x04000175 RID: 373
|
||||
private bool isReadOnly;
|
||||
|
||||
/// <summary>Specifies an empty collection to use, rather than creating a new one with no items. This static field is read-only.</summary>
|
||||
// Token: 0x04000176 RID: 374
|
||||
public static readonly EventDescriptorCollection Empty = new EventDescriptorCollection(null, true);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,117 @@
|
||||
using System;
|
||||
|
||||
namespace System.ComponentModel
|
||||
{
|
||||
/// <summary>Provides a simple list of delegates. This class cannot be inherited.</summary>
|
||||
// Token: 0x02000081 RID: 129
|
||||
public sealed class EventHandlerList : IDisposable
|
||||
{
|
||||
/// <summary>Gets or sets the delegate for the specified object.</summary>
|
||||
/// <returns>The delegate for the specified key, or null if a delegate does not exist.</returns>
|
||||
/// <param name="key">An object to find in the list. </param>
|
||||
// Token: 0x17000137 RID: 311
|
||||
public Delegate this[object key]
|
||||
{
|
||||
get
|
||||
{
|
||||
if (key == null)
|
||||
{
|
||||
return this.null_entry;
|
||||
}
|
||||
ListEntry listEntry = this.FindEntry(key);
|
||||
if (listEntry != null)
|
||||
{
|
||||
return listEntry.value;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.AddHandler(key, value);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Adds a delegate to the list.</summary>
|
||||
/// <param name="key">The object that owns the event. </param>
|
||||
/// <param name="value">The delegate to add to the list. </param>
|
||||
// Token: 0x060004A4 RID: 1188 RVA: 0x0000D6A8 File Offset: 0x0000B8A8
|
||||
public void AddHandler(object key, Delegate value)
|
||||
{
|
||||
if (key == null)
|
||||
{
|
||||
this.null_entry = Delegate.Combine(this.null_entry, value);
|
||||
return;
|
||||
}
|
||||
ListEntry listEntry = this.FindEntry(key);
|
||||
if (listEntry == null)
|
||||
{
|
||||
listEntry = new ListEntry();
|
||||
listEntry.key = key;
|
||||
listEntry.value = null;
|
||||
listEntry.next = this.entries;
|
||||
this.entries = listEntry;
|
||||
}
|
||||
listEntry.value = Delegate.Combine(listEntry.value, value);
|
||||
}
|
||||
|
||||
/// <summary>Adds a list of delegates to the current list.</summary>
|
||||
/// <param name="listToAddFrom">The list to add.</param>
|
||||
// Token: 0x060004A5 RID: 1189 RVA: 0x0000D718 File Offset: 0x0000B918
|
||||
public void AddHandlers(EventHandlerList listToAddFrom)
|
||||
{
|
||||
if (listToAddFrom == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
for (ListEntry next = listToAddFrom.entries; next != null; next = next.next)
|
||||
{
|
||||
this.AddHandler(next.key, next.value);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Removes a delegate from the list.</summary>
|
||||
/// <param name="key">The object that owns the event. </param>
|
||||
/// <param name="value">The delegate to remove from the list. </param>
|
||||
// Token: 0x060004A6 RID: 1190 RVA: 0x0000D758 File Offset: 0x0000B958
|
||||
public void RemoveHandler(object key, Delegate value)
|
||||
{
|
||||
if (key == null)
|
||||
{
|
||||
this.null_entry = Delegate.Remove(this.null_entry, value);
|
||||
return;
|
||||
}
|
||||
ListEntry listEntry = this.FindEntry(key);
|
||||
if (listEntry == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
listEntry.value = Delegate.Remove(listEntry.value, value);
|
||||
}
|
||||
|
||||
/// <summary>Disposes the delegate list.</summary>
|
||||
// Token: 0x060004A7 RID: 1191 RVA: 0x0000D7A0 File Offset: 0x0000B9A0
|
||||
public void Dispose()
|
||||
{
|
||||
this.entries = null;
|
||||
}
|
||||
|
||||
// Token: 0x060004A8 RID: 1192 RVA: 0x0000D7AC File Offset: 0x0000B9AC
|
||||
private ListEntry FindEntry(object key)
|
||||
{
|
||||
for (ListEntry next = this.entries; next != null; next = next.next)
|
||||
{
|
||||
if (next.key == key)
|
||||
{
|
||||
return next;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
// Token: 0x0400017A RID: 378
|
||||
private ListEntry entries;
|
||||
|
||||
// Token: 0x0400017B RID: 379
|
||||
private Delegate null_entry;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
using System;
|
||||
|
||||
namespace System.ComponentModel
|
||||
{
|
||||
/// <summary>Provides a type converter to convert expandable objects to and from various other representations.</summary>
|
||||
// Token: 0x02000082 RID: 130
|
||||
public class ExpandableObjectConverter : TypeConverter
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,84 @@
|
||||
using System;
|
||||
using System.ComponentModel.Design.Serialization;
|
||||
using System.Globalization;
|
||||
using System.Reflection;
|
||||
|
||||
namespace System.ComponentModel
|
||||
{
|
||||
/// <summary>Provides a type converter to convert <see cref="T:System.Guid" /> objects to and from various other representations.</summary>
|
||||
// Token: 0x02000083 RID: 131
|
||||
public class GuidConverter : TypeConverter
|
||||
{
|
||||
/// <summary>Gets a value indicating whether this converter can convert an object in the given source type to a GUID object using the context.</summary>
|
||||
/// <returns>true if this converter can perform the conversion; otherwise, false.</returns>
|
||||
/// <param name="context">An <see cref="T:System.ComponentModel.ITypeDescriptorContext" /> that provides a format context. </param>
|
||||
/// <param name="sourceType">A <see cref="T:System.Type" /> that represents the type you wish to convert from. </param>
|
||||
// Token: 0x060004AB RID: 1195 RVA: 0x0000D7F4 File Offset: 0x0000B9F4
|
||||
public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType)
|
||||
{
|
||||
return sourceType == typeof(string) || base.CanConvertFrom(context, sourceType);
|
||||
}
|
||||
|
||||
/// <summary>Gets a value indicating whether this converter can convert an object to the given destination type using the context.</summary>
|
||||
/// <returns>true if this converter can perform the conversion; otherwise, false.</returns>
|
||||
/// <param name="context">An <see cref="T:System.ComponentModel.ITypeDescriptorContext" /> that provides a format context. </param>
|
||||
/// <param name="destinationType">A <see cref="T:System.Type" /> that represents the type you wish to convert to. </param>
|
||||
// Token: 0x060004AC RID: 1196 RVA: 0x0000D810 File Offset: 0x0000BA10
|
||||
public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType)
|
||||
{
|
||||
return destinationType == typeof(string) || destinationType == typeof(global::System.ComponentModel.Design.Serialization.InstanceDescriptor) || base.CanConvertTo(context, destinationType);
|
||||
}
|
||||
|
||||
/// <summary>Converts the given object to a GUID object.</summary>
|
||||
/// <returns>An <see cref="T:System.Object" /> that represents the converted <paramref name="value" />.</returns>
|
||||
/// <param name="context">An <see cref="T:System.ComponentModel.ITypeDescriptorContext" /> that provides a format context. </param>
|
||||
/// <param name="culture">An optional <see cref="T:System.Globalization.CultureInfo" />. If not supplied, the current culture is assumed. </param>
|
||||
/// <param name="value">The <see cref="T:System.Object" /> to convert. </param>
|
||||
/// <exception cref="T:System.NotSupportedException">The conversion cannot be performed. </exception>
|
||||
// Token: 0x060004AD RID: 1197 RVA: 0x0000D84C File Offset: 0x0000BA4C
|
||||
public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value)
|
||||
{
|
||||
if (value.GetType() == typeof(string))
|
||||
{
|
||||
string text = (string)value;
|
||||
try
|
||||
{
|
||||
return new Guid(text);
|
||||
}
|
||||
catch
|
||||
{
|
||||
throw new FormatException(text + "is not a valid GUID.");
|
||||
}
|
||||
}
|
||||
return base.ConvertFrom(context, culture, value);
|
||||
}
|
||||
|
||||
/// <summary>Converts the given object to another type.</summary>
|
||||
/// <returns>The converted object.</returns>
|
||||
/// <param name="context">A formatter context. </param>
|
||||
/// <param name="culture">The culture into which <paramref name="value" /> will be converted.</param>
|
||||
/// <param name="value">The object to convert. </param>
|
||||
/// <param name="destinationType">The type to convert the object to. </param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="destinationType" /> is null.</exception>
|
||||
/// <exception cref="T:System.NotSupportedException">The conversion cannot be performed. </exception>
|
||||
// Token: 0x060004AE RID: 1198 RVA: 0x0000D8CC File Offset: 0x0000BACC
|
||||
public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
|
||||
{
|
||||
if (value is Guid)
|
||||
{
|
||||
Guid guid = (Guid)value;
|
||||
if (destinationType == typeof(string) && value != null)
|
||||
{
|
||||
return guid.ToString("D");
|
||||
}
|
||||
if (destinationType == typeof(global::System.ComponentModel.Design.Serialization.InstanceDescriptor))
|
||||
{
|
||||
ConstructorInfo constructor = typeof(Guid).GetConstructor(new Type[] { typeof(string) });
|
||||
return new global::System.ComponentModel.Design.Serialization.InstanceDescriptor(constructor, new object[] { guid.ToString("D") });
|
||||
}
|
||||
}
|
||||
return base.ConvertTo(context, culture, value, destinationType);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,116 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
|
||||
namespace System.ComponentModel
|
||||
{
|
||||
/// <summary>Provides the features required to support both complex and simple scenarios when binding to a data source.</summary>
|
||||
// Token: 0x02000084 RID: 132
|
||||
public interface IBindingList : ICollection, IEnumerable, IList
|
||||
{
|
||||
/// <summary>Occurs when the list changes or an item in the list changes.</summary>
|
||||
// Token: 0x14000014 RID: 20
|
||||
// (add) Token: 0x060004AF RID: 1199
|
||||
// (remove) Token: 0x060004B0 RID: 1200
|
||||
event ListChangedEventHandler ListChanged;
|
||||
|
||||
/// <summary>Adds the <see cref="T:System.ComponentModel.PropertyDescriptor" /> to the indexes used for searching.</summary>
|
||||
/// <param name="property">The <see cref="T:System.ComponentModel.PropertyDescriptor" /> to add to the indexes used for searching. </param>
|
||||
// Token: 0x060004B1 RID: 1201
|
||||
void AddIndex(PropertyDescriptor property);
|
||||
|
||||
/// <summary>Adds a new item to the list.</summary>
|
||||
/// <returns>The item added to the list.</returns>
|
||||
/// <exception cref="T:System.NotSupportedException">
|
||||
/// <see cref="P:System.ComponentModel.IBindingList.AllowNew" /> is false. </exception>
|
||||
// Token: 0x060004B2 RID: 1202
|
||||
object AddNew();
|
||||
|
||||
/// <summary>Sorts the list based on a <see cref="T:System.ComponentModel.PropertyDescriptor" /> and a <see cref="T:System.ComponentModel.ListSortDirection" />.</summary>
|
||||
/// <param name="property">The <see cref="T:System.ComponentModel.PropertyDescriptor" /> to sort by. </param>
|
||||
/// <param name="direction">One of the <see cref="T:System.ComponentModel.ListSortDirection" /> values. </param>
|
||||
/// <exception cref="T:System.NotSupportedException">
|
||||
/// <see cref="P:System.ComponentModel.IBindingList.SupportsSorting" /> is false. </exception>
|
||||
// Token: 0x060004B3 RID: 1203
|
||||
void ApplySort(PropertyDescriptor property, ListSortDirection direction);
|
||||
|
||||
/// <summary>Returns the index of the row that has the given <see cref="T:System.ComponentModel.PropertyDescriptor" />.</summary>
|
||||
/// <returns>The index of the row that has the given <see cref="T:System.ComponentModel.PropertyDescriptor" />.</returns>
|
||||
/// <param name="property">The <see cref="T:System.ComponentModel.PropertyDescriptor" /> to search on. </param>
|
||||
/// <param name="key">The value of the <paramref name="property" /> parameter to search for. </param>
|
||||
/// <exception cref="T:System.NotSupportedException">
|
||||
/// <see cref="P:System.ComponentModel.IBindingList.SupportsSearching" /> is false. </exception>
|
||||
// Token: 0x060004B4 RID: 1204
|
||||
int Find(PropertyDescriptor property, object key);
|
||||
|
||||
/// <summary>Removes the <see cref="T:System.ComponentModel.PropertyDescriptor" /> from the indexes used for searching.</summary>
|
||||
/// <param name="property">The <see cref="T:System.ComponentModel.PropertyDescriptor" /> to remove from the indexes used for searching. </param>
|
||||
// Token: 0x060004B5 RID: 1205
|
||||
void RemoveIndex(PropertyDescriptor property);
|
||||
|
||||
/// <summary>Removes any sort applied using <see cref="M:System.ComponentModel.IBindingList.ApplySort(System.ComponentModel.PropertyDescriptor,System.ComponentModel.ListSortDirection)" />.</summary>
|
||||
/// <exception cref="T:System.NotSupportedException">
|
||||
/// <see cref="P:System.ComponentModel.IBindingList.SupportsSorting" /> is false. </exception>
|
||||
// Token: 0x060004B6 RID: 1206
|
||||
void RemoveSort();
|
||||
|
||||
/// <summary>Gets whether you can update items in the list.</summary>
|
||||
/// <returns>true if you can update the items in the list; otherwise, false.</returns>
|
||||
// Token: 0x17000138 RID: 312
|
||||
// (get) Token: 0x060004B7 RID: 1207
|
||||
bool AllowEdit { get; }
|
||||
|
||||
/// <summary>Gets whether you can add items to the list using <see cref="M:System.ComponentModel.IBindingList.AddNew" />.</summary>
|
||||
/// <returns>true if you can add items to the list using <see cref="M:System.ComponentModel.IBindingList.AddNew" />; otherwise, false.</returns>
|
||||
// Token: 0x17000139 RID: 313
|
||||
// (get) Token: 0x060004B8 RID: 1208
|
||||
bool AllowNew { get; }
|
||||
|
||||
/// <summary>Gets whether you can remove items from the list, using <see cref="M:System.Collections.IList.Remove(System.Object)" /> or <see cref="M:System.Collections.IList.RemoveAt(System.Int32)" />.</summary>
|
||||
/// <returns>true if you can remove items from the list; otherwise, false.</returns>
|
||||
// Token: 0x1700013A RID: 314
|
||||
// (get) Token: 0x060004B9 RID: 1209
|
||||
bool AllowRemove { get; }
|
||||
|
||||
/// <summary>Gets whether the items in the list are sorted.</summary>
|
||||
/// <returns>true if <see cref="M:System.ComponentModel.IBindingList.ApplySort(System.ComponentModel.PropertyDescriptor,System.ComponentModel.ListSortDirection)" /> has been called and <see cref="M:System.ComponentModel.IBindingList.RemoveSort" /> has not been called; otherwise, false.</returns>
|
||||
/// <exception cref="T:System.NotSupportedException">
|
||||
/// <see cref="P:System.ComponentModel.IBindingList.SupportsSorting" /> is false. </exception>
|
||||
// Token: 0x1700013B RID: 315
|
||||
// (get) Token: 0x060004BA RID: 1210
|
||||
bool IsSorted { get; }
|
||||
|
||||
/// <summary>Gets the direction of the sort.</summary>
|
||||
/// <returns>One of the <see cref="T:System.ComponentModel.ListSortDirection" /> values.</returns>
|
||||
/// <exception cref="T:System.NotSupportedException">
|
||||
/// <see cref="P:System.ComponentModel.IBindingList.SupportsSorting" /> is false. </exception>
|
||||
// Token: 0x1700013C RID: 316
|
||||
// (get) Token: 0x060004BB RID: 1211
|
||||
ListSortDirection SortDirection { get; }
|
||||
|
||||
/// <summary>Gets the <see cref="T:System.ComponentModel.PropertyDescriptor" /> that is being used for sorting.</summary>
|
||||
/// <returns>The <see cref="T:System.ComponentModel.PropertyDescriptor" /> that is being used for sorting.</returns>
|
||||
/// <exception cref="T:System.NotSupportedException">
|
||||
/// <see cref="P:System.ComponentModel.IBindingList.SupportsSorting" /> is false. </exception>
|
||||
// Token: 0x1700013D RID: 317
|
||||
// (get) Token: 0x060004BC RID: 1212
|
||||
PropertyDescriptor SortProperty { get; }
|
||||
|
||||
/// <summary>Gets whether a <see cref="E:System.ComponentModel.IBindingList.ListChanged" /> event is raised when the list changes or an item in the list changes.</summary>
|
||||
/// <returns>true if a <see cref="E:System.ComponentModel.IBindingList.ListChanged" /> event is raised when the list changes or when an item changes; otherwise, false.</returns>
|
||||
// Token: 0x1700013E RID: 318
|
||||
// (get) Token: 0x060004BD RID: 1213
|
||||
bool SupportsChangeNotification { get; }
|
||||
|
||||
/// <summary>Gets whether the list supports searching using the <see cref="M:System.ComponentModel.IBindingList.Find(System.ComponentModel.PropertyDescriptor,System.Object)" /> method.</summary>
|
||||
/// <returns>true if the list supports searching using the <see cref="M:System.ComponentModel.IBindingList.Find(System.ComponentModel.PropertyDescriptor,System.Object)" /> method; otherwise, false.</returns>
|
||||
// Token: 0x1700013F RID: 319
|
||||
// (get) Token: 0x060004BE RID: 1214
|
||||
bool SupportsSearching { get; }
|
||||
|
||||
/// <summary>Gets whether the list supports sorting.</summary>
|
||||
/// <returns>true if the list supports sorting; otherwise, false.</returns>
|
||||
// Token: 0x17000140 RID: 320
|
||||
// (get) Token: 0x060004BF RID: 1215
|
||||
bool SupportsSorting { get; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
|
||||
namespace System.ComponentModel
|
||||
{
|
||||
/// <summary>Extends the <see cref="T:System.ComponentModel.IBindingList" /> interface by providing advanced sorting and filtering capabilities.</summary>
|
||||
// Token: 0x02000085 RID: 133
|
||||
public interface IBindingListView : ICollection, IEnumerable, IList, IBindingList
|
||||
{
|
||||
/// <summary>Gets or sets the filter to be used to exclude items from the collection of items returned by the data source</summary>
|
||||
/// <returns>The string used to filter items out in the item collection returned by the data source. </returns>
|
||||
// Token: 0x17000141 RID: 321
|
||||
// (get) Token: 0x060004C0 RID: 1216
|
||||
// (set) Token: 0x060004C1 RID: 1217
|
||||
string Filter { get; set; }
|
||||
|
||||
/// <summary>Gets the collection of sort descriptions currently applied to the data source.</summary>
|
||||
/// <returns>The <see cref="T:System.ComponentModel.ListSortDescriptionCollection" /> currently applied to the data source.</returns>
|
||||
// Token: 0x17000142 RID: 322
|
||||
// (get) Token: 0x060004C2 RID: 1218
|
||||
ListSortDescriptionCollection SortDescriptions { get; }
|
||||
|
||||
/// <summary>Gets a value indicating whether the data source supports advanced sorting. </summary>
|
||||
/// <returns>true if the data source supports advanced sorting; otherwise, false. </returns>
|
||||
// Token: 0x17000143 RID: 323
|
||||
// (get) Token: 0x060004C3 RID: 1219
|
||||
bool SupportsAdvancedSorting { get; }
|
||||
|
||||
/// <summary>Gets a value indicating whether the data source supports filtering. </summary>
|
||||
/// <returns>true if the data source supports filtering; otherwise, false. </returns>
|
||||
// Token: 0x17000144 RID: 324
|
||||
// (get) Token: 0x060004C4 RID: 1220
|
||||
bool SupportsFiltering { get; }
|
||||
|
||||
/// <summary>Sorts the data source based on the given <see cref="T:System.ComponentModel.ListSortDescriptionCollection" />.</summary>
|
||||
/// <param name="sorts">The <see cref="T:System.ComponentModel.ListSortDescriptionCollection" /> containing the sorts to apply to the data source.</param>
|
||||
// Token: 0x060004C5 RID: 1221
|
||||
void ApplySort(ListSortDescriptionCollection sorts);
|
||||
|
||||
/// <summary>Removes the current filter applied to the data source.</summary>
|
||||
// Token: 0x060004C6 RID: 1222
|
||||
void RemoveFilter();
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user