diff options
author | Gonzalo Paniagua Javier <gonzalo.mono@gmail.com> | 2004-03-16 00:19:08 +0300 |
---|---|---|
committer | Gonzalo Paniagua Javier <gonzalo.mono@gmail.com> | 2004-03-16 00:19:08 +0300 |
commit | 429226eafaedc985eff09ab6e9a727e4597edb45 (patch) | |
tree | 6055c3db2c3f10c89b58fd38f3a642290f4e7f86 /mcs/class/System/System.Diagnostics/ProcessStartInfo.cs | |
parent | 760a7ce27c43d3d34f006aee7c2a64058a0b364e (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.Diagnostics/ProcessStartInfo.cs')
-rwxr-xr-x | mcs/class/System/System.Diagnostics/ProcessStartInfo.cs | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/mcs/class/System/System.Diagnostics/ProcessStartInfo.cs b/mcs/class/System/System.Diagnostics/ProcessStartInfo.cs index b711dbfb3df..82b0b86b999 100755 --- a/mcs/class/System/System.Diagnostics/ProcessStartInfo.cs +++ b/mcs/class/System/System.Diagnostics/ProcessStartInfo.cs @@ -8,8 +8,9 @@ // (C) 2002 Ximian, Inc. http://www.ximian.com // -using System.ComponentModel; +using System.Collections; using System.Collections.Specialized; +using System.ComponentModel; namespace System.Diagnostics { @@ -29,6 +30,7 @@ namespace System.Diagnostics private string verb = ""; private ProcessWindowStyle window_style = ProcessWindowStyle.Normal; private string working_directory = ""; + private ProcessStringDictionary envVars; public ProcessStartInfo() { @@ -75,10 +77,20 @@ namespace System.Diagnostics [MonitoringDescription ("Environment variables used for this process.")] public StringDictionary EnvironmentVariables { get { - throw new NotImplementedException(); + if (envVars == null) { + envVars = new ProcessStringDictionary (); + foreach (DictionaryEntry entry in Environment.GetEnvironmentVariables ()) + envVars.Add ((string) entry.Key, (string) entry.Value); + } + + return envVars; } } + internal bool HaveEnvVars { + get { return (envVars != null && envVars.Count > 0); } + } + [DefaultValue (false)] [MonitoringDescription ("Thread shows dialogboxes for errors.")] public bool ErrorDialog { |