예제 #1
0
 public ProductLicense LoadLicense(string productName)
 {
     try
     {
         ProductLicenseInfo licenseInfo    = _licenseStore.LoadLicense(productName);
         ProductLicense     productLicense = new ProductLicense(_cryptoService, _identifierService, licenseInfo, _userInfoProvider);
         return(productLicense);
     }
     catch (LicenseNotFoundException ex)
     {
         return(new ProductLicense(LicenseStatus.NotFound, ex.Message));
     }
     catch (Exception ex)
     {
         return(new ProductLicense(LicenseStatus.Invalid, ex.Message));
     }
 }