Skip to content

Commit

Permalink
Use InvariantException as the aggregate type
Browse files Browse the repository at this point in the history
  • Loading branch information
jameswoodley committed Jun 21, 2020
1 parent 8c24ee7 commit 5d3037c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Command/ICommandValidator.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System.Threading;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using LightestNight.System.Domain.Exceptions;

Expand All @@ -12,6 +13,6 @@ public interface ICommandValidator<in TCommand>
/// <param name="command">The command to validate</param>
/// <param name="cancellationToken">Any <see cref="CancellationToken" /> to use to marshal the request</param>
/// <returns>An empty collection if no validation errors are found, or a collection of <see cref="InvariantError" /></returns>
Task<DomainException> Validate(TCommand command, CancellationToken cancellationToken);
Task<IEnumerable<InvariantError>> Validate(TCommand command, CancellationToken cancellationToken);
}
}

0 comments on commit 5d3037c

Please sign in to comment.