示例#1
0
        private Event Map(ChangeOptionsCommandContextModel ctx_model, ChangeOptionsCommand cmd)
        {
            var options_data = new OptionsData()
            {
                Tables       = ctx_model.Tables,
                Sets         = ctx_model.Sets,
                Points       = ctx_model.Points,
                Points_drawn = ctx_model.PointsDrawn,
                Drawn        = ctx_model.Drawn,
                Fair_lots    = ctx_model.Walkover
            };

            return(new OptionsCreated(nameof(OptionsCreated),
                                      new TournamentContext(cmd.TournamentId, nameof(TournamentContext)), options_data));
        }
示例#2
0
        public IMessageContext Load(IMessage input)
        {
            var cmd       = input as ChangeOptionsCommand;
            var ctx_model = new ChangeOptionsCommandContextModel()
            {
                Tables      = cmd.Tables,
                Sets        = cmd.Sets,
                Points      = cmd.Points,
                PointsDrawn = cmd.PointsDrawn,
                Drawn       = cmd.Drawn,
                Walkover    = cmd.FairLots
            };

            return(ctx_model);
        }