using System.Runtime.InteropServices; #pragma warning disable 1591 namespace OpenCvSharp.Internal.Util; // ReSharper disable once InconsistentNaming internal enum OS { Windows, Unix } internal enum Runtime { DotNet, Mono } /// /// Provides information for the platform which the user is using /// internal static class Platform { /// /// OS type /// // ReSharper disable once InconsistentNaming public static readonly OS OS; /// /// Runtime type /// public static readonly Runtime Runtime; #pragma warning disable CA1810 static Platform() #pragma warning restore CA1810 { OS = RuntimeInformation.IsOSPlatform(OSPlatform.Linux) || RuntimeInformation.IsOSPlatform(OSPlatform.OSX) ? OS.Unix : OS.Windows; Runtime = (Type.GetType("Mono.Runtime") is null) ? Runtime.Mono : Runtime.DotNet; } }