Skip to content

Commit

Permalink
feat/docs: Creating image of the process flow
Browse files Browse the repository at this point in the history
  • Loading branch information
enzotlucas committed Nov 30, 2023
1 parent e96058d commit 96f24ff
Show file tree
Hide file tree
Showing 10 changed files with 8 additions and 9 deletions.
Binary file added docs/process-flow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion src/api/Example.EventDriven.API/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ internal static class Program
{
private static void Main(string[] args)
{

var builder = WebApplication.CreateBuilder(args);

builder.Services.AddApiDependencyInjection(builder.Configuration);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
namespace Example.EventDriven.Application.CreateProcess.Boundaries
{
[ExcludeFromCodeCoverage]
public sealed class CreateProcessEvent : GenericEvent<CreateProcessRequest>
public sealed class CreateProcessEvent : BaseEvent<CreateProcessRequest>
{
public override string OperationName => nameof(CreateProcessEvent);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
namespace Example.EventDriven.Application.ExecuteProcess.Boundaries
{
[ExcludeFromCodeCoverage]
public sealed class ExecuteProcessEvent : GenericEvent<ExecuteProcessRequest>
public sealed class ExecuteProcessEvent : BaseEvent<ExecuteProcessRequest>
{
public override string OperationName => nameof(ExecuteProcessEvent);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
namespace Example.EventDriven.Application.Request.UpdateRequest.Boundaries
{
[ExcludeFromCodeCoverage]
public sealed class UpdateRequestStatusEvent : GenericEvent<UpdateRequestStatusRequest>
public sealed class UpdateRequestStatusEvent : BaseEvent<UpdateRequestStatusRequest>
{
public override string OperationName => nameof(UpdateRequestStatusEvent);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace Example.EventDriven.Domain.Gateways.Event
{
[ExcludeFromCodeCoverage]
public abstract class GenericEvent<T>
public abstract class BaseEvent<T>
{
public DateTime Timestamp { get; private set; }
public abstract string OperationName { get; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ Task SubscribeAsync<TEvent, TEventRequest>(string subscriptionId,
Func<TEvent, CancellationToken, Task> onMessage,
Action<ISubscriptionConfiguration> configuration,
CancellationToken cancellationToken)
where TEvent : GenericEvent<TEventRequest>;
where TEvent : BaseEvent<TEventRequest>;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
{
public interface IEventSenderManager : IDisposable
{
Task<Guid> Send<TEventRequest>(GenericEvent<TEventRequest> genericEvent, CancellationToken cancellationToken);
Task<Guid> Send<TEventRequest>(BaseEvent<TEventRequest> genericEvent, CancellationToken cancellationToken);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public async Task SubscribeAsync<TEvent, TEventRequest>(string subscriptionId,
Func<TEvent, CancellationToken, Task> onMessage,
Action<ISubscriptionConfiguration> configuration,
CancellationToken cancellationToken)
where TEvent : GenericEvent<TEventRequest>
where TEvent : BaseEvent<TEventRequest>

{
TryConnect();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public RabbitMqSenderManager(IConfiguration configuration) : base(configuration)
{
}

public async Task<Guid> Send<TEventRequest>(GenericEvent<TEventRequest> genericEvent, CancellationToken cancellationToken)
public async Task<Guid> Send<TEventRequest>(BaseEvent<TEventRequest> genericEvent, CancellationToken cancellationToken)
{
if(genericEvent.RequestId == Guid.Empty)
genericEvent.RequestId = Guid.NewGuid();
Expand Down

0 comments on commit 96f24ff

Please sign in to comment.