Beispiel #1
0
        /// <summary>
        /// Fills the property of this struct that has the correct name with the information contained in the member-XElement.
        /// </summary>
        /// <param name="member">The member element storing the information.</param>
        /// <returns>Whether it was successful or not.</returns>
        protected override bool parseXml(XElement member)
        {
            var value = getMemberValueElement(member);

            switch (getMemberName(member))
            {
            case "Override":
                if ([email protected](value))
                {
                    return(false);
                }
                break;

            case "Mods":
                if (!mods.ParseXml(value))
                {
                    return(false);
                }
                break;

            default:
                return(false);
            }

            return(true);
        }
        /// <summary>
        /// Fills the property of this struct that has the correct name with the information contained in the member-XElement.
        /// </summary>
        /// <param name="member">The member element storing the information.</param>
        /// <returns>Whether it was successful or not.</returns>
        protected override bool parseXml(XElement member)
        {
            var value = getMemberValueElement(member);

            switch (getMemberName(member))
            {
            case "Login":
                if (!login.ParseXml(value))
                {
                    return(false);
                }
                break;

            case "NickName":
                if (!nickName.ParseXml(value))
                {
                    return(false);
                }
                break;

            case "PlayerId":
                if (!playerId.ParseXml(value))
                {
                    return(false);
                }
                break;

            case "Rank":
                if (!rank.ParseXml(value))
                {
                    return(false);
                }
                break;

            case "BestTime":
                if (!bestTime.ParseXml(value))
                {
                    return(false);
                }
                break;

            case "BestCheckpoints":
                if (!bestCheckpoints.ParseXml(value))
                {
                    return(false);
                }
                break;

            case "Score":
                if (!score.ParseXml(value))
                {
                    return(false);
                }
                break;

            case "NbrLapsFinished":
                if (!nbrLapsFinished.ParseXml(value))
                {
                    return(false);
                }
                break;

            case "LadderScore":
                if (!ladderScore.ParseXml(value))
                {
                    return(false);
                }
                break;

            default:
                return(false);
            }

            return(true);
        }