Ejemplo n.º 1
0
        public ProductLicenseInfo GenerateAndActivateProductKey(short productID, short productFeatures, short trialDays, string clientID, string username, string company, string userEmail, string machineHash)
        {
            string privateXmlKey = Helpers.GetResourceString("KProcess.Ksmed.Server.Activation.Resources.PrivateKey.xml");

            ProductKeyPublisher keyPublisher = new ProductKeyPublisher(privateXmlKey);
            string productKey = keyPublisher.GenerateProductKey(productID, productFeatures, trialDays, clientID, username, company, userEmail);

            return(new ProductActivation(privateXmlKey)
                   .ActivateProduct(productKey, machineHash));
        }