public bool AddNotifications(IDomainNotifier notifier) { if (!notifier.IsValid) { foreach (DomainNotification notification in notifier.GetNotifications()) { AddNotification(notification); } return(true); } return(false); }
protected bool AddNotifications(IDomainNotifier notifier) { _logger.LogInformation("Validador de domínio recebido: {notifier}", notifier); if (!notifier.IsValid) { foreach (DomainNotification notification in notifier.GetNotifications()) { AddNotification(notification.Title, notification.Description); } _logger.LogWarning("Validação de domínio {notifier} falhou: {notifications}", notifier.GetNotificationsAsDictionary()); return(true); } _logger.LogInformation("Validador de domínio {notifier} feita com sucesso.", notifier); return(false); }
protected CommandResult FailureDueToEntityStateInconsistency(IDomainNotifier domainNotifier) { return(CommandResult.Failure(domainNotifier .GetNotifications() .ToList())); }