public ScutexLicense GetScutexLicense()
        {
            ClientLicense clientLicense = _clientLicenseService.GetClientLicense();

            if (clientLicense == null)
            {
                return(null);
            }

            return(GetScutexLicense(clientLicense));
        }
Exemple #2
0
        /// <summary>
        /// Attempts to register the software and turn the version into a full
        /// version. This method may call remote web services, or authenticate
        /// locally ('offline') depending on the settings.
        /// </summary>
        /// <remarks>
        /// If the state of Scutex cannot be verified, for example the
        /// data file or Licensing assembly was tampered with, this method
        /// will warn the user and kill the entire process.
        /// </remarks>
        /// <param name="licenseKey">
        /// Plain text license key to attempt to register
        /// </param>
        public ScutexLicense Register(string licenseKey)
        {
            if (String.IsNullOrEmpty(licenseKey))
            {
                throw new ScutexAuditException();
            }

            ScutexLicense scutexLicense = licenseManagerService.GetScutexLicense();

            RegisterResult result = _registerService.Register(licenseKey, _clientLicenseService.GetClientLicense(), scutexLicense);

            return(result.ScutexLicense);
        }