Lucene.Net.Util.Constants: Fixed OS check for FreeBSD and SunOS so it will work 
if/when those platforms become available on .NET Standard


Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/f486e5c4
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/f486e5c4
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/f486e5c4

Branch: refs/heads/master
Commit: f486e5c421f2be952ff6805b8b0dfa457513e5a1
Parents: 5d9a9a0
Author: Shad Storhaug <[email protected]>
Authored: Mon Sep 25 00:28:49 2017 +0700
Committer: Shad Storhaug <[email protected]>
Committed: Mon Sep 25 00:28:49 2017 +0700

----------------------------------------------------------------------
 src/Lucene.Net/Util/Constants.cs | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f486e5c4/src/Lucene.Net/Util/Constants.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Util/Constants.cs b/src/Lucene.Net/Util/Constants.cs
index 6b79fdc..ff29507 100644
--- a/src/Lucene.Net/Util/Constants.cs
+++ b/src/Lucene.Net/Util/Constants.cs
@@ -140,7 +140,8 @@ namespace Lucene.Net.Util
             WINDOWS = RuntimeInformation.IsOSPlatform(OSPlatform.Windows);
             LINUX = RuntimeInformation.IsOSPlatform(OSPlatform.Linux);
             MAC_OS_X = RuntimeInformation.IsOSPlatform(OSPlatform.OSX);
-            // LUCENENET NOTE: SunOS and FreeBSD not supported
+            FREE_BSD = 
RuntimeInformation.IsOSPlatform(OSPlatform.Create("FreeBSD"));
+            SUN_OS = 
RuntimeInformation.IsOSPlatform(OSPlatform.Create("SunOS"));
 #else
             // LUCENENET NOTE: On .NET Framework, our only possibilities are 
Windows or Linux
             PlatformID pid = Environment.OSVersion.Platform;

Reply via email to