Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Barnette <jbarn@mono-cvs.ximian.com>2001-08-22 17:36:27 +0400
committerJohn Barnette <jbarn@mono-cvs.ximian.com>2001-08-22 17:36:27 +0400
commitd07c387db5b471fbd4027c714c6b84e12b06c13a (patch)
treea28d6ba824a2fa35119e6e4572d9208ccdec9b0b /mcs/class/System/System.Collections.Specialized
parentcfc72f5639ca84e5e84301b3f6001f7de4989c4e (diff)
Initial add of StringDictionary.
svn path=/trunk/mcs/; revision=561
Diffstat (limited to 'mcs/class/System/System.Collections.Specialized')
-rwxr-xr-xmcs/class/System/System.Collections.Specialized/ChangeLog2
-rw-r--r--mcs/class/System/System.Collections.Specialized/StringDictionary.cs97
-rwxr-xr-xmcs/class/System/System.Collections.Specialized/common.src1
3 files changed, 100 insertions, 0 deletions
diff --git a/mcs/class/System/System.Collections.Specialized/ChangeLog b/mcs/class/System/System.Collections.Specialized/ChangeLog
index 0e0542ffa4b..bc349c8bbd7 100755
--- a/mcs/class/System/System.Collections.Specialized/ChangeLog
+++ b/mcs/class/System/System.Collections.Specialized/ChangeLog
@@ -1,4 +1,6 @@
2001-08-22 John Barnette <jbarn@httcb.net>
+ * StringDictionary.cs:
+ Initial working implementation.
* ListDictionary.cs:
Initial working implementation.
diff --git a/mcs/class/System/System.Collections.Specialized/StringDictionary.cs b/mcs/class/System/System.Collections.Specialized/StringDictionary.cs
new file mode 100644
index 00000000000..2e5bc2bfe10
--- /dev/null
+++ b/mcs/class/System/System.Collections.Specialized/StringDictionary.cs
@@ -0,0 +1,97 @@
+namespace System.Collections.Specialized
+{
+ public class StringDictionary : IEnumerable
+ {
+ protected Hashtable table;
+
+ public StringDictionary()
+ {
+ table = new Hashtable();
+ }
+
+ // Public Instance Properties
+
+ public virtual int Count
+ {
+ get {
+ return table.Count;
+ }
+ }
+
+ public virtual bool IsSynchronized
+ {
+ get {
+ return false;
+ }
+ }
+
+ public virtual string this[string key]
+ {
+ get {
+ return (string) table[key.ToLower()];
+ }
+
+ set {
+ table[key.ToLower()] = value;
+ }
+ }
+
+ public virtual ICollection Keys
+ {
+ get {
+ return table.Keys;
+ }
+ }
+
+ public virtual ICollection Values
+ {
+ get {
+ return table.Values;
+ }
+ }
+
+ public virtual object SyncRoot
+ {
+ get {
+ return table.SyncRoot;
+ }
+ }
+
+ // Public Instance Methods
+
+ public virtual void Add(string key, string value)
+ {
+ table.Add(key.ToLower(), value);
+ }
+
+ public virtual void Clear()
+ {
+ table.Clear();
+ }
+
+ public virtual bool ContainsKey(string key)
+ {
+ return table.ContainsKey(key.ToLower());
+ }
+
+ public virtual bool ContainsValue(string value)
+ {
+ return table.ContainsValue(value);
+ }
+
+ public virtual void CopyTo(Array array, int index)
+ {
+ table.CopyTo(array, index);
+ }
+
+ public virtual IEnumerator GetEnumerator()
+ {
+ return table.GetEnumerator();
+ }
+
+ public virtual void Remove(string key)
+ {
+ table.Remove(key.ToLower());
+ }
+ }
+} \ No newline at end of file
diff --git a/mcs/class/System/System.Collections.Specialized/common.src b/mcs/class/System/System.Collections.Specialized/common.src
index b8b657fa57d..5695cbc5315 100755
--- a/mcs/class/System/System.Collections.Specialized/common.src
+++ b/mcs/class/System/System.Collections.Specialized/common.src
@@ -1,4 +1,5 @@
BitVector32.cs
ListDictionary.cs
StringCollection.cs
+StringDictionary.cs
StringEnumerator.cs