コード例 #1
0
        public static BasketballLiveResult GetResult(SportLiveMatch liveMatch)
        {
            var scores = liveMatch.Result.GetScores();

            return(new BasketballLiveResult
            {
                Match = liveMatch,
                Total1 = scores.homeScore,
                Total2 = scores.awayScore,
                Periods = liveMatch.Result.GetPeriods(),
                OverallTotal = scores.homeScore + scores.awayScore,
            });
        }
コード例 #2
0
        public static CyberFootballMatch FromLiveMatch(SportLiveMatch liveMatch)
        {
            var evno = liveMatch.EventNo;

            var p1origin = liveMatch.Team1;
            var p2origin = liveMatch.Team2;

            if (string.IsNullOrEmpty(p1origin) || string.IsNullOrEmpty(p2origin))
            {
                return(null);
            }

            var m = new CyberFootballMatch
            {
                EventNo   = evno,
                Player1   = CyberFootballPlayer(p1origin),
                Player2   = CyberFootballPlayer(p2origin),
                LiveMatch = liveMatch
            };

            return(m);
        }