public EntityLeaderList(EntityLeaderList iValue) { foreach (EntityLeader lLeader in iValue) { this.Add((EntityLeader)lLeader.Clone()); } }
public PopulationDataEntry(String iName, OfficeType iType, EntityLeaderList iLeaderList) { Name = iName; EntityOffice lOffice = new EntityOffice(); lOffice.Type = iType; lOffice.OfficialsList = iLeaderList; Offices.Add(lOffice); }
protected EntityLeaderList ParseLeaders(String iValue) { EntityLeaderList lResult = new EntityLeaderList(); Int32 lPos3 = iValue.IndexOf(mGovernorStart) + mGovernorStart.Length; Int32 lPos4 = iValue.IndexOf(mViceGovernorStart) + mViceGovernorStart.Length; lResult.AddRange(ParseNames(iValue.Substring(lPos3, lPos4 - lPos3 - mViceGovernorStart.Length), EntityLeaderType.Governor)); lResult.AddRange(ParseNames(iValue.Substring(lPos4), EntityLeaderType.ViceGovernor)); return(lResult); }
internal static EntityOffice Load(XmlNode iNode) { EntityOffice RetVal = null; if (iNode != null && iNode.Name.Equals("office")) { RetVal = new EntityOffice(); string s = TambonHelper.GetAttributeOptionalString(iNode, "type"); if (!String.IsNullOrEmpty(s)) { RetVal.Type = (OfficeType)Enum.Parse(typeof(OfficeType), s); } if (iNode.HasChildNodes) { foreach (XmlNode lChildNode in iNode.ChildNodes) { if (lChildNode.Name == "officials") { EntityLeaderList lOfficials = EntityLeaderList.Load(lChildNode); RetVal.OfficialsList = lOfficials; } if (lChildNode.Name == "url") { RetVal.Websites.Add(new Uri(lChildNode.InnerText)); } if (lChildNode.Name == "address") { RetVal.Address = ThaiAddress.Load(lChildNode); } if (lChildNode.Name == "geo:Point") { RetVal.Location = GeoPoint.Load(lChildNode); } } } } return(RetVal); }
public static EntityLeaderList Load(XmlNode iNode) { EntityLeaderList RetVal = null; if (iNode != null && iNode.Name.Equals("officials")) { RetVal = new EntityLeaderList(); RetVal.Source = TambonHelper.GetAttributeOptionalString(iNode, "source"); if (iNode.HasChildNodes) { foreach (XmlNode lChildNode in iNode.ChildNodes) { EntityLeader lCurrent = EntityLeader.Load(lChildNode); if (lCurrent != null) { RetVal.Add(lCurrent); } } } } return(RetVal); }