{\r
public sealed class Environment\r
{\r
- private Environment () {}
-
+ private Environment () {}\r
+\r
[MonoTODO]\r
public enum SpecialFolder\r
{ // TODO: Determine if these windoze style folder identifiers \r
// have unix/linux counterparts\r
- ApplicationData,\r
- CommonApplicationData,\r
- CommonProgramFiles,\r
- Cookies,\r
- DesktopDirectory,\r
- Favorites,\r
- History,\r
- InternetCache,\r
- LocalApplicationData,\r
- Personal,\r
- ProgramFiles,\r
- Programs,\r
- Recent,\r
- SendTo,\r
- StartMenu,\r
- Startup,\r
- System,\r
- Templates\r
+ Programs = 0x02,\r
+ Personal = 0x05,\r
+ Favorites = 0x06,\r
+ Startup = 0x07,\r
+ Recent = 0x08,\r
+ SendTo = 0x09,\r
+ StartMenu = 0x0b,\r
+ DesktopDirectory = 0x10,\r
+ Templates = 0x15,\r
+ ApplicationData = 0x1a,\r
+ LocalApplicationData = 0x1c,\r
+ InternetCache = 0x20,\r
+ Cookies = 0x21,\r
+ History = 0x22,\r
+ CommonApplicationData = 0x23,\r
+ System = 0x25,\r
+ ProgramFiles = 0x26,\r
+ CommonProgramFiles = 0x2b,\r
}\r
\r
// TODO: Make sure the security attributes do what I expect\r
{\r
// FIXME: we may need to quote, but any sane person\r
// should use GetCommandLineArgs () instead.\r
- return String.Join ("", GetCommandLineArgs ());\r
+ return String.Join (" ", GetCommandLineArgs ());\r
}\r
}\r
\r
/// <summary>\r
/// Get StackTrace\r
/// </summary>\r
- [MonoTODO]\r
- public static string StackTrace\r
- {\r
- get\r
- {\r
- return null;\r
+ public static string StackTrace {\r
+ get {\r
+ try {\r
+ throw new Exception ();\r
+ } catch (Exception e) {\r
+ return e.StackTrace;\r
+ }\r
}\r
}\r
\r
/// <summary>\r
/// Get the number of milliseconds that have elapsed since the system was booted\r
/// </summary>\r
- [MonoTODO]\r
- public static int TickCount\r
- {\r
- get\r
- {\r
- return 0;\r
- //return getTickCount();\r
- }\r
+ public extern static int TickCount {\r
+ [MethodImplAttribute (MethodImplOptions.InternalCall)]\r
+ get;\r
}\r
\r
/// <summary>\r
/// Get UserDomainName\r
/// </summary>\r
[MonoTODO]\r
- public static string UserDomainName\r
- {\r
- get\r
- {\r
- return null;\r
+ public static string UserDomainName {\r
+ get {\r
+ return MachineName;\r
}\r
}\r
\r
}\r
\r
/// <summary>\r
- /// Get the version of an assembly\r
+ /// Get the version of the common language runtime \r
/// </summary>\r
[MonoTODO]\r
- public static Version Version\r
- {\r
- get\r
- {\r
- return null;\r
+ public static Version Version {\r
+ get {\r
+ return new Version();\r
}\r
}\r
\r