public AddCommentCommandProcessor(IUserService userService, ICommentFactory commentFactory) { Validator.ValidateNull(userService, "userService"); Validator.ValidateNull(commentFactory, "commentFactory"); this.userService = userService; this.commentFactory = commentFactory; }
public PostCommentService( IOptions <WebConfiguration> config, ICommentFactory commentFactory, IPullRequestService pullRequestService) { _config = config?.Value ?? throw new ArgumentNullException(nameof(config)); _commentFactory = commentFactory ?? throw new ArgumentNullException(nameof(commentFactory)); _pullRequestService = pullRequestService ?? throw new ArgumentNullException(nameof(pullRequestService)); }
public CommentService(IGenericRepository <Comment> repository, IUnitOfWork unitOfWork, ICommentFactory commentFactory) : base(repository, unitOfWork) { if (commentFactory == null) { throw new ArgumentNullException("Comment cant't be null"); } this.commentFactory = commentFactory; }
public CommentController(ICommentService commentService, ICommentFactory commentFactory, BlogUserManager userManager, IHttpContextAccessor httpContextAccessor, IGuidGenerator guidGenerator, IIPAddressService iPAddressService) { _commentService = commentService; _commentFactory = commentFactory; _userManager = userManager; _httpContextAccessor = httpContextAccessor; _guidGenerator = guidGenerator; _iPAddressService = iPAddressService; }
public void ConstructorShouldThrowException_WhenCommentFactoryIsNull() { // Arrange var unitOfWork = new Mock <IUnitOfWork>(); var repository = new Mock <IGenericRepository <Comment> >(); ICommentFactory commentFactory = null; // Act & Assert Assert.Throws <ArgumentNullException>(() => new CommentService(repository.Object, unitOfWork.Object, commentFactory)); }
public CommentService( IEFRepository <Comment> commentRepository, IUnitOfWork unitOfWork, ICommentFactory commentFactory) { Guard.WhenArgument(commentRepository, "CommentRepository").IsNull().Throw(); Guard.WhenArgument(unitOfWork, "UnitOfWork").IsNull().Throw(); Guard.WhenArgument(commentFactory, "CommentFactory").IsNull().Throw(); this.commentRepository = commentRepository; this.unitOfWork = unitOfWork; this.commentFactory = commentFactory; }
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; }
public DealershipEngine( IInputOutputProvider provider, ICommentFactory commentFactory, ICommandFactory commandFactory, IUserFactory userFactory, IVehicleFactory vehicleFactory) { this.provider = provider; this.commentFactory = commentFactory; this.commandFactory = commandFactory; this.userFactory = userFactory; this.vehicleFactory = vehicleFactory; this.users = new Collection<IUser>(); this.loggedUser = null; }
public DealershipEngine( IInputOutputProvider provider, ICommentFactory commentFactory, ICommandFactory commandFactory, IUserFactory userFactory, IVehicleFactory vehicleFactory) { this.provider = provider; this.commentFactory = commentFactory; this.commandFactory = commandFactory; this.userFactory = userFactory; this.vehicleFactory = vehicleFactory; this.users = new Collection <IUser>(); this.loggedUser = null; }
public LakesController( ILakeService lakeService, ICommentFactory commentFactory, IDateProvider dateProvider, ICommentService commentsService) { Validator.ValidateForNull(lakeService, paramName: "lakeService"); Validator.ValidateForNull(commentFactory, paramName: "commentFactory"); Validator.ValidateForNull(dateProvider, paramName: "dateProvider"); Validator.ValidateForNull(commentsService, paramName: "commentsService"); this.lakeService = lakeService; this.commentFactory = commentFactory; this.dateProvider = dateProvider; this.commentsService = commentsService; }
public DealershipEngine( ICommentFactory commentFactory, IUserFactory userFactory, ICommandFactory commandFactory, IVehicleHandler startHandler, IReader reader, ILogger logger) { this.users = new List <IUser>(); this.loggedUser = null; this.commandFactory = commandFactory; this.reader = reader; this.logger = logger; this.startHandler = startHandler; this.userFactory = userFactory; this.commentFactory = commentFactory; }
public CommentService(ILogService logService, IDateTimeProvider dateTimeProvider, IUserService userService, ICommentFactory commentFactory, IRepository <Comment> commentRepository, IUnitOfWork unitOfWork) { if (logService == null) { throw new ArgumentNullException(nameof(logService)); } if (userService == null) { throw new ArgumentNullException(nameof(userService)); } if (dateTimeProvider == null) { throw new ArgumentNullException(nameof(dateTimeProvider)); } if (commentFactory == null) { throw new ArgumentNullException(nameof(commentFactory)); } if (commentRepository == null) { throw new ArgumentNullException(nameof(commentRepository)); } if (unitOfWork == null) { throw new ArgumentNullException(nameof(unitOfWork)); } this.logService = logService; this.dateTimeProvider = dateTimeProvider; this.userService = userService; this.commentFactory = commentFactory; this.commentRepository = commentRepository; this.unitOfWork = unitOfWork; }
public CommentService(IUnitOfWork unitOfWork, IRepository <Comment> commentRepositoryEF, ICommentFactory commentFactory) { if (unitOfWork == null) { throw new ArgumentNullException(string.Format(ExceptionConstants.ArgumentCannotBeNull, "unitOfWork")); } if (commentRepositoryEF == null) { throw new ArgumentNullException(string.Format(ExceptionConstants.ArgumentCannotBeNull, "commentRepositoryEF")); } if (commentFactory == null) { throw new ArgumentNullException(string.Format(ExceptionConstants.ArgumentCannotBeNull, "expenseFactory")); } this.unitOfWork = unitOfWork; this.commentRepositoryEF = commentRepositoryEF; this.commentFactory = commentFactory; }
public CommentCreator(IEntityData ticketRepo, ICommentFactory commentFactory, IGetsTransaction transactionCreator, IEntityData commentRepo, ICreatesValidators <CreateCommentRequest> validatorFactory, Func <IValidationResult, Comment, CreateCommentResponse> responseCreator) { if (responseCreator == null) { throw new ArgumentNullException(nameof(responseCreator)); } if (validatorFactory == null) { throw new ArgumentNullException(nameof(validatorFactory)); } if (commentRepo == null) { throw new ArgumentNullException(nameof(commentRepo)); } if (transactionCreator == null) { throw new ArgumentNullException(nameof(transactionCreator)); } if (commentFactory == null) { throw new ArgumentNullException(nameof(commentFactory)); } if (ticketRepo == null) { throw new ArgumentNullException(nameof(ticketRepo)); } this.validatorFactory = validatorFactory; this.commentFactory = commentFactory; this.ticketRepo = ticketRepo; this.transactionCreator = transactionCreator; this.commentRepo = commentRepo; this.responseCreator = responseCreator; }
public ExpenseService( IUnitOfWork unitOfWork, IRepository <Expense> expenseRepositoryEF, IRepository <ExpenseCategory> expenseCategoryRepositoryEF, IExpenseFactory expenseFactory, ICommentFactory commentFactory) { if (unitOfWork == null) { throw new ArgumentNullException(string.Format(ExceptionConstants.ArgumentCannotBeNull, "unitOfWork")); } if (expenseRepositoryEF == null) { throw new ArgumentNullException(string.Format(ExceptionConstants.ArgumentCannotBeNull, "expenseRepositoryEF")); } if (expenseCategoryRepositoryEF == null) { throw new ArgumentNullException(string.Format(ExceptionConstants.ArgumentCannotBeNull, "expenseCategoryRepositoryEF")); } if (expenseFactory == null) { throw new ArgumentNullException(string.Format(ExceptionConstants.ArgumentCannotBeNull, "expenseFactory")); } if (commentFactory == null) { throw new ArgumentNullException(string.Format(ExceptionConstants.ArgumentCannotBeNull, "expenseFactory")); } this.unitOfWork = unitOfWork; this.expenseRepositoryEF = expenseRepositoryEF; this.expenseCategoryRepositoryEF = expenseCategoryRepositoryEF; this.expenseFactory = expenseFactory; this.commentFactory = commentFactory; }
public CommentService(IEventBus bus, ICommentFactory factory, ICommentRepo repo) { this.bus = bus; this.factory = factory; this.repo = repo; }
public AddCommentHandler(ICommentFactory factory) { this.factory = factory; }
public AddCommentCommandProcessor(IUserService userService, ICommentFactory commentFactory) { this.userService = userService; this.commentFactory = commentFactory; }
private CommentRepo(IDatabase database, ICommentFactory factory) : base(database) { this.factory = factory; }
public CommentsViewComponent(IPostService postService, ICommentService commentService, CommentsSettings commentsSettings, IPostFactory postFactory, ICommentFactory commentFactory) { _postService = postService; _commentService = commentService; _commentsSettings = commentsSettings; _postFactory = postFactory; }