using System.Xml; using BetterPatchFileCreator.AdminService; namespace BetterPatchFileCreator.Code { public class DeployConfig { public string Name { get; set; } public string Description { get; set; } public string ServiceURI { get; set; } public void LoadFromXmlNode(XmlNode node) { foreach (XmlAttribute attribute in node.Attributes) { switch (attribute.Name) { case "Name": this.Name = attribute.InnerText; break; case "Description": this.Description = attribute.InnerText; break; case "ServiceURI": this.ServiceURI = attribute.InnerText; break; } } } public XmlNode ToXmlNode(XmlDocument doc) { XmlNode toReturn = doc.CreateElement("DeployConfig"); XmlAttribute attr = doc.CreateAttribute("Name"); attr.InnerText = this.Name; toReturn.Attributes.Append(attr); attr = doc.CreateAttribute("Description"); attr.InnerText = this.Description; toReturn.Attributes.Append(attr); attr = doc.CreateAttribute("ServiceURI"); toReturn.Attributes.Append(attr); return toReturn; } public AdminServiceClient OpenProxy() { AdminServiceClient client = new AdminServiceClient("BasicHttpBinding_IAdminService", ServiceURI); client.Open(); return client; } } }