コード例 #1
0
        public FootballPlayerPresenter(IFootballPlayerView view, IFootballPlayerService footballPlayerService)
            : base(view)
        {
            Guard.WhenArgument(footballPlayerService, "footballPlayerService").IsNull().Throw();
            this.footballPlayerService = footballPlayerService;

            this.View.OnGetFootballPlayerById += View_OnGetFootballPlayerById;
        }
コード例 #2
0
        public ManageFootballPlayersPresenter(
            IManageFootballPlayersView view,
            IFootballPlayerService footballPlayerService,
            ICountryService countryService,
            ITeamService teamService)
            : base(view)
        {
            Guard.WhenArgument(footballPlayerService, "footballPlayerService").IsNull().Throw();
            Guard.WhenArgument(countryService, "countryService").IsNull().Throw();
            Guard.WhenArgument(teamService, "teamService").IsNull().Throw();

            this.footballPlayerService = footballPlayerService;
            this.countryService        = countryService;
            this.teamService           = teamService;

            this.View.OnGetAllPlayers        += View_OnGetAllPlayers;
            this.View.OnGetAllCoutries       += View_OnGetAllCoutries;
            this.View.OnGetAllTeams          += View_OnGetAllTeams;
            this.View.OnUpdateFootballPlayer += View_OnUpdateFootballPlayer;
            this.View.OnDeleteFootballPlayer += View_OnDeleteFootballPlayer;
            this.View.OnAddFootballPlayer    += View_OnAddFootballPlayer;
        }
コード例 #3
0
 public PlayerController(IFootballPlayerService footballPlayerService, ICloudinaryService cloudinaryService)
 {
     this.footballPlayerService = footballPlayerService;
     this.cloudinaryService     = cloudinaryService;
 }
コード例 #4
0
 public PlayerController(IFootballPlayerService footballPlayerService)
 {
     this.footballPlayerService = footballPlayerService;
 }