예제 #1
0
 public OperationResult(EnumOperationResult enumOperationResult, IList <ValidationError> errors)
 {
     Status       = enumOperationResult;
     Errors       = errors.HasNoItems() ? new List <ValidationError>() : errors;
     DomainEvents = new List <INotification>();
     if (Errors.HasItems() && Status == EnumOperationResult.None)
     {
         Status = EnumOperationResult.Error;
     }
 }
예제 #2
0
 public OperationResult(EnumOperationResult enumOperationResult)
 {
     Status       = enumOperationResult;
     Errors       = new List <ValidationError>();
     DomainEvents = new List <INotification>();
 }