public HyperAddress(string addressLine1, string addressLine2, string city, string state, string zipCode) : this() { AddressLines.Add(addressLine1); AddressLines.Add(addressLine2); City = city; State = state; ZipCode = zipCode; }
/// <summary> /// Initialise the addresslines list of address lines. Clears any existing lines, further lines can be added through the AddressLine property /// </summary> public LabelCollection SetAddressLines(params string[] lines) { if (AddressLines == null) { AddressLines = new LabelCollection(this); } else { AddressLines.Clear(); } foreach (string line in lines) { AddressLines.Add(line.Trim()); } return(AddressLines); }
internal override void ParseXml(XmlElement xml) { base.ParseXml(xml); if (xml.HasAttribute("InternalLocation")) { InternalLocation = xml.Attributes["InternalLocation"].Value; } foreach (XmlNode child in xml.ChildNodes) { string name = child.Name; if (string.Compare(name, "AddressLines") == 0) { foreach (XmlNode cn in child.ChildNodes) { AddressLines.Add(cn.InnerText); } } else if (string.Compare(name, "InternalLocation", true) == 0) { InternalLocation = child.InnerText; } else if (string.Compare(name, "PostalBox", true) == 0) { PostalBox = child.InnerText; } else if (string.Compare(name, "Town", true) == 0) { Town = child.InnerText; } else if (string.Compare(name, "Region", true) == 0) { Region = child.InnerText; } else if (string.Compare(name, "PostalCode", true) == 0) { PostalCode = child.InnerText; } else if (string.Compare(name, "Country", true) == 0) { Country = child.InnerText; } } if (xml.HasAttribute("PostalBox")) { PostalBox = xml.Attributes["PostalBox"].Value; } if (xml.HasAttribute("Town")) { Town = xml.Attributes["Town"].Value; } if (xml.HasAttribute("Region")) { Region = xml.Attributes["Region"].Value; } if (xml.HasAttribute("PostalCode")) { PostalCode = xml.Attributes["PostalCode"].Value; } if (xml.HasAttribute("Country")) { Country = xml.Attributes["Country"].Value; } }
public Builder AddAddressLines(string value) { AddressLines.Add(value); return(this); }