Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@

<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="9.0.5" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="9.0.7" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="9.0.10" />
<PackageReference Include="SecurityService.Client" Version="2025.7.2" />
<PackageReference Include="Shared" Version="2025.7.13" />
<PackageReference Include="Shared.DomainDrivenDesign" Version="2025.7.13" />
<PackageReference Include="Shared" Version="2025.11.5" />
<PackageReference Include="Shared.DomainDrivenDesign" Version="2025.11.5" />
<PackageReference Include="MediatR" Version="12.5.0" />
<PackageReference Include="Shared.EventStore" Version="2025.7.13" />
<PackageReference Include="Shared.EventStore" Version="2025.11.5" />
<PackageReference Include="System.IO.Abstractions" Version="22.0.14" />
<PackageReference Include="TransactionProcessor.Client" Version="2025.7.2" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="9.0.5" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.4" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Shared.DomainDrivenDesign" Version="2025.7.13" />
<PackageReference Include="Shared.DomainDrivenDesign" Version="2025.11.5" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion FileProcessor.FileAggregate.Tests/FileAggregateTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public void FileAggregate_CanBeCreated_IsCreated()
[Fact]
public void FileAggregate_CanBeCreated_InvalidFileId_IsCreated()
{
Should.Throw<ArgumentNullException>(() => { FileAggregate fileAggregate = FileAggregate.Create(Guid.Empty); });
Should.Throw<ArgumentException>(() => { FileAggregate fileAggregate = FileAggregate.Create(Guid.Empty); });
}

[Fact]
Expand Down
3 changes: 2 additions & 1 deletion FileProcessor.FileAggregate/FileAggregate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,8 @@ public FileAggregate()
/// <param name="aggregateId">The aggregate identifier.</param>
private FileAggregate(Guid aggregateId)
{
Guard.ThrowIfInvalidGuid(aggregateId, "Aggregate Id cannot be an Empty Guid");
if (aggregateId== Guid.Empty)
throw new ArgumentException("Aggregate Id cannot be an Empty Guid");

this.AggregateId = aggregateId;
this.FileLines = new List<FileLine>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@

<ItemGroup>
<PackageReference Include="Grpc.Net.Client" Version="2.71.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="9.0.7" />
<PackageReference Include="Shared.DomainDrivenDesign" Version="2025.7.13" />
<PackageReference Include="Shared.EventStore" Version="2025.7.13" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="9.0.10" />
<PackageReference Include="Shared.DomainDrivenDesign" Version="2025.11.5" />
<PackageReference Include="Shared.EventStore" Version="2025.11.5" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Shared.DomainDrivenDesign" Version="2025.7.13" />
<PackageReference Include="Shared.DomainDrivenDesign" Version="2025.11.5" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,8 @@ public FileImportLogAggregate()

private FileImportLogAggregate(Guid aggregateId)
{
Guard.ThrowIfInvalidGuid(aggregateId, "Aggregate Id cannot be an Empty Guid");
if (aggregateId == Guid.Empty)
throw new ArgumentException("Aggregate Id cannot be an Empty Guid");

this.AggregateId = aggregateId;
this.Files = new List<ImportLogFile>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

<ItemGroup>
<PackageReference Include="Grpc.Net.Client" Version="2.71.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="9.0.7" />
<PackageReference Include="Shared.EventStore" Version="2025.7.13" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="9.0.10" />
<PackageReference Include="Shared.EventStore" Version="2025.11.5" />
</ItemGroup>

<ItemGroup>
Expand Down
71 changes: 0 additions & 71 deletions FileProcessor.Tests/ControllerTests.cs

This file was deleted.

2 changes: 1 addition & 1 deletion FileProcessor.Tests/FileProcessor.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.14.1" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="9.0.7" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="9.0.10" />
<PackageReference Include="Moq" Version="4.20.72" />
<PackageReference Include="Shouldly" Version="4.3.0" />
<PackageReference Include="System.IO.Abstractions.TestingHelpers" Version="22.0.14" />
Expand Down
2 changes: 0 additions & 2 deletions FileProcessor/Bootstrapper/RepositoryRegistry.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,10 @@ namespace FileProcessor.Bootstrapper;
using Microsoft.Extensions.Hosting;
using Shared.DomainDrivenDesign.EventSourcing;
using Shared.EntityFramework;
using Shared.EntityFramework.ConnectionStringConfiguration;
using Shared.EventStore.Aggregate;
using Shared.EventStore.EventStore;
using Shared.EventStore.SubscriptionWorker;
using Shared.General;
using Shared.Repositories;
using System;
using System.Diagnostics.CodeAnalysis;

Expand Down
13 changes: 9 additions & 4 deletions FileProcessor/Controllers/DomainEventController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using SimpleResults;

namespace FileProcessor.Controllers
{
Expand Down Expand Up @@ -119,18 +120,22 @@
var eventHandlerType = this.Request.Headers["EventHandlerType"];
var resolver = Startup.Container.GetInstance<IDomainEventHandlerResolver>(eventHandlerType);
// We are being told by the caller to use a specific handler
var allhandlers = resolver.GetDomainEventHandlers(domainEvent);
var handlers = allhandlers.Where(h => h.GetType().Name.Contains(eventHandler));
var allhandlersResult = resolver.GetDomainEventHandlers(domainEvent);
if (allhandlersResult.IsFailed)
return new List<IDomainEventHandler>();
var handlers = allhandlersResult.Data.Where(h => h.GetType().Name.Contains(eventHandler));

return handlers.ToList();

}

List<IDomainEventHandler> eventHandlers = this.DomainEventHandlerResolver.GetDomainEventHandlers(domainEvent);
return eventHandlers;
Result<List<IDomainEventHandler>> eventHandlersResult = this.DomainEventHandlerResolver.GetDomainEventHandlers(domainEvent);
if (eventHandlersResult.IsFailed)
return new List<IDomainEventHandler>();
return eventHandlersResult.Data;
}

private async Task<IDomainEvent> GetDomainEvent(Object domainEvent)

Check warning on line 138 in FileProcessor/Controllers/DomainEventController.cs

View workflow job for this annotation

GitHub Actions / Build and Test Pull Requests

This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls, or 'await Task.Run(...)' to do CPU-bound work on a background thread.
{
String eventType = this.Request.Headers["eventType"].ToString();

Expand Down
10 changes: 5 additions & 5 deletions FileProcessor/FileProcessor.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,25 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="ClientProxyBase" Version="2025.7.13" />
<PackageReference Include="ClientProxyBase" Version="2025.11.5" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="9.0.5" />
<PackageReference Include="Lamar" Version="15.0.0" />
<PackageReference Include="Lamar.Microsoft.DependencyInjection" Version="15.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="9.0.7" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="9.0.10" />
<PackageReference Include="AspNetCore.HealthChecks.SqlServer" Version="9.0.0" />
<PackageReference Include="AspNetCore.HealthChecks.UI" Version="9.0.0" />
<PackageReference Include="AspNetCore.HealthChecks.UI.Client" Version="9.0.0" />
<PackageReference Include="AspNetCore.HealthChecks.UI.InMemory.Storage" Version="9.0.0" />
<PackageReference Include="AspNetCore.HealthChecks.Uris" Version="9.0.0" />
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.21.2" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="9.0.5" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="Shared" Version="2025.7.13" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.4" />
<PackageReference Include="Shared" Version="2025.11.5" />
<PackageReference Include="NLog.Extensions.Logging" Version="5.5.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="9.0.5" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="9.0.5" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="9.0.5" />
<PackageReference Include="Shared.Results.Web" Version="2025.7.13" />
<PackageReference Include="Shared.Results.Web" Version="2025.11.5" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="8.1.4" />
<PackageReference Include="Swashbuckle.AspNetCore.Annotations" Version="8.1.4" />
<PackageReference Include="Swashbuckle.AspNetCore.Filters" Version="8.0.3" />
Expand Down
31 changes: 0 additions & 31 deletions FileProcessor/Startup.cs
Original file line number Diff line number Diff line change
@@ -1,60 +1,29 @@
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using ImTools;

namespace FileProcessor
{
using System.Diagnostics.CodeAnalysis;
using System.Globalization;
using System.IO;
using System.IO.Abstractions;
using System.Reflection;
using Bootstrapper;
using BusinessLogic.Common;
using BusinessLogic.EventHandling;
using BusinessLogic.FileFormatHandlers;
using BusinessLogic.Managers;
using BusinessLogic.RequestHandlers;
using BusinessLogic.Requests;
using Common;
using EventStore.Client;
using File.DomainEvents;
using FileImportLog.DomainEvents;
using FileProcessor.Models;
using HealthChecks.UI.Client;
using JasperFx.Core;
using Lamar;
using MediatR;
using Microsoft.AspNetCore.Authentication.JwtBearer;
using Microsoft.AspNetCore.Diagnostics.HealthChecks;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Diagnostics.HealthChecks;
using Microsoft.Extensions.Logging;
using Microsoft.OpenApi.Models;
using Newtonsoft.Json;
using Newtonsoft.Json.Serialization;
using NLog.Extensions.Logging;
using SecurityService.Client;
using Shared.DomainDrivenDesign.EventSourcing;
using Shared.EntityFramework;
using Shared.EntityFramework.ConnectionStringConfiguration;
using Shared.EventStore.Aggregate;
using Shared.EventStore.EventStore;
using Shared.EventStore.Extensions;
using Shared.Extensions;
using Shared.General;
using Shared.Logger;
using Shared.Middleware;
using Shared.Repositories;
using Swashbuckle.AspNetCore.Filters;
using TransactionProcessor.Client;
using ILogger = Microsoft.Extensions.Logging.ILogger;

[ExcludeFromCodeCoverage]
Expand Down
Loading