Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
System.Environment Class Reference

Classes

class  WindowsVersion
 

Public Types

enum  SpecialFolder {
  ApplicationData = 26 , CommonApplicationData = 35 , LocalApplicationData = 28 , Cookies = 33 ,
  Desktop = 0 , Favorites = 6 , History = 34 , InternetCache = 32 ,
  Programs = 2 , MyComputer = 17 , MyMusic = 13 , MyPictures = 39 ,
  MyVideos = 14 , Recent = 8 , SendTo = 9 , StartMenu = 11 ,
  Startup = 7 , System = 37 , Templates = 21 , DesktopDirectory = 16 ,
  Personal = 5 , MyDocuments = 5 , ProgramFiles = 38 , CommonProgramFiles = 43 ,
  AdminTools = 48 , CDBurning = 59 , CommonAdminTools = 47 , CommonDocuments = 46 ,
  CommonMusic = 53 , CommonOemLinks = 58 , CommonPictures = 54 , CommonStartMenu = 22 ,
  CommonPrograms = 23 , CommonStartup = 24 , CommonDesktopDirectory = 25 , CommonTemplates = 45 ,
  CommonVideos = 55 , Fonts = 20 , NetworkShortcuts = 19 , PrinterShortcuts = 27 ,
  UserProfile = 40 , CommonProgramFilesX86 = 44 , ProgramFilesX86 = 42 , Resources = 56 ,
  LocalizedResources = 57 , SystemX86 = 41 , Windows = 36
}
 
enum  SpecialFolderOption { None = 0 , Create = 32768 , DoNotVerify = 16384 }
 

Public Member Functions

static void FailFast (string? message)
 
static void FailFast (string? message, Exception? exception)
 
static void FailFast (string? message, Exception? exception, string? errorMessage)
 

Static Public Member Functions

static void Exit (int exitCode)
 
static string[] GetCommandLineArgs ()
 
static ? string GetEnvironmentVariable (string variable)
 
static ? string GetEnvironmentVariable (string variable, EnvironmentVariableTarget target)
 
static IDictionary GetEnvironmentVariables (EnvironmentVariableTarget target)
 
static void SetEnvironmentVariable (string variable, string? value)
 
static void SetEnvironmentVariable (string variable, string? value, EnvironmentVariableTarget target)
 
static string ExpandEnvironmentVariables (string name)
 
static string GetFolderPath (SpecialFolder folder)
 
static string GetFolderPath (SpecialFolder folder, SpecialFolderOption option)
 
static string[] GetLogicalDrives ()
 
static unsafe IDictionary GetEnvironmentVariables ()
 

Static Package Functions

static string GetResourceStringLocal (string key)
 
static void SetCommandLineArgs (string[] cmdLineArgs)
 

Properties

static int CurrentManagedThreadId [get]
 
static int ExitCode [get, set]
 
static int TickCount [get]
 
static long TickCount64 [get]
 
static int ProcessorCount = GetProcessorCount() [get]
 
static bool IsSingleProcessor [get]
 
static bool HasShutdownStarted [get]
 
static string CommandLine [get]
 
static string CurrentDirectory [get, set]
 
static int ProcessId [get]
 
static ? string ProcessPath [get]
 
static bool Is64BitProcess [get]
 
static bool Is64BitOperatingSystem [get]
 
static string NewLine [get]
 
static OperatingSystem OSVersion [get]
 
static Version Version [get]
 
static string StackTrace [get]
 
static bool IsWindows8OrAbove [get]
 
static string UserName [get]
 
static string UserDomainName [get]
 
static string CurrentDirectoryCore [get, set]
 
static int SystemPageSize [get]
 
static string MachineName [get]
 
static string SystemDirectory [get]
 
static unsafe bool UserInteractive [get]
 
static unsafe long WorkingSet [get]
 

Private Member Functions

static void _Exit (int exitCode)
 
static string[] GetCommandLineArgsNative ()
 
static int GetProcessorCount ()
 

Static Private Member Functions

static bool ValidateAndConvertRegistryTarget (EnvironmentVariableTarget target)
 
static void ValidateVariableAndValue (string variable, ref string value)
 
static string GetEnvironmentVariableFromRegistry (string variable, bool fromMachine)
 
static unsafe void SetEnvironmentVariableFromRegistry (string variable, string value, bool fromMachine)
 
static IDictionary GetEnvironmentVariablesFromRegistry (bool fromMachine)
 
static RegistryKey OpenEnvironmentKeyIfExists (bool fromMachine, bool writable)
 
static void GetUserName (ref ValueStringBuilder builder)
 
static string GetFolderPathCore (SpecialFolder folder, SpecialFolderOption option)
 
static string GetKnownFolderPath (string folderGuid, SpecialFolderOption option)
 
static string ExpandEnvironmentVariablesCore (string name)
 
static int GetProcessId ()
 
static string GetProcessPath ()
 
static unsafe OperatingSystem GetOSVersion ()
 
static string GetEnvironmentVariableCore (string variable)
 
static void SetEnvironmentVariableCore (string variable, string value)
 

Static Private Attributes

static string[] s_commandLineArgs
 
static volatile int s_processId
 
static volatile string s_processPath
 
static volatile OperatingSystem s_osVersion
 

Detailed Description

Definition at line 14 of file Environment.cs.


The documentation for this class was generated from the following file: