コード例 #1
0
        /// <summary>
        /// Adapte un Match en Match Contract.
        /// </summary>
        /// <param name="matchC">Match à adapter.</param>
        /// <returns>Match.</returns>
        public static Match fromMatchContract(MatchContract matchC)
        {
            if (matchC == null)
                return null;

            Match m = new Match();
            m.ID = matchC.ID;
            m.IdJediVainqueur = matchC.IdVainqueur;
            m.Jedi1 = JediAdapter.fromJediContract(matchC.Jedi1);
            m.Jedi2 = JediAdapter.fromJediContract(matchC.Jedi2);
            m.PhaseTournoi = MatchAdapter.fromPhaseTournoiContract(matchC.PhaseTournoi);
            m.Stade = StadeAdapter.fromStadeContract(matchC.Stade);

            return m;
        }
コード例 #2
0
        /// <summary>
        /// Adapte un Match en Match Contract.
        /// </summary>
        /// <param name="match">Match à adapter.</param>
        /// <returns>Match contract.</returns>
        public static MatchContract fromMatch(Match match)
        {
            if (match == null)
                return null;

            // Prépare les valeurs
            JediContract jc1 = JediAdapter.fromJedi(match.Jedi1);
            JediContract jc2 = JediAdapter.fromJedi(match.Jedi2);
            EPhaseTournoiContract pc = MatchAdapter.fromPhaseTournoi(match.PhaseTournoi);
            StadeContract sc = StadeAdapter.fromStade(match.Stade);

            // Crée le MatchContract
            MatchContract mc = new MatchContract(match.ID, jc1, jc2, pc, sc);

            return mc;
        }
コード例 #3
0
 void IJediWebService.DeleteMatch(MatchContract match)
 {
     Match m = MatchAdapter.fromMatchContract(match);
     m_manager.DeleteMatch(m);
 }
コード例 #4
0
 int IJediWebService.ComputeMatchResult(MatchContract match)
 {
     return m_manager.ComputeMatchResult(MatchAdapter.fromMatchContract(match));
 }