File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2525 uses : github/super-linter@v4
2626 env :
2727 VALIDATE_ALL_CODEBASE : false
28+ FILTER_REGEX_INCLUDE : .*src/.*
2829 DEFAULT_BRANCH : " master"
2930 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change 2121 <PackageReadmeFile >README.md</PackageReadmeFile >
2222 <RepositoryUrl >https://github.com/NinjaRocks/Ninja.DomainEvents</RepositoryUrl >
2323 <RepositoryType >git</RepositoryType >
24- <PackageTags >Domain -events; domain events; .net 6 .0; </PackageTags >
24+ <PackageTags >domain -events; domain events; .net6 .0; c# domain events; domain pub/sub; event pub sub </PackageTags >
2525 </PropertyGroup >
2626
2727 <ItemGroup >
Original file line number Diff line number Diff line change 44 /// Interface to implement domain event handler.
55 /// </summary>
66 /// <typeparam name="T">Event Type</typeparam>
7- public interface IHandle < T > : IHandle where T : IDomainEvent
7+ public interface IHandler < T > : IHandler where T : IDomainEvent
88 {
99 Task HandleAsync ( T @event ) ;
1010 }
1111
12- public interface IHandle
12+ public interface IHandler
1313 { }
1414}
Original file line number Diff line number Diff line change 55 /// </summary>
66 public interface IResolver
77 {
8- Task < IEnumerable < IHandle < T > > > ResolveAsync < T > ( ) where T : IDomainEvent ;
8+ Task < IEnumerable < IHandler < T > > > ResolveAsync < T > ( ) where T : IDomainEvent ;
99 }
1010}
Original file line number Diff line number Diff line change 55 /// </summary>
66 public sealed class Resolver : IResolver
77 {
8- private readonly IEnumerable < IHandle > _Handlers ;
8+ private readonly IEnumerable < IHandler > _Handlers ;
99
10- public Resolver ( IEnumerable < IHandle > handlers )
10+ public Resolver ( IEnumerable < IHandler > handlers )
1111 {
1212 _Handlers = handlers ;
1313 }
1414
15- public Task < IEnumerable < IHandle < T > > > ResolveAsync < T > ( ) where T : IDomainEvent
15+ public Task < IEnumerable < IHandler < T > > > ResolveAsync < T > ( ) where T : IDomainEvent
1616 {
17- var handlers = _Handlers . Where ( t => typeof ( IHandle < T > ) . IsAssignableFrom ( t . GetType ( ) ) ) . Cast < IHandle < T > > ( ) ;
17+ var handlers = _Handlers . Where ( t => typeof ( IHandler < T > ) . IsAssignableFrom ( t . GetType ( ) ) ) . Cast < IHandler < T > > ( ) ;
1818 return Task . FromResult ( handlers ) ;
1919 }
2020 }
Original file line number Diff line number Diff line change 22
33namespace DomainEvents . Tests . Handlers
44{
5- public class CustomerCreatedHandler : IHandle < CustomerCreated >
5+ public class CustomerCreatedHandler : IHandler < CustomerCreated >
66 {
77 private readonly Dictionary < IDomainEvent , Type > _HandlerResult ;
88
Original file line number Diff line number Diff line change 22
33namespace DomainEvents . Tests . Handlers
44{
5- public class OrderReceivedHandler : IHandle < OrderReceived >
5+ public class OrderReceivedHandler : IHandler < OrderReceived >
66 {
77 private readonly Dictionary < IDomainEvent , Type > _HandlerResult ;
88
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ public void Setup()
1515 {
1616 _HandlerResult = new Dictionary < IDomainEvent , Type > ( ) ;
1717 _Publisher = new Publisher ( new Resolver (
18- new List < IHandle > { new CustomerCreatedHandler ( _HandlerResult ) ,
18+ new List < IHandler > { new CustomerCreatedHandler ( _HandlerResult ) ,
1919 new OrderReceivedHandler ( _HandlerResult ) } )
2020 ) ;
2121 }
You can’t perform that action at this time.
0 commit comments