Skip to content

Commit

Permalink
all dependencies now uses async event projection (#113)
Browse files Browse the repository at this point in the history
  • Loading branch information
runeanielsen authored Mar 21, 2023
1 parent 1160f5c commit 181fd64
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Threading.Tasks;

namespace OpenFTTH.APIGateway.DynamicProperties
{
Expand All @@ -34,10 +35,10 @@ public DynamicPropertiesProjection(ILogger<DynamicPropertiesProjection> logger,

Initialize();

ProjectEvent<TerminalEquipmentPlacedInNodeContainer>(Project);
ProjectEvent<TerminalEquipmentSpecificationAdded>(Project);
ProjectEvent<NodeContainerPlacedInRouteNetwork>(Project);
ProjectEvent<TerminalEquipmentAddressInfoChanged>(Project);
ProjectEventAsync<TerminalEquipmentPlacedInNodeContainer>(ProjectAsync);
ProjectEventAsync<TerminalEquipmentSpecificationAdded>(ProjectAsync);
ProjectEventAsync<NodeContainerPlacedInRouteNetwork>(ProjectAsync);
ProjectEventAsync<TerminalEquipmentAddressInfoChanged>(ProjectAsync);
}

private void Initialize()
Expand All @@ -53,7 +54,7 @@ private void Initialize()
_isInitialized = true;
}

private void Project(IEventEnvelope eventEnvelope)
private Task ProjectAsync(IEventEnvelope eventEnvelope)
{
if (_newInstallationStoredProcedureExists)
{
Expand Down Expand Up @@ -94,6 +95,8 @@ private void Project(IEventEnvelope eventEnvelope)

}
}

return Task.CompletedTask;
}

private void CallNewInstallationStoredProcedure(TerminalEquipmentPlacedInNodeContainer @event)
Expand Down
14 changes: 7 additions & 7 deletions OpenFTTH.APIGateway/OpenFTTH.APIGateway.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@
<PackageReference Include="OpenFTTH.Address.Business" Version="2.1.0" />
<PackageReference Include="OpenFTTH.CQRS" Version="2.1.1" />
<PackageReference Include="OpenFTTH.Events" Version="3.2.0" />
<PackageReference Include="OpenFTTH.EventSourcing" Version="3.0.8" />
<PackageReference Include="OpenFTTH.EventSourcing" Version="3.0.9" />
<PackageReference Include="OpenFTTH.NotificationClient" Version="0.3.0" />
<PackageReference Include="OpenFTTH.RouteNetwork.API" Version="3.0.5" />
<PackageReference Include="OpenFTTH.RouteNetwork.Business" Version="3.0.5" />
<PackageReference Include="OpenFTTH.Schematic.API" Version="3.0.1" />
<PackageReference Include="OpenFTTH.Schematic.Business" Version="3.0.1" />
<PackageReference Include="OpenFTTH.UtilityGraphService.API" Version="4.0.2" />
<PackageReference Include="OpenFTTH.UtilityGraphService.Business" Version="4.0.2" />
<PackageReference Include="OpenFTTH.RouteNetwork.API" Version="3.1.0" />
<PackageReference Include="OpenFTTH.RouteNetwork.Business" Version="3.1.0" />
<PackageReference Include="OpenFTTH.Schematic.API" Version="3.1.0" />
<PackageReference Include="OpenFTTH.Schematic.Business" Version="3.1.0" />
<PackageReference Include="OpenFTTH.UtilityGraphService.API" Version="4.1.0" />
<PackageReference Include="OpenFTTH.UtilityGraphService.Business" Version="4.1.0" />
<PackageReference Include="OpenFTTH.Work.API" Version="0.7.0" />
<PackageReference Include="OpenFTTH.Work.Business" Version="0.7.0" />
<PackageReference Include="ProjNet" Version="2.0.0" />
Expand Down

0 comments on commit 181fd64

Please sign in to comment.