/// <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); }
static SystemInfo() { var c = new OSVersionInfo(); if (c.GetOSVersion().ToLower().Contains("windows")) { SystemInfoObject = new WindowsSystemInfo(); } else { SystemInfoObject = new LinuxSystemInfo(); } }