Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
RuntimeEnvironment.cs
Go to the documentation of this file.
2using System.IO;
4
6
7public static class RuntimeEnvironment
8{
9 [Obsolete("RuntimeEnvironment members SystemConfigurationFile, GetRuntimeInterfaceAsIntPtr, and GetRuntimeInterfaceAsObject are not supported and throw PlatformNotSupportedException.", DiagnosticId = "SYSLIB0019", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
10 public static string SystemConfigurationFile
11 {
12 get
13 {
15 }
16 }
17
18 public static bool FromGlobalAccessCache(Assembly a)
19 {
20 return false;
21 }
22
23 [UnconditionalSuppressMessage("SingleFile", "IL3000: Avoid accessing Assembly file path when publishing as a single file", Justification = "This call is fine because the code handles the Assembly.Location equals null by calling AppDomain.CurrentDomain.BaseDirectory")]
24 public static string GetRuntimeDirectory()
25 {
26 string path = typeof(object).Assembly.Location;
27 if (!Path.IsPathRooted(path))
28 {
29 path = AppDomain.CurrentDomain.BaseDirectory;
30 }
32 }
33
34 [Obsolete("RuntimeEnvironment members SystemConfigurationFile, GetRuntimeInterfaceAsIntPtr, and GetRuntimeInterfaceAsObject are not supported and throw PlatformNotSupportedException.", DiagnosticId = "SYSLIB0019", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
35 public static IntPtr GetRuntimeInterfaceAsIntPtr(Guid clsid, Guid riid)
36 {
38 }
39
40 [Obsolete("RuntimeEnvironment members SystemConfigurationFile, GetRuntimeInterfaceAsIntPtr, and GetRuntimeInterfaceAsObject are not supported and throw PlatformNotSupportedException.", DiagnosticId = "SYSLIB0019", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
41 public static object GetRuntimeInterfaceAsObject(Guid clsid, Guid riid)
42 {
44 }
45
46 public static string GetSystemVersion()
47 {
48 return typeof(object).Assembly.ImageRuntimeVersion;
49 }
50}
static AppDomain CurrentDomain
Definition AppDomain.cs:28
static bool IsPathRooted([NotNullWhen(true)] string? path)
Definition Path.cs:985
static readonly char DirectorySeparatorChar
Definition Path.cs:71
static ? string GetDirectoryName(string? path)
Definition Path.cs:121
static object GetRuntimeInterfaceAsObject(Guid clsid, Guid riid)
static IntPtr GetRuntimeInterfaceAsIntPtr(Guid clsid, Guid riid)