public void Validate(ValidationNotificationHandler notificationHandler) { var validator = new CardValidator(notificationHandler); validator.Validate(this); Valid = !notificationHandler.Notifications.Any(); }
public CreateTransactionEndpoint(ICommandDispatcher commandDispatcher, ValidationNotificationHandler validationNotificationHandler) { this.commandDispatcher = commandDispatcher ?? throw new ArgumentNullException(nameof(commandDispatcher)); this.validationNotificationHandler = validationNotificationHandler ?? throw new ArgumentNullException(nameof(validationNotificationHandler)); }
public CardValidator(ValidationNotificationHandler notificationHandler) : base(notificationHandler) { }
public ValidateModelStateAttribute(ValidationNotificationHandler notificationHandler) { this.notificationHandler = notificationHandler ?? throw new ArgumentNullException(nameof(notificationHandler)); }
public TransactionController(ICommandDispatcher commandDispatcher, IQueryDispatcher queryDispatcher, ValidationNotificationHandler validationNotificationHandler) { this.commandDispatcher = commandDispatcher ?? throw new ArgumentNullException(nameof(commandDispatcher)); this.queryDispatcher = queryDispatcher ?? throw new ArgumentNullException(nameof(queryDispatcher)); this.validationNotificationHandler = validationNotificationHandler ?? throw new ArgumentNullException(nameof(validationNotificationHandler)); }
public CreateCardCommandHandler(IEventBus eventBus, ICardWriteOnlyRepository cardRepository, ValidationNotificationHandler notificationHandler) { this.eventBus = eventBus ?? throw new ArgumentNullException(nameof(eventBus)); this.cardRepository = cardRepository ?? throw new ArgumentNullException(nameof(cardRepository)); this.notificationHandler = notificationHandler ?? throw new ArgumentNullException(nameof(notificationHandler));; }
public void Validate(ValidationNotificationHandler notificationHandler) { throw new NotImplementedException(); }