Пример #1
0
 public WebProductLicense LoadWebLicense(string productName)
 {
     try
     {
         ProductLicenseInfo licenseInfo    = _licenseStore.LoadLicense(productName);
         UsersPool          usersPool      = _licenseStore.LoadUsersPoolLicense(ActivationConstants.WebUsersPoolName);
         WebProductLicense  productLicense = new WebProductLicense(_cryptoService, _identifierService, licenseInfo, _userInfoProvider, usersPool);
         return(productLicense);
     }
     catch (LicenseNotFoundException ex)
     {
         return(new WebProductLicense(WebLicenseStatus.NotFound, "Common_License_StatusReason_Exception", ex.Message));
     }
     catch (Exception ex)
     {
         return(new WebProductLicense(WebLicenseStatus.Invalid, "Common_License_StatusReason_Exception", ex.Message));
     }
 }