public MyReviewsPresenter(IBeerReviewService reviewService, IMyReviewsView view)
     : base(reviewService, view)
 {
     this.View.Initialized  += this.OnViewInitialise;
     this.View.ReviewUpdate += this.OnUpdateReview;
     this.View.ReviewDelete += this.OnDeleteReview;
 }
Exemplo n.º 2
0
        public NotificationsHub(IFollowerService followerService, IBeerReviewService reviewService)
        {
            Guard.WhenArgument(followerService, nameof(followerService)).IsNull().Throw();
            Guard.WhenArgument(reviewService, nameof(reviewService)).IsNull().Throw();

            this.followerService = followerService;
            this.reviewService   = reviewService;
        }
Exemplo n.º 3
0
        public UsersController(IMapper mapper, IUserService userService, IBeerReviewService reviewService)
        {
            Guard.WhenArgument(mapper, nameof(mapper)).IsNull().Throw();
            Guard.WhenArgument(userService, nameof(userService)).IsNull().Throw();
            Guard.WhenArgument(reviewService, nameof(reviewService)).IsNull().Throw();

            this.mapper        = mapper;
            this.userService   = userService;
            this.reviewService = reviewService;
        }
        public BeerReviewPresenter(IBeerReviewService reviewService, TView view)
            : base(view)
        {
            if (reviewService == null)
            {
                throw new ArgumentNullException(nameof(reviewService));
            }

            this.reviewService = reviewService;
        }
        public ReviewsController(IMapper mapper, IBeerReviewService reviewService, IImageUploadService imageUpload)
        {
            Guard.WhenArgument(mapper, nameof(mapper)).IsNull().Throw();
            Guard.WhenArgument(reviewService, nameof(reviewService)).IsNull().Throw();
            Guard.WhenArgument(imageUpload, nameof(imageUpload)).IsNull().Throw();

            this.mapper        = mapper;
            this.reviewService = reviewService;
            this.imageUpload   = imageUpload;
        }
Exemplo n.º 6
0
        public CreateReviewPresenter(IBeerReviewService reviewService,
                                     IImageUploadService imgUploadService,
                                     ICreateReviewView view)
            : base(reviewService, view)
        {
            if (imgUploadService == null)
            {
                throw new ArgumentNullException(nameof(imgUploadService));
            }

            this.imgUploadService     = imgUploadService;
            this.View.OnCreateReview += this.OnViewCreateReview;
        }
 public MockedBeerReviewPresenter(IBeerReviewService reviewService, IRegisterView view)
     : base(reviewService, view)
 {
 }
Exemplo n.º 8
0
 public DefaultPresenter(IBeerReviewService reviewService, IReviewDetailsView view)
     : base(reviewService, view)
 {
     this.View.OnInitialise += this.OnViewInitialise;
 }