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:
authorGonzalo Paniagua Javier <gonzalo.mono@gmail.com>2004-03-16 00:19:08 +0300
committerGonzalo Paniagua Javier <gonzalo.mono@gmail.com>2004-03-16 00:19:08 +0300
commit429226eafaedc985eff09ab6e9a727e4597edb45 (patch)
tree6055c3db2c3f10c89b58fd38f3a642290f4e7f86 /mcs/class/System/System.Collections.Specialized
parent760a7ce27c43d3d34f006aee7c2a64058a0b364e (diff)
2004-03-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* System.dll.sources: added ProcessStringDictionary. * System.Collections.Specialized/ProcessStringDictionary.cs: the same as StringDictionary, but doesn't turn keys into lowercase. * System.Diagnostics/Process.cs: added environment variables setting support and also send useShellExecute to the runtime. * System.Diagnostics/ProcessStartInfo.cs: support EnvironmentVariables. MS uses StringDictionary, which turns keys into lowercase. We don't do that. svn path=/trunk/mcs/; revision=24068
Diffstat (limited to 'mcs/class/System/System.Collections.Specialized')
-rwxr-xr-xmcs/class/System/System.Collections.Specialized/ChangeLog5
-rw-r--r--mcs/class/System/System.Collections.Specialized/ProcessStringDictionary.cs91
2 files changed, 96 insertions, 0 deletions
diff --git a/mcs/class/System/System.Collections.Specialized/ChangeLog b/mcs/class/System/System.Collections.Specialized/ChangeLog
index c2f2bcaafc5..7dca31451a2 100755
--- a/mcs/class/System/System.Collections.Specialized/ChangeLog
+++ b/mcs/class/System/System.Collections.Specialized/ChangeLog
@@ -1,3 +1,8 @@
+2004-03-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+ * ProcessStringDictionary.cs: the same as StringDictionary, but
+ doesn't turn keys into lowercase.
+
2003-11-18 Todd Berman <tberman@gentoo.org>
* IOrderedDictionary.cs: new v2 interface
diff --git a/mcs/class/System/System.Collections.Specialized/ProcessStringDictionary.cs b/mcs/class/System/System.Collections.Specialized/ProcessStringDictionary.cs
new file mode 100644
index 00000000000..394de74e954
--- /dev/null
+++ b/mcs/class/System/System.Collections.Specialized/ProcessStringDictionary.cs
@@ -0,0 +1,91 @@
+//
+// System.Collections.Specialized.ProcessStringDictionary.cs
+//
+// Authors:
+// Gonzalo Paniagua Javier (gonzalo@ximin.com)
+//
+// (c) 2004 Novell, Inc. (http://www.novell.com)
+//
+
+// StringDictionary turns all the keys into lower case. That's not good
+// when ProcessStartInfo.EnvironmentVariables is used on *nix.
+
+using System.Collections;
+
+namespace System.Collections.Specialized
+{
+ class ProcessStringDictionary : StringDictionary, IEnumerable
+ {
+ Hashtable table;
+
+ public ProcessStringDictionary ()
+ {
+ table = new Hashtable (CaseInsensitiveHashCodeProvider.Default,
+ CaseInsensitiveComparer.Default);
+ }
+
+ public override int Count {
+ get { return table.Count; }
+ }
+
+ public override bool IsSynchronized {
+ get { return false; }
+ }
+
+ public override string this [string key] {
+ get { return (string) table [key]; }
+
+ set { table [key] = value; }
+ }
+
+ public override ICollection Keys {
+ get {
+ return table.Keys;
+ }
+ }
+
+ public override ICollection Values {
+ get { return table.Values; }
+ }
+
+ public override object SyncRoot {
+ get { return table.SyncRoot; }
+ }
+
+ public override void Add (string key, string value)
+ {
+ table.Add (key, value);
+ }
+
+ public override void Clear ()
+ {
+ table.Clear ();
+ }
+
+ public override bool ContainsKey (string key)
+ {
+ return table.ContainsKey (key);
+ }
+
+ public override bool ContainsValue (string value)
+ {
+ return table.ContainsValue (value);
+ }
+
+ public override void CopyTo (Array array, int index)
+ {
+ table.CopyTo (array, index);
+ }
+
+ public override IEnumerator GetEnumerator ()
+ {
+ return table.GetEnumerator();
+ }
+
+ public override void Remove(string key)
+ {
+ table.Remove (key);
+ }
+ }
+}
+