Beispiel #1
0
        /// <summary>Output the licence details to a licence file</summary>
        public void WriteLicenceFile(string lic)
        {
            // Create the licence xml document
            var root = new XDocument(new XElement(XmlTag.Root)).Root;

            if (root == null)
            {
                throw new Exception("Failed to create licence.xml root node");
            }

            // Save the elements
            root.Add2(XmlTag.LicenceHolder, LicenceHolder, false);
            root.Add2(XmlTag.EmailAddr, EmailAddress, false);
            root.Add2(XmlTag.Company, Company, false);
            root.Add2(XmlTag.ActivationCode, ActivationCode, false);
            root.Add2(XmlTag.VersionMask, VersionMask, false);

            // Save the licence file
            root.Save(lic);
        }