public virtual void ReadFrom(XElement xE)
 {
     FeedId           = null;
     FeedChangeStatus = null;
     ChangedFeedItems = null;
     RemovedFeedItems = null;
     foreach (var xItem in xE.Elements())
     {
         var localName = xItem.Name.LocalName;
         if (localName == "feedId")
         {
             FeedId = long.Parse(xItem.Value);
         }
         else if (localName == "feedChangeStatus")
         {
             FeedChangeStatus = ChangeStatusExtensions.Parse(xItem.Value);
         }
         else if (localName == "changedFeedItems")
         {
             if (ChangedFeedItems == null)
             {
                 ChangedFeedItems = new List <long>();
             }
             ChangedFeedItems.Add(long.Parse(xItem.Value));
         }
         else if (localName == "removedFeedItems")
         {
             if (RemovedFeedItems == null)
             {
                 RemovedFeedItems = new List <long>();
             }
             RemovedFeedItems.Add(long.Parse(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));
         }
     }
 }
Beispiel #3
0
 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));
         }
     }
 }