/// <summary>
        /// Constructor
        /// </summary>
        public WindowsSystemInfo()
        {
            var c = new OSVersionInfo();

            if (!c.GetOSVersion().ToLower().Contains("windows"))
            {
                throw new Exception("This class only functions on Windows platforms");
            }

            pData = new WindowsSystemInfoInternal();
            RegisterEvents(pData);
        }
Exemple #2
0
        static SystemInfo()
        {
            var c = new OSVersionInfo();

            if (c.GetOSVersion().ToLower().Contains("windows"))
            {
                SystemInfoObject = new WindowsSystemInfo();
            }
            else
            {
                SystemInfoObject = new LinuxSystemInfo();
            }
        }