示例#1
0
        public static TimelineEvent Parse(dynamic dynamicXml)
        {
            if (dynamicXml == null)
            {
                return(null);
            }

            var builder = new TimelineEvent
            {
                Assists      = TimelineEventPlayer.ParseList(dynamicXml.GetAssistList()),
                AwayScore    = dynamicXml.AwayScore <double?>(),
                HomeScore    = dynamicXml.HomeScore <double?>(),
                GoalScorer   = TimelineEventPlayer.Parse(dynamicXml.GoalScorer),
                Id           = dynamicXml.Id <int>(),
                MatchTime    = dynamicXml.MatchTime <int?>(),
                Period       = dynamicXml.Period,
                PeriodName   = dynamicXml.PeriodName,
                Points       = dynamicXml.Points,
                StoppageTime = dynamicXml.StoppageTime,
                Team         = dynamicXml.Team,
                Time         = dynamicXml.Time <DateTimeOffset>(),
                Type         = dynamicXml.Type,
                Value        = dynamicXml.Value,
                X            = dynamicXml.X <int?>(),
                Y            = dynamicXml.Y <int?>()
            };

            return(builder);
        }
示例#2
0
        public static TimelineEventPlayer Parse(dynamic dynamicXml)
        {
            if (dynamicXml == null)
            {
                return(null);
            }

            var builder = new TimelineEventPlayer
            {
                Id   = dynamicXml.Id,
                Name = dynamicXml.Name,
                Type = dynamicXml.Type
            };

            return(builder);
        }