Exemple #1
0
        public override Response NewResponse(XmlNode responseNode)
        {
            var calresList = new List <CalendarResource>();

            foreach (XmlNode calResource in responseNode.ChildNodes)
            {
                var calres = new CalendarResource {
                    id = XmlUtil.AttributeValue(calResource.Attributes, AccountService.A_ID)
                };
                foreach (XmlNode attrNode  in calResource.ChildNodes)
                {
                    calres.AttributesList.Add(XmlUtil.AttributeValue(attrNode.Attributes, AccountService.A_ATTRNAME), attrNode.InnerText);
                }
                calresList.Add(calres);
            }
            return(new SearchCalendarResourcesResponse(calresList));
        }
Exemple #2
0
        public override Response NewResponse(XmlNode responseNode)
        {
            var calresList = new List <CalendarResource>();

            foreach (XmlNode calResource in responseNode.ChildNodes)
            {
                var calres = new CalendarResource {
                    id = XmlUtil.AttributeValue(calResource.Attributes, AccountService.A_ID)
                };
                foreach (XmlNode attrNode in calResource.ChildNodes)
                {
                    var attrName = XmlUtil.AttributeValue(attrNode.Attributes, AccountService.A_ATTRNAME);
                    if (!calres.AttributesList.ContainsKey(attrName))
                    {
                        calres.AttributesList.Add(attrName, attrNode.InnerText);
                    }
                }
                calresList.Add(calres);
            }
            var res = new SearchGalResponse(calresList);

            res.ResponseNode = responseNode;
            return(res);
        }