Example #1
0
        public PostController(
            IPostService postService,
            PostViewModelProvider postViewModelProvider,
            CategoryViewModelProvider categoryViewModelProvider,
            IOptionsSnapshot <BehlogSetting> setting,
            FileUploadHelper fileUploader,
            ITagService tagService
            )
        {
            postService.CheckArgumentIsNull();
            _postService = postService;

            postViewModelProvider.CheckArgumentIsNull();
            _postViewModelProvider = postViewModelProvider;

            categoryViewModelProvider.CheckArgumentIsNull();
            _categoryViewModelProvider = categoryViewModelProvider;

            setting.CheckArgumentIsNull();
            _setting = setting;

            fileUploader.CheckArgumentIsNull();
            _fileUploader = fileUploader;

            tagService.CheckArgumentIsNull(nameof(tagService));
            _tagService = tagService;
        }
Example #2
0
        public GalleryController(
            IAdminSliderService sliderService,
            PostViewModelProvider postViewModelProvider)
        {
            sliderService.CheckArgumentIsNull(nameof(sliderService));
            _sliderService = sliderService;

            postViewModelProvider.CheckArgumentIsNull(nameof(postViewModelProvider));
            _postViewModelProvider = postViewModelProvider;
        }