Skip to content
This repository was archived by the owner on Dec 24, 2022. It is now read-only.

Commit e9a159c

Browse files
committed
Add IsNetCore3 check
1 parent 67ffcf8 commit e9a159c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/ServiceStack.Text/Env.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ static Env()
2121
IsLinux = System.Runtime.InteropServices.RuntimeInformation.IsOSPlatform(System.Runtime.InteropServices.OSPlatform.Linux);
2222
IsWindows = System.Runtime.InteropServices.RuntimeInformation.IsOSPlatform(System.Runtime.InteropServices.OSPlatform.Windows);
2323
IsOSX = System.Runtime.InteropServices.RuntimeInformation.IsOSPlatform(System.Runtime.InteropServices.OSPlatform.OSX);
24+
IsNetCore3 = System.Runtime.InteropServices.RuntimeInformation.FrameworkDescription.StartsWith(".NET Core 3");
2425

2526
var fxDesc = System.Runtime.InteropServices.RuntimeInformation.FrameworkDescription;
2627
IsMono = fxDesc.Contains("Mono");
@@ -129,6 +130,8 @@ static Env()
129130
public static bool IsNetFramework { get; set; }
130131

131132
public static bool IsNetCore { get; set; }
133+
134+
public static bool IsNetCore3 { get; set; }
132135

133136
public static bool SupportsExpressions { get; private set; }
134137

0 commit comments

Comments
 (0)