示例#1
0
        public CommentService(
            ICommentRepository repository,
            ICommentFactory factory,
            IUserContext userContext)
        {
            repository.CheckArgumentIsNull(nameof(repository));
            _repository = repository;

            factory.CheckArgumentIsNull(nameof(factory));
            _factory = factory;

            userContext.CheckArgumentIsNull(nameof(userContext));
            _userContext = userContext;
        }
示例#2
0
        public CommentFactory(
            ICommentRepository repository,
            IUserContext userContext,
            IDateService dateService)
        {
            repository.CheckArgumentIsNull(nameof(repository));
            _repository = repository;

            userContext.CheckArgumentIsNull(nameof(userContext));
            _userContext = userContext;

            dateService.CheckArgumentIsNull(nameof(dateService));
            _dateService = dateService;
        }