using System;
using System.Globalization;
namespace System.Collections.Specialized
{
/// Implements a hash table with the key and the value strongly typed to be strings rather than objects.
// Token: 0x0200003A RID: 58
[Serializable]
public class StringDictionary : IEnumerable
{
/// Initializes a new instance of the class.
// Token: 0x06000281 RID: 641 RVA: 0x000090F8 File Offset: 0x000072F8
public StringDictionary()
{
this.contents = new Hashtable();
}
/// Gets the number of key/value pairs in the .
/// The number of key/value pairs in the .Retrieving the value of this property is an O(1) operation.
// Token: 0x170000B2 RID: 178
// (get) Token: 0x06000282 RID: 642 RVA: 0x0000910C File Offset: 0x0000730C
public virtual int Count
{
get
{
return this.contents.Count;
}
}
/// Gets a value indicating whether access to the is synchronized (thread safe).
/// true if access to the is synchronized (thread safe); otherwise, false.
// Token: 0x170000B3 RID: 179
// (get) Token: 0x06000283 RID: 643 RVA: 0x0000911C File Offset: 0x0000731C
public virtual bool IsSynchronized
{
get
{
return false;
}
}
/// Gets or sets the value associated with the specified key.
/// 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.
/// The key whose value to get or set.
///
/// is null.
// 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;
}
}
/// Gets a collection of keys in the .
/// An that provides the keys in the .
// Token: 0x170000B5 RID: 181
// (get) Token: 0x06000286 RID: 646 RVA: 0x00009194 File Offset: 0x00007394
public virtual ICollection Keys
{
get
{
return this.contents.Keys;
}
}
/// Gets a collection of values in the .
/// An that provides the values in the .
// Token: 0x170000B6 RID: 182
// (get) Token: 0x06000287 RID: 647 RVA: 0x000091A4 File Offset: 0x000073A4
public virtual ICollection Values
{
get
{
return this.contents.Values;
}
}
/// Gets an object that can be used to synchronize access to the .
/// An that can be used to synchronize access to the .
// Token: 0x170000B7 RID: 183
// (get) Token: 0x06000288 RID: 648 RVA: 0x000091B4 File Offset: 0x000073B4
public virtual object SyncRoot
{
get
{
return this.contents.SyncRoot;
}
}
/// Adds an entry with the specified key and value into the .
/// The key of the entry to add.
/// The value of the entry to add. The value can be null.
///
/// is null.
/// An entry with the same key already exists in the .
/// The is read-only.
// 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);
}
/// Removes all entries from the .
/// The is read-only.
// Token: 0x0600028A RID: 650 RVA: 0x000091FC File Offset: 0x000073FC
public virtual void Clear()
{
this.contents.Clear();
}
/// Determines if the contains a specific key.
/// true if the contains an entry with the specified key; otherwise, false.
/// The key to locate in the .
/// The key is null.
// 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));
}
/// Determines if the contains a specific value.
/// true if the contains an element with the specified value; otherwise, false.
/// The value to locate in the . The value can be null.
// Token: 0x0600028C RID: 652 RVA: 0x00009238 File Offset: 0x00007438
public virtual bool ContainsValue(string value)
{
return this.contents.ContainsValue(value);
}
/// Copies the string dictionary values to a one-dimensional instance at the specified index.
/// The one-dimensional that is the destination of the values copied from the .
/// The index in the array where copying begins.
///
/// is multidimensional.-or- The number of elements in the is greater than the available space from to the end of .
///
/// is null.
///
/// is less than the lower bound of .
// Token: 0x0600028D RID: 653 RVA: 0x00009248 File Offset: 0x00007448
public virtual void CopyTo(Array array, int index)
{
this.contents.CopyTo(array, index);
}
/// Returns an enumerator that iterates through the string dictionary.
/// An that iterates through the string dictionary.
// Token: 0x0600028E RID: 654 RVA: 0x00009258 File Offset: 0x00007458
public virtual IEnumerator GetEnumerator()
{
return this.contents.GetEnumerator();
}
/// Removes the entry with the specified key from the string dictionary.
/// The key of the entry to remove.
/// The key is null.
/// The is read-only.
// 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;
}
}