Exemple #1
0
        public void OSWin81x64_SupportedOn_1201_Returns_True()
        {
            var hostOS = new OS("6.3.9200", 0, 64); //Windows 8.1 x64

              OS os = OS.FindSupportedOs(hostOS, OS.GetSupportedOSForProductVersion("12.01"));
              bool supported = os != null;
              Assert.AreEqual(true, supported && os.recommended == false);
        }
Exemple #2
0
        public void OSWin7x64SP1_SupportedOn_1201_Returns_True()
        {
            var hostOS = new OS("6.1.7601", 1, 64); //Windows 7 SP1 x64

              OS os = OS.FindSupportedOs(hostOS, OS.GetSupportedOSForProductVersion("12.01"));
              bool supported = os != null;
              Assert.AreEqual(true, supported && os.recommended);
        }
Exemple #3
0
        public void OSWinVistax32SP2_SupportedOn_1201_Returns_False()
        {
            var hostOS = new OS("6.0.6002", 2, 32); //Windows XP SP3 x32

              OS os = OS.FindSupportedOs(hostOS, OS.GetSupportedOSForProductVersion("12.01"));
              bool supported = os != null;

              Assert.AreEqual(false, supported);
        }
        internal static string IsOSSupportedInfo()
        {
            try
              {
            var name = OSCollectorHelper.GetOSFullNameFormatted();
            if (ProductDetection.Vugen.IsInstalled)
            {
              Version osVersion = Environment.OSVersion.Version;
              string osString = String.Format("{0}.{1}.{2}", osVersion.Major.ToString(), osVersion.Minor.ToString(), osVersion.Build.ToString());
              OS hostOS = new OS(osString, spInt, bitsInt);
              Logger.Debug(String.Format("hostOs: OSString:{0}, SP:{1}, Bits:{2}", osString, spInt, bitsInt));
              // Get supported OSes for current product version
              List<OS> supportedOsList = OS.GetSupportedOSForProductVersion(ProductDetection.Vugen.ProductVersion);

              OS supportedOs = OS.FindSupportedOs(hostOS, supportedOsList);

              if (supportedOs != null)
            return supportedOs.recommended ? Html.cYes : Html.Yes;
              else
            return Html.cNo;// "Unknown product version (You might be using an old LRDetect version).";
            }
              }
              catch (Exception ex)
              {
            Logger.Error(ex.ToString());
            return ex.Message;
              }
              return Html.cNo;
        }
Exemple #5
0
 public void OSWin7x64_SupportedOn_1201_Returns_False()
 {
     var hostOS = new OS("6.1.7601", 0, 64); //Windows 7 x64 No SPs
       OS os = OS.FindSupportedOs(hostOS, OS.GetSupportedOSForProductVersion("12.01"));
       Assert.AreEqual(true, os == null);
 }
Exemple #6
0
 internal static OS FindSupportedOs(OS hostOS, List<OS> supportedOs)
 {
     OS os = supportedOs.FirstOrDefault(o => o.Equals(hostOS));
       return os;
 }
Exemple #7
0
 public bool Equals(OS obj)
 {
     OS osObj = obj as OS;
       if (osObj != null)
       {
     if (this.version == osObj.version && this.bits == osObj.bits && this.servicePack == osObj.servicePack)
       return true;
       }
       return false;
 }