-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- refactory of Entity domain events support - aggregate to consume events from Entity - major refactoring of Persistence to support Outbox
- Loading branch information
Showing
30 changed files
with
465 additions
and
189 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,16 @@ | ||
<Project Sdk="Microsoft.NET.Sdk" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<PropertyGroup> | ||
<EnableNETAnalyzers>true</EnableNETAnalyzers> | ||
<LangVersion>10</LangVersion> | ||
<Nullable>enable</Nullable> | ||
<PackageVersion /> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<PackageReference Include="NodaTime" Version="3.1.6" /> | ||
<PackageReference Include="System.Memory.Data" Version="7.0.0" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<ProjectReference Include="..\DFlow\DFlow.csproj" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Folder Include="Aggregates" /> | ||
</ItemGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// Copyright (C) 2020 Road to Agility | ||
// | ||
// This Source Code Form is subject to the terms of the Mozilla Public | ||
// License, v. 2.0. If a copy of the MPL was not distributed with this | ||
// file, You can obtain one at https://mozilla.org/MPL/2.0/. | ||
|
||
|
||
using System; | ||
using System.Text.Json; | ||
using NodaTime; | ||
|
||
namespace DFlow.Persistence.Model; | ||
|
||
public sealed record AggregateState(Guid Id | ||
, Guid AggregateId | ||
, string AggregationType | ||
, string EventType | ||
, Instant EventDatetime | ||
, JsonDocument EventData):IDisposable | ||
{ | ||
public void Dispose() | ||
{ | ||
EventData.Dispose(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
namespace System.Runtime.CompilerServices | ||
{ | ||
internal static class IsExternalInit {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// Copyright (C) 2023 Road to Agility | ||
// | ||
// This Source Code Form is subject to the terms of the Mozilla Public | ||
// License, v. 2.0. If a copy of the MPL was not distributed with this | ||
// file, You can obtain one at https://mozilla.org/MPL/2.0/. | ||
|
||
|
||
using System.Collections.Generic; | ||
using DFlow.BusinessObjects; | ||
using DFlow.Persistence.Model; | ||
|
||
namespace DFlow.Persistence.Outbox; | ||
|
||
interface IEventsExporting | ||
{ | ||
IReadOnlyList<AggregateState> ToOutBox(IDomainEvents entity); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// Copyright (C) 2022 Road to Agility | ||
// | ||
// This Source Code Form is subject to the terms of the Mozilla Public | ||
// License, v. 2.0. If a copy of the MPL was not distributed with this | ||
// file, You can obtain one at https://mozilla.org/MPL/2.0/. | ||
|
||
using System; | ||
|
||
namespace DFlow.BusinessObjects | ||
{ | ||
public sealed class AggregateId : ValueOf<Guid, AggregateId> | ||
{ | ||
public static AggregateId Empty() | ||
{ | ||
return From(Guid.Empty); | ||
} | ||
|
||
public static AggregateId New() | ||
{ | ||
return From(Guid.NewGuid()); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// Copyright (C) 2022 Road to Agility | ||
// | ||
// This Source Code Form is subject to the terms of the Mozilla Public | ||
// License, v. 2.0. If a copy of the MPL was not distributed with this | ||
// file, You can obtain one at https://mozilla.org/MPL/2.0/. | ||
|
||
using System; | ||
|
||
namespace DFlow.BusinessObjects | ||
{ | ||
public sealed class EntityId : ValueOf<Guid, EntityId> | ||
{ | ||
public static EntityId Empty() | ||
{ | ||
return From(Guid.Empty); | ||
} | ||
|
||
public static EntityId New() | ||
{ | ||
return From(Guid.NewGuid()); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.