File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed
MongoDB.Driver.Encryption Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -22,14 +22,15 @@ internal enum OperatingSystemPlatform
22
22
{
23
23
Windows ,
24
24
Linux ,
25
- MacOS
25
+ MacOS ,
26
+ Unknown
26
27
}
27
28
28
29
internal static class OperatingSystemHelper
29
30
{
30
31
public static OperatingSystemPlatform CurrentOperatingSystem => __currentOperatingSystem . Value ;
31
32
32
- private static readonly Lazy < OperatingSystemPlatform > __currentOperatingSystem = new Lazy < OperatingSystemPlatform > ( DetermineOperatingSystemPlatform ) ;
33
+ private static readonly Lazy < OperatingSystemPlatform > __currentOperatingSystem = new ( DetermineOperatingSystemPlatform ) ;
33
34
34
35
private static OperatingSystemPlatform DetermineOperatingSystemPlatform ( )
35
36
{
@@ -50,7 +51,7 @@ private static OperatingSystemPlatform DetermineOperatingSystemPlatform()
50
51
}
51
52
else
52
53
{
53
- throw new PlatformNotSupportedException ( $ "Unsupported platform ' { RuntimeInformation . OSDescription } '." ) ;
54
+ return OperatingSystemPlatform . Unknown ;
54
55
}
55
56
#endif
56
57
}
Original file line number Diff line number Diff line change @@ -22,14 +22,15 @@ internal enum OperatingSystemPlatform
22
22
{
23
23
Windows ,
24
24
Linux ,
25
- MacOS
25
+ MacOS ,
26
+ Unknown
26
27
}
27
28
28
29
internal static class OperatingSystemHelper
29
30
{
30
31
public static OperatingSystemPlatform CurrentOperatingSystem => __currentOperatingSystem . Value ;
31
32
32
- private static readonly Lazy < OperatingSystemPlatform > __currentOperatingSystem = new Lazy < OperatingSystemPlatform > ( DetermineOperatingSystemPlatform ) ;
33
+ private static readonly Lazy < OperatingSystemPlatform > __currentOperatingSystem = new ( DetermineOperatingSystemPlatform ) ;
33
34
34
35
private static OperatingSystemPlatform DetermineOperatingSystemPlatform ( )
35
36
{
@@ -50,7 +51,7 @@ private static OperatingSystemPlatform DetermineOperatingSystemPlatform()
50
51
}
51
52
else
52
53
{
53
- throw new PlatformNotSupportedException ( $ "Unsupported platform ' { RuntimeInformation . OSDescription } '." ) ;
54
+ return OperatingSystemPlatform . Unknown ;
54
55
}
55
56
#endif
56
57
}
You can’t perform that action at this time.
0 commit comments