File tree 1 file changed +2
-1
lines changed
src/libraries/Common/tests/TestUtilities/System 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,8 @@ public static partial class PlatformDetection
23
23
// do it in a way that failures don't cascade.
24
24
//
25
25
26
- public static readonly bool IsInHelix = Environment . GetEnvironmentVariables ( ) . Keys . Cast < string > ( ) . Where ( key => key . StartsWith ( "HELIX" ) ) . Any ( ) ;
26
+ private static Lazy < bool > s_IsInHelix => new Lazy < bool > ( ( ) => Environment . GetEnvironmentVariables ( ) . Keys . Cast < string > ( ) . Any ( key => key . StartsWith ( "HELIX" ) ) ) ;
27
+ public static bool IsInHelix => s_IsInHelix . Value ;
27
28
28
29
public static bool IsNetCore => Environment . Version . Major >= 5 || RuntimeInformation . FrameworkDescription . StartsWith ( ".NET Core" , StringComparison . OrdinalIgnoreCase ) ;
29
30
public static bool IsMonoRuntime => Type . GetType ( "Mono.RuntimeStructs" ) != null ;
You can’t perform that action at this time.
0 commit comments