Mon Apr 29 15:32:02 CEST 2002 Paolo Molaro <lupus@ximian.com>
[mono.git] / mcs / class / corlib / System / Environment.cs
index 2195524435aa4a1cc3b9adc04323d11aa7ac550a..dc92fda727c3c26b535a8082f3098bf542649ce8 100644 (file)
@@ -58,7 +58,9 @@ namespace System
                        // [EnvironmentPermissionAttribute(SecurityAction.Demand, Read = "COMMANDLINE")]\r
                        get\r
                        {\r
-                               return GetCommandLine ();\r
+                               // FIXME: we may need to quote, but any sane person\r
+                               // should use GetCommandLineArgs () instead.\r
+                               return String.Join ("", GetCommandLineArgs ());\r
                        }\r
                }\r
 \r
@@ -231,10 +233,8 @@ namespace System
                        }\r
                }\r
 \r
-               [MonoTODO]\r
-               public static void Exit(int exitCode)\r
-               { \r
-               }\r
+               [MethodImplAttribute (MethodImplOptions.InternalCall)]\r
+               public extern static void Exit(int exitCode);\r
 \r
                /// <summary>\r
                /// Substitute environment variables in the argument "name"\r
@@ -248,12 +248,8 @@ namespace System
                /// <summary>\r
                /// Return an array of the command line arguments of the current process\r
                /// </summary>\r
-               public static string[] GetCommandLineArgs()\r
-               {\r
-                       char[] delimiter = new char[1];\r
-                       delimiter[0] = ' ';\r
-                       return CommandLine.Split (delimiter);\r
-               }\r
+               [MethodImplAttribute (MethodImplOptions.InternalCall)]\r
+               public extern static string[] GetCommandLineArgs();\r
 \r
                /// <summary>\r
                /// Return a string containing the value of the environment\r
@@ -299,7 +295,5 @@ namespace System
                [MethodImplAttribute (MethodImplOptions.InternalCall)]\r
                private extern static string [] GetEnvironmentVariableNames ();\r
 \r
-               [MethodImplAttribute (MethodImplOptions.InternalCall)]\r
-               private extern static string GetCommandLine ();\r
        }\r
 }\r