Merge pull request #3395 from lambdageek/dev/handles-strings
[mono.git] / mcs / class / corlib / System / Environment.cs
index 87096678d30b76a4e4a9632e3446e7e1b42ca0ac..36ae8687aae76a3cf40e67ae5f76c4dc32993fed 100644 (file)
@@ -870,6 +870,22 @@ namespace System {
                        }
                }
 #else
+               public static string GetEnvironmentVariable (string variable, EnvironmentVariableTarget target)
+               {
+                       if (target == EnvironmentVariableTarget.Process)
+                               return GetEnvironmentVariable (variable);
+
+                       return null;
+               }
+
+               public static IDictionary GetEnvironmentVariables (EnvironmentVariableTarget target)
+               {
+                       if (target == EnvironmentVariableTarget.Process)
+                               return GetEnvironmentVariables ();
+
+                       return (IDictionary)new Hashtable ();
+               }
+
                public static void SetEnvironmentVariable (string variable, string value)
                {
                        if (variable == null)
@@ -883,6 +899,14 @@ namespace System {
 
                        InternalSetEnvironmentVariable (variable, value);
                }
+
+               public static void SetEnvironmentVariable (string variable, string value, EnvironmentVariableTarget target)
+               {
+                       if (target == EnvironmentVariableTarget.Process)
+                               SetEnvironmentVariable (variable, value);
+
+                       // other targets ignored
+               }
 #endif
                [MethodImplAttribute (MethodImplOptions.InternalCall)]
                internal static extern void InternalSetEnvironmentVariable (string variable, string value);