Make TypeNameParser consistently use tabs
[mono-project.git] / netcore / System.Private.CoreLib / src / System / Environment.cs
blobba3b2e12d429a89c87994fd5875175e95b3e38f1
1 // Licensed to the .NET Foundation under one or more agreements.
2 // The .NET Foundation licenses this file to you under the MIT license.
3 // See the LICENSE file in the project root for more information.
5 using System.Collections;
6 using System.Globalization;
7 using System.Diagnostics;
8 using System.Runtime.CompilerServices;
9 using System.Threading;
11 namespace System
13 partial class Environment
15 public static int CurrentManagedThreadId => Thread.CurrentThread.ManagedThreadId;
17 public extern static int ExitCode {
18 [MethodImplAttribute (MethodImplOptions.InternalCall)]
19 get;
20 [MethodImplAttribute (MethodImplOptions.InternalCall)]
21 set;
24 public static extern bool HasShutdownStarted {
25 [MethodImplAttribute (MethodImplOptions.InternalCall)]
26 get;
29 public static extern int ProcessorCount {
30 [MethodImplAttribute (MethodImplOptions.InternalCall)]
31 get;
34 public static string StackTrace {
35 [MethodImpl (MethodImplOptions.NoInlining)] // Prevent inlining from affecting where the stacktrace starts
36 get => new StackTrace (true).ToString (System.Diagnostics.StackTrace.TraceFormat.Normal);
39 public extern static int TickCount {
40 [MethodImplAttribute (MethodImplOptions.InternalCall)]
41 get;
44 public extern static long TickCount64 {
45 [MethodImplAttribute (MethodImplOptions.InternalCall)]
46 get;
49 [MethodImplAttribute (MethodImplOptions.InternalCall)]
50 public extern static void Exit (int exitCode);
52 [MethodImplAttribute (MethodImplOptions.InternalCall)]
53 public extern static string[] GetCommandLineArgs ();
55 public static void FailFast (string message)
57 FailFast (message, null, null);
60 public static void FailFast(string message, Exception exception)
62 FailFast (message, exception, null);
65 [MethodImplAttribute (MethodImplOptions.InternalCall)]
66 public extern static void FailFast (string message, Exception exception, string errorSource);
69 #region referencesource dependencies - to be removed
71 partial class Environment
73 internal static string GetResourceString (string key)
75 return key;
78 internal static string GetResourceString (string key, CultureInfo culture)
80 return key;
83 internal static string GetResourceString (string key, params object[] values)
85 return string.Format (CultureInfo.InvariantCulture, key, values);
88 #endregion