Skip to content

Commit d943657

Browse files
authored
V4.0.0/rtm (#28)
✨ support for request-id 📝 updated DocFX ⬆️ bump dependencies 💬 updated community health pages
1 parent 551b251 commit d943657

17 files changed

+310
-24
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
uid: Savvyio.Commands
3+
summary: *content
4+
---
5+
The `Savvyio.Commands` namespace holds all the abstractions and core types related to commands (C in Cqrs).
6+
7+
[!INCLUDE [availability-modern](../../includes/availability-modern.md)]

.docfx/api/namespaces/Savvyio.Data.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
uid: Savvyio.Data
3+
summary: *content
4+
---
5+
The `Savvyio.Data` namespace holds all the abstractions and core types related to data.
6+
7+
[!INCLUDE [availability-modern](../../includes/availability-modern.md)]
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
uid: Savvyio.Dispatchers
3+
summary: *content
4+
---
5+
The `Savvyio.Dispatchers` namespace holds all the abstractions and core types related to dispatchers.
6+
7+
[!INCLUDE [availability-modern](../../includes/availability-modern.md)]
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
uid: Savvyio.Domain
3+
summary: *content
4+
---
5+
The `Savvyio.Domain` namespace holds all the abstractions and core types related to DDD.
6+
7+
[!INCLUDE [availability-modern](../../includes/availability-modern.md)]
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
uid: Savvyio.EventDriven
3+
summary: *content
4+
---
5+
The `Savvyio.EventDriven` namespace holds all the abstractions and core types related to integration events.
6+
7+
[!INCLUDE [availability-modern](../../includes/availability-modern.md)]
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
uid: Savvyio.Handlers
3+
summary: *content
4+
---
5+
The `Savvyio.Handlers` namespace holds all the abstractions and core types related to handlers.
6+
7+
[!INCLUDE [availability-modern](../../includes/availability-modern.md)]
8+
9+
### Extension Methods
10+
11+
|Type|Ext|Methods|
12+
|--:|:-:|---|
13+
|IFireForgetRegistry|⬇️|`RegisterAsync`|
14+
|IRequestReplyRegistry|⬇️|`RegisterAsync`|
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
uid: Savvyio.Messaging
3+
summary: *content
4+
---
5+
The `Savvyio.Messaging` namespace holds all the abstractions and core types related to messaging.
6+
7+
[!INCLUDE [availability-modern](../../includes/availability-modern.md)]
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
uid: Savvyio.Queries
3+
summary: *content
4+
---
5+
The `Savvyio.Queries` namespace holds all the abstractions and core types related to queriying (Q in cQrs).
6+
7+
[!INCLUDE [availability-modern](../../includes/availability-modern.md)]
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
uid: Savvyio.Reflection
3+
summary: *content
4+
---
5+
The `Savvyio.Reflection` namespace holds all the abstractions and core types related to reflection.
6+
7+
[!INCLUDE [availability-modern](../../includes/availability-modern.md)]

.docfx/api/namespaces/Savvyio.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
uid: Savvyio
3+
summary: *content
4+
---
5+
The `Savvyio` namespace provides the fundamental abstractions and classes for supporting a complete flow of DDD, CQRS and Event Sourcing concepts including the option to scale out using distributed subsystems.
6+
7+
[!INCLUDE [availability-modern](../../includes/availability-modern.md)]
8+
9+
### Extension Methods
10+
11+
|Type|Ext|Methods|
12+
|--:|:-:|---|
13+
|IMetadata|⬇️|`GetCausationId`, `GetCorrelationId`, `GetMemberType`, `SetCausationId`, `SetCorrelationId`, `SetEventId`, `SetTimestamp`, `SetMemberType`, `SaveMetadata`, `MergeMetadata`|
14+
|SavvyioOptions|⬇️|`AddDispatchers`, `AddHandlers`|
15+
|Task|⬇️|`SingleOrDefaultAsync`|
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Availability: .NET 9 and .NET 8

Directory.Packages.props

Lines changed: 19 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,24 @@
33
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
44
</PropertyGroup>
55
<ItemGroup>
6-
<PackageVersion Include="AWSSDK.SQS" Version="3.7.400.47" />
7-
<PackageVersion Include="AWSSDK.SimpleNotificationService" Version="3.7.400.47" />
6+
<PackageVersion Include="AWSSDK.SQS" Version="3.7.400.49" />
7+
<PackageVersion Include="AWSSDK.SimpleNotificationService" Version="3.7.400.49" />
88
<PackageVersion Include="Azure.Identity" Version="1.13.1" />
99
<PackageVersion Include="Azure.Messaging.EventGrid" Version="4.27.0" />
10-
<PackageVersion Include="Azure.Storage.Queues" Version="12.20.1" />
11-
<PackageVersion Include="Codebelt.Extensions.Newtonsoft.Json" Version="9.0.0-rc.1" />
12-
<PackageVersion Include="Codebelt.Extensions.Xunit.App" Version="9.0.0-rc.1" />
13-
<PackageVersion Include="Codebelt.Extensions.YamlDotNet" Version="9.0.0-rc.1" />
14-
<PackageVersion Include="Cuemon.Extensions.Collections.Generic" Version="9.0.0-rc.1" />
15-
<PackageVersion Include="Cuemon.Extensions.Core" Version="9.0.0-rc.1" />
16-
<PackageVersion Include="Cuemon.Extensions.DependencyInjection" Version="9.0.0-rc.1" />
17-
<PackageVersion Include="Cuemon.Extensions.IO" Version="9.0.0-rc.1" />
18-
<PackageVersion Include="Cuemon.Extensions.Reflection" Version="9.0.0-rc.1" />
19-
<PackageVersion Include="Cuemon.Extensions.Text.Json" Version="9.0.0-rc.1" />
20-
<PackageVersion Include="Cuemon.Security.Cryptography" Version="9.0.0-rc.1" />
10+
<PackageVersion Include="Azure.Storage.Queues" Version="12.21.0" />
11+
<PackageVersion Include="Codebelt.Extensions.Newtonsoft.Json" Version="9.0.0" />
12+
<PackageVersion Include="Codebelt.Extensions.Xunit.App" Version="9.0.0" />
13+
<PackageVersion Include="Codebelt.Extensions.YamlDotNet" Version="9.0.0" />
14+
<PackageVersion Include="Cuemon.Extensions.Collections.Generic" Version="9.0.0" />
15+
<PackageVersion Include="Cuemon.Extensions.Core" Version="9.0.0" />
16+
<PackageVersion Include="Cuemon.Extensions.DependencyInjection" Version="9.0.0" />
17+
<PackageVersion Include="Cuemon.Extensions.IO" Version="9.0.0" />
18+
<PackageVersion Include="Cuemon.Extensions.Reflection" Version="9.0.0" />
19+
<PackageVersion Include="Cuemon.Extensions.Text.Json" Version="9.0.0" />
20+
<PackageVersion Include="Cuemon.Security.Cryptography" Version="9.0.0" />
2121
<PackageVersion Include="Dapper.StrongName" Version="2.1.35" />
2222
<PackageVersion Include="DapperExtensions.StrongNameReference" Version="1.9.0" />
23-
<PackageVersion Include="Microsoft.Data.Sqlite" Version="9.0.0-rc.2.24474.1" />
23+
<PackageVersion Include="Microsoft.Data.Sqlite" Version="9.0.0" />
2424
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
2525
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="8.0.0" />
2626
<PackageVersion Include="Microsoft.TestPlatform.ObjectModel" Version="17.10.0" />
@@ -33,18 +33,16 @@
3333
<PackageVersion Include="xunit.runner.console" Version="2.9.2" />
3434
<PackageVersion Include="xunit.runner.visualstudio" Version="2.8.2" />
3535
</ItemGroup>
36-
3736
<ItemGroup Condition="$(TargetFramework.StartsWith('net9'))">
38-
<PackageVersion Include="Microsoft.EntityFrameworkCore" Version="9.0.0-rc.2.24474.1" />
39-
<PackageVersion Include="Microsoft.EntityFrameworkCore.InMemory" Version="9.0.0-rc.2.24474.1" />
40-
<PackageVersion Include="Microsoft.EntityFrameworkCore.Relational" Version="9.0.0-rc.2.24474.1" />
41-
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="9.0.0-rc.2.24473.5" />
37+
<PackageVersion Include="Microsoft.EntityFrameworkCore" Version="9.0.0" />
38+
<PackageVersion Include="Microsoft.EntityFrameworkCore.InMemory" Version="9.0.0" />
39+
<PackageVersion Include="Microsoft.EntityFrameworkCore.Relational" Version="9.0.0" />
40+
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="9.0.0" />
4241
</ItemGroup>
43-
4442
<ItemGroup Condition="$(TargetFramework.StartsWith('net8'))">
4543
<PackageVersion Include="Microsoft.EntityFrameworkCore" Version="8.0.8" />
4644
<PackageVersion Include="Microsoft.EntityFrameworkCore.InMemory" Version="8.0.8" />
4745
<PackageVersion Include="Microsoft.EntityFrameworkCore.Relational" Version="8.0.8" />
4846
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.1" />
4947
</ItemGroup>
50-
</Project>
48+
</Project>

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# Savvy I/O
44

5-
An open-source project (MIT license) that provides a SOLID and clean .NET class library for writing DDD, CQRS and Event Sourcing applications for .NET 8 (LTS) and .NET 6 (LTS).
5+
An open-source project (MIT license) that provides a SOLID and clean .NET class library for writing DDD, CQRS and Event Sourcing applications for .NET 9 (STS) and .NET 8 (LTS).
66

77
![Savvy I/O Flow](.assets/savvyio.png)
88

src/Savvyio.Core/MetadataDictionary.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public sealed class MetadataDictionary : IMetadataDictionary
1818
/// Gets a list of the reserved keywords.
1919
/// </summary>
2020
/// <value>A list of the reserved keywords.</value>
21-
public static IReadOnlyCollection<string> ReservedKeywords { get; } = Arguments.ToEnumerableOf(Timestamp, MemberType, CorrelationId, CausationId, EventId, AggregateVersion).ToList();
21+
public static IReadOnlyCollection<string> ReservedKeywords { get; } = Arguments.ToEnumerableOf(Timestamp, MemberType, CorrelationId, RequestId, CausationId, EventId, AggregateVersion).ToList();
2222

2323
internal static string EnsureReservedKeywordCapitalization(string key)
2424
{
@@ -40,6 +40,11 @@ internal static string EnsureReservedKeywordCapitalization(string key)
4040
/// </summary>
4141
public const string CorrelationId = nameof(CorrelationId);
4242

43+
/// <summary>
44+
/// RequestId is a reserved keyword.
45+
/// </summary>
46+
public const string RequestId = nameof(RequestId);
47+
4348
/// <summary>
4449
/// CausationId is a reserved keyword.
4550
/// </summary>

src/Savvyio.Core/MetadataExtensions.cs

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,17 @@ public static string GetCorrelationId<T>(this T request) where T : IMetadata
3232
return MetadataFactory.Get(request, MetadataDictionary.CorrelationId).As<string>();
3333
}
3434

35+
/// <summary>
36+
/// Gets the string representation of the request identifier from the <paramref name="request"/>.
37+
/// </summary>
38+
/// <typeparam name="T">The model that implements the <see cref="IMetadata"/> interface.</typeparam>
39+
/// <param name="request">The <see cref="IMetadata"/> to extend.</param>
40+
/// <returns>The string representation of the request identifier from the <paramref name="request"/>.</returns>
41+
public static string GetRequestId<T>(this T request) where T : IMetadata
42+
{
43+
return MetadataFactory.Get(request, MetadataDictionary.RequestId).As<string>();
44+
}
45+
3546
/// <summary>
3647
/// Gets the string representation of the underlying member type of <paramref name="request"/>.
3748
/// </summary>
@@ -70,6 +81,19 @@ public static T SetCorrelationId<T>(this T request, string correlationId) where
7081
return request;
7182
}
7283

84+
/// <summary>
85+
/// Assigns a new <paramref name="requestId"/> to the <paramref name="request"/>.
86+
/// </summary>
87+
/// <typeparam name="T">The model that implements the <see cref="IMetadata"/> interface.</typeparam>
88+
/// <param name="request">The <see cref="IMetadata"/> to extend.</param>
89+
/// <param name="requestId">The request identifier of the model.</param>
90+
/// <returns>A reference to <paramref name="request"/> after the operation has completed.</returns>
91+
public static T SetRequestId<T>(this T request, string requestId) where T : IMetadata
92+
{
93+
MetadataFactory.Set(request, MetadataDictionary.RequestId, requestId);
94+
return request;
95+
}
96+
7397
/// <summary>
7498
/// Assigns a new <paramref name="eventId"/> to the <paramref name="request"/>.
7599
/// </summary>

0 commit comments

Comments
 (0)