コード例 #1
0
 public BarCommentController(IBarService barService,
                             IBarCommentsService barCommentsService,
                             IBarRatingService barRatingService,
                             IViewModelMapper <BarCommentDto, BarCommentViewModel> barCommentVmMapper,
                             IViewModelMapper <BarDTO, BarViewModel> barVmMapper)
 {
     this.barService         = barService ?? throw new ArgumentNullException(nameof(barService));
     this.barCommentsService = barCommentsService ?? throw new ArgumentNullException(nameof(barCommentsService));
     this.barRatingService   = barRatingService ?? throw new ArgumentNullException(nameof(barRatingService));
     this.barCommentVmMapper = barCommentVmMapper ?? throw new ArgumentNullException(nameof(barCommentVmMapper));
     this.barVmMapper        = barVmMapper ?? throw new ArgumentNullException(nameof(barVmMapper));
 }
コード例 #2
0
 public BarsController(IBarService barService,
                       IBarCommentsService barCommentsService,
                       IBarRatingService barRatingService,
                       IViewModelMapper <BarCommentDto, BarCommentViewModel> barCommentVmMapper,
                       IViewModelMapper <BarDTO, BarViewModel> barVmMapper,
                       IViewModelMapper <BarRatingDto, BarRatingViewModel> barRatingVmMapper,
                       IWebHostEnvironment webHostEnvironment,
                       ICocktailService cocktailService,
                       IViewModelMapper <CocktailDto, CocktailViewModel> cocktailVmMapper)
 {
     this.barService         = barService ?? throw new ArgumentNullException(nameof(barService));
     this.barCommentsService = barCommentsService ?? throw new ArgumentNullException(nameof(barCommentsService));
     this.barRatingService   = barRatingService ?? throw new ArgumentNullException(nameof(barRatingService));
     this.barCommentVmMapper = barCommentVmMapper ?? throw new ArgumentNullException(nameof(barCommentVmMapper));
     this.barVmMapper        = barVmMapper ?? throw new ArgumentNullException(nameof(barVmMapper));
     this.barRatingVmMapper  = barRatingVmMapper ?? throw new ArgumentNullException(nameof(barRatingVmMapper));
     this.webHostEnvironment = webHostEnvironment ?? throw new ArgumentNullException(nameof(webHostEnvironment));
     this.cocktailService    = cocktailService ?? throw new ArgumentNullException(nameof(cocktailService));
     this.cocktailVmMapper   = cocktailVmMapper;
 }