public virtual void ReadFrom(XElement xE) { ChangedCampaigns = null; ChangedFeeds = null; LastChangeTimestamp = null; foreach (var xItem in xE.Elements()) { var localName = xItem.Name.LocalName; if (localName == "changedCampaigns") { if (ChangedCampaigns == null) { ChangedCampaigns = new List <CampaignChangeData>(); } var changedCampaignsItem = new CampaignChangeData(); changedCampaignsItem.ReadFrom(xItem); ChangedCampaigns.Add(changedCampaignsItem); } else if (localName == "changedFeeds") { if (ChangedFeeds == null) { ChangedFeeds = new List <FeedChangeData>(); } var changedFeedsItem = new FeedChangeData(); changedFeedsItem.ReadFrom(xItem); ChangedFeeds.Add(changedFeedsItem); } else if (localName == "lastChangeTimestamp") { LastChangeTimestamp = xItem.Value; } } }
public virtual void ReadFrom(XElement xE) { CampaignId = null; CampaignChangeStatus = null; ChangedAdGroups = null; AddedCampaignCriteria = null; RemovedCampaignCriteria = null; ChangedFeeds = null; RemovedFeeds = null; foreach (var xItem in xE.Elements()) { var localName = xItem.Name.LocalName; if (localName == "campaignId") { CampaignId = long.Parse(xItem.Value); } else if (localName == "campaignChangeStatus") { CampaignChangeStatus = ChangeStatusExtensions.Parse(xItem.Value); } else if (localName == "changedAdGroups") { if (ChangedAdGroups == null) { ChangedAdGroups = new List <AdGroupChangeData>(); } var changedAdGroupsItem = new AdGroupChangeData(); changedAdGroupsItem.ReadFrom(xItem); ChangedAdGroups.Add(changedAdGroupsItem); } else if (localName == "addedCampaignCriteria") { if (AddedCampaignCriteria == null) { AddedCampaignCriteria = new List <long>(); } AddedCampaignCriteria.Add(long.Parse(xItem.Value)); } else if (localName == "removedCampaignCriteria") { if (RemovedCampaignCriteria == null) { RemovedCampaignCriteria = new List <long>(); } RemovedCampaignCriteria.Add(long.Parse(xItem.Value)); } else if (localName == "changedFeeds") { if (ChangedFeeds == null) { ChangedFeeds = new List <long>(); } ChangedFeeds.Add(long.Parse(xItem.Value)); } else if (localName == "removedFeeds") { if (RemovedFeeds == null) { RemovedFeeds = new List <long>(); } RemovedFeeds.Add(long.Parse(xItem.Value)); } } }
public virtual void ReadFrom(XElement xE) { AdGroupId = null; AdGroupChangeStatus = null; ChangedAds = null; ChangedCriteria = null; RemovedCriteria = null; ChangedFeeds = null; RemovedFeeds = null; ChangedAdGroupBidModifierCriteria = null; RemovedAdGroupBidModifierCriteria = null; foreach (var xItem in xE.Elements()) { var localName = xItem.Name.LocalName; if (localName == "adGroupId") { AdGroupId = long.Parse(xItem.Value); } else if (localName == "adGroupChangeStatus") { AdGroupChangeStatus = ChangeStatusExtensions.Parse(xItem.Value); } else if (localName == "changedAds") { if (ChangedAds == null) { ChangedAds = new List <long>(); } ChangedAds.Add(long.Parse(xItem.Value)); } else if (localName == "changedCriteria") { if (ChangedCriteria == null) { ChangedCriteria = new List <long>(); } ChangedCriteria.Add(long.Parse(xItem.Value)); } else if (localName == "removedCriteria") { if (RemovedCriteria == null) { RemovedCriteria = new List <long>(); } RemovedCriteria.Add(long.Parse(xItem.Value)); } else if (localName == "changedFeeds") { if (ChangedFeeds == null) { ChangedFeeds = new List <long>(); } ChangedFeeds.Add(long.Parse(xItem.Value)); } else if (localName == "removedFeeds") { if (RemovedFeeds == null) { RemovedFeeds = new List <long>(); } RemovedFeeds.Add(long.Parse(xItem.Value)); } else if (localName == "changedAdGroupBidModifierCriteria") { if (ChangedAdGroupBidModifierCriteria == null) { ChangedAdGroupBidModifierCriteria = new List <long>(); } ChangedAdGroupBidModifierCriteria.Add(long.Parse(xItem.Value)); } else if (localName == "removedAdGroupBidModifierCriteria") { if (RemovedAdGroupBidModifierCriteria == null) { RemovedAdGroupBidModifierCriteria = new List <long>(); } RemovedAdGroupBidModifierCriteria.Add(long.Parse(xItem.Value)); } } }