diff --git a/docs/process-flow.png b/docs/process-flow.png new file mode 100644 index 0000000..0442548 Binary files /dev/null and b/docs/process-flow.png differ diff --git a/src/api/Example.EventDriven.API/Program.cs b/src/api/Example.EventDriven.API/Program.cs index c0ff448..a2cd437 100644 --- a/src/api/Example.EventDriven.API/Program.cs +++ b/src/api/Example.EventDriven.API/Program.cs @@ -8,7 +8,6 @@ internal static class Program { private static void Main(string[] args) { - var builder = WebApplication.CreateBuilder(args); builder.Services.AddApiDependencyInjection(builder.Configuration); diff --git a/src/shared/Example.EventDriven.Application/Process/CreateProcess/Boundaries/CreateProcessEvent.cs b/src/shared/Example.EventDriven.Application/Process/CreateProcess/Boundaries/CreateProcessEvent.cs index 3c090a1..a8605da 100644 --- a/src/shared/Example.EventDriven.Application/Process/CreateProcess/Boundaries/CreateProcessEvent.cs +++ b/src/shared/Example.EventDriven.Application/Process/CreateProcess/Boundaries/CreateProcessEvent.cs @@ -4,7 +4,7 @@ namespace Example.EventDriven.Application.CreateProcess.Boundaries { [ExcludeFromCodeCoverage] - public sealed class CreateProcessEvent : GenericEvent + public sealed class CreateProcessEvent : BaseEvent { public override string OperationName => nameof(CreateProcessEvent); } diff --git a/src/shared/Example.EventDriven.Application/Process/ExecuteProcess/Boundaries/ExecuteProcessEvent.cs b/src/shared/Example.EventDriven.Application/Process/ExecuteProcess/Boundaries/ExecuteProcessEvent.cs index 2ff6441..2a515be 100644 --- a/src/shared/Example.EventDriven.Application/Process/ExecuteProcess/Boundaries/ExecuteProcessEvent.cs +++ b/src/shared/Example.EventDriven.Application/Process/ExecuteProcess/Boundaries/ExecuteProcessEvent.cs @@ -4,7 +4,7 @@ namespace Example.EventDriven.Application.ExecuteProcess.Boundaries { [ExcludeFromCodeCoverage] - public sealed class ExecuteProcessEvent : GenericEvent + public sealed class ExecuteProcessEvent : BaseEvent { public override string OperationName => nameof(ExecuteProcessEvent); } diff --git a/src/shared/Example.EventDriven.Application/Request/UpdateRequestStatus/Boundaries/UpdateRequestStatusEvent.cs b/src/shared/Example.EventDriven.Application/Request/UpdateRequestStatus/Boundaries/UpdateRequestStatusEvent.cs index 05ce2ec..de20ee9 100644 --- a/src/shared/Example.EventDriven.Application/Request/UpdateRequestStatus/Boundaries/UpdateRequestStatusEvent.cs +++ b/src/shared/Example.EventDriven.Application/Request/UpdateRequestStatus/Boundaries/UpdateRequestStatusEvent.cs @@ -4,7 +4,7 @@ namespace Example.EventDriven.Application.Request.UpdateRequest.Boundaries { [ExcludeFromCodeCoverage] - public sealed class UpdateRequestStatusEvent : GenericEvent + public sealed class UpdateRequestStatusEvent : BaseEvent { public override string OperationName => nameof(UpdateRequestStatusEvent); } diff --git a/src/shared/Example.EventDriven.Domain/Gateways/Event/GenericEvent.cs b/src/shared/Example.EventDriven.Domain/Gateways/Event/BaseEvent.cs similarity index 88% rename from src/shared/Example.EventDriven.Domain/Gateways/Event/GenericEvent.cs rename to src/shared/Example.EventDriven.Domain/Gateways/Event/BaseEvent.cs index d116ab4..1b63e33 100644 --- a/src/shared/Example.EventDriven.Domain/Gateways/Event/GenericEvent.cs +++ b/src/shared/Example.EventDriven.Domain/Gateways/Event/BaseEvent.cs @@ -3,7 +3,7 @@ namespace Example.EventDriven.Domain.Gateways.Event { [ExcludeFromCodeCoverage] - public abstract class GenericEvent + public abstract class BaseEvent { public DateTime Timestamp { get; private set; } public abstract string OperationName { get; } diff --git a/src/shared/Example.EventDriven.Domain/Gateways/Event/IEventConsumerManager.cs b/src/shared/Example.EventDriven.Domain/Gateways/Event/IEventConsumerManager.cs index 22355ec..cbbdece 100644 --- a/src/shared/Example.EventDriven.Domain/Gateways/Event/IEventConsumerManager.cs +++ b/src/shared/Example.EventDriven.Domain/Gateways/Event/IEventConsumerManager.cs @@ -8,6 +8,6 @@ Task SubscribeAsync(string subscriptionId, Func onMessage, Action configuration, CancellationToken cancellationToken) - where TEvent : GenericEvent; + where TEvent : BaseEvent; } } diff --git a/src/shared/Example.EventDriven.Domain/Gateways/Event/IEventSenderManager.cs b/src/shared/Example.EventDriven.Domain/Gateways/Event/IEventSenderManager.cs index 7e6c022..75619bd 100644 --- a/src/shared/Example.EventDriven.Domain/Gateways/Event/IEventSenderManager.cs +++ b/src/shared/Example.EventDriven.Domain/Gateways/Event/IEventSenderManager.cs @@ -2,6 +2,6 @@ { public interface IEventSenderManager : IDisposable { - Task Send(GenericEvent genericEvent, CancellationToken cancellationToken); + Task Send(BaseEvent genericEvent, CancellationToken cancellationToken); } } diff --git a/src/shared/Example.EventDriven.Infrastructure/Event/RabbitMqConsumerManager.cs b/src/shared/Example.EventDriven.Infrastructure/Event/RabbitMqConsumerManager.cs index 2fed751..bb453fe 100644 --- a/src/shared/Example.EventDriven.Infrastructure/Event/RabbitMqConsumerManager.cs +++ b/src/shared/Example.EventDriven.Infrastructure/Event/RabbitMqConsumerManager.cs @@ -18,7 +18,7 @@ public async Task SubscribeAsync(string subscriptionId, Func onMessage, Action configuration, CancellationToken cancellationToken) - where TEvent : GenericEvent + where TEvent : BaseEvent { TryConnect(); diff --git a/src/shared/Example.EventDriven.Infrastructure/Event/RabbitMqSenderManager.cs b/src/shared/Example.EventDriven.Infrastructure/Event/RabbitMqSenderManager.cs index 721b7b0..e3f1b3e 100644 --- a/src/shared/Example.EventDriven.Infrastructure/Event/RabbitMqSenderManager.cs +++ b/src/shared/Example.EventDriven.Infrastructure/Event/RabbitMqSenderManager.cs @@ -12,7 +12,7 @@ public RabbitMqSenderManager(IConfiguration configuration) : base(configuration) { } - public async Task Send(GenericEvent genericEvent, CancellationToken cancellationToken) + public async Task Send(BaseEvent genericEvent, CancellationToken cancellationToken) { if(genericEvent.RequestId == Guid.Empty) genericEvent.RequestId = Guid.NewGuid();