private static void AppendUpgradeEvaluationExpirationInfo(StringBuilder builder, License license, DateTime now)
 {
     if (!LicenseVerificator.IsExpired(license, now))
     {
         int num = LicenseVerificator.DaysToExpire(license, now);
         if (num <= 30)
         {
             builder.AppendFormat("Temporary evaluation license expires in {0} day(s)\r\n", num);
             return;
         }
         builder.AppendFormat("Temporary evaluation license expires on {0:d}\r\n", license.EndTime);
     }
 }
        private static void AppendLicenseExpirationInfo(StringBuilder builder, License license, DateTime now)
        {
            if (LicenseVerificator.IsExpired(license, now))
            {
                builder.AppendFormat("License expired on {0:d}\r\n", license.EndTime);
                return;
            }
            if (!LicenseVerificator.IsStarted(license, now))
            {
                builder.AppendFormat("License will be valid from {0:d}\r\n", license.StartTime);
                return;
            }
            int num = LicenseVerificator.DaysToExpire(license, now);

            if (num <= 30)
            {
                builder.AppendFormat("License expires in {0} day(s)\r\n", num);
                return;
            }
            builder.AppendFormat("License expires on {0:d}\r\n", license.EndTime);
        }
예제 #3
0
 public static bool IsExpiringSoon(License license, DateTime now)
 {
     return(LicenseVerificator.DaysToExpire(license, now) <= 7);
 }