public bool VerifyAndAcceptLicense(Product product, ProductCodeName codeName, string publicKey, string fileName) { XmlDocument doc = new XmlDocument(); doc.Load(fileName); return(VerifyAndAcceptLicense(product, codeName, publicKey, doc)); }
public bool VerifyAndAcceptLicense(Product product, ProductCodeName codeName, string publicKey, XmlDocument doc) { if (!VerifyLicense(publicKey, doc)) { return(false); } PragmaLicense lic = FromXmlDocument(doc); MachineID mId = MachineIdProvider.Retrieve(lic.MachineIdType); return((mId.Key.ToLowerInvariant() == lic.MachineKey.Key.ToLowerInvariant()) && (lic.ProductCodeName == codeName) && (lic.Product == product)); }