Esempio n. 1
0
        internal override void BuildUpdate(XElement xp)
        {
            SetBaseValues(xp);

            //update-content
            var xcontent = xp.Element("update-content");
            if (xcontent != null)
            {
                //person
                var xe = xcontent.Element("person");
                if (xe != null)
                {
                    Person = new LinkedInPersonPosition();
                    Utils.BuildPerson(Person, xe);
                    //positions
                    xe = xcontent.Element("positions");
                    if (xe != null)
                    {
                        Person.AddPositions(xe.Elements("position").Select(Utils.BuildPositionBase));
                    }
                }
            }
            //updated-fields
            var xfields = xp.Element("updated-fields");
            if (xfields != null)
            {
                AddUpdateFields(xfields.Elements("update-field").Select(xf =>
                {
                    var xElement = xf.Element("name");
                    return xElement != null ? xElement.Value.Trim() : null;
                }));
            }
        }
Esempio n. 2
0
        internal override void BuildUpdate(XElement xp)
        {
            SetBaseValues(xp);

            //update-content
            var xcontent = xp.Element("update-content");

            if (xcontent != null)
            {
                //person
                var xe = xcontent.Element("person");
                if (xe != null)
                {
                    Person = new LinkedInPersonPosition();
                    Utils.BuildPerson(Person, xe);
                    //positions
                    xe = xcontent.Element("positions");
                    if (xe != null)
                    {
                        Person.AddPositions(xe.Elements("position").Select(Utils.BuildPositionBase));
                    }
                }
            }
            //updated-fields
            var xfields = xp.Element("updated-fields");

            if (xfields != null)
            {
                AddUpdateFields(xfields.Elements("update-field").Select(xf =>
                {
                    var xElement = xf.Element("name");
                    return(xElement != null ? xElement.Value.Trim() : null);
                }));
            }
        }