コード例 #1
0
ファイル: LicensedProduct.cs プロジェクト: presscad/docviewer
        public void Save(XmlElement parent)
        {
            XmlElement el = parent.OwnerDocument.CreateElement("Product");

            el.SetAttribute("AssemblyName", _assemblyName);
            el.SetAttribute("Version", _version);
            el.SetAttribute("ExpirationDate", _expirationDate.ToString("yyyy-MM-dd"));
            el.SetAttribute("Type", _type.ToString());
            el.SetAttribute("Scope", _scope.ToString());

            if (!string.IsNullOrEmpty(LicenseUrl))
            {
                el.SetAttribute("LicenseUrl", LicenseUrl);
            }

            parent.AppendChild(el);
        }