Inheritance: OfferOutboundEntry
コード例 #1
0
        private List <OfferInboundEntry> buildFriendsInboundResponsesEntryList(XmlDocument x)
        {
            XmlNodeList offerNodes = x.SelectNodes("/response/user");

            if (offerNodes.Count > 0)
            {
                List <OfferInboundEntry> offerList = new List <OfferInboundEntry>();
                foreach (XmlNode offerNode in offerNodes)
                {
                    OfferInboundEntry offer = new OfferInboundEntry();
                    XmlUtils.UseNode(offerNode);
                    offer.UserId   = XmlUtils.Int("uid");
                    offer.UserName = XmlUtils.String("name");
                    offer.Photo    = XmlUtils.String("photo");
                    offer.Viewed   = XmlUtils.Bool("viewed");
                    offer.Age      = XmlUtils.Int("age");
                    offer.Message  = XmlUtils.String("message");
                    offer.CityId   = XmlUtils.Int("city_id");
                    offer.CityName = XmlUtils.String("city_name");

                    offerList.Add(offer);
                }
                return(offerList);
            }
            return(null);
        }
コード例 #2
0
ファイル: OffersFactory.cs プロジェクト: ivukovi4/RestMap
        private List<OfferInboundEntry> buildFriendsInboundResponsesEntryList(XmlDocument x)
        {
            XmlNodeList offerNodes = x.SelectNodes("/response/user");
            if (offerNodes.Count > 0)
            {
                List<OfferInboundEntry> offerList = new List<OfferInboundEntry>();
                foreach (XmlNode offerNode in offerNodes)
                {
                    OfferInboundEntry offer = new OfferInboundEntry();
                    XmlUtils.UseNode(offerNode);
                    offer.UserId = XmlUtils.Int("uid");
                    offer.UserName = XmlUtils.String("name");
                    offer.Photo = XmlUtils.String("photo");
                    offer.Viewed = XmlUtils.Bool("viewed");
                    offer.Age = XmlUtils.Int("age");
                    offer.Message = XmlUtils.String("message");
                    offer.CityId = XmlUtils.Int("city_id");
                    offer.CityName = XmlUtils.String("city_name");

                    offerList.Add(offer);
                }
                return offerList;
            }
            return null;
        }