예제 #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;
        }
예제 #2
0
        public PostViewModelProvider(
            LanguageViewModelProvider languageProvider,
            IPostTypeService postTypeService,
            IPostService postService,
            CategoryViewModelProvider categoryProvider,
            ITagService tagService
            )
        {
            postTypeService.CheckArgumentIsNull();
            _postTypeService = postTypeService;

            languageProvider.CheckArgumentIsNull();
            _languageViewModelProvider = languageProvider;

            postService.CheckArgumentIsNull();
            _postService = postService;

            categoryProvider.CheckArgumentIsNull();
            _categoryProvider = categoryProvider;

            tagService.CheckArgumentIsNull(nameof(tagService));
            _tagService = tagService;
        }
예제 #3
0
 public TagsLoader(ITagService tagService)
 {
     tagService.CheckArgumentIsNull(nameof(tagService));
     _tagService = tagService;
 }