diff --git a/.github/release-drafter-v7.x.yml b/.github/release-drafter-v7.x.yml
new file mode 100644
index 00000000..efdc4234
--- /dev/null
+++ b/.github/release-drafter-v7.x.yml
@@ -0,0 +1,15 @@
+name-template: v$NEXT_PATCH_VERSION
+tag-template: v$NEXT_PATCH_VERSION
+categories:
+ - title: 🚀 Features
+ label: feature
+ - title: 🐛 Bug Fixes
+ label: fix
+ - title: 🛠️ Maintenance
+ label: chore
+change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
+commitish: 'support/7.x'
+filter-by-commitish: true
+template: |
+ ## Changes
+ $CHANGES
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index b9b05bb9..1316d75c 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -20,7 +20,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
- dotnet-version: 7.0.x
+ dotnet-version: 8.0.x
- name: Build and Test
run: ./Build.ps1
shell: pwsh
diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml
index 5c0a4c57..0d87a663 100644
--- a/.github/workflows/codeql-analysis.yml
+++ b/.github/workflows/codeql-analysis.yml
@@ -62,7 +62,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
- dotnet-version: 7.0.x
+ dotnet-version: 8.0.x
- run: |
dotnet build
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 2b380301..098fbf03 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -16,7 +16,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
- dotnet-version: 7.0.x
+ dotnet-version: 8.0.x
- name: Build and Test
run: ./Build.ps1
shell: pwsh
diff --git a/Directory.Build.props b/Directory.Build.props
index 03da4891..65309b49 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -15,8 +15,8 @@
v
-
-
+
+
diff --git a/NBB.sln b/NBB.sln
index 49db1ed2..b4fe77be 100644
--- a/NBB.sln
+++ b/NBB.sln
@@ -44,6 +44,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "samples", "samples", "{D282
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "MicroServices", "MicroServices", "{CC43326A-DD67-4B00-80EE-C244B31A319F}"
ProjectSection(SolutionItems) = preProject
+ samples\MicroServices\NBB Samples.postman_collection.json = samples\MicroServices\NBB Samples.postman_collection.json
samples\MicroServices\README.md = samples\MicroServices\README.md
EndProjectSection
EndProject
@@ -220,6 +221,10 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NBB.Messaging.OpenTelemetry
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".github", ".github", "{F57779EB-9107-427D-A65C-5AA262C348E1}"
ProjectSection(SolutionItems) = preProject
+ .github\release-drafter-v4.x.yml = .github\release-drafter-v4.x.yml
+ .github\release-drafter-v5.x.yml = .github\release-drafter-v5.x.yml
+ .github\release-drafter-v6.x.yml = .github\release-drafter-v6.x.yml
+ .github\release-drafter-v7.x.yml = .github\release-drafter-v7.x.yml
.github\release-drafter.yml = .github\release-drafter.yml
EndProjectSection
EndProject
@@ -334,6 +339,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NBB.Messaging.DataContracts
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "MultiTenancy", "MultiTenancy", "{FA5EB6F2-9864-46B9-B62E-13D6578D9009}"
ProjectSection(SolutionItems) = preProject
+ samples\MultiTenancy\MultiTenantTodoList.postman_collection.json = samples\MultiTenancy\MultiTenantTodoList.postman_collection.json
samples\MultiTenancy\README.md = samples\MultiTenancy\README.md
EndProjectSection
EndProject
@@ -372,6 +378,7 @@ EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{E7A719C2-1F6B-47DB-9708-3313EB2DBB4F}"
ProjectSection(SolutionItems) = preProject
.github\workflows\ci.yml = .github\workflows\ci.yml
+ .github\workflows\codeql-analysis.yml = .github\workflows\codeql-analysis.yml
.github\workflows\release-drafter.yml = .github\workflows\release-drafter.yml
.github\workflows\release.yml = .github\workflows\release.yml
EndProjectSection
diff --git a/dependencies.props b/dependencies.props
index 9d32a4dd..4e5a6821 100644
--- a/dependencies.props
+++ b/dependencies.props
@@ -1,41 +1,40 @@
-
- 13.0.1
- 11.1.0
- 1.0.1
- 11.0.0
- 3.3.0
- 0.13.1
- 4.16.1
- 2.4.1
- 2.4.3
- 3.1.0
- 17.0.0
- 4.1.0
- 6.3.0
- 5.0.1
- 7.0.0
- 7.0.0
- 4.7.0
- 1.5.0
- 1.5.0
- 1.5.0
- 1.0.0-rc9.14
- 1.0.0-beta.7
- 1.0.0-rc9.14
- 1.5.0
- 1.5.0-rc.1
- 1.5.0-rc.1
- 7.2.2
- 2.10.0
- 3.1.0
- 4.0.1
- 5.6.1
- 4.1.0
- 12.0.0
- 10.6.6
- 4.17.0
- 1.0.3
- 6.15.0
-
+
+ 13.0.3
+ 12.2.0
+ 2.0.1
+ 4.2.2
+ 0.13.11
+ 4.20.70
+ 2.6.3
+ 2.5.5
+ 6.0.0
+ 17.8.0
+ 5.6.1
+ 6.12.0
+ 5.1.2
+ 8.0.0
+ 8.0.0
+ 4.7.0
+ 1.7.0
+ 1.7.0
+ 1.7.0
+ 1.6.0-rc.1
+ 1.0.0-beta.8
+ 1.6.0-rc.1
+ 1.5.1
+ 1.5.0-rc.1
+ 1.7.0-rc.1
+ 8.2.0
+ 3.1.1
+ 8.0.0
+ 5.0.1
+ 6.5.0
+ 8.0.0
+ 12.0.1
+ 10.9.0
+ 4.18.1
+ 1.0.3
+ 7.0.3
+
diff --git a/samples/MicroServices/NBB Samples.postman_collection.json b/samples/MicroServices/NBB Samples.postman_collection.json
new file mode 100644
index 00000000..e6d6ac04
--- /dev/null
+++ b/samples/MicroServices/NBB Samples.postman_collection.json
@@ -0,0 +1,110 @@
+{
+ "variables": [],
+ "info": {
+ "name": "NBB Samples",
+ "_postman_id": "8a8a47f1-d934-e859-1450-0f113a99bacb",
+ "description": "",
+ "schema": "https://schema.getpostman.com/json/collection/v2.0.0/collection.json"
+ },
+ "item": [
+ {
+ "name": "create contract",
+ "request": {
+ "url": "http://localhost:2047/api/contracts",
+ "method": "POST",
+ "header": [
+ {
+ "key": "Content-Type",
+ "value": "application/json"
+ }
+ ],
+ "body": {
+ "mode": "raw",
+ "raw": "{\n \"ClientId\": \"3317223e-22ea-48dc-bc34-fff6ab3b9481\"\n}"
+ },
+ "description": null
+ },
+ "response": []
+ },
+ {
+ "name": "add contract line",
+ "request": {
+ "url": "http://localhost:2047/api/contracts/99534474-4560-4240-88B7-8B14E03D2733/lines",
+ "method": "POST",
+ "header": [
+ {
+ "key": "Content-Type",
+ "value": "application/json",
+ "description": ""
+ }
+ ],
+ "body": {
+ "mode": "raw",
+ "raw": "{\n \"Product\": \"Pere\",\n \"Price\": 23,\n \"Quantity\": 5,\n \"ContractId\": \"6FD1AC92-B280-4ABC-AE7D-6ADFB2D2B5A8\"\n}"
+ },
+ "description": ""
+ },
+ "response": []
+ },
+ {
+ "name": "validate contract",
+ "request": {
+ "url": "http://localhost:2047/api/contracts/A6159DB7-A23B-4A66-B011-B5644F0B8AED/validate",
+ "method": "POST",
+ "header": [
+ {
+ "key": "Content-Type",
+ "value": "application/json",
+ "description": ""
+ }
+ ],
+ "body": {
+ "mode": "raw",
+ "raw": "{\n \"ContractId\": \"6FD1AC92-B280-4ABC-AE7D-6ADFB2D2B5A8\"\n}"
+ },
+ "description": ""
+ },
+ "response": []
+ },
+ {
+ "name": "pay payable",
+ "request": {
+ "url": "http://localhost:2046/api/payables/0d64be94-9a86-4d65-b862-c401227a2292/pay",
+ "method": "POST",
+ "header": [
+ {
+ "key": "Content-Type",
+ "value": "application/json",
+ "description": ""
+ }
+ ],
+ "body": {
+ "mode": "raw",
+ "raw": "{\n \"PayableId\": \"9C2CF598-2F3C-4617-BD29-C6C39319AE7B\"\n}"
+ },
+ "description": ""
+ },
+ "response": []
+ },
+ {
+ "name": "get invoice",
+ "request": {
+ "url": "http://localhost:2048/api/invoices/80E80EDF-60C9-4A44-A524-522074592435",
+ "method": "GET",
+ "header": [
+ {
+ "key": "Content-Type",
+ "value": "application/json",
+ "description": ""
+ }
+ ],
+ "body": {
+ "mode": "raw",
+ "raw": "{\n \"ClientId\": \"3317223e-22ea-48dc-bc34-fff6ab3b9481\"\n}"
+ },
+ "description": null
+ },
+ "response": []
+ }
+ ]
+}
\ No newline at end of file
diff --git a/samples/MicroServices/NBB.Contracts/NBB.Contracts.Api/Dockerfile b/samples/MicroServices/NBB.Contracts/NBB.Contracts.Api/Dockerfile
index 17d1fa3b..12631dc7 100644
--- a/samples/MicroServices/NBB.Contracts/NBB.Contracts.Api/Dockerfile
+++ b/samples/MicroServices/NBB.Contracts/NBB.Contracts.Api/Dockerfile
@@ -1,6 +1,6 @@
#See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging.
-FROM mcr.microsoft.com/dotnet/aspnet:7.0 AS base
+FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base
WORKDIR /app
RUN sed -i 's/DEFAULT@SECLEVEL=2/DEFAULT@SECLEVEL=1/g' /etc/ssl/openssl.cnf
RUN sed -i 's/MinProtocol = TLSv1.2/MinProtocol = TLSv1/g' /etc/ssl/openssl.cnf
@@ -8,7 +8,7 @@ RUN sed -i 's/DEFAULT@SECLEVEL=2/DEFAULT@SECLEVEL=1/g' /usr/lib/ssl/openssl.cnf
RUN sed -i 's/MinProtocol = TLSv1.2/MinProtocol = TLSv1/g' /usr/lib/ssl/openssl.cnf
EXPOSE 80
-FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build
+FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
WORKDIR /src
COPY ["NuGet.config", "."]
COPY ["dependencies.props", "."]
diff --git a/samples/MicroServices/NBB.Contracts/NBB.Contracts.Api/NBB.Contracts.Api.csproj b/samples/MicroServices/NBB.Contracts/NBB.Contracts.Api/NBB.Contracts.Api.csproj
index 8b70415f..3608ebf5 100644
--- a/samples/MicroServices/NBB.Contracts/NBB.Contracts.Api/NBB.Contracts.Api.csproj
+++ b/samples/MicroServices/NBB.Contracts/NBB.Contracts.Api/NBB.Contracts.Api.csproj
@@ -8,7 +8,7 @@
- net7.0
+ net8.0
..\..\..\..\docker-compose.dcproj
NBB_Contracts_6a73f87d-2175-4be0-9a42-31cb73bc8e10
Linux
@@ -21,7 +21,7 @@
-
+
@@ -29,10 +29,10 @@
-
-
-
-
+
+
+
+
diff --git a/samples/MicroServices/NBB.Contracts/NBB.Contracts.Api/Startup.cs b/samples/MicroServices/NBB.Contracts/NBB.Contracts.Api/Startup.cs
index 83d510a2..57dc7621 100644
--- a/samples/MicroServices/NBB.Contracts/NBB.Contracts.Api/Startup.cs
+++ b/samples/MicroServices/NBB.Contracts/NBB.Contracts.Api/Startup.cs
@@ -79,9 +79,9 @@ void configureResource(ResourceBuilder r) =>
.AddHttpClientInstrumentation()
.AddAspNetCoreInstrumentation()
.AddEntityFrameworkCoreInstrumentation(options => options.SetDbStatementForText = true)
- .AddJaegerExporter()
+ .AddOtlpExporter()
);
- services.Configure(Configuration.GetSection("OpenTelemetry:Jaeger"));
+ services.Configure(Configuration.GetSection("OpenTelemetry:Otlp"));
}
if (Configuration.GetValue("OpenTelemetry:MetricsEnabled"))
diff --git a/samples/MicroServices/NBB.Contracts/NBB.Contracts.Api/appsettings.json b/samples/MicroServices/NBB.Contracts/NBB.Contracts.Api/appsettings.json
index ea961e5f..03b7efe9 100644
--- a/samples/MicroServices/NBB.Contracts/NBB.Contracts.Api/appsettings.json
+++ b/samples/MicroServices/NBB.Contracts/NBB.Contracts.Api/appsettings.json
@@ -30,12 +30,8 @@
"OpenTelemetry": {
"MetricsEnabled": true,
"TracingEnabled": true,
- "Jaeger": {
- //"AgentHost": "localhost",
- //"AgentPort": 6831,
- //"Protocol": "UdpCompactThrift",
- "Endpoint": "YOUR_COLLECTOR_URL",
- "Protocol": "HttpBinaryThrift"
+ "Otlp": {
+ "Endpoint": "YOUR_COLLECTOR_URL"
}
}
}
diff --git a/samples/MicroServices/NBB.Contracts/NBB.Contracts.Application/CommandHandlers/ContractCommandHandlers.cs b/samples/MicroServices/NBB.Contracts/NBB.Contracts.Application/CommandHandlers/ContractCommandHandlers.cs
index 18b2af11..d7514827 100644
--- a/samples/MicroServices/NBB.Contracts/NBB.Contracts.Application/CommandHandlers/ContractCommandHandlers.cs
+++ b/samples/MicroServices/NBB.Contracts/NBB.Contracts.Application/CommandHandlers/ContractCommandHandlers.cs
@@ -27,25 +27,21 @@ public ContractCommandHandlers(IEventSourcedRepository repository, Con
_logger = logger;
}
- public async Task Handle(CreateContract command, CancellationToken cancellationToken)
+ public async Task Handle(CreateContract command, CancellationToken cancellationToken)
{
var contract = new Contract(command.ClientId);
await _repository.SaveAsync(contract, cancellationToken);
_domainMetrics.ContractCreated();
-
- return Unit.Value;
}
- public async Task Handle(AddContractLine command, CancellationToken cancellationToken)
+ public async Task Handle(AddContractLine command, CancellationToken cancellationToken)
{
var contract = await _repository.GetByIdAsync(command.ContractId, cancellationToken);
contract.AddContractLine(command.Product, command.Price, command.Quantity);
await _repository.SaveAsync(contract, cancellationToken);
-
- return Unit.Value;
}
- public async Task Handle(ValidateContract command, CancellationToken cancellationToken)
+ public async Task Handle(ValidateContract command, CancellationToken cancellationToken)
{
_logger.LogInformation("Validating contract");
@@ -53,8 +49,6 @@ public async Task Handle(ValidateContract command, CancellationToken cance
contract.Validate();
await _repository.SaveAsync(contract, cancellationToken);
_domainMetrics.ContractValidated();
-
- return Unit.Value;
}
}
}
diff --git a/samples/MicroServices/NBB.Contracts/NBB.Contracts.Application/NBB.Contracts.Application.csproj b/samples/MicroServices/NBB.Contracts/NBB.Contracts.Application/NBB.Contracts.Application.csproj
index 920daf06..0ed36ed8 100644
--- a/samples/MicroServices/NBB.Contracts/NBB.Contracts.Application/NBB.Contracts.Application.csproj
+++ b/samples/MicroServices/NBB.Contracts/NBB.Contracts.Application/NBB.Contracts.Application.csproj
@@ -8,7 +8,7 @@
- net7.0
+ net8.0
diff --git a/samples/MicroServices/NBB.Contracts/NBB.Contracts.Domain/NBB.Contracts.Domain.csproj b/samples/MicroServices/NBB.Contracts/NBB.Contracts.Domain/NBB.Contracts.Domain.csproj
index 7d6ac305..ac404c5c 100644
--- a/samples/MicroServices/NBB.Contracts/NBB.Contracts.Domain/NBB.Contracts.Domain.csproj
+++ b/samples/MicroServices/NBB.Contracts/NBB.Contracts.Domain/NBB.Contracts.Domain.csproj
@@ -8,7 +8,7 @@
- net7.0
+ net8.0
diff --git a/samples/MicroServices/NBB.Contracts/NBB.Contracts.Migrations/NBB.Contracts.Migrations.csproj b/samples/MicroServices/NBB.Contracts/NBB.Contracts.Migrations/NBB.Contracts.Migrations.csproj
index 8ca0cadc..4bb35710 100644
--- a/samples/MicroServices/NBB.Contracts/NBB.Contracts.Migrations/NBB.Contracts.Migrations.csproj
+++ b/samples/MicroServices/NBB.Contracts/NBB.Contracts.Migrations/NBB.Contracts.Migrations.csproj
@@ -9,7 +9,7 @@
Exe
- net7.0
+ net8.0
NBB_Contracts_6a73f87d-2175-4be0-9a42-31cb73bc8e10
diff --git a/samples/MicroServices/NBB.Contracts/NBB.Contracts.PublishedLanguage/NBB.Contracts.PublishedLanguage.csproj b/samples/MicroServices/NBB.Contracts/NBB.Contracts.PublishedLanguage/NBB.Contracts.PublishedLanguage.csproj
index d5cbdaf6..ef5f4f84 100644
--- a/samples/MicroServices/NBB.Contracts/NBB.Contracts.PublishedLanguage/NBB.Contracts.PublishedLanguage.csproj
+++ b/samples/MicroServices/NBB.Contracts/NBB.Contracts.PublishedLanguage/NBB.Contracts.PublishedLanguage.csproj
@@ -8,7 +8,7 @@
- net7.0
+ net8.0
diff --git a/samples/MicroServices/NBB.Contracts/NBB.Contracts.ReadModel.Data/NBB.Contracts.ReadModel.Data.csproj b/samples/MicroServices/NBB.Contracts/NBB.Contracts.ReadModel.Data/NBB.Contracts.ReadModel.Data.csproj
index 7961f9fa..93dd6a6a 100644
--- a/samples/MicroServices/NBB.Contracts/NBB.Contracts.ReadModel.Data/NBB.Contracts.ReadModel.Data.csproj
+++ b/samples/MicroServices/NBB.Contracts/NBB.Contracts.ReadModel.Data/NBB.Contracts.ReadModel.Data.csproj
@@ -8,7 +8,7 @@
- net7.0
+ net8.0
diff --git a/samples/MicroServices/NBB.Contracts/NBB.Contracts.ReadModel/NBB.Contracts.ReadModel.csproj b/samples/MicroServices/NBB.Contracts/NBB.Contracts.ReadModel/NBB.Contracts.ReadModel.csproj
index 1ae781cb..5856dd07 100644
--- a/samples/MicroServices/NBB.Contracts/NBB.Contracts.ReadModel/NBB.Contracts.ReadModel.csproj
+++ b/samples/MicroServices/NBB.Contracts/NBB.Contracts.ReadModel/NBB.Contracts.ReadModel.csproj
@@ -8,7 +8,7 @@
- net7.0
+ net8.0
diff --git a/samples/MicroServices/NBB.Contracts/NBB.Contracts.Worker/Dockerfile b/samples/MicroServices/NBB.Contracts/NBB.Contracts.Worker/Dockerfile
index b1758e7f..3355bb83 100644
--- a/samples/MicroServices/NBB.Contracts/NBB.Contracts.Worker/Dockerfile
+++ b/samples/MicroServices/NBB.Contracts/NBB.Contracts.Worker/Dockerfile
@@ -1,6 +1,6 @@
#See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging.
-FROM mcr.microsoft.com/dotnet/aspnet:7.0 AS base
+FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base
WORKDIR /app
RUN sed -i 's/DEFAULT@SECLEVEL=2/DEFAULT@SECLEVEL=1/g' /etc/ssl/openssl.cnf
@@ -8,7 +8,7 @@ RUN sed -i 's/MinProtocol = TLSv1.2/MinProtocol = TLSv1/g' /etc/ssl/openssl.cnf
RUN sed -i 's/DEFAULT@SECLEVEL=2/DEFAULT@SECLEVEL=1/g' /usr/lib/ssl/openssl.cnf
RUN sed -i 's/MinProtocol = TLSv1.2/MinProtocol = TLSv1/g' /usr/lib/ssl/openssl.cnf
-FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build
+FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
WORKDIR /src
COPY ["NuGet.config", "."]
COPY ["dependencies.props", "."]
diff --git a/samples/MicroServices/NBB.Contracts/NBB.Contracts.Worker/NBB.Contracts.Worker.csproj b/samples/MicroServices/NBB.Contracts/NBB.Contracts.Worker/NBB.Contracts.Worker.csproj
index 12dd8bfe..2a657132 100644
--- a/samples/MicroServices/NBB.Contracts/NBB.Contracts.Worker/NBB.Contracts.Worker.csproj
+++ b/samples/MicroServices/NBB.Contracts/NBB.Contracts.Worker/NBB.Contracts.Worker.csproj
@@ -9,7 +9,7 @@
Exe
- net7.0
+ net8.0
NBB_Contracts_6a73f87d-2175-4be0-9a42-31cb73bc8e10
Linux
..\..\..\..
@@ -20,7 +20,7 @@
-
+
@@ -31,11 +31,11 @@
-
-
+
+
-
+
diff --git a/samples/MicroServices/NBB.Contracts/NBB.Contracts.Worker/Program.cs b/samples/MicroServices/NBB.Contracts/NBB.Contracts.Worker/Program.cs
index 1048aec5..322b14d6 100644
--- a/samples/MicroServices/NBB.Contracts/NBB.Contracts.Worker/Program.cs
+++ b/samples/MicroServices/NBB.Contracts/NBB.Contracts.Worker/Program.cs
@@ -45,8 +45,7 @@ public static async Task Main(string[] args)
})
.ConfigureServices((hostingContext, services) =>
{
- services.AddMediatR(typeof(ContractCommandHandlers).Assembly);
-
+ services.AddMediatR(cfg => cfg.RegisterServicesFromAssemblyContaining());
var transport = hostingContext.Configuration.GetValue("Messaging:Transport", "NATS");
if (transport.Equals("NATS", StringComparison.InvariantCultureIgnoreCase))
@@ -93,9 +92,9 @@ void configureResource(ResourceBuilder r) =>
.SetSampler(new AlwaysOnSampler())
.AddMessageBusInstrumentation()
.AddEntityFrameworkCoreInstrumentation(options => options.SetDbStatementForText = true)
- .AddJaegerExporter()
+ .AddOtlpExporter()
);
- services.Configure(hostingContext.Configuration.GetSection("OpenTelemetry:Jaeger"));
+ services.Configure(hostingContext.Configuration.GetSection("OpenTelemetry:Otlp"));
}
if (hostingContext.Configuration.GetValue("OpenTelemetry:MetricsEnabled"))
diff --git a/samples/MicroServices/NBB.Contracts/NBB.Contracts.Worker/appsettings.json b/samples/MicroServices/NBB.Contracts/NBB.Contracts.Worker/appsettings.json
index 3d4ad970..fe9b9d9c 100644
--- a/samples/MicroServices/NBB.Contracts/NBB.Contracts.Worker/appsettings.json
+++ b/samples/MicroServices/NBB.Contracts/NBB.Contracts.Worker/appsettings.json
@@ -41,9 +41,8 @@
"OpenTelemetry": {
"MetricsEnabled": true,
"TracingEnabled": true,
- "Jaeger": {
- "Endpoint": "YOUR_COLLECTOR_URL",
- "Protocol": "HttpBinaryThrift"
+ "Otlp": {
+ "Endpoint": "YOUR_COLLECTOR_URL"
}
}
}
diff --git a/samples/MicroServices/NBB.Contracts/NBB.Contracts.WriteModel.Data/NBB.Contracts.WriteModel.Data.csproj b/samples/MicroServices/NBB.Contracts/NBB.Contracts.WriteModel.Data/NBB.Contracts.WriteModel.Data.csproj
index ee71d13f..aca85be8 100644
--- a/samples/MicroServices/NBB.Contracts/NBB.Contracts.WriteModel.Data/NBB.Contracts.WriteModel.Data.csproj
+++ b/samples/MicroServices/NBB.Contracts/NBB.Contracts.WriteModel.Data/NBB.Contracts.WriteModel.Data.csproj
@@ -8,7 +8,7 @@
- net7.0
+ net8.0
diff --git a/samples/MicroServices/NBB.Invoices.FSharp/NBB.Invoices.FSharp.Api/Handlers/Common.fs b/samples/MicroServices/NBB.Invoices.FSharp/NBB.Invoices.FSharp.Api/Handlers/Common.fs
index f6e2b9c7..9f3426a1 100644
--- a/samples/MicroServices/NBB.Invoices.FSharp/NBB.Invoices.FSharp.Api/Handlers/Common.fs
+++ b/samples/MicroServices/NBB.Invoices.FSharp/NBB.Invoices.FSharp.Api/Handlers/Common.fs
@@ -16,8 +16,7 @@ module MessageBus =
module HandlerUtils =
open Giraffe
open NBB.Core.Effects
- open Microsoft.AspNetCore.Http
- open FSharp.Control.Tasks.Affine
+ open Microsoft.AspNetCore.Http
open Microsoft.Extensions.DependencyInjection
type Effect<'a> = FSharp.Effect<'a>
diff --git a/samples/MicroServices/NBB.Invoices.FSharp/NBB.Invoices.FSharp.Api/NBB.Invoices.FSharp.Api.fsproj b/samples/MicroServices/NBB.Invoices.FSharp/NBB.Invoices.FSharp.Api/NBB.Invoices.FSharp.Api.fsproj
index 94a6b2a5..000bbecf 100644
--- a/samples/MicroServices/NBB.Invoices.FSharp/NBB.Invoices.FSharp.Api/NBB.Invoices.FSharp.Api.fsproj
+++ b/samples/MicroServices/NBB.Invoices.FSharp/NBB.Invoices.FSharp.Api/NBB.Invoices.FSharp.Api.fsproj
@@ -1,7 +1,7 @@
- net7.0
+ net8.0
NBB_Invoices_c9e28d3a-7681-452a-9dbe-a52a9b6a0900
@@ -12,7 +12,7 @@
-
+
diff --git a/samples/MicroServices/NBB.Invoices.FSharp/NBB.Invoices.FSharp.Api/Program.fs b/samples/MicroServices/NBB.Invoices.FSharp/NBB.Invoices.FSharp.Api/Program.fs
index 8710dd6b..ce4d4e1e 100644
--- a/samples/MicroServices/NBB.Invoices.FSharp/NBB.Invoices.FSharp.Api/Program.fs
+++ b/samples/MicroServices/NBB.Invoices.FSharp/NBB.Invoices.FSharp.Api/Program.fs
@@ -71,7 +71,7 @@ module Program =
|> ignore
let configureLogging (builder : ILoggingBuilder) =
- builder.AddFilter(fun l -> l.Equals LogLevel.Error)
+ builder.AddFilter(_.Equals(LogLevel.Error))
.AddConsole()
.AddDebug() |> ignore
diff --git a/samples/MicroServices/NBB.Invoices.FSharp/NBB.Invoices.FSharp.Worker/NBB.Invoices.FSharp.Worker.fsproj b/samples/MicroServices/NBB.Invoices.FSharp/NBB.Invoices.FSharp.Worker/NBB.Invoices.FSharp.Worker.fsproj
index 9d9dfa06..255fc07e 100644
--- a/samples/MicroServices/NBB.Invoices.FSharp/NBB.Invoices.FSharp.Worker/NBB.Invoices.FSharp.Worker.fsproj
+++ b/samples/MicroServices/NBB.Invoices.FSharp/NBB.Invoices.FSharp.Worker/NBB.Invoices.FSharp.Worker.fsproj
@@ -2,7 +2,7 @@
Exe
- net7.0
+ net8.0
NBB_Invoices_c9e28d3a-7681-452a-9dbe-a52a9b6a0900
diff --git a/samples/MicroServices/NBB.Invoices.FSharp/NBB.Invoices.FSharp/NBB.Invoices.FSharp.fsproj b/samples/MicroServices/NBB.Invoices.FSharp/NBB.Invoices.FSharp/NBB.Invoices.FSharp.fsproj
index d2d627be..bec85e8a 100644
--- a/samples/MicroServices/NBB.Invoices.FSharp/NBB.Invoices.FSharp/NBB.Invoices.FSharp.fsproj
+++ b/samples/MicroServices/NBB.Invoices.FSharp/NBB.Invoices.FSharp/NBB.Invoices.FSharp.fsproj
@@ -1,7 +1,7 @@
- net7.0
+ net8.0
diff --git a/samples/MicroServices/NBB.Invoices/NBB.Invoices.Api/NBB.Invoices.Api.csproj b/samples/MicroServices/NBB.Invoices/NBB.Invoices.Api/NBB.Invoices.Api.csproj
index a904bac8..f7868337 100644
--- a/samples/MicroServices/NBB.Invoices/NBB.Invoices.Api/NBB.Invoices.Api.csproj
+++ b/samples/MicroServices/NBB.Invoices/NBB.Invoices.Api/NBB.Invoices.Api.csproj
@@ -8,7 +8,7 @@
- net7.0
+ net8.0
..\docker-compose.dcproj
NBB_Invoices_c9e28d3a-7681-452a-9dbe-a52a9b6a0900
diff --git a/samples/MicroServices/NBB.Invoices/NBB.Invoices.Application/CommandHandlers/CreateInvoiceCommandHandler.cs b/samples/MicroServices/NBB.Invoices/NBB.Invoices.Application/CommandHandlers/CreateInvoiceCommandHandler.cs
index 14e556b6..bd47811d 100644
--- a/samples/MicroServices/NBB.Invoices/NBB.Invoices.Application/CommandHandlers/CreateInvoiceCommandHandler.cs
+++ b/samples/MicroServices/NBB.Invoices/NBB.Invoices.Application/CommandHandlers/CreateInvoiceCommandHandler.cs
@@ -1,30 +1,28 @@
// Copyright (c) TotalSoft.
// This source code is licensed under the MIT license.
-using MediatR;
-using NBB.Data.Abstractions;
-using NBB.Invoices.Domain.InvoiceAggregate;
+using MediatR;
+using NBB.Data.Abstractions;
+using NBB.Invoices.Domain.InvoiceAggregate;
using NBB.Invoices.PublishedLanguage;
-using System.Threading;
-using System.Threading.Tasks;
-
-namespace NBB.Invoices.Application.CommandHandlers
-{
- public class CreateInvoiceCommandHandler : IRequestHandler
- {
- private readonly ICrudRepository _repository;
- public CreateInvoiceCommandHandler(ICrudRepository repository)
- {
- this._repository = repository;
- }
-
- public async Task Handle(CreateInvoice command, CancellationToken cancellationToken)
- {
- var invoice = new Invoice(command.ClientId, command.ContractId, command.Amount);
- await _repository.AddAsync(invoice, cancellationToken);
- await _repository.SaveChangesAsync(cancellationToken);
-
- return Unit.Value;
- }
- }
-}
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace NBB.Invoices.Application.CommandHandlers
+{
+ public class CreateInvoiceCommandHandler : IRequestHandler
+ {
+ private readonly ICrudRepository _repository;
+ public CreateInvoiceCommandHandler(ICrudRepository repository)
+ {
+ this._repository = repository;
+ }
+
+ public async Task Handle(CreateInvoice command, CancellationToken cancellationToken)
+ {
+ var invoice = new Invoice(command.ClientId, command.ContractId, command.Amount);
+ await _repository.AddAsync(invoice, cancellationToken);
+ await _repository.SaveChangesAsync(cancellationToken);
+ }
+ }
+}
diff --git a/samples/MicroServices/NBB.Invoices/NBB.Invoices.Application/CommandHandlers/MarkInvoiceAsPayedCommandHandler.cs b/samples/MicroServices/NBB.Invoices/NBB.Invoices.Application/CommandHandlers/MarkInvoiceAsPayedCommandHandler.cs
index e11f6424..2160a29e 100644
--- a/samples/MicroServices/NBB.Invoices/NBB.Invoices.Application/CommandHandlers/MarkInvoiceAsPayedCommandHandler.cs
+++ b/samples/MicroServices/NBB.Invoices/NBB.Invoices.Application/CommandHandlers/MarkInvoiceAsPayedCommandHandler.cs
@@ -18,7 +18,7 @@ public MarkInvoiceAsPayedCommandHandler(ICrudRepository repository)
this._repository = repository;
}
- public async Task Handle(MarkInvoiceAsPayed command, CancellationToken cancellationToken)
+ public async Task Handle(MarkInvoiceAsPayed command, CancellationToken cancellationToken)
{
var invoice = await _repository.GetByIdAsync(command.InvoiceId, cancellationToken);
if (invoice != null)
@@ -27,7 +27,6 @@ public async Task Handle(MarkInvoiceAsPayed command, CancellationToken can
await _repository.SaveChangesAsync(cancellationToken);
}
- return Unit.Value;
}
}
}
diff --git a/samples/MicroServices/NBB.Invoices/NBB.Invoices.Application/CommandHandlers/ProcessInvoiceCommandHandler.cs b/samples/MicroServices/NBB.Invoices/NBB.Invoices.Application/CommandHandlers/ProcessInvoiceCommandHandler.cs
index 3114280b..9ef19f85 100644
--- a/samples/MicroServices/NBB.Invoices/NBB.Invoices.Application/CommandHandlers/ProcessInvoiceCommandHandler.cs
+++ b/samples/MicroServices/NBB.Invoices/NBB.Invoices.Application/CommandHandlers/ProcessInvoiceCommandHandler.cs
@@ -22,7 +22,7 @@ public ProcessInvoiceCommandHandler(ICrudRepository invocieRepository,
this._invoiceLockRepository = invoiceLockRepository;
}
- public Task Handle(ProcessInvoice command, CancellationToken cancellationToken)
+ public Task Handle(ProcessInvoice command, CancellationToken cancellationToken)
=> UsingInvoiceLock(command.InvoiceId, lockTimeoutMs: 10000, async () =>
{
var invoice = await _invocieRepository.GetByIdAsync(command.InvoiceId, cancellationToken);
diff --git a/samples/MicroServices/NBB.Invoices/NBB.Invoices.Application/NBB.Invoices.Application.csproj b/samples/MicroServices/NBB.Invoices/NBB.Invoices.Application/NBB.Invoices.Application.csproj
index d4bce7e1..c6f1ae2e 100644
--- a/samples/MicroServices/NBB.Invoices/NBB.Invoices.Application/NBB.Invoices.Application.csproj
+++ b/samples/MicroServices/NBB.Invoices/NBB.Invoices.Application/NBB.Invoices.Application.csproj
@@ -8,7 +8,7 @@
- net7.0
+ net8.0
diff --git a/samples/MicroServices/NBB.Invoices/NBB.Invoices.Data/NBB.Invoices.Data.csproj b/samples/MicroServices/NBB.Invoices/NBB.Invoices.Data/NBB.Invoices.Data.csproj
index b93f6a77..b7d409a9 100644
--- a/samples/MicroServices/NBB.Invoices/NBB.Invoices.Data/NBB.Invoices.Data.csproj
+++ b/samples/MicroServices/NBB.Invoices/NBB.Invoices.Data/NBB.Invoices.Data.csproj
@@ -8,7 +8,7 @@
- net7.0
+ net8.0
diff --git a/samples/MicroServices/NBB.Invoices/NBB.Invoices.Domain/NBB.Invoices.Domain.csproj b/samples/MicroServices/NBB.Invoices/NBB.Invoices.Domain/NBB.Invoices.Domain.csproj
index 6e372600..abaee232 100644
--- a/samples/MicroServices/NBB.Invoices/NBB.Invoices.Domain/NBB.Invoices.Domain.csproj
+++ b/samples/MicroServices/NBB.Invoices/NBB.Invoices.Domain/NBB.Invoices.Domain.csproj
@@ -8,7 +8,7 @@
- net7.0
+ net8.0
diff --git a/samples/MicroServices/NBB.Invoices/NBB.Invoices.Migrations/NBB.Invoices.Migrations.csproj b/samples/MicroServices/NBB.Invoices/NBB.Invoices.Migrations/NBB.Invoices.Migrations.csproj
index 14ab5687..df6625d3 100644
--- a/samples/MicroServices/NBB.Invoices/NBB.Invoices.Migrations/NBB.Invoices.Migrations.csproj
+++ b/samples/MicroServices/NBB.Invoices/NBB.Invoices.Migrations/NBB.Invoices.Migrations.csproj
@@ -9,7 +9,7 @@
Exe
- net7.0
+ net8.0
NBB_Invoices_c9e28d3a-7681-452a-9dbe-a52a9b6a0900
diff --git a/samples/MicroServices/NBB.Invoices/NBB.Invoices.PublishedLanguage/NBB.Invoices.PublishedLanguage.csproj b/samples/MicroServices/NBB.Invoices/NBB.Invoices.PublishedLanguage/NBB.Invoices.PublishedLanguage.csproj
index d5cbdaf6..ef5f4f84 100644
--- a/samples/MicroServices/NBB.Invoices/NBB.Invoices.PublishedLanguage/NBB.Invoices.PublishedLanguage.csproj
+++ b/samples/MicroServices/NBB.Invoices/NBB.Invoices.PublishedLanguage/NBB.Invoices.PublishedLanguage.csproj
@@ -8,7 +8,7 @@
- net7.0
+ net8.0
diff --git a/samples/MicroServices/NBB.Invoices/NBB.Invoices.Worker/NBB.Invoices.Worker.csproj b/samples/MicroServices/NBB.Invoices/NBB.Invoices.Worker/NBB.Invoices.Worker.csproj
index 32929f3f..7306d1cf 100644
--- a/samples/MicroServices/NBB.Invoices/NBB.Invoices.Worker/NBB.Invoices.Worker.csproj
+++ b/samples/MicroServices/NBB.Invoices/NBB.Invoices.Worker/NBB.Invoices.Worker.csproj
@@ -9,7 +9,7 @@
Exe
- net7.0
+ net8.0
NBB_Invoices_c9e28d3a-7681-452a-9dbe-a52a9b6a0900
@@ -22,7 +22,7 @@
-
+
diff --git a/samples/MicroServices/NBB.Invoices/NBB.Invoices.Worker/Program.cs b/samples/MicroServices/NBB.Invoices/NBB.Invoices.Worker/Program.cs
index 28747920..c3ba19ad 100644
--- a/samples/MicroServices/NBB.Invoices/NBB.Invoices.Worker/Program.cs
+++ b/samples/MicroServices/NBB.Invoices/NBB.Invoices.Worker/Program.cs
@@ -48,7 +48,7 @@ public static async Task Main(string[] args)
})
.ConfigureServices((hostingContext, services) =>
{
- services.AddMediatR(typeof(CreateInvoiceCommandHandler).Assembly);
+ services.AddMediatR(cfg => cfg.RegisterServicesFromAssemblyContaining());
services.AddMessageBus().AddNatsTransport(hostingContext.Configuration);
services.AddInvoicesWriteDataAccess();
diff --git a/samples/MicroServices/NBB.MicroServicesOrchestration/NBB.MicroServicesOrchestration.csproj b/samples/MicroServices/NBB.MicroServicesOrchestration/NBB.MicroServicesOrchestration.csproj
index 30a70f50..9d2c9d01 100644
--- a/samples/MicroServices/NBB.MicroServicesOrchestration/NBB.MicroServicesOrchestration.csproj
+++ b/samples/MicroServices/NBB.MicroServicesOrchestration/NBB.MicroServicesOrchestration.csproj
@@ -2,12 +2,12 @@
Exe
- net7.0
+ net8.0
NBB_Orchestration_a3e28d3a-7681-452a-9dbe-a52a9b6a0854
-
+
diff --git a/samples/MicroServices/NBB.MicroServicesOrchestration/Program.cs b/samples/MicroServices/NBB.MicroServicesOrchestration/Program.cs
index 3ef339d1..917f73b9 100644
--- a/samples/MicroServices/NBB.MicroServicesOrchestration/Program.cs
+++ b/samples/MicroServices/NBB.MicroServicesOrchestration/Program.cs
@@ -42,7 +42,7 @@ public static async Task Main(string[] args)
})
.ConfigureServices((hostingContext, services) =>
{
- services.AddMediatR(typeof(Program).Assembly);
+ services.AddMediatR(cfg => cfg.RegisterServicesFromAssemblyContaining());
services.AddMessageBus().AddNatsTransport(hostingContext.Configuration);
diff --git a/samples/MicroServices/NBB.Payments/NBB.Payments.Api/NBB.Payments.Api.csproj b/samples/MicroServices/NBB.Payments/NBB.Payments.Api/NBB.Payments.Api.csproj
index df76468e..3b48040f 100644
--- a/samples/MicroServices/NBB.Payments/NBB.Payments.Api/NBB.Payments.Api.csproj
+++ b/samples/MicroServices/NBB.Payments/NBB.Payments.Api/NBB.Payments.Api.csproj
@@ -8,7 +8,7 @@
- net7.0
+ net8.0
..\..\..\..\docker-compose.dcproj
NBB_Payments_65e4fd90-1fb9-4806-9e38-5d70466ad364
diff --git a/samples/MicroServices/NBB.Payments/NBB.Payments.Application/CommandHandlers/CreatePayableCommandHandler.cs b/samples/MicroServices/NBB.Payments/NBB.Payments.Application/CommandHandlers/CreatePayableCommandHandler.cs
index 74769d58..1b563f60 100644
--- a/samples/MicroServices/NBB.Payments/NBB.Payments.Application/CommandHandlers/CreatePayableCommandHandler.cs
+++ b/samples/MicroServices/NBB.Payments/NBB.Payments.Application/CommandHandlers/CreatePayableCommandHandler.cs
@@ -20,13 +20,11 @@ public CreatePayableCommandHandler(ICrudRepository repository)
_repository = repository;
}
- public async Task Handle(CreatePayable command, CancellationToken cancellationToken)
+ public async Task Handle(CreatePayable command, CancellationToken cancellationToken)
{
var payable = new Payable(command.ClientId, command.Amount, command.InvoiceId, command.ContractId);
await _repository.AddAsync(payable, cancellationToken);
await _repository.SaveChangesAsync(cancellationToken);
-
- return Unit.Value;
}
}
diff --git a/samples/MicroServices/NBB.Payments/NBB.Payments.Application/CommandHandlers/PayPayableCommandHandler.cs b/samples/MicroServices/NBB.Payments/NBB.Payments.Application/CommandHandlers/PayPayableCommandHandler.cs
index 6b655282..6ea18ec7 100644
--- a/samples/MicroServices/NBB.Payments/NBB.Payments.Application/CommandHandlers/PayPayableCommandHandler.cs
+++ b/samples/MicroServices/NBB.Payments/NBB.Payments.Application/CommandHandlers/PayPayableCommandHandler.cs
@@ -1,35 +1,33 @@
// Copyright (c) TotalSoft.
// This source code is licensed under the MIT license.
-using MediatR;
-using NBB.Data.Abstractions;
-using NBB.Payments.Domain.PayableAggregate;
+using MediatR;
+using NBB.Data.Abstractions;
+using NBB.Payments.Domain.PayableAggregate;
using NBB.Payments.PublishedLanguage;
-using System.Threading;
-using System.Threading.Tasks;
-
-namespace NBB.Payments.Application.CommandHandlers
-{
- public class PayPayableCommandHandler : IRequestHandler
- {
- private readonly ICrudRepository _repository;
-
- public PayPayableCommandHandler(ICrudRepository repository)
- {
- _repository = repository;
- }
-
-
- public async Task Handle(PayPayable command, CancellationToken cancellationToken)
- {
- var payable = await _repository.GetByIdAsync(command.PayableId, cancellationToken);
- if (payable != null)
- {
- payable.Pay();
- await _repository.SaveChangesAsync(cancellationToken);
- }
-
- return Unit.Value;
- }
- }
-}
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace NBB.Payments.Application.CommandHandlers
+{
+ public class PayPayableCommandHandler : IRequestHandler
+ {
+ private readonly ICrudRepository _repository;
+
+ public PayPayableCommandHandler(ICrudRepository repository)
+ {
+ _repository = repository;
+ }
+
+
+ public async Task Handle(PayPayable command, CancellationToken cancellationToken)
+ {
+ var payable = await _repository.GetByIdAsync(command.PayableId, cancellationToken);
+ if (payable != null)
+ {
+ payable.Pay();
+ await _repository.SaveChangesAsync(cancellationToken);
+ }
+ }
+ }
+}
diff --git a/samples/MicroServices/NBB.Payments/NBB.Payments.Application/NBB.Payments.Application.csproj b/samples/MicroServices/NBB.Payments/NBB.Payments.Application/NBB.Payments.Application.csproj
index 8cc5ed4c..7cb0401e 100644
--- a/samples/MicroServices/NBB.Payments/NBB.Payments.Application/NBB.Payments.Application.csproj
+++ b/samples/MicroServices/NBB.Payments/NBB.Payments.Application/NBB.Payments.Application.csproj
@@ -8,7 +8,7 @@
- net7.0
+ net8.0
diff --git a/samples/MicroServices/NBB.Payments/NBB.Payments.Data/NBB.Payments.Data.csproj b/samples/MicroServices/NBB.Payments/NBB.Payments.Data/NBB.Payments.Data.csproj
index a8e125f4..f41a397f 100644
--- a/samples/MicroServices/NBB.Payments/NBB.Payments.Data/NBB.Payments.Data.csproj
+++ b/samples/MicroServices/NBB.Payments/NBB.Payments.Data/NBB.Payments.Data.csproj
@@ -8,7 +8,7 @@
- net7.0
+ net8.0
diff --git a/samples/MicroServices/NBB.Payments/NBB.Payments.Domain/NBB.Payments.Domain.csproj b/samples/MicroServices/NBB.Payments/NBB.Payments.Domain/NBB.Payments.Domain.csproj
index 4b8f08da..2d171357 100644
--- a/samples/MicroServices/NBB.Payments/NBB.Payments.Domain/NBB.Payments.Domain.csproj
+++ b/samples/MicroServices/NBB.Payments/NBB.Payments.Domain/NBB.Payments.Domain.csproj
@@ -8,7 +8,7 @@
- net7.0
+ net8.0
diff --git a/samples/MicroServices/NBB.Payments/NBB.Payments.Migrations/NBB.Payments.Migrations.csproj b/samples/MicroServices/NBB.Payments/NBB.Payments.Migrations/NBB.Payments.Migrations.csproj
index edb6cb41..afd3a003 100644
--- a/samples/MicroServices/NBB.Payments/NBB.Payments.Migrations/NBB.Payments.Migrations.csproj
+++ b/samples/MicroServices/NBB.Payments/NBB.Payments.Migrations/NBB.Payments.Migrations.csproj
@@ -9,7 +9,7 @@
Exe
- net7.0
+ net8.0
NBB_Payments_65e4fd90-1fb9-4806-9e38-5d70466ad364
diff --git a/samples/MicroServices/NBB.Payments/NBB.Payments.PublishedLanguage/NBB.Payments.PublishedLanguage.csproj b/samples/MicroServices/NBB.Payments/NBB.Payments.PublishedLanguage/NBB.Payments.PublishedLanguage.csproj
index 9140a4e6..89f7549e 100644
--- a/samples/MicroServices/NBB.Payments/NBB.Payments.PublishedLanguage/NBB.Payments.PublishedLanguage.csproj
+++ b/samples/MicroServices/NBB.Payments/NBB.Payments.PublishedLanguage/NBB.Payments.PublishedLanguage.csproj
@@ -8,7 +8,7 @@
- net7.0
+ net8.0
diff --git a/samples/MicroServices/NBB.Payments/NBB.Payments.Worker/NBB.Payments.Worker.csproj b/samples/MicroServices/NBB.Payments/NBB.Payments.Worker/NBB.Payments.Worker.csproj
index 2be5f8e2..dbce973c 100644
--- a/samples/MicroServices/NBB.Payments/NBB.Payments.Worker/NBB.Payments.Worker.csproj
+++ b/samples/MicroServices/NBB.Payments/NBB.Payments.Worker/NBB.Payments.Worker.csproj
@@ -9,7 +9,7 @@
Exe
- net7.0
+ net8.0
NBB_Payments_65e4fd90-1fb9-4806-9e38-5d70466ad364
@@ -22,7 +22,7 @@
-
+
diff --git a/samples/MicroServices/NBB.Payments/NBB.Payments.Worker/Program.cs b/samples/MicroServices/NBB.Payments/NBB.Payments.Worker/Program.cs
index 68b17ac0..e9721068 100644
--- a/samples/MicroServices/NBB.Payments/NBB.Payments.Worker/Program.cs
+++ b/samples/MicroServices/NBB.Payments/NBB.Payments.Worker/Program.cs
@@ -1,89 +1,89 @@
// Copyright (c) TotalSoft.
// This source code is licensed under the MIT license.
-using MediatR;
-using Microsoft.Extensions.Configuration;
-using Microsoft.Extensions.DependencyInjection;
-using Microsoft.Extensions.Hosting;
-using Microsoft.Extensions.Logging;
-using NBB.Application.MediatR;
-using NBB.Core.Abstractions;
-using NBB.Correlation.Serilog;
-using NBB.Domain;
-using NBB.Domain.Abstractions;
-using NBB.EventStore.Abstractions;
-using NBB.Messaging.Host;
-using NBB.Payments.Application.CommandHandlers;
-using NBB.Payments.Data;
-using Serilog;
-using Serilog.Events;
-using Serilog.Sinks.MSSqlServer;
-using System.Threading;
-using System.Threading.Tasks;
-
-namespace NBB.Payments.Worker
-{
- public class Program
- {
- public static async Task Main(string[] args)
- {
- var builder = Host
- .CreateDefaultBuilder(args)
- .ConfigureLogging((hostingContext, loggingBuilder) =>
- {
- var connectionString = hostingContext.Configuration.GetConnectionString("Logs");
-
- Log.Logger = new LoggerConfiguration()
- .MinimumLevel.Debug()
- .MinimumLevel.Override("Microsoft", LogEventLevel.Warning)
- .Enrich.FromLogContext()
- .Enrich.With()
- .WriteTo.MSSqlServer(connectionString,
- new MSSqlServerSinkOptions {TableName = "Logs", AutoCreateSqlTable = true})
- .CreateLogger();
-
- loggingBuilder.AddSerilog(dispose: true);
- loggingBuilder.AddFilter("Microsoft", logLevel => logLevel >= LogLevel.Warning);
- loggingBuilder.AddConsole();
- })
- .ConfigureServices((hostingContext, services) =>
- {
- services.AddMediatR(typeof(PayPayableCommandHandler).Assembly);
- //services.AddKafkaMessaging();
- services.AddMessageBus().AddNatsTransport(hostingContext.Configuration);
-
- services.AddPaymentsWriteDataAccess();
-
+using MediatR;
+using Microsoft.Extensions.Configuration;
+using Microsoft.Extensions.DependencyInjection;
+using Microsoft.Extensions.Hosting;
+using Microsoft.Extensions.Logging;
+using NBB.Application.MediatR;
+using NBB.Core.Abstractions;
+using NBB.Correlation.Serilog;
+using NBB.Domain;
+using NBB.Domain.Abstractions;
+using NBB.EventStore.Abstractions;
+using NBB.Messaging.Host;
+using NBB.Payments.Application.CommandHandlers;
+using NBB.Payments.Data;
+using Serilog;
+using Serilog.Events;
+using Serilog.Sinks.MSSqlServer;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace NBB.Payments.Worker
+{
+ public class Program
+ {
+ public static async Task Main(string[] args)
+ {
+ var builder = Host
+ .CreateDefaultBuilder(args)
+ .ConfigureLogging((hostingContext, loggingBuilder) =>
+ {
+ var connectionString = hostingContext.Configuration.GetConnectionString("Logs");
+
+ Log.Logger = new LoggerConfiguration()
+ .MinimumLevel.Debug()
+ .MinimumLevel.Override("Microsoft", LogEventLevel.Warning)
+ .Enrich.FromLogContext()
+ .Enrich.With()
+ .WriteTo.MSSqlServer(connectionString,
+ new MSSqlServerSinkOptions {TableName = "Logs", AutoCreateSqlTable = true})
+ .CreateLogger();
+
+ loggingBuilder.AddSerilog(dispose: true);
+ loggingBuilder.AddFilter("Microsoft", logLevel => logLevel >= LogLevel.Warning);
+ loggingBuilder.AddConsole();
+ })
+ .ConfigureServices((hostingContext, services) =>
+ {
+ services.AddMediatR(cfg => cfg.RegisterServicesFromAssemblyContaining());
+ //services.AddKafkaMessaging();
+ services.AddMessageBus().AddNatsTransport(hostingContext.Configuration);
+
+ services.AddPaymentsWriteDataAccess();
+
services.AddEventStore(es =>
{
es.UseNewtownsoftJson(new SingleValueObjectConverter());
es.UseAdoNetEventRepository(opts => opts.FromConfiguration());
- });
-
- services.AddMessagingHost(
- hostingContext.Configuration,
- hostBuilder => hostBuilder
- .Configure(configBuilder => configBuilder
- .AddSubscriberServices(subscriberBuilder => subscriberBuilder
- .FromMediatRHandledCommands().AddAllClasses()
- .FromMediatRHandledEvents().AddAllClasses()
- )
- .WithDefaultOptions()
- .UsePipeline(pipelineBuilder => pipelineBuilder
- .UseCorrelationMiddleware()
- .UseExceptionHandlingMiddleware()
- .UseDefaultResiliencyMiddleware()
- .UseMediatRMiddleware()
- )
- ));
-
- services
- .Decorate(typeof(IUow<>), typeof(DomainUowDecorator<>))
- .Decorate(typeof(IUow<>), typeof(MediatorUowDecorator<>))
- .Decorate(typeof(IUow<>), typeof(EventStoreUowDecorator<>));
- });
-
- await builder.RunConsoleAsync(CancellationToken.None);
- }
- }
-}
+ });
+
+ services.AddMessagingHost(
+ hostingContext.Configuration,
+ hostBuilder => hostBuilder
+ .Configure(configBuilder => configBuilder
+ .AddSubscriberServices(subscriberBuilder => subscriberBuilder
+ .FromMediatRHandledCommands().AddAllClasses()
+ .FromMediatRHandledEvents().AddAllClasses()
+ )
+ .WithDefaultOptions()
+ .UsePipeline(pipelineBuilder => pipelineBuilder
+ .UseCorrelationMiddleware()
+ .UseExceptionHandlingMiddleware()
+ .UseDefaultResiliencyMiddleware()
+ .UseMediatRMiddleware()
+ )
+ ));
+
+ services
+ .Decorate(typeof(IUow<>), typeof(DomainUowDecorator<>))
+ .Decorate(typeof(IUow<>), typeof(MediatorUowDecorator<>))
+ .Decorate(typeof(IUow<>), typeof(EventStoreUowDecorator<>));
+ });
+
+ await builder.RunConsoleAsync(CancellationToken.None);
+ }
+ }
+}
diff --git a/samples/Monolith/NBB.Mono.Migrations/NBB.Mono.Migrations.csproj b/samples/Monolith/NBB.Mono.Migrations/NBB.Mono.Migrations.csproj
index 47f7aa0b..a766b6b7 100644
--- a/samples/Monolith/NBB.Mono.Migrations/NBB.Mono.Migrations.csproj
+++ b/samples/Monolith/NBB.Mono.Migrations/NBB.Mono.Migrations.csproj
@@ -9,7 +9,7 @@
Exe
- net7.0
+ net8.0
NBB_Mono_04f3de64-51a9-466b-a489-ed331aba59c8
diff --git a/samples/Monolith/NBB.Mono/NBB.Mono.csproj b/samples/Monolith/NBB.Mono/NBB.Mono.csproj
index 0775678b..2ff22bda 100644
--- a/samples/Monolith/NBB.Mono/NBB.Mono.csproj
+++ b/samples/Monolith/NBB.Mono/NBB.Mono.csproj
@@ -8,7 +8,7 @@
- net7.0
+ net8.0
..\..\MicroServices\docker-compose.dcproj
NBB_Mono_04f3de64-51a9-466b-a489-ed331aba59c8
@@ -18,7 +18,7 @@
-
+
diff --git a/samples/Monolith/NBB.Mono/Startup.cs b/samples/Monolith/NBB.Mono/Startup.cs
index a9e83c0d..16f8e221 100644
--- a/samples/Monolith/NBB.Mono/Startup.cs
+++ b/samples/Monolith/NBB.Mono/Startup.cs
@@ -1,111 +1,111 @@
// Copyright (c) TotalSoft.
// This source code is licensed under the MIT license.
-using MediatR;
-using Microsoft.AspNetCore.Builder;
-using Microsoft.AspNetCore.Hosting;
-using Microsoft.Extensions.Configuration;
-using Microsoft.Extensions.DependencyInjection;
-using NBB.Application.MediatR;
-using NBB.Contracts.Application.CommandHandlers;
-using NBB.Contracts.ReadModel.Data;
-using NBB.Contracts.WriteModel.Data;
-using NBB.Core.Abstractions;
-using NBB.Correlation.AspNet;
-using NBB.Domain.Abstractions;
-using NBB.EventStore.Abstractions;
-using NBB.Invoices.Application.CommandHandlers;
-using NBB.Invoices.Data;
-using NBB.Payments.Application.CommandHandlers;
-using NBB.Payments.Data;
-using NBB.Domain;
-using NBB.Messaging.Host;
-using Microsoft.Extensions.Hosting;
-using System.Linq;
-using MicroServicesOrchestration;
-using NBB.Core.DependencyInjection;
-
-namespace NBB.Mono
-{
- public class Startup
- {
- public Startup(IConfiguration configuration)
- {
- Configuration = configuration;
- }
-
- public IConfiguration Configuration { get; }
-
- // This method gets called by the runtime. Use this method to add services to the container.
- public void ConfigureServices(IServiceCollection services)
- {
- services.AddMvc();
- services.AddSingleton(Configuration);
- services.AddMediatR(
- typeof(ContractCommandHandlers).Assembly,
- typeof(CreateInvoiceCommandHandler).Assembly,
- typeof(PayPayableCommandHandler).Assembly);
-
- services.AddMessageBus().AddInProcessTransport();
-
- services.AddContractsWriteModelDataAccess();
- services.AddContractsReadModelDataAccess();
- services.AddInvoicesDataAccess();
- services.AddPaymentsDataAccess();
-
+using MediatR;
+using Microsoft.AspNetCore.Builder;
+using Microsoft.AspNetCore.Hosting;
+using Microsoft.Extensions.Configuration;
+using Microsoft.Extensions.DependencyInjection;
+using NBB.Application.MediatR;
+using NBB.Contracts.Application.CommandHandlers;
+using NBB.Contracts.ReadModel.Data;
+using NBB.Contracts.WriteModel.Data;
+using NBB.Core.Abstractions;
+using NBB.Correlation.AspNet;
+using NBB.Domain.Abstractions;
+using NBB.EventStore.Abstractions;
+using NBB.Invoices.Application.CommandHandlers;
+using NBB.Invoices.Data;
+using NBB.Payments.Application.CommandHandlers;
+using NBB.Payments.Data;
+using NBB.Domain;
+using NBB.Messaging.Host;
+using Microsoft.Extensions.Hosting;
+using System.Linq;
+using MicroServicesOrchestration;
+using NBB.Core.DependencyInjection;
+
+namespace NBB.Mono
+{
+ public class Startup
+ {
+ public Startup(IConfiguration configuration)
+ {
+ Configuration = configuration;
+ }
+
+ public IConfiguration Configuration { get; }
+
+ // This method gets called by the runtime. Use this method to add services to the container.
+ public void ConfigureServices(IServiceCollection services)
+ {
+ services.AddMvc();
+ services.AddSingleton(Configuration);
+ services.AddMediatR(cfg => cfg.RegisterServicesFromAssemblies(
+ typeof(ContractCommandHandlers).Assembly,
+ typeof(CreateInvoiceCommandHandler).Assembly,
+ typeof(PayPayableCommandHandler).Assembly));
+
+ services.AddMessageBus().AddInProcessTransport();
+
+ services.AddContractsWriteModelDataAccess();
+ services.AddContractsReadModelDataAccess();
+ services.AddInvoicesDataAccess();
+ services.AddPaymentsDataAccess();
+
services.AddEventStore(es =>
{
es.UseNewtownsoftJson(new SingleValueObjectConverter());
es.UseAdoNetEventRepository(opts => opts.FromConfiguration());
- });
-
+ });
+
var integrationMessageAssemblies = new[] {
typeof(NBB.Contracts.PublishedLanguage.ContractValidated).Assembly,
typeof(NBB.Invoices.PublishedLanguage.InvoiceCreated).Assembly,
typeof(NBB.Payments.PublishedLanguage.PayableCreated).Assembly,
- };
-
- services.AddMessagingHost(
- Configuration,
- hostBuilder => hostBuilder
- .Configure(configBuilder => configBuilder
- .AddSubscriberServices(subscriberBuiler => subscriberBuiler
- .FromMediatRHandledCommands().AddClassesWhere(t => integrationMessageAssemblies.Contains(t.Assembly))
- .FromMediatRHandledEvents().AddClassesWhere(t => integrationMessageAssemblies.Contains(t.Assembly))
- )
- .WithDefaultOptions()
- .UsePipeline(pipelineBuilder => pipelineBuilder
- .UseExceptionHandlingMiddleware()
- .UseCorrelationMiddleware()
- .UseDefaultResiliencyMiddleware()
- .UseMediatRMiddleware()
- )
- )
- );
-
- services.AddProcessManager(typeof(InvoicingProcessManager).Assembly);
-
- services.DecorateOpenGenericWhen(typeof(IUow<>), typeof(DomainUowDecorator<>),
- serviceType => typeof(IEventedAggregateRoot).IsAssignableFrom(serviceType.GetGenericArguments()[0]));
- services.DecorateOpenGenericWhen(typeof(IUow<>), typeof(MediatorUowDecorator<>),
- serviceType => typeof(IEventedEntity).IsAssignableFrom(serviceType.GetGenericArguments()[0]));
- services.DecorateOpenGenericWhen(typeof(IUow<>), typeof(EventStoreUowDecorator<>),
- serviceType => typeof(IEventedEntity).IsAssignableFrom(serviceType.GetGenericArguments()[0]) &&
- typeof(IIdentifiedEntity).IsAssignableFrom(serviceType.GetGenericArguments()[0]));
- }
-
- // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
- public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
- {
- app.UseCorrelation();
-
- if (env.IsDevelopment())
- {
- app.UseDeveloperExceptionPage();
- }
-
- app.UseRouting();
- app.UseEndpoints(endpoints => { endpoints.MapControllers(); });
- }
- }
-}
+ };
+
+ services.AddMessagingHost(
+ Configuration,
+ hostBuilder => hostBuilder
+ .Configure(configBuilder => configBuilder
+ .AddSubscriberServices(subscriberBuiler => subscriberBuiler
+ .FromMediatRHandledCommands().AddClassesWhere(t => integrationMessageAssemblies.Contains(t.Assembly))
+ .FromMediatRHandledEvents().AddClassesWhere(t => integrationMessageAssemblies.Contains(t.Assembly))
+ )
+ .WithDefaultOptions()
+ .UsePipeline(pipelineBuilder => pipelineBuilder
+ .UseExceptionHandlingMiddleware()
+ .UseCorrelationMiddleware()
+ .UseDefaultResiliencyMiddleware()
+ .UseMediatRMiddleware()
+ )
+ )
+ );
+
+ services.AddProcessManager(typeof(InvoicingProcessManager).Assembly);
+
+ services.DecorateOpenGenericWhen(typeof(IUow<>), typeof(DomainUowDecorator<>),
+ serviceType => typeof(IEventedAggregateRoot).IsAssignableFrom(serviceType.GetGenericArguments()[0]));
+ services.DecorateOpenGenericWhen(typeof(IUow<>), typeof(MediatorUowDecorator<>),
+ serviceType => typeof(IEventedEntity).IsAssignableFrom(serviceType.GetGenericArguments()[0]));
+ services.DecorateOpenGenericWhen(typeof(IUow<>), typeof(EventStoreUowDecorator<>),
+ serviceType => typeof(IEventedEntity).IsAssignableFrom(serviceType.GetGenericArguments()[0]) &&
+ typeof(IIdentifiedEntity).IsAssignableFrom(serviceType.GetGenericArguments()[0]));
+ }
+
+ // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
+ public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
+ {
+ app.UseCorrelation();
+
+ if (env.IsDevelopment())
+ {
+ app.UseDeveloperExceptionPage();
+ }
+
+ app.UseRouting();
+ app.UseEndpoints(endpoints => { endpoints.MapControllers(); });
+ }
+ }
+}
diff --git a/samples/MultiTenancy/MultiTenantTodoList.postman_collection.json b/samples/MultiTenancy/MultiTenantTodoList.postman_collection.json
index 5c4fd9c1..b3120b5d 100644
--- a/samples/MultiTenancy/MultiTenantTodoList.postman_collection.json
+++ b/samples/MultiTenancy/MultiTenantTodoList.postman_collection.json
@@ -66,4 +66,4 @@
"response": []
}
]
-}
\ No newline at end of file
+}
diff --git a/samples/MultiTenancy/NBB.Todo.Api/NBB.Todo.Api.csproj b/samples/MultiTenancy/NBB.Todo.Api/NBB.Todo.Api.csproj
index 4d4374fe..e5000e01 100644
--- a/samples/MultiTenancy/NBB.Todo.Api/NBB.Todo.Api.csproj
+++ b/samples/MultiTenancy/NBB.Todo.Api/NBB.Todo.Api.csproj
@@ -1,7 +1,7 @@
- net7.0
+ net8.0
NBB_Todo_a9328d3a-7681-452a-9dbe-a52a9b6a0593
@@ -10,16 +10,16 @@
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
diff --git a/samples/MultiTenancy/NBB.Todo.Api/Startup.cs b/samples/MultiTenancy/NBB.Todo.Api/Startup.cs
index 11e54eb8..2bed2682 100644
--- a/samples/MultiTenancy/NBB.Todo.Api/Startup.cs
+++ b/samples/MultiTenancy/NBB.Todo.Api/Startup.cs
@@ -5,6 +5,7 @@
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;
+using Microsoft.Data.SqlClient;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions;
@@ -23,6 +24,7 @@
using OpenTelemetry.Resources;
using OpenTelemetry.Trace;
using System;
+using System.Linq;
using System.Reflection;
using ProblemDetailsOptions = Hellang.Middleware.ProblemDetails.ProblemDetailsOptions;
@@ -75,10 +77,21 @@ void configureResource(ResourceBuilder r) =>
.AddHttpClientInstrumentation()
.AddAspNetCoreInstrumentation()
.AddMessageBusInstrumentation()
- .AddEntityFrameworkCoreInstrumentation(options => options.SetDbStatementForText = true)
- .AddJaegerExporter()
+ .AddEntityFrameworkCoreInstrumentation(options =>
+ {
+ options.SetDbStatementForText = true;
+ options.EnrichWithIDbCommand = (activity, command) =>
+ {
+ //activity.SetTag("db.statement", command.CommandText);
+ activity.SetTag(
+ "db.statement.params",
+ string.Join(", ", command.Parameters.Cast().Select(p => $"{p.ParameterName} = {p.Value}")));
+ };
+
+ })
+ .AddOtlpExporter()
);
- services.Configure(Configuration.GetSection("OpenTelemetry:Jaeger"));
+ services.Configure(Configuration.GetSection("OpenTelemetry:Otlp"));
}
if (Configuration.GetValue("OpenTelemetry:MetricsEnabled"))
diff --git a/samples/MultiTenancy/NBB.Todo.Api/appsettings.json b/samples/MultiTenancy/NBB.Todo.Api/appsettings.json
index 5ba8d6dc..2ec49cdb 100644
--- a/samples/MultiTenancy/NBB.Todo.Api/appsettings.json
+++ b/samples/MultiTenancy/NBB.Todo.Api/appsettings.json
@@ -1,7 +1,7 @@
{
"ConnectionStrings": {
- "DefaultConnection": "Server=YOUR_SERVER;Database=NBB_Invoices;User Id=YOUR_USER;Password=YOUR_PASSWORD;MultipleActiveResultSets=true",
- "Log_Database": "Server=YOUR_SERVER;Database=NBB_Invoices;User Id=YOUR_USER;Password=YOUR_PASSWORD;MultipleActiveResultSets=true"
+ "DefaultConnection": "Server=YOUR_SERVER;Database=NBB_Invoices;User Id=YOUR_USER;Password=YOUR_PASSWORD;MultipleActiveResultSets=true;TrustServerCertificate=True",
+ "Log_Database": "Server=YOUR_SERVER;Database=NBB_Invoices;User Id=YOUR_USER;Password=YOUR_PASSWORD;MultipleActiveResultSets=true;TrustServerCertificate=True"
},
"Serilog": {
"Properties": {
@@ -64,7 +64,7 @@
"TenancyType": "MultiTenant", // "MultiTenant" "MonoTenant"
"Defaults": {
"ConnectionStrings": {
- "DefaultConnection": "Server=YOUR_SERVER;Database=NBB_Invoices;User Id=YOUR_USER;Password=YOUR_PASSWORD;MultipleActiveResultSets=true"
+ "DefaultConnection": "Server=YOUR_SERVER;Database=NBB_Invoices;User Id=YOUR_USER;Password=YOUR_PASSWORD;MultipleActiveResultSets=true;TrustServerCertificate=True"
}
},
"Tenants": {
@@ -79,9 +79,8 @@
"OpenTelemetry": {
"MetricsEnabled": true,
"TracingEnabled": true,
- "Jaeger": {
- "Endpoint": "YOUR_COLLECTOR_URL",
- "Protocol": "HttpBinaryThrift"
+ "Otlp": {
+ "Endpoint": "YOUR_COLLECTOR_URL"
}
}
}
diff --git a/samples/MultiTenancy/NBB.Todo.Data/NBB.Todo.Data.csproj b/samples/MultiTenancy/NBB.Todo.Data/NBB.Todo.Data.csproj
index fc6a2d6a..c83f2b53 100644
--- a/samples/MultiTenancy/NBB.Todo.Data/NBB.Todo.Data.csproj
+++ b/samples/MultiTenancy/NBB.Todo.Data/NBB.Todo.Data.csproj
@@ -1,7 +1,7 @@
- net7.0
+ net8.0
diff --git a/samples/MultiTenancy/NBB.Todo.Migrations/NBB.Todo.Migrations.csproj b/samples/MultiTenancy/NBB.Todo.Migrations/NBB.Todo.Migrations.csproj
index 104613f6..f190a4af 100644
--- a/samples/MultiTenancy/NBB.Todo.Migrations/NBB.Todo.Migrations.csproj
+++ b/samples/MultiTenancy/NBB.Todo.Migrations/NBB.Todo.Migrations.csproj
@@ -2,7 +2,7 @@
Exe
- net7.0
+ net8.0
NBB_Todo_a9328d3a-7681-452a-9dbe-a52a9b6a0593
diff --git a/samples/MultiTenancy/NBB.Todo.PublishedLanguage/NBB.Todo.PublishedLanguage.csproj b/samples/MultiTenancy/NBB.Todo.PublishedLanguage/NBB.Todo.PublishedLanguage.csproj
index d0fe7055..dc93ab67 100644
--- a/samples/MultiTenancy/NBB.Todo.PublishedLanguage/NBB.Todo.PublishedLanguage.csproj
+++ b/samples/MultiTenancy/NBB.Todo.PublishedLanguage/NBB.Todo.PublishedLanguage.csproj
@@ -1,7 +1,7 @@
- net7.0
+ net8.0
diff --git a/samples/MultiTenancy/NBB.Todo.Worker/Application/CreateTodoTaskHandler.cs b/samples/MultiTenancy/NBB.Todo.Worker/Application/CreateTodoTaskHandler.cs
index aee3a66e..72275265 100644
--- a/samples/MultiTenancy/NBB.Todo.Worker/Application/CreateTodoTaskHandler.cs
+++ b/samples/MultiTenancy/NBB.Todo.Worker/Application/CreateTodoTaskHandler.cs
@@ -19,7 +19,7 @@ public CreateTodoTaskHandler(ICrudRepository todoTaskRepository)
_todoTaskRepository = todoTaskRepository;
}
- public async Task Handle(CreateTodoTask request, CancellationToken cancellationToken)
+ public async Task Handle(CreateTodoTask request, CancellationToken cancellationToken)
{
//throw new System.Exception("handler exception");
var todoTask = new TodoTask
@@ -30,10 +30,7 @@ public async Task Handle(CreateTodoTask request, CancellationToken cancell
};
await _todoTaskRepository.AddAsync(todoTask, cancellationToken);
-
await _todoTaskRepository.SaveChangesAsync(cancellationToken);
-
- return Unit.Value;
}
}
}
diff --git a/samples/MultiTenancy/NBB.Todo.Worker/NBB.Todo.Worker.csproj b/samples/MultiTenancy/NBB.Todo.Worker/NBB.Todo.Worker.csproj
index 52600b6f..6e3f669c 100644
--- a/samples/MultiTenancy/NBB.Todo.Worker/NBB.Todo.Worker.csproj
+++ b/samples/MultiTenancy/NBB.Todo.Worker/NBB.Todo.Worker.csproj
@@ -2,7 +2,7 @@
- net7.0
+ net8.0
Linux
NBB_Todo_a9328d3a-7681-452a-9dbe-a52a9b6a0593
Exe
@@ -19,19 +19,19 @@
-
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
diff --git a/samples/MultiTenancy/NBB.Todo.Worker/Program.cs b/samples/MultiTenancy/NBB.Todo.Worker/Program.cs
index 8711002a..6dab40cc 100644
--- a/samples/MultiTenancy/NBB.Todo.Worker/Program.cs
+++ b/samples/MultiTenancy/NBB.Todo.Worker/Program.cs
@@ -25,6 +25,8 @@
using OpenTelemetry.Trace;
using OpenTelemetry.Metrics;
using NBB.Tools.Serilog.OpenTelemetryTracingSink;
+using Microsoft.Data.SqlClient;
+using System.Linq;
namespace NBB.Todo.Worker
{
@@ -72,7 +74,7 @@ public static IHost BuildConsoleHost(string[] args) =>
private static void ConfigureServices(HostBuilderContext hostingContext, IServiceCollection services)
{
// MediatR
- services.AddMediatR(typeof(CreateTodoTaskHandler).Assembly);
+ services.AddMediatR(cfg => cfg.RegisterServicesFromAssemblyContaining());
// Data
services.AddTodoDataAccess();
@@ -120,10 +122,16 @@ void configureResource(ResourceBuilder r) =>
.ConfigureResource(configureResource)
.SetSampler(new AlwaysOnSampler())
.AddMessageBusInstrumentation()
- .AddEntityFrameworkCoreInstrumentation(options => options.SetDbStatementForText = true)
- .AddJaegerExporter()
+ .AddEntityFrameworkCoreInstrumentation(options => {
+ options.SetDbStatementForText = true;
+ options.EnrichWithIDbCommand = (activity, command) =>
+ activity.SetTag(
+ "db.statement.params",
+ string.Join(", ", command.Parameters.Cast().Select(p => $"{p.ParameterName} = {p.Value}")));
+ })
+ .AddOtlpExporter()
);
- services.Configure(hostingContext.Configuration.GetSection("OpenTelemetry:Jaeger"));
+ services.Configure(hostingContext.Configuration.GetSection("OpenTelemetry:Otlp"));
}
diff --git a/samples/MultiTenancy/NBB.Todo.Worker/appsettings.json b/samples/MultiTenancy/NBB.Todo.Worker/appsettings.json
index f48d4608..1271db64 100644
--- a/samples/MultiTenancy/NBB.Todo.Worker/appsettings.json
+++ b/samples/MultiTenancy/NBB.Todo.Worker/appsettings.json
@@ -80,9 +80,8 @@
"OpenTelemetry": {
"MetricsEnabled": true,
"TracingEnabled": true,
- "Jaeger": {
- "Endpoint": "YOUR_COLLECTOR_URL",
- "Protocol": "HttpBinaryThrift"
+ "Otlp": {
+ "Endpoint": "YOUR_COLLECTOR_URL"
}
}
}
diff --git a/samples/Orchestration/ProcessManagerSample/ProcessManagerSample.csproj b/samples/Orchestration/ProcessManagerSample/ProcessManagerSample.csproj
index 1565d354..bd3fcd77 100644
--- a/samples/Orchestration/ProcessManagerSample/ProcessManagerSample.csproj
+++ b/samples/Orchestration/ProcessManagerSample/ProcessManagerSample.csproj
@@ -2,14 +2,14 @@
Exe
- net7.0
+ net8.0
NBB_ProcessManager_6573f87d-2175-4be0-9a42-31cb73bc8e19
-
+
@@ -18,7 +18,7 @@
-
+
diff --git a/samples/Orchestration/ProcessManagerSample/Startup.cs b/samples/Orchestration/ProcessManagerSample/Startup.cs
index bc412a4a..a880eb9f 100644
--- a/samples/Orchestration/ProcessManagerSample/Startup.cs
+++ b/samples/Orchestration/ProcessManagerSample/Startup.cs
@@ -20,7 +20,7 @@ public static void ConfigureServicesDelegate(HostBuilderContext context, IServic
services.AddMessageBus().AddInProcessTransport();
- services.AddMediatR(typeof(GetPartnerQuery).Assembly);
+ services.AddMediatR(cfg => cfg.RegisterServicesFromAssemblyContaining());
services.AddTransient(typeof(IPipelineBehavior<,>), typeof(RequestPreProcessorBehavior<,>));
//services.AddScoped, TimeoutOccuredHandler>();
diff --git a/src/Application/NBB.Application.DataContracts.Schema/NBB.Application.DataContracts.Schema.csproj b/src/Application/NBB.Application.DataContracts.Schema/NBB.Application.DataContracts.Schema.csproj
index 413ae74b..9df9636c 100644
--- a/src/Application/NBB.Application.DataContracts.Schema/NBB.Application.DataContracts.Schema.csproj
+++ b/src/Application/NBB.Application.DataContracts.Schema/NBB.Application.DataContracts.Schema.csproj
@@ -8,7 +8,7 @@
- net7.0
+ net8.0
Data contracts for CQ(R)S applications.
diff --git a/src/Application/NBB.Application.DataContracts/NBB.Application.DataContracts.csproj b/src/Application/NBB.Application.DataContracts/NBB.Application.DataContracts.csproj
index d610bbb0..89b31e12 100644
--- a/src/Application/NBB.Application.DataContracts/NBB.Application.DataContracts.csproj
+++ b/src/Application/NBB.Application.DataContracts/NBB.Application.DataContracts.csproj
@@ -1,7 +1,7 @@
- net7.0
+ net8.0
Legacy code for compatibiltity with NBB 4.x. Reference this package only to support published language assemblies compiled against NBB 4
diff --git a/src/Application/NBB.Application.DataContracts/Readme.md b/src/Application/NBB.Application.DataContracts/Readme.md
index f2a899be..f751c517 100644
--- a/src/Application/NBB.Application.DataContracts/Readme.md
+++ b/src/Application/NBB.Application.DataContracts/Readme.md
@@ -35,7 +35,7 @@ namespace ServiceA.PublishedLanguage.Commands
- net7.0
+ net8.0
diff --git a/src/Application/NBB.Application.MediatR.Effects/DependencyInjectionExtensions.cs b/src/Application/NBB.Application.MediatR.Effects/DependencyInjectionExtensions.cs
index 301e352c..8476fd51 100644
--- a/src/Application/NBB.Application.MediatR.Effects/DependencyInjectionExtensions.cs
+++ b/src/Application/NBB.Application.MediatR.Effects/DependencyInjectionExtensions.cs
@@ -11,7 +11,8 @@ public static class DependencyInjectionExtensions
{
public static IServiceCollection AddMediatorEffects(this IServiceCollection services)
{
- services.AddSingleton(typeof(MediatorEffects.Send.Handler<>));
+ services.AddSingleton(typeof(MediatorEffects.Send.QueryHandler<>));
+ services.AddSingleton(typeof(MediatorEffects.Send.CommandHandler));
services.AddSingleton, MediatorEffects.Publish.Handler>();
return services;
}
diff --git a/src/Application/NBB.Application.MediatR.Effects/Mediator.cs b/src/Application/NBB.Application.MediatR.Effects/Mediator.cs
index 35d91cf0..f79fcc25 100644
--- a/src/Application/NBB.Application.MediatR.Effects/Mediator.cs
+++ b/src/Application/NBB.Application.MediatR.Effects/Mediator.cs
@@ -1,88 +1,114 @@
// Copyright (c) TotalSoft.
// This source code is licensed under the MIT license.
-using System.Threading;
-using System.Threading.Tasks;
-using MediatR;
-using NBB.Core.Effects;
-using Unit = NBB.Core.Effects.Unit;
-
-namespace NBB.Application.MediatR.Effects
-{
- public static class MediatorEffects
- {
- public class Send
- {
- public class SideEffect : ISideEffect, IAmHandledBy>
- {
- public IRequest Query { get; }
-
- public SideEffect(IRequest query)
- {
- Query = query;
- }
- }
-
-
- public class Handler : ISideEffectHandler, TResponse>
- {
- private readonly IMediator _mediator;
-
- public Handler(IMediator mediator)
- {
- _mediator = mediator;
- }
-
- public Task Handle(SideEffect sideEffect, CancellationToken cancellationToken = default)
- {
- return _mediator.Send(sideEffect.Query, cancellationToken);
- }
- }
- }
-
- public class Publish
- {
- public class SideEffect : ISideEffect
- {
- public INotification Notification { get; }
-
- public SideEffect(INotification notification)
- {
- Notification = notification;
- }
- }
-
-
- public class Handler : ISideEffectHandler
- {
- private readonly IMediator _mediator;
-
- public Handler(IMediator mediator)
- {
- _mediator = mediator;
- }
-
- public async Task Handle(SideEffect sideEffect, CancellationToken cancellationToken = default)
- {
- await _mediator.Publish(sideEffect.Notification, cancellationToken);
- return Unit.Value;
- }
- }
- }
- }
-
- public static class Mediator
- {
- public static Effect Send(IRequest query) =>
- Effect.Of, TResponse>(
- new MediatorEffects.Send.SideEffect(query));
-
- public static Effect Send(IRequest cmd) =>
- Effect.Of, global::MediatR.Unit>(
- new MediatorEffects.Send.SideEffect(cmd)).ToUnit();
-
- public static Effect Publish(INotification notification) =>
- Effect.Of(new MediatorEffects.Publish.SideEffect(notification));
-
- }
-}
+using System.Threading;
+using System.Threading.Tasks;
+using MediatR;
+using NBB.Core.Effects;
+using Unit = NBB.Core.Effects.Unit;
+
+namespace NBB.Application.MediatR.Effects
+{
+ public static class MediatorEffects
+ {
+ public class Send
+ {
+ public class QuerySideEffect : ISideEffect, IAmHandledBy>
+ {
+ public IRequest Query { get; }
+
+ public QuerySideEffect(IRequest query)
+ {
+ Query = query;
+ }
+ }
+
+ public class CommandSideEffect : ISideEffect, IAmHandledBy
+ {
+ public IRequest Query { get; }
+
+ public CommandSideEffect(IRequest query)
+ {
+ Query = query;
+ }
+ }
+
+ public class QueryHandler : ISideEffectHandler, TResponse>
+ {
+ private readonly IMediator _mediator;
+
+ public QueryHandler(IMediator mediator)
+ {
+ _mediator = mediator;
+ }
+
+ public Task Handle(QuerySideEffect sideEffect, CancellationToken cancellationToken = default)
+ {
+ return _mediator.Send(sideEffect.Query, cancellationToken);
+ }
+ }
+
+ public class CommandHandler : ISideEffectHandler
+ {
+ private readonly IMediator _mediator;
+
+ public CommandHandler(IMediator mediator)
+ {
+ _mediator = mediator;
+ }
+
+ public async Task Handle(CommandSideEffect sideEffect, CancellationToken cancellationToken = default)
+ {
+ await _mediator.Send(sideEffect.Query, cancellationToken);
+
+ return Unit.Value;
+ }
+ }
+ }
+
+ public class Publish
+ {
+ public class SideEffect : ISideEffect
+ {
+ public INotification Notification { get; }
+
+ public SideEffect(INotification notification)
+ {
+ Notification = notification;
+ }
+ }
+
+
+ public class Handler : ISideEffectHandler
+ {
+ private readonly IMediator _mediator;
+
+ public Handler(IMediator mediator)
+ {
+ _mediator = mediator;
+ }
+
+ public async Task Handle(SideEffect sideEffect, CancellationToken cancellationToken = default)
+ {
+ await _mediator.Publish(sideEffect.Notification, cancellationToken);
+ return Unit.Value;
+ }
+ }
+ }
+ }
+
+ public static class Mediator
+ {
+ public static Effect Send(IRequest query) =>
+ Effect.Of, TResponse>(
+ new MediatorEffects.Send.QuerySideEffect(query));
+
+ public static Effect Send(IRequest cmd) =>
+ Effect.Of(
+ new MediatorEffects.Send.CommandSideEffect(cmd)).ToUnit();
+
+ public static Effect Publish(INotification notification) =>
+ Effect.Of(new MediatorEffects.Publish.SideEffect(notification));
+
+ }
+}
diff --git a/src/Application/NBB.Application.MediatR.Effects/NBB.Application.MediatR.Effects.csproj b/src/Application/NBB.Application.MediatR.Effects/NBB.Application.MediatR.Effects.csproj
index edc58b1c..374c2f39 100644
--- a/src/Application/NBB.Application.MediatR.Effects/NBB.Application.MediatR.Effects.csproj
+++ b/src/Application/NBB.Application.MediatR.Effects/NBB.Application.MediatR.Effects.csproj
@@ -1,7 +1,7 @@
- net7.0
+ net8.0
diff --git a/src/Application/NBB.Application.MediatR/NBB.Application.MediatR.csproj b/src/Application/NBB.Application.MediatR/NBB.Application.MediatR.csproj
index 1039bbb4..4ca33e3b 100644
--- a/src/Application/NBB.Application.MediatR/NBB.Application.MediatR.csproj
+++ b/src/Application/NBB.Application.MediatR/NBB.Application.MediatR.csproj
@@ -8,7 +8,7 @@
- net7.0
+ net8.0
Data contracts for CQ(R)S applications.
diff --git a/src/Application/NBB.Application.Mediator.FSharp/Mediator.fs b/src/Application/NBB.Application.Mediator.FSharp/Mediator.fs
index 632da59b..7defc3a4 100644
--- a/src/Application/NBB.Application.Mediator.FSharp/Mediator.fs
+++ b/src/Application/NBB.Application.Mediator.FSharp/Mediator.fs
@@ -20,17 +20,17 @@ module Mediator =
let dispatchEvent (event: #IEvent) =
getMediator
- >>= (fun mediator -> mediator.DispatchEvent(event :> IEvent))
+ >>= _.DispatchEvent(event :> IEvent)
let sendCommand (cmd: #ICommand) =
getMediator
- >>= (fun mediator -> mediator.SendCommand(cmd :> ICommand))
+ >>= _.SendCommand(cmd :> ICommand)
let dispatchEvents (events: #IEvent list) = List.traverse_ dispatchEvent events
let sendQuery (query: #IQuery<'TResponse>) =
getMediator
- >>= (fun mediator -> mediator.SendQuery(query :> IQuery))
+ >>= _.SendQuery(query :> IQuery)
|> Effect.map unbox<'TResponse>
let sendMessage message =
diff --git a/src/Application/NBB.Application.Mediator.FSharp/NBB.Application.Mediator.FSharp.fsproj b/src/Application/NBB.Application.Mediator.FSharp/NBB.Application.Mediator.FSharp.fsproj
index 65cd1e9c..fe623413 100644
--- a/src/Application/NBB.Application.Mediator.FSharp/NBB.Application.Mediator.FSharp.fsproj
+++ b/src/Application/NBB.Application.Mediator.FSharp/NBB.Application.Mediator.FSharp.fsproj
@@ -1,7 +1,7 @@
- net7.0
+ net8.0
diff --git a/src/Core/NBB.Core.Abstractions/NBB.Core.Abstractions.csproj b/src/Core/NBB.Core.Abstractions/NBB.Core.Abstractions.csproj
index 63c12fe8..4527560e 100644
--- a/src/Core/NBB.Core.Abstractions/NBB.Core.Abstractions.csproj
+++ b/src/Core/NBB.Core.Abstractions/NBB.Core.Abstractions.csproj
@@ -8,7 +8,7 @@
- net7.0
+ net8.0
This package provides cross-cutting abstractions and type extensions that other packages rely upon. The interfaces of this package are not intended to be directly referenced by the end-consumer.
diff --git a/src/Core/NBB.Core.Configuration/NBB.Core.Configuration.csproj b/src/Core/NBB.Core.Configuration/NBB.Core.Configuration.csproj
index 17625586..fb52b521 100644
--- a/src/Core/NBB.Core.Configuration/NBB.Core.Configuration.csproj
+++ b/src/Core/NBB.Core.Configuration/NBB.Core.Configuration.csproj
@@ -1,7 +1,7 @@
- net7.0
+ net8.0
enable
enable
diff --git a/src/Core/NBB.Core.DependencyInjection/NBB.Core.DependencyInjection.csproj b/src/Core/NBB.Core.DependencyInjection/NBB.Core.DependencyInjection.csproj
index 17a9e042..8510dbcc 100644
--- a/src/Core/NBB.Core.DependencyInjection/NBB.Core.DependencyInjection.csproj
+++ b/src/Core/NBB.Core.DependencyInjection/NBB.Core.DependencyInjection.csproj
@@ -1,12 +1,12 @@
- net7.0
+ net8.0
Asp.Net DI and Scrutor missing features
-
+
diff --git a/src/Core/NBB.Core.Effects.FSharp/NBB.Core.Effects.FSharp.fsproj b/src/Core/NBB.Core.Effects.FSharp/NBB.Core.Effects.FSharp.fsproj
index 589396eb..f5cfe525 100644
--- a/src/Core/NBB.Core.Effects.FSharp/NBB.Core.Effects.FSharp.fsproj
+++ b/src/Core/NBB.Core.Effects.FSharp/NBB.Core.Effects.FSharp.fsproj
@@ -1,7 +1,7 @@
- net7.0
+ net8.0
diff --git a/src/Core/NBB.Core.Effects/NBB.Core.Effects.csproj b/src/Core/NBB.Core.Effects/NBB.Core.Effects.csproj
index 20ff79e3..94488dc6 100644
--- a/src/Core/NBB.Core.Effects/NBB.Core.Effects.csproj
+++ b/src/Core/NBB.Core.Effects/NBB.Core.Effects.csproj
@@ -1,7 +1,7 @@
- net7.0
+ net8.0
diff --git a/src/Core/NBB.Core.Evented.FSharp/NBB.Core.Evented.FSharp.fsproj b/src/Core/NBB.Core.Evented.FSharp/NBB.Core.Evented.FSharp.fsproj
index 582dc146..c93ca17a 100644
--- a/src/Core/NBB.Core.Evented.FSharp/NBB.Core.Evented.FSharp.fsproj
+++ b/src/Core/NBB.Core.Evented.FSharp/NBB.Core.Evented.FSharp.fsproj
@@ -1,7 +1,7 @@
- net7.0
+ net8.0
diff --git a/src/Core/NBB.Core.FSharp/NBB.Core.FSharp.fsproj b/src/Core/NBB.Core.FSharp/NBB.Core.FSharp.fsproj
index 4cdaf51a..73a4f06a 100644
--- a/src/Core/NBB.Core.FSharp/NBB.Core.FSharp.fsproj
+++ b/src/Core/NBB.Core.FSharp/NBB.Core.FSharp.fsproj
@@ -1,7 +1,7 @@
- net7.0
+ net8.0
diff --git a/src/Core/NBB.Core.Pipeline/NBB.Core.Pipeline.csproj b/src/Core/NBB.Core.Pipeline/NBB.Core.Pipeline.csproj
index 38baae60..76ae7df4 100644
--- a/src/Core/NBB.Core.Pipeline/NBB.Core.Pipeline.csproj
+++ b/src/Core/NBB.Core.Pipeline/NBB.Core.Pipeline.csproj
@@ -1,7 +1,7 @@
- net7.0
+ net8.0
Generic pipeline
diff --git a/src/Correlation/NBB.Correlation.AspNet/NBB.Correlation.AspNet.csproj b/src/Correlation/NBB.Correlation.AspNet/NBB.Correlation.AspNet.csproj
index 3b8ea991..68a28109 100644
--- a/src/Correlation/NBB.Correlation.AspNet/NBB.Correlation.AspNet.csproj
+++ b/src/Correlation/NBB.Correlation.AspNet/NBB.Correlation.AspNet.csproj
@@ -7,7 +7,7 @@
- net7.0
+ net8.0
Correlation middleware for Asp.Net Core
diff --git a/src/Correlation/NBB.Correlation.Serilog.SqlServer/NBB.Correlation.Serilog.SqlServer.csproj b/src/Correlation/NBB.Correlation.Serilog.SqlServer/NBB.Correlation.Serilog.SqlServer.csproj
index d02d54fa..34ef0a20 100644
--- a/src/Correlation/NBB.Correlation.Serilog.SqlServer/NBB.Correlation.Serilog.SqlServer.csproj
+++ b/src/Correlation/NBB.Correlation.Serilog.SqlServer/NBB.Correlation.Serilog.SqlServer.csproj
@@ -8,7 +8,7 @@
- net7.0
+ net8.0
Extensions for creating new columns in sql Server for Serilog Table
diff --git a/src/Correlation/NBB.Correlation.Serilog/NBB.Correlation.Serilog.csproj b/src/Correlation/NBB.Correlation.Serilog/NBB.Correlation.Serilog.csproj
index 31abe823..a6530f2a 100644
--- a/src/Correlation/NBB.Correlation.Serilog/NBB.Correlation.Serilog.csproj
+++ b/src/Correlation/NBB.Correlation.Serilog/NBB.Correlation.Serilog.csproj
@@ -8,7 +8,7 @@
- net7.0
+ net8.0
Serilog enrichers for Correlation package
diff --git a/src/Correlation/NBB.Correlation/NBB.Correlation.csproj b/src/Correlation/NBB.Correlation/NBB.Correlation.csproj
index 571de58e..cf13924c 100644
--- a/src/Correlation/NBB.Correlation/NBB.Correlation.csproj
+++ b/src/Correlation/NBB.Correlation/NBB.Correlation.csproj
@@ -8,7 +8,7 @@
- net7.0
+ net8.0
Correlation infrastructure for distributed systems
diff --git a/src/Data/NBB.Data.Abstractions/NBB.Data.Abstractions.csproj b/src/Data/NBB.Data.Abstractions/NBB.Data.Abstractions.csproj
index a657b9b1..8e7cfa69 100644
--- a/src/Data/NBB.Data.Abstractions/NBB.Data.Abstractions.csproj
+++ b/src/Data/NBB.Data.Abstractions/NBB.Data.Abstractions.csproj
@@ -1,7 +1,7 @@
- net7.0
+ net8.0
This package contains some lightweight data access abstractions
diff --git a/src/Data/NBB.Data.EntityFramework.MultiTenancy/NBB.Data.EntityFramework.MultiTenancy.csproj b/src/Data/NBB.Data.EntityFramework.MultiTenancy/NBB.Data.EntityFramework.MultiTenancy.csproj
index aef478ea..baa78267 100644
--- a/src/Data/NBB.Data.EntityFramework.MultiTenancy/NBB.Data.EntityFramework.MultiTenancy.csproj
+++ b/src/Data/NBB.Data.EntityFramework.MultiTenancy/NBB.Data.EntityFramework.MultiTenancy.csproj
@@ -1,7 +1,7 @@
- net7.0
+ net8.0
diff --git a/src/Data/NBB.Data.EntityFramework/NBB.Data.EntityFramework.csproj b/src/Data/NBB.Data.EntityFramework/NBB.Data.EntityFramework.csproj
index 09959794..2b2621cc 100644
--- a/src/Data/NBB.Data.EntityFramework/NBB.Data.EntityFramework.csproj
+++ b/src/Data/NBB.Data.EntityFramework/NBB.Data.EntityFramework.csproj
@@ -8,7 +8,7 @@
- net7.0
+ net8.0
An Entity Framework data access for general use.
diff --git a/src/Data/NBB.Data.EventSourcing/NBB.Data.EventSourcing.csproj b/src/Data/NBB.Data.EventSourcing/NBB.Data.EventSourcing.csproj
index bde7edd5..79b7e909 100644
--- a/src/Data/NBB.Data.EventSourcing/NBB.Data.EventSourcing.csproj
+++ b/src/Data/NBB.Data.EventSourcing/NBB.Data.EventSourcing.csproj
@@ -8,7 +8,7 @@
- net7.0
+ net8.0
Contains data access building blocks for event-sourced aggregates.
diff --git a/src/Domain/NBB.Domain.Abstractions/NBB.Domain.Abstractions.csproj b/src/Domain/NBB.Domain.Abstractions/NBB.Domain.Abstractions.csproj
index e312cbe6..08e6cf16 100644
--- a/src/Domain/NBB.Domain.Abstractions/NBB.Domain.Abstractions.csproj
+++ b/src/Domain/NBB.Domain.Abstractions/NBB.Domain.Abstractions.csproj
@@ -8,7 +8,7 @@
- net7.0
+ net8.0
Some DDD domain buiding blocks abstractions
diff --git a/src/Domain/NBB.Domain/NBB.Domain.csproj b/src/Domain/NBB.Domain/NBB.Domain.csproj
index b6f7e7d6..ede6a44e 100644
--- a/src/Domain/NBB.Domain/NBB.Domain.csproj
+++ b/src/Domain/NBB.Domain/NBB.Domain.csproj
@@ -8,14 +8,14 @@
- net7.0
+ net8.0
A collection of DDD domain building blocks
-
+
diff --git a/src/EventStore/NBB.EventStore.Abstractions/NBB.EventStore.Abstractions.csproj b/src/EventStore/NBB.EventStore.Abstractions/NBB.EventStore.Abstractions.csproj
index ef03a601..c7d23c5c 100644
--- a/src/EventStore/NBB.EventStore.Abstractions/NBB.EventStore.Abstractions.csproj
+++ b/src/EventStore/NBB.EventStore.Abstractions/NBB.EventStore.Abstractions.csproj
@@ -8,7 +8,7 @@
- net7.0
+ net8.0
This package should contain common event store abstractions and should be references by event store dependent building blocks.
diff --git a/src/EventStore/NBB.EventStore.AdoNet.Migrations/NBB.EventStore.AdoNet.Migrations.csproj b/src/EventStore/NBB.EventStore.AdoNet.Migrations/NBB.EventStore.AdoNet.Migrations.csproj
index 3b85e234..0db44c56 100644
--- a/src/EventStore/NBB.EventStore.AdoNet.Migrations/NBB.EventStore.AdoNet.Migrations.csproj
+++ b/src/EventStore/NBB.EventStore.AdoNet.Migrations/NBB.EventStore.AdoNet.Migrations.csproj
@@ -9,7 +9,7 @@
Exe
- net7.0
+ net8.0
NBB_EventStoreAdoNetMigrations_f43f7048-9bff-4649-881c-97774e23e9f8
diff --git a/src/EventStore/NBB.EventStore.AdoNet.Multitenancy/NBB.EventStore.AdoNet.MultiTenancy.csproj b/src/EventStore/NBB.EventStore.AdoNet.Multitenancy/NBB.EventStore.AdoNet.MultiTenancy.csproj
index 7516a3db..ae788cb0 100644
--- a/src/EventStore/NBB.EventStore.AdoNet.Multitenancy/NBB.EventStore.AdoNet.MultiTenancy.csproj
+++ b/src/EventStore/NBB.EventStore.AdoNet.Multitenancy/NBB.EventStore.AdoNet.MultiTenancy.csproj
@@ -8,7 +8,7 @@
- net7.0
+ net8.0
This package contains an event repository built with plain old Ado.Net
diff --git a/src/EventStore/NBB.EventStore.AdoNet/NBB.EventStore.AdoNet.csproj b/src/EventStore/NBB.EventStore.AdoNet/NBB.EventStore.AdoNet.csproj
index f2ada179..48e9bcdd 100644
--- a/src/EventStore/NBB.EventStore.AdoNet/NBB.EventStore.AdoNet.csproj
+++ b/src/EventStore/NBB.EventStore.AdoNet/NBB.EventStore.AdoNet.csproj
@@ -8,7 +8,7 @@
- net7.0
+ net8.0
This package contains an event repository built with plain old Ado.Net
diff --git a/src/EventStore/NBB.EventStore.Effects/NBB.EventStore.Effects.csproj b/src/EventStore/NBB.EventStore.Effects/NBB.EventStore.Effects.csproj
index f2a62d75..843009e9 100644
--- a/src/EventStore/NBB.EventStore.Effects/NBB.EventStore.Effects.csproj
+++ b/src/EventStore/NBB.EventStore.Effects/NBB.EventStore.Effects.csproj
@@ -1,7 +1,7 @@
- net7.0
+ net8.0
diff --git a/src/EventStore/NBB.EventStore.InMemory/NBB.EventStore.InMemory.csproj b/src/EventStore/NBB.EventStore.InMemory/NBB.EventStore.InMemory.csproj
index 0907cbaa..d87a277e 100644
--- a/src/EventStore/NBB.EventStore.InMemory/NBB.EventStore.InMemory.csproj
+++ b/src/EventStore/NBB.EventStore.InMemory/NBB.EventStore.InMemory.csproj
@@ -1,7 +1,7 @@
- net7.0
+ net8.0
diff --git a/src/EventStore/NBB.EventStore/NBB.EventStore.csproj b/src/EventStore/NBB.EventStore/NBB.EventStore.csproj
index f488e99c..3dd3f804 100644
--- a/src/EventStore/NBB.EventStore/NBB.EventStore.csproj
+++ b/src/EventStore/NBB.EventStore/NBB.EventStore.csproj
@@ -8,7 +8,7 @@
- net7.0
+ net8.0
This package contains a modest implementation of an event store.
diff --git a/src/EventStore/NBB.SQLStreamStore.Migrations/NBB.SQLStreamStore.Migrations.csproj b/src/EventStore/NBB.SQLStreamStore.Migrations/NBB.SQLStreamStore.Migrations.csproj
index e55d07e0..7bf73aa9 100644
--- a/src/EventStore/NBB.SQLStreamStore.Migrations/NBB.SQLStreamStore.Migrations.csproj
+++ b/src/EventStore/NBB.SQLStreamStore.Migrations/NBB.SQLStreamStore.Migrations.csproj
@@ -9,7 +9,7 @@
Exe
- net7.0
+ net8.0
NBB_SqlStreamStore_Migrations_cc6382af-cd19-4d46-8084-9dca6c4ab82b
diff --git a/src/EventStore/NBB.SQLStreamStore/NBB.SQLStreamStore.csproj b/src/EventStore/NBB.SQLStreamStore/NBB.SQLStreamStore.csproj
index 8819d1ba..8aa2ee20 100644
--- a/src/EventStore/NBB.SQLStreamStore/NBB.SQLStreamStore.csproj
+++ b/src/EventStore/NBB.SQLStreamStore/NBB.SQLStreamStore.csproj
@@ -8,7 +8,7 @@
- net7.0
+ net8.0
diff --git a/src/Http/NBB.Http.Effects/NBB.Http.Effects.csproj b/src/Http/NBB.Http.Effects/NBB.Http.Effects.csproj
index 1596da95..2ef764b7 100644
--- a/src/Http/NBB.Http.Effects/NBB.Http.Effects.csproj
+++ b/src/Http/NBB.Http.Effects/NBB.Http.Effects.csproj
@@ -1,7 +1,7 @@
- net7.0
+ net8.0
diff --git a/src/Messaging/NBB.Messaging.Abstractions/NBB.Messaging.Abstractions.csproj b/src/Messaging/NBB.Messaging.Abstractions/NBB.Messaging.Abstractions.csproj
index 87b6612d..94044b7a 100644
--- a/src/Messaging/NBB.Messaging.Abstractions/NBB.Messaging.Abstractions.csproj
+++ b/src/Messaging/NBB.Messaging.Abstractions/NBB.Messaging.Abstractions.csproj
@@ -7,10 +7,10 @@
SAK
-
- net7.0
- A few lightweight messaging abstractions
-
+
+ net8.0
+ A few lightweight messaging abstractions
+
diff --git a/src/Messaging/NBB.Messaging.BackwardCompatibility/NBB.Messaging.BackwardCompatibility.csproj b/src/Messaging/NBB.Messaging.BackwardCompatibility/NBB.Messaging.BackwardCompatibility.csproj
index 427b3f63..bab06519 100644
--- a/src/Messaging/NBB.Messaging.BackwardCompatibility/NBB.Messaging.BackwardCompatibility.csproj
+++ b/src/Messaging/NBB.Messaging.BackwardCompatibility/NBB.Messaging.BackwardCompatibility.csproj
@@ -1,7 +1,7 @@
- net7.0
+ net8.0
diff --git a/src/Messaging/NBB.Messaging.DataContracts/NBB.Messaging.DataContracts.csproj b/src/Messaging/NBB.Messaging.DataContracts/NBB.Messaging.DataContracts.csproj
index fb677caf..423fa63e 100644
--- a/src/Messaging/NBB.Messaging.DataContracts/NBB.Messaging.DataContracts.csproj
+++ b/src/Messaging/NBB.Messaging.DataContracts/NBB.Messaging.DataContracts.csproj
@@ -1,7 +1,7 @@
- net7.0
+ net8.0
This package helps us formalize and instrument messaging data contracts.
diff --git a/src/Messaging/NBB.Messaging.Effects/NBB.Messaging.Effects.csproj b/src/Messaging/NBB.Messaging.Effects/NBB.Messaging.Effects.csproj
index 2ca8de86..50ef0049 100644
--- a/src/Messaging/NBB.Messaging.Effects/NBB.Messaging.Effects.csproj
+++ b/src/Messaging/NBB.Messaging.Effects/NBB.Messaging.Effects.csproj
@@ -1,7 +1,7 @@
- net7.0
+ net8.0
diff --git a/src/Messaging/NBB.Messaging.Host/Builder/MediatRMessagingHostExtensions.cs b/src/Messaging/NBB.Messaging.Host/Builder/MediatRMessagingHostExtensions.cs
index fe0a58d6..0d3ce25a 100644
--- a/src/Messaging/NBB.Messaging.Host/Builder/MediatRMessagingHostExtensions.cs
+++ b/src/Messaging/NBB.Messaging.Host/Builder/MediatRMessagingHostExtensions.cs
@@ -18,7 +18,7 @@ public static class MediatorMessagingHostBuilderExtensions
private record TypeInfo(Type GenericTypeDef, Func Condition);
private static readonly TypeInfo EventType = new(typeof(INotificationHandler<>), _ => true);
- private static readonly TypeInfo CommandType = new(typeof(IRequestHandler<,>), types => types[1] == typeof(Unit));
+ private static readonly TypeInfo CommandType = new(typeof(IRequestHandler<>), _ => true);
private static readonly TypeInfo QueryType = new(typeof(IRequestHandler<,>), types => types[1] != typeof(Unit));
///
diff --git a/src/Messaging/NBB.Messaging.Host/MessagingPipeline/SchemaMessageValidatorMiddleware.cs b/src/Messaging/NBB.Messaging.Host/MessagingPipeline/SchemaMessageValidatorMiddleware.cs
index 4a767c2a..d5d9a394 100644
--- a/src/Messaging/NBB.Messaging.Host/MessagingPipeline/SchemaMessageValidatorMiddleware.cs
+++ b/src/Messaging/NBB.Messaging.Host/MessagingPipeline/SchemaMessageValidatorMiddleware.cs
@@ -19,10 +19,10 @@ public class SchemaMessageValidatorMiddleware : IPipelineMiddleware next)
{
- if (!context.MessagingEnvelope.Headers.TryGetValue(MessagingHeaders.CorrelationId, out var _))
+ if (!context.MessagingEnvelope.Headers.TryGetValue(MessagingHeaders.CorrelationId, out _))
throw new Exception($"Message of type {context.MessagingEnvelope.Payload.GetType().GetPrettyName()} does not contain {MessagingHeaders.CorrelationId} header.");
- if (!context.MessagingEnvelope.Headers.TryGetValue(MessagingHeaders.Source, out var _))
+ if (!context.MessagingEnvelope.Headers.TryGetValue(MessagingHeaders.Source, out _))
throw new Exception($"Message of type {context.MessagingEnvelope.Payload.GetType().GetPrettyName()} does not contain {MessagingHeaders.Source} header.");
await next();
diff --git a/src/Messaging/NBB.Messaging.Host/NBB.Messaging.Host.csproj b/src/Messaging/NBB.Messaging.Host/NBB.Messaging.Host.csproj
index 2e63f555..1901f5c2 100644
--- a/src/Messaging/NBB.Messaging.Host/NBB.Messaging.Host.csproj
+++ b/src/Messaging/NBB.Messaging.Host/NBB.Messaging.Host.csproj
@@ -1,9 +1,9 @@
-
- net7.0
- Messaging subscriber host
-
+
+ net8.0
+ Messaging subscriber host
+
diff --git a/src/Messaging/NBB.Messaging.InProcessMessaging/Internal/Storage.cs b/src/Messaging/NBB.Messaging.InProcessMessaging/Internal/Storage.cs
index 6fa83fc0..90a78d62 100644
--- a/src/Messaging/NBB.Messaging.InProcessMessaging/Internal/Storage.cs
+++ b/src/Messaging/NBB.Messaging.InProcessMessaging/Internal/Storage.cs
@@ -57,7 +57,7 @@ public async Task AddSubscription(string topic, Func
await Task.Yield();
var cts = CancellationTokenSource.CreateLinkedTokenSource(cancellationToken);
- var _ = Task.Run(async () => { await StartBroker(topic, handler, cts.Token); }, cts.Token);
+ _ = Task.Run(async () => { await StartBroker(topic, handler, cts.Token); }, cts.Token);
return new DelegateDisposable(() =>
{
cts.Cancel();
diff --git a/src/Messaging/NBB.Messaging.InProcessMessaging/NBB.Messaging.InProcessMessaging.csproj b/src/Messaging/NBB.Messaging.InProcessMessaging/NBB.Messaging.InProcessMessaging.csproj
index 24422fe6..1f82719e 100644
--- a/src/Messaging/NBB.Messaging.InProcessMessaging/NBB.Messaging.InProcessMessaging.csproj
+++ b/src/Messaging/NBB.Messaging.InProcessMessaging/NBB.Messaging.InProcessMessaging.csproj
@@ -8,7 +8,7 @@
- net7.0
+ net8.0
InProcessMessaging provides in process comunication for Monolithic applications composed from decoupled bounded contexts
diff --git a/src/Messaging/NBB.Messaging.JetStream/NBB.Messaging.JetStream.csproj b/src/Messaging/NBB.Messaging.JetStream/NBB.Messaging.JetStream.csproj
index c2d1fb63..9b5a2db4 100644
--- a/src/Messaging/NBB.Messaging.JetStream/NBB.Messaging.JetStream.csproj
+++ b/src/Messaging/NBB.Messaging.JetStream/NBB.Messaging.JetStream.csproj
@@ -8,7 +8,7 @@
- net7.0
+ net8.0
Nats JetStream messaging
@@ -19,7 +19,7 @@
-
+
diff --git a/src/Messaging/NBB.Messaging.MultiTenancy/NBB.Messaging.MultiTenancy.csproj b/src/Messaging/NBB.Messaging.MultiTenancy/NBB.Messaging.MultiTenancy.csproj
index 156e8c3b..1db817d0 100644
--- a/src/Messaging/NBB.Messaging.MultiTenancy/NBB.Messaging.MultiTenancy.csproj
+++ b/src/Messaging/NBB.Messaging.MultiTenancy/NBB.Messaging.MultiTenancy.csproj
@@ -1,7 +1,7 @@
- net7.0
+ net8.0
diff --git a/src/Messaging/NBB.Messaging.Nats/NBB.Messaging.Nats.csproj b/src/Messaging/NBB.Messaging.Nats/NBB.Messaging.Nats.csproj
index d2fc424c..bf6ea618 100644
--- a/src/Messaging/NBB.Messaging.Nats/NBB.Messaging.Nats.csproj
+++ b/src/Messaging/NBB.Messaging.Nats/NBB.Messaging.Nats.csproj
@@ -8,7 +8,7 @@
- net7.0
+ net8.0
Nats messaging
@@ -23,7 +23,7 @@
-
+
diff --git a/src/Messaging/NBB.Messaging.Noop/NBB.Messaging.Noop.csproj b/src/Messaging/NBB.Messaging.Noop/NBB.Messaging.Noop.csproj
index 8dd5b22b..ba6ccb67 100644
--- a/src/Messaging/NBB.Messaging.Noop/NBB.Messaging.Noop.csproj
+++ b/src/Messaging/NBB.Messaging.Noop/NBB.Messaging.Noop.csproj
@@ -8,7 +8,7 @@
- net7.0
+ net8.0
Noop messaging
diff --git a/src/Messaging/NBB.Messaging.OpenTelemetry/NBB.Messaging.OpenTelemetry.csproj b/src/Messaging/NBB.Messaging.OpenTelemetry/NBB.Messaging.OpenTelemetry.csproj
index 4a08e84e..f53ccf13 100644
--- a/src/Messaging/NBB.Messaging.OpenTelemetry/NBB.Messaging.OpenTelemetry.csproj
+++ b/src/Messaging/NBB.Messaging.OpenTelemetry/NBB.Messaging.OpenTelemetry.csproj
@@ -1,7 +1,7 @@
- net7.0
+ net8.0
diff --git a/src/Messaging/NBB.Messaging.Rusi/NBB.Messaging.Rusi.csproj b/src/Messaging/NBB.Messaging.Rusi/NBB.Messaging.Rusi.csproj
index a8fbc336..e841b7cf 100644
--- a/src/Messaging/NBB.Messaging.Rusi/NBB.Messaging.Rusi.csproj
+++ b/src/Messaging/NBB.Messaging.Rusi/NBB.Messaging.Rusi.csproj
@@ -1,46 +1,46 @@
-
- SAK
- SAK
- SAK
- SAK
-
-
-
- net7.0
- Rusi client transport
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- all
- runtime; build; native; contentfiles; analyzers; buildtransitive
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- <_Parameter1>$(AssemblyName).Tests
-
-
+
+ SAK
+ SAK
+ SAK
+ SAK
+
+
+
+ net8.0
+ Rusi client transport
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <_Parameter1>$(AssemblyName).Tests
+
+
diff --git a/src/MultiTenancy/NBB.MultiTenancy.Abstractions/NBB.MultiTenancy.Abstractions.csproj b/src/MultiTenancy/NBB.MultiTenancy.Abstractions/NBB.MultiTenancy.Abstractions.csproj
index d69fcb9b..6b3d800d 100644
--- a/src/MultiTenancy/NBB.MultiTenancy.Abstractions/NBB.MultiTenancy.Abstractions.csproj
+++ b/src/MultiTenancy/NBB.MultiTenancy.Abstractions/NBB.MultiTenancy.Abstractions.csproj
@@ -1,7 +1,7 @@
- net7.0
+ net8.0
diff --git a/src/MultiTenancy/NBB.MultiTenancy.AspNet/NBB.MultiTenancy.AspNet.csproj b/src/MultiTenancy/NBB.MultiTenancy.AspNet/NBB.MultiTenancy.AspNet.csproj
index 670a323e..51d06253 100644
--- a/src/MultiTenancy/NBB.MultiTenancy.AspNet/NBB.MultiTenancy.AspNet.csproj
+++ b/src/MultiTenancy/NBB.MultiTenancy.AspNet/NBB.MultiTenancy.AspNet.csproj
@@ -1,7 +1,7 @@
- net7.0
+ net8.0
diff --git a/src/MultiTenancy/NBB.MultiTenancy.Identification.Http/NBB.MultiTenancy.Identification.Http.csproj b/src/MultiTenancy/NBB.MultiTenancy.Identification.Http/NBB.MultiTenancy.Identification.Http.csproj
index e905d4bb..abfe22dd 100644
--- a/src/MultiTenancy/NBB.MultiTenancy.Identification.Http/NBB.MultiTenancy.Identification.Http.csproj
+++ b/src/MultiTenancy/NBB.MultiTenancy.Identification.Http/NBB.MultiTenancy.Identification.Http.csproj
@@ -1,7 +1,7 @@
- net7.0
+ net8.0
diff --git a/src/MultiTenancy/NBB.MultiTenancy.Identification.Messaging/NBB.MultiTenancy.Identification.Messaging.csproj b/src/MultiTenancy/NBB.MultiTenancy.Identification.Messaging/NBB.MultiTenancy.Identification.Messaging.csproj
index 197d6697..8298478c 100644
--- a/src/MultiTenancy/NBB.MultiTenancy.Identification.Messaging/NBB.MultiTenancy.Identification.Messaging.csproj
+++ b/src/MultiTenancy/NBB.MultiTenancy.Identification.Messaging/NBB.MultiTenancy.Identification.Messaging.csproj
@@ -1,7 +1,7 @@
- net7.0
+ net8.0
diff --git a/src/MultiTenancy/NBB.MultiTenancy.Identification/NBB.MultiTenancy.Identification.csproj b/src/MultiTenancy/NBB.MultiTenancy.Identification/NBB.MultiTenancy.Identification.csproj
index fe0285a1..2377ece1 100644
--- a/src/MultiTenancy/NBB.MultiTenancy.Identification/NBB.MultiTenancy.Identification.csproj
+++ b/src/MultiTenancy/NBB.MultiTenancy.Identification/NBB.MultiTenancy.Identification.csproj
@@ -1,7 +1,7 @@
- net7.0
+ net8.0
diff --git a/src/Orchestration/NBB.ProcessManager.Definition/NBB.ProcessManager.Definition.csproj b/src/Orchestration/NBB.ProcessManager.Definition/NBB.ProcessManager.Definition.csproj
index 250ec990..76079de6 100644
--- a/src/Orchestration/NBB.ProcessManager.Definition/NBB.ProcessManager.Definition.csproj
+++ b/src/Orchestration/NBB.ProcessManager.Definition/NBB.ProcessManager.Definition.csproj
@@ -1,14 +1,14 @@
- net7.0
+ net8.0
Process manager definition builder.
-
+
diff --git a/src/Orchestration/NBB.ProcessManager.Runtime/NBB.ProcessManager.Runtime.csproj b/src/Orchestration/NBB.ProcessManager.Runtime/NBB.ProcessManager.Runtime.csproj
index 4a3a960e..7c09a717 100644
--- a/src/Orchestration/NBB.ProcessManager.Runtime/NBB.ProcessManager.Runtime.csproj
+++ b/src/Orchestration/NBB.ProcessManager.Runtime/NBB.ProcessManager.Runtime.csproj
@@ -1,7 +1,7 @@
- net7.0
+ net8.0
diff --git a/src/Projections/NBB.ProjectR/NBB.ProjectR.csproj b/src/Projections/NBB.ProjectR/NBB.ProjectR.csproj
index df2fd21d..2ed25d98 100644
--- a/src/Projections/NBB.ProjectR/NBB.ProjectR.csproj
+++ b/src/Projections/NBB.ProjectR/NBB.ProjectR.csproj
@@ -1,7 +1,7 @@
- net7.0
+ net8.0
diff --git a/src/Tools/Serilog/NBB.Tools.Serilog.Enrichers.ServiceIdentifier/NBB.Tools.Serilog.Enrichers.ServiceIdentifier.csproj b/src/Tools/Serilog/NBB.Tools.Serilog.Enrichers.ServiceIdentifier/NBB.Tools.Serilog.Enrichers.ServiceIdentifier.csproj
index 924c55ea..e3f80723 100644
--- a/src/Tools/Serilog/NBB.Tools.Serilog.Enrichers.ServiceIdentifier/NBB.Tools.Serilog.Enrichers.ServiceIdentifier.csproj
+++ b/src/Tools/Serilog/NBB.Tools.Serilog.Enrichers.ServiceIdentifier/NBB.Tools.Serilog.Enrichers.ServiceIdentifier.csproj
@@ -1,7 +1,7 @@
- net7.0
+ net8.0
diff --git a/src/Tools/Serilog/NBB.Tools.Serilog.Enrichers.TenantId/NBB.Tools.Serilog.Enrichers.TenantId.csproj b/src/Tools/Serilog/NBB.Tools.Serilog.Enrichers.TenantId/NBB.Tools.Serilog.Enrichers.TenantId.csproj
index a0ab01d8..6b2a128f 100644
--- a/src/Tools/Serilog/NBB.Tools.Serilog.Enrichers.TenantId/NBB.Tools.Serilog.Enrichers.TenantId.csproj
+++ b/src/Tools/Serilog/NBB.Tools.Serilog.Enrichers.TenantId/NBB.Tools.Serilog.Enrichers.TenantId.csproj
@@ -1,7 +1,7 @@
- net7.0
+ net8.0
diff --git a/src/Tools/Serilog/NBB.Tools.Serilog.OpenTelemetryTracingSink/NBB.Tools.Serilog.OpenTelemetryTracingSink.csproj b/src/Tools/Serilog/NBB.Tools.Serilog.OpenTelemetryTracingSink/NBB.Tools.Serilog.OpenTelemetryTracingSink.csproj
index d4e2fd6b..256fe835 100644
--- a/src/Tools/Serilog/NBB.Tools.Serilog.OpenTelemetryTracingSink/NBB.Tools.Serilog.OpenTelemetryTracingSink.csproj
+++ b/src/Tools/Serilog/NBB.Tools.Serilog.OpenTelemetryTracingSink/NBB.Tools.Serilog.OpenTelemetryTracingSink.csproj
@@ -1,7 +1,7 @@
- net7.0
+ net8.0
diff --git a/test/Benchmarks/EffectsBenchmarks/EffectsBenchmarks/EffectBenchmark.fs b/test/Benchmarks/EffectsBenchmarks/EffectsBenchmarks/EffectBenchmark.fs
index bfabb434..3e556b7f 100644
--- a/test/Benchmarks/EffectsBenchmarks/EffectsBenchmarks/EffectBenchmark.fs
+++ b/test/Benchmarks/EffectsBenchmarks/EffectsBenchmarks/EffectBenchmark.fs
@@ -7,7 +7,7 @@ open BenchmarkDotNet.Attributes
open NBB.Core.Effects.FSharp
open NBB.Core.Effects.FSharp.Interpreter
-[]
+[]
type Benchmark() =
let interpreter = createInterpreter()
diff --git a/test/Benchmarks/EffectsBenchmarks/EffectsBenchmarks/EffectsBenchmarks.fsproj b/test/Benchmarks/EffectsBenchmarks/EffectsBenchmarks/EffectsBenchmarks.fsproj
index ccdaf82a..29cb6a8d 100644
--- a/test/Benchmarks/EffectsBenchmarks/EffectsBenchmarks/EffectsBenchmarks.fsproj
+++ b/test/Benchmarks/EffectsBenchmarks/EffectsBenchmarks/EffectsBenchmarks.fsproj
@@ -2,7 +2,7 @@
Exe
- net7.0
+ net8.0
diff --git a/test/Benchmarks/EventStoreBenchmarks/EventRepositoryBenchmark.cs b/test/Benchmarks/EventStoreBenchmarks/EventRepositoryBenchmark.cs
index e542c97b..283873d2 100644
--- a/test/Benchmarks/EventStoreBenchmarks/EventRepositoryBenchmark.cs
+++ b/test/Benchmarks/EventStoreBenchmarks/EventRepositoryBenchmark.cs
@@ -14,7 +14,7 @@
namespace TheBenchmarks
{
- [SimpleJob(launchCount: 1, warmupCount: 0, targetCount: 10)]
+ [SimpleJob(launchCount: 1, warmupCount: 0, iterationCount: 10)]
public class EventRepositoryBenchmark
{
private IServiceProvider _container;
diff --git a/test/Benchmarks/EventStoreBenchmarks/EventSourcedRepositoryBenchmark.cs b/test/Benchmarks/EventStoreBenchmarks/EventSourcedRepositoryBenchmark.cs
index cdf419e3..972055ff 100644
--- a/test/Benchmarks/EventStoreBenchmarks/EventSourcedRepositoryBenchmark.cs
+++ b/test/Benchmarks/EventStoreBenchmarks/EventSourcedRepositoryBenchmark.cs
@@ -1,316 +1,316 @@
// Copyright (c) TotalSoft.
// This source code is licensed under the MIT license.
-using BenchmarkDotNet.Attributes;
-using Microsoft.Extensions.Configuration;
-using Microsoft.Extensions.DependencyInjection;
-using NBB.Core.Abstractions;
-using NBB.EventStore.AdoNet.Migrations;
-using System;
-using System.Collections.Generic;
-using System.IO;
-using System.Linq;
-using NBB.Data.Abstractions;
-using NBB.Domain;
+using BenchmarkDotNet.Attributes;
+using Microsoft.Extensions.Configuration;
+using Microsoft.Extensions.DependencyInjection;
+using NBB.Core.Abstractions;
+using NBB.EventStore.AdoNet.Migrations;
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using NBB.Data.Abstractions;
+using NBB.Domain;
using System.Reflection;
using MediatR;
-namespace TheBenchmarks
-{
- //[SimpleJob(runStrategy:RunStrategy.ColdStart, launchCount: 2, warmupCount: 0, targetCount: 5)]
- //[SimpleJob(runStrategy:RunStrategy.ColdStart, launchCount: 10, warmupCount: 0, targetCount: 1)]
- [SimpleJob(launchCount: 1, warmupCount: 0, targetCount: 10)]
- [RPlotExporter, RankColumn]
- public class EventSourcedRepositoryBenchmark
- {
- private IServiceProvider _container;
+namespace TheBenchmarks
+{
+ //[SimpleJob(runStrategy:RunStrategy.ColdStart, launchCount: 2, warmupCount: 0, targetCount: 5)]
+ //[SimpleJob(runStrategy:RunStrategy.ColdStart, launchCount: 10, warmupCount: 0, targetCount: 1)]
+ [SimpleJob(launchCount: 1, warmupCount: 0, iterationCount: 10)]
+ [RPlotExporter, RankColumn]
+ public class EventSourcedRepositoryBenchmark
+ {
+ private IServiceProvider _container;
private TestAggregate _loadedAggregate;
- private readonly Guid _loadTestAggregateId = Guid.NewGuid();
-
- private const int _snapshotFrequency = 10;
- private const bool _useJunkData = false;
- private const int _junkDataAggregates = 100;
- private const int _junkDataEventsPerAggregate = 1000;
-
- [Params(10, 100, 1000)]
- public int NumberOfEvents { get; set; }
-
- public void GlobalSetup(bool withSnapshot)
- {
- MigrateNBBEventStore();
-
- _container = BuildServiceProvider(services =>
- {
- services.AddEventSourcingDataAccess((sp, builder) => builder.Options.DefaultSnapshotVersionFrequency = _snapshotFrequency);
-
- if (withSnapshot)
- services.AddEventSourcedRepository();
- else
- services.AddEventSourcedRepository();
- });
-
- if (withSnapshot)
- SeedEventRepository(_useJunkData);
- else
- SeedEventRepository(_useJunkData);
- }
-
- [GlobalSetup(Target = nameof(LoadAggregateWithoutSnapshot))]
- public void GlobalSetupLoadAggregateWithoutSnapshot()
- {
- GlobalSetup(false);
- //LoadAggregate();
- //TryLoadRandomAggregate();
- }
-
- [GlobalSetup(Target = nameof(LoadAndSaveAggregateWithoutSnapshot))]
- public void GlobalSetupLoadAndSaveAggregateWithoutSnapshot()
- {
- GlobalSetup(false);
- //LoadAndSaveAggregateWithoutSnapshot();
- }
-
- [GlobalSetup(Target = nameof(SaveAggregateWithoutSnapshot))]
- public void GlobalSetupSaveAggregateWithoutSnapshot()
- {
- GlobalSetup(false);
- }
-
- [GlobalSetup(Target = nameof(LoadAggregateWithSnapshot))]
- public void GlobalSetupLoadAggregateWithSnapshot()
- {
- GlobalSetup(true);
- //LoadAggregate();
- //TryLoadRandomAggregate();
+ private readonly Guid _loadTestAggregateId = Guid.NewGuid();
+
+ private const int _snapshotFrequency = 10;
+ private const bool _useJunkData = false;
+ private const int _junkDataAggregates = 100;
+ private const int _junkDataEventsPerAggregate = 1000;
+
+ [Params(10, 100, 1000)]
+ public int NumberOfEvents { get; set; }
+
+ public void GlobalSetup(bool withSnapshot)
+ {
+ MigrateNBBEventStore();
+
+ _container = BuildServiceProvider(services =>
+ {
+ services.AddEventSourcingDataAccess((sp, builder) => builder.Options.DefaultSnapshotVersionFrequency = _snapshotFrequency);
+
+ if (withSnapshot)
+ services.AddEventSourcedRepository();
+ else
+ services.AddEventSourcedRepository();
+ });
+
+ if (withSnapshot)
+ SeedEventRepository(_useJunkData);
+ else
+ SeedEventRepository(_useJunkData);
}
- [GlobalSetup(Target = nameof(LoadAndSaveAggregateWithSnapshot))]
- public void GlobalSetupLoadAndSaveAggregateWithSnapshot()
- {
- GlobalSetup(true);
- //LoadAndSaveAggregateWithSnapshot();
- }
-
- [GlobalSetup(Target = nameof(SaveAggregateWithSnapshot))]
- public void GlobalSetupSaveAggregateWithSnapshot()
- {
- GlobalSetup(true);
+ [GlobalSetup(Target = nameof(LoadAggregateWithoutSnapshot))]
+ public void GlobalSetupLoadAggregateWithoutSnapshot()
+ {
+ GlobalSetup(false);
+ //LoadAggregate();
+ //TryLoadRandomAggregate();
+ }
+
+ [GlobalSetup(Target = nameof(LoadAndSaveAggregateWithoutSnapshot))]
+ public void GlobalSetupLoadAndSaveAggregateWithoutSnapshot()
+ {
+ GlobalSetup(false);
+ //LoadAndSaveAggregateWithoutSnapshot();
+ }
+
+ [GlobalSetup(Target = nameof(SaveAggregateWithoutSnapshot))]
+ public void GlobalSetupSaveAggregateWithoutSnapshot()
+ {
+ GlobalSetup(false);
+ }
+
+ [GlobalSetup(Target = nameof(LoadAggregateWithSnapshot))]
+ public void GlobalSetupLoadAggregateWithSnapshot()
+ {
+ GlobalSetup(true);
+ //LoadAggregate();
+ //TryLoadRandomAggregate();
+ }
+
+ [GlobalSetup(Target = nameof(LoadAndSaveAggregateWithSnapshot))]
+ public void GlobalSetupLoadAndSaveAggregateWithSnapshot()
+ {
+ GlobalSetup(true);
+ //LoadAndSaveAggregateWithSnapshot();
+ }
+
+ [GlobalSetup(Target = nameof(SaveAggregateWithSnapshot))]
+ public void GlobalSetupSaveAggregateWithSnapshot()
+ {
+ GlobalSetup(true);
}
//[Benchmark]
- public void LoadAggregateWithoutSnapshot()
- {
- LoadAggregate();
- }
-
- //[Benchmark]
- public void LoadAggregateWithSnapshot()
- {
- LoadAggregate();
- }
-
- [Benchmark]
- public void LoadAndSaveAggregateWithSnapshot()
- {
- var aggregate = LoadAggregate();
- SaveAggregate(aggregate);
- }
-
- [Benchmark]
- public void LoadAndSaveAggregateWithoutSnapshot()
- {
- var aggregate = LoadAggregate();
- SaveAggregate(aggregate);
- }
-
- //[Benchmark]
- public void SaveAggregateWithSnapshot()
- {
- SaveAggregate((TestSnapshotAggregate)_loadedAggregate);
- }
-
- //[Benchmark]
- public void SaveAggregateWithoutSnapshot()
- {
- SaveAggregate(_loadedAggregate);
- }
-
- public TAggregateRoot LoadAggregate() where TAggregateRoot : TestAggregate
- {
- using var scope = _container.CreateScope();
- var repository = scope.ServiceProvider.GetService>();
- var aggregate = repository.GetByIdAsync(_loadTestAggregateId, default).GetAwaiter().GetResult();
-
- if (aggregate?.AggregateId == default(Guid))
- aggregate.AggregateId = _loadTestAggregateId;
-
- return aggregate;
- }
-
- public void TryLoadRandomAggregate() where TAggregateRoot : TestAggregate
- {
- using var scope = _container.CreateScope();
- var repository = scope.ServiceProvider.GetService>();
- var aggregate = repository.GetByIdAsync(Guid.NewGuid(), default).GetAwaiter().GetResult();
- }
-
- public void SaveAggregate(TAggregateRoot aggregate) where TAggregateRoot : TestAggregate, new()
- {
- using var scope = _container.CreateScope();
- var repository = scope.ServiceProvider.GetService>();
- aggregate.DoAction($"Event {Guid.NewGuid()}");
- aggregate.DoAction($"Event {Guid.NewGuid()}");
- repository.SaveAsync(aggregate).GetAwaiter().GetResult();
- _loadedAggregate = aggregate;
- }
-
- private void SeedEventRepository(bool useJunkData = false) where TAggregateRoot : TestAggregate, new()
- {
- if (useJunkData)
- {
- SeedJunkData();
- }
-
- SeedAggregates(NumberOfEvents, _loadTestAggregateId);
- }
-
- private void SeedJunkData() where TAggregateRoot : TestAggregate, new()
- {
- var aggregateIds = Enumerable.Range(0, _junkDataAggregates).Select(x => Guid.NewGuid()).ToArray();
-
- SeedAggregates(_junkDataEventsPerAggregate, aggregateIds);
- }
-
- private void SeedAggregates(int eventNo, params Guid[] aggregateIds) where TAggregateRoot : TestAggregate, new()
- {
- using var scope = _container.CreateScope();
- var repository = scope.ServiceProvider.GetService>();
-
- foreach (var aggregateId in aggregateIds)
- {
- var aggregate = new TAggregateRoot() { AggregateId = aggregateId };
- for (int i = 0; i < eventNo; i++)
- {
- aggregate.DoAction($"Value {i + 1}");
-
- if ((i + 1) % _snapshotFrequency == 0)
- repository.SaveAsync(aggregate).GetAwaiter().GetResult();
- }
-
- repository.SaveAsync(aggregate).GetAwaiter().GetResult();
-
- aggregate.DoAction($"AdditionlValue 1");
- aggregate.DoAction($"AdditionlValue 2");
- aggregate.DoAction($"AdditionlValue 3");
-
- repository.SaveAsync(aggregate).GetAwaiter().GetResult();
-
- if (aggregateId == _loadTestAggregateId)
- _loadedAggregate = aggregate;
- }
- }
-
- private static void MigrateNBBEventStore()
- {
- new AdoNetEventStoreDatabaseMigrator().ReCreateDatabaseObjects(default).Wait();
- }
-
- private static TestEvent GetATestEvent()
- {
- return new TestEvent("Lorem ipsum");
- }
-
- private static IServiceProvider BuildServiceProvider(Action addEventStoreAction)
- {
- var configurationBuilder = new ConfigurationBuilder()
- .SetBasePath(Directory.GetCurrentDirectory())
- .AddJsonFile("appsettings.json", optional: false, reloadOnChange: true);
-
- var environment = Environment.GetEnvironmentVariable("DOTNET_ENVIRONMENT");
- var isDevelopment = string.Equals(environment, "development", StringComparison.OrdinalIgnoreCase);
-
- if (isDevelopment)
- {
- configurationBuilder.AddUserSecrets(Assembly.GetExecutingAssembly());
- }
-
- var configuration = configurationBuilder.Build();
-
- var services = new ServiceCollection();
- services.AddSingleton(configuration);
- services.AddLogging();
-
- services.AddMediatR(typeof(Program).Assembly);
-
+ public void LoadAggregateWithoutSnapshot()
+ {
+ LoadAggregate();
+ }
+
+ //[Benchmark]
+ public void LoadAggregateWithSnapshot()
+ {
+ LoadAggregate();
+ }
+
+ [Benchmark]
+ public void LoadAndSaveAggregateWithSnapshot()
+ {
+ var aggregate = LoadAggregate();
+ SaveAggregate(aggregate);
+ }
+
+ [Benchmark]
+ public void LoadAndSaveAggregateWithoutSnapshot()
+ {
+ var aggregate = LoadAggregate();
+ SaveAggregate(aggregate);
+ }
+
+ //[Benchmark]
+ public void SaveAggregateWithSnapshot()
+ {
+ SaveAggregate((TestSnapshotAggregate)_loadedAggregate);
+ }
+
+ //[Benchmark]
+ public void SaveAggregateWithoutSnapshot()
+ {
+ SaveAggregate(_loadedAggregate);
+ }
+
+ public TAggregateRoot LoadAggregate() where TAggregateRoot : TestAggregate
+ {
+ using var scope = _container.CreateScope();
+ var repository = scope.ServiceProvider.GetService>();
+ var aggregate = repository.GetByIdAsync(_loadTestAggregateId, default).GetAwaiter().GetResult();
+
+ if (aggregate?.AggregateId == default(Guid))
+ aggregate.AggregateId = _loadTestAggregateId;
+
+ return aggregate;
+ }
+
+ public void TryLoadRandomAggregate() where TAggregateRoot : TestAggregate
+ {
+ using var scope = _container.CreateScope();
+ var repository = scope.ServiceProvider.GetService>();
+ var aggregate = repository.GetByIdAsync(Guid.NewGuid(), default).GetAwaiter().GetResult();
+ }
+
+ public void SaveAggregate(TAggregateRoot aggregate) where TAggregateRoot : TestAggregate, new()
+ {
+ using var scope = _container.CreateScope();
+ var repository = scope.ServiceProvider.GetService>();
+ aggregate.DoAction($"Event {Guid.NewGuid()}");
+ aggregate.DoAction($"Event {Guid.NewGuid()}");
+ repository.SaveAsync(aggregate).GetAwaiter().GetResult();
+ _loadedAggregate = aggregate;
+ }
+
+ private void SeedEventRepository(bool useJunkData = false) where TAggregateRoot : TestAggregate, new()
+ {
+ if (useJunkData)
+ {
+ SeedJunkData();
+ }
+
+ SeedAggregates(NumberOfEvents, _loadTestAggregateId);
+ }
+
+ private void SeedJunkData() where TAggregateRoot : TestAggregate, new()
+ {
+ var aggregateIds = Enumerable.Range(0, _junkDataAggregates).Select(x => Guid.NewGuid()).ToArray();
+
+ SeedAggregates(_junkDataEventsPerAggregate, aggregateIds);
+ }
+
+ private void SeedAggregates(int eventNo, params Guid[] aggregateIds) where TAggregateRoot : TestAggregate, new()
+ {
+ using var scope = _container.CreateScope();
+ var repository = scope.ServiceProvider.GetService>();
+
+ foreach (var aggregateId in aggregateIds)
+ {
+ var aggregate = new TAggregateRoot() { AggregateId = aggregateId };
+ for (int i = 0; i < eventNo; i++)
+ {
+ aggregate.DoAction($"Value {i + 1}");
+
+ if ((i + 1) % _snapshotFrequency == 0)
+ repository.SaveAsync(aggregate).GetAwaiter().GetResult();
+ }
+
+ repository.SaveAsync(aggregate).GetAwaiter().GetResult();
+
+ aggregate.DoAction($"AdditionlValue 1");
+ aggregate.DoAction($"AdditionlValue 2");
+ aggregate.DoAction($"AdditionlValue 3");
+
+ repository.SaveAsync(aggregate).GetAwaiter().GetResult();
+
+ if (aggregateId == _loadTestAggregateId)
+ _loadedAggregate = aggregate;
+ }
+ }
+
+ private static void MigrateNBBEventStore()
+ {
+ new AdoNetEventStoreDatabaseMigrator().ReCreateDatabaseObjects(default).Wait();
+ }
+
+ private static TestEvent GetATestEvent()
+ {
+ return new TestEvent("Lorem ipsum");
+ }
+
+ private static IServiceProvider BuildServiceProvider(Action addEventStoreAction)
+ {
+ var configurationBuilder = new ConfigurationBuilder()
+ .SetBasePath(Directory.GetCurrentDirectory())
+ .AddJsonFile("appsettings.json", optional: false, reloadOnChange: true);
+
+ var environment = Environment.GetEnvironmentVariable("DOTNET_ENVIRONMENT");
+ var isDevelopment = string.Equals(environment, "development", StringComparison.OrdinalIgnoreCase);
+
+ if (isDevelopment)
+ {
+ configurationBuilder.AddUserSecrets(Assembly.GetExecutingAssembly());
+ }
+
+ var configuration = configurationBuilder.Build();
+
+ var services = new ServiceCollection();
+ services.AddSingleton(configuration);
+ services.AddLogging();
+
+ services.AddMediatR(cfg => cfg.RegisterServicesFromAssemblyContaining());
+
services.AddEventStore(es =>
{
es.UseNewtownsoftJson();
es.UseAdoNetEventRepository(opts => opts.FromConfiguration());
- });
-
- addEventStoreAction(services);
-
- var container = services.BuildServiceProvider();
- return container;
- }
-
- public record TestEvent(string Prop);
-
- public class TestAggregate : EventSourcedAggregateRoot
+ });
+
+ addEventStoreAction(services);
+
+ var container = services.BuildServiceProvider();
+ return container;
+ }
+
+ public record TestEvent(string Prop);
+
+ public class TestAggregate : EventSourcedAggregateRoot
{
- public Guid AggregateId { get; set; }
-
+ public Guid AggregateId { get; set; }
+
protected List State { get; set; } = new List();
- public string Prop1 { get; protected set; }
-
- public override Guid GetIdentityValue()
- {
- return AggregateId;
- }
-
- public void DoAction(string prop)
- {
- Emit(new TestEvent(prop));
- }
-
- private void Apply(TestEvent testEvent)
- {
- if (State.Count > 100)
- State.Clear();
-
- State.Add(testEvent.Prop);
- }
- }
-
- public class TestSnapshotAggregate : TestAggregate, IMementoProvider
- {
- public void SetMemento(TestSnapshot memento)
- {
- AggregateId = memento.AggregateId;
- State = memento.State.ToList();
- }
-
- public TestSnapshot CreateMemento()
- {
- return new TestSnapshot(AggregateId, State.ToList());
- }
-
- void IMementoProvider.SetMemento(object memento) => SetMemento((TestSnapshot)memento);
- object IMementoProvider.CreateMemento() => CreateMemento();
+ public string Prop1 { get; protected set; }
+
+ public override Guid GetIdentityValue()
+ {
+ return AggregateId;
+ }
+
+ public void DoAction(string prop)
+ {
+ Emit(new TestEvent(prop));
+ }
+
+ private void Apply(TestEvent testEvent)
+ {
+ if (State.Count > 100)
+ State.Clear();
+
+ State.Add(testEvent.Prop);
+ }
+ }
+
+ public class TestSnapshotAggregate : TestAggregate, IMementoProvider
+ {
+ public void SetMemento(TestSnapshot memento)
+ {
+ AggregateId = memento.AggregateId;
+ State = memento.State.ToList();
+ }
+
+ public TestSnapshot CreateMemento()
+ {
+ return new TestSnapshot(AggregateId, State.ToList());
+ }
+
+ void IMementoProvider.SetMemento(object memento) => SetMemento((TestSnapshot)memento);
+ object IMementoProvider.CreateMemento() => CreateMemento();
}
- public class TestSnapshot
- {
- public Guid AggregateId { get; }
- public IEnumerable State { get; }
-
- public TestSnapshot(Guid aggregateId, IEnumerable state)
- {
- AggregateId = aggregateId;
- State = state;
- }
- }
- }
-}
+ public class TestSnapshot
+ {
+ public Guid AggregateId { get; }
+ public IEnumerable State { get; }
+
+ public TestSnapshot(Guid aggregateId, IEnumerable state)
+ {
+ AggregateId = aggregateId;
+ State = state;
+ }
+ }
+ }
+}
diff --git a/test/Benchmarks/EventStoreBenchmarks/EventStoreBenchmark.cs b/test/Benchmarks/EventStoreBenchmarks/EventStoreBenchmark.cs
index b6ed9167..3b2b2ae4 100644
--- a/test/Benchmarks/EventStoreBenchmarks/EventStoreBenchmark.cs
+++ b/test/Benchmarks/EventStoreBenchmarks/EventStoreBenchmark.cs
@@ -22,7 +22,7 @@ namespace TheBenchmarks
public record TestEvent(Guid EventId, Guid? CorrelationId) : INotification;
- [SimpleJob(launchCount: 1, warmupCount: 0, targetCount: 10)]
+ [SimpleJob(launchCount: 1, warmupCount: 0, iterationCount: 10)]
public class EventStoreBenchmark
{
private IServiceProvider _container;
diff --git a/test/Benchmarks/EventStoreBenchmarks/EventStoreBenchmarks.csproj b/test/Benchmarks/EventStoreBenchmarks/EventStoreBenchmarks.csproj
index 1dce1b44..9d1fec9c 100644
--- a/test/Benchmarks/EventStoreBenchmarks/EventStoreBenchmarks.csproj
+++ b/test/Benchmarks/EventStoreBenchmarks/EventStoreBenchmarks.csproj
@@ -9,7 +9,7 @@
Exe
- net7.0
+ net8.0
NBB_TheBenchmarks_4e36178d-da86-4206-8332-54c8f5bb818b
@@ -34,7 +34,7 @@
-
+
diff --git a/test/Integration/NBB.EventStore.IntegrationTests/NBB.EventStore.IntegrationTests.csproj b/test/Integration/NBB.EventStore.IntegrationTests/NBB.EventStore.IntegrationTests.csproj
index 3f8f5421..b81544d5 100644
--- a/test/Integration/NBB.EventStore.IntegrationTests/NBB.EventStore.IntegrationTests.csproj
+++ b/test/Integration/NBB.EventStore.IntegrationTests/NBB.EventStore.IntegrationTests.csproj
@@ -9,7 +9,7 @@
Library
- net7.0
+ net8.0
NBB_EventStoreIntegrationTests_1b7f48bb-0e9a-4219-b794-1788abaf788e
diff --git a/test/Integration/NBB.Messaging.Rusi.IntegrationTests/NBB.Messaging.Rusi.IntegrationTests.csproj b/test/Integration/NBB.Messaging.Rusi.IntegrationTests/NBB.Messaging.Rusi.IntegrationTests.csproj
index d134df8b..d8f40e0c 100644
--- a/test/Integration/NBB.Messaging.Rusi.IntegrationTests/NBB.Messaging.Rusi.IntegrationTests.csproj
+++ b/test/Integration/NBB.Messaging.Rusi.IntegrationTests/NBB.Messaging.Rusi.IntegrationTests.csproj
@@ -1,7 +1,7 @@
- net7.0
+ net8.0
enable
enable
@@ -35,7 +35,7 @@
runtime; build; native; contentfiles; analyzers; buildtransitive
all
-
+
runtime; build; native; contentfiles; analyzers; buildtransitive
all
diff --git a/test/UnitTests/Application/NBB.Application.Effects.Tests/ApplicationEffectsTest.cs b/test/UnitTests/Application/NBB.Application.Effects.Tests/ApplicationEffectsTest.cs
index a13ac87e..f8340231 100644
--- a/test/UnitTests/Application/NBB.Application.Effects.Tests/ApplicationEffectsTest.cs
+++ b/test/UnitTests/Application/NBB.Application.Effects.Tests/ApplicationEffectsTest.cs
@@ -26,7 +26,7 @@ public void AddMediatorEffects_should_register_MediatorSendQuery_SideEffectHandl
//Assert
using var container = services.BuildServiceProvider();
- var handler = container.GetService(typeof(MediatorEffects.Send.Handler));
+ var handler = container.GetService(typeof(MediatorEffects.Send.QueryHandler));
handler.Should().NotBeNull();
}
@@ -35,9 +35,9 @@ public async Task MediatorSendQuery_effect_handler_should_send_query_to_mediator
{
//Arrange
var mediator = new Mock();
- var sut = new MediatorEffects.Send.Handler(mediator.Object);
+ var sut = new MediatorEffects.Send.QueryHandler(mediator.Object);
var query = new TestQuery();
- var sideEffect = new MediatorEffects.Send.SideEffect(query);
+ var sideEffect = new MediatorEffects.Send.QuerySideEffect(query);
//Act
var result = await sut.Handle(sideEffect);
diff --git a/test/UnitTests/Application/NBB.Application.Effects.Tests/NBB.Application.Effects.Tests.csproj b/test/UnitTests/Application/NBB.Application.Effects.Tests/NBB.Application.Effects.Tests.csproj
index dc6347eb..84da3d44 100644
--- a/test/UnitTests/Application/NBB.Application.Effects.Tests/NBB.Application.Effects.Tests.csproj
+++ b/test/UnitTests/Application/NBB.Application.Effects.Tests/NBB.Application.Effects.Tests.csproj
@@ -1,7 +1,7 @@
- net7.0
+ net8.0
false
diff --git a/test/UnitTests/Application/NBB.Application.Mediator.FSharp.Tests/EventPipelineTests.fs b/test/UnitTests/Application/NBB.Application.Mediator.FSharp.Tests/EventPipelineTests.fs
index 3164d5b1..dc1a1432 100644
--- a/test/UnitTests/Application/NBB.Application.Mediator.FSharp.Tests/EventPipelineTests.fs
+++ b/test/UnitTests/Application/NBB.Application.Mediator.FSharp.Tests/EventPipelineTests.fs
@@ -124,7 +124,7 @@ let ``EventHandler.append left identity law `` (f: SomeEvent -> unit option) (re
req
|> h
|> Effect.interpret interpreter
- |> fun t -> t.GetAwaiter().GetResult()
+ |> _.GetAwaiter().GetResult()
run (empty ++ f') = run f'
@@ -139,7 +139,7 @@ let ``EventHandler.append right identity law`` (f: SomeEvent -> unit option) (re
req
|> h
|> Effect.interpret interpreter
- |> fun t -> t.GetAwaiter().GetResult()
+ |> _.GetAwaiter().GetResult()
run (f' ++ empty) = run f'
@@ -161,7 +161,7 @@ let ``EventHandler.append associativity law``
req
|> h
|> Effect.interpret interpreter
- |> fun t -> t.GetAwaiter().GetResult()
+ |> _.GetAwaiter().GetResult()
run ((f' ++ g') ++ h') = run (f' ++ (g' ++ h'))
diff --git a/test/UnitTests/Application/NBB.Application.Mediator.FSharp.Tests/NBB.Application.Mediator.FSharp.Tests.fsproj b/test/UnitTests/Application/NBB.Application.Mediator.FSharp.Tests/NBB.Application.Mediator.FSharp.Tests.fsproj
index 4af1a05a..56898ce8 100644
--- a/test/UnitTests/Application/NBB.Application.Mediator.FSharp.Tests/NBB.Application.Mediator.FSharp.Tests.fsproj
+++ b/test/UnitTests/Application/NBB.Application.Mediator.FSharp.Tests/NBB.Application.Mediator.FSharp.Tests.fsproj
@@ -1,7 +1,7 @@
- net7.0
+ net8.0
false
false
diff --git a/test/UnitTests/Application/NBB.Application.Mediator.FSharp.Tests/RequestPipelineTests.fs b/test/UnitTests/Application/NBB.Application.Mediator.FSharp.Tests/RequestPipelineTests.fs
index d2501f7e..bd2c155e 100644
--- a/test/UnitTests/Application/NBB.Application.Mediator.FSharp.Tests/RequestPipelineTests.fs
+++ b/test/UnitTests/Application/NBB.Application.Mediator.FSharp.Tests/RequestPipelineTests.fs
@@ -65,7 +65,7 @@ let ``RequestHandler.compose left identity law `` (f: int -> int option) (req: i
req
|> h
|> Effect.interpret interpreter
- |> fun t -> t.GetAwaiter().GetResult()
+ |> _.GetAwaiter().GetResult()
run (identity >=> f') = run f'
@@ -78,7 +78,7 @@ let ``RequestHandler.compose right identity law`` (f: int -> int option) (req: i
req
|> h
|> Effect.interpret interpreter
- |> fun t -> t.GetAwaiter().GetResult()
+ |> _.GetAwaiter().GetResult()
run (f' >=> identity) = run f'
@@ -98,7 +98,7 @@ let ``RequestHandler.compose associativity law``
req
|> h
|> Effect.interpret interpreter
- |> fun t -> t.GetAwaiter().GetResult()
+ |> _.GetAwaiter().GetResult()
run ((f' >=> g') >=> h') = run (f' >=> (g' >=> h'))
diff --git a/test/UnitTests/Core/NBB.Core.Configuration.Tests/NBB.Core.Configuration.Tests.csproj b/test/UnitTests/Core/NBB.Core.Configuration.Tests/NBB.Core.Configuration.Tests.csproj
index 6244fa64..f8f1c5d0 100644
--- a/test/UnitTests/Core/NBB.Core.Configuration.Tests/NBB.Core.Configuration.Tests.csproj
+++ b/test/UnitTests/Core/NBB.Core.Configuration.Tests/NBB.Core.Configuration.Tests.csproj
@@ -1,7 +1,7 @@
- net7.0
+ net8.0
enable
false
diff --git a/test/UnitTests/Core/NBB.Core.Effects.FSharp.Tests/NBB.Core.Effects.FSharp.Tests.fsproj b/test/UnitTests/Core/NBB.Core.Effects.FSharp.Tests/NBB.Core.Effects.FSharp.Tests.fsproj
index 3830b233..f5b6ba07 100644
--- a/test/UnitTests/Core/NBB.Core.Effects.FSharp.Tests/NBB.Core.Effects.FSharp.Tests.fsproj
+++ b/test/UnitTests/Core/NBB.Core.Effects.FSharp.Tests/NBB.Core.Effects.FSharp.Tests.fsproj
@@ -1,7 +1,7 @@
- net7.0
+ net8.0
false
false
diff --git a/test/UnitTests/Core/NBB.Core.Effects.Tests/NBB.Core.Effects.Tests.csproj b/test/UnitTests/Core/NBB.Core.Effects.Tests/NBB.Core.Effects.Tests.csproj
index 8b5f46c4..27151007 100644
--- a/test/UnitTests/Core/NBB.Core.Effects.Tests/NBB.Core.Effects.Tests.csproj
+++ b/test/UnitTests/Core/NBB.Core.Effects.Tests/NBB.Core.Effects.Tests.csproj
@@ -1,7 +1,7 @@
- net7.0
+ net8.0
false
diff --git a/test/UnitTests/Core/NBB.Core.Evented.FSharp.Tests/NBB.Core.Evented.FSharp.Tests.fsproj b/test/UnitTests/Core/NBB.Core.Evented.FSharp.Tests/NBB.Core.Evented.FSharp.Tests.fsproj
index 4ec729d0..311b31bb 100644
--- a/test/UnitTests/Core/NBB.Core.Evented.FSharp.Tests/NBB.Core.Evented.FSharp.Tests.fsproj
+++ b/test/UnitTests/Core/NBB.Core.Evented.FSharp.Tests/NBB.Core.Evented.FSharp.Tests.fsproj
@@ -1,7 +1,7 @@
- net7.0
+ net8.0
false
false
@@ -16,7 +16,7 @@
-
+
diff --git a/test/UnitTests/Core/NBB.Core.Evented.FSharp.Tests/Tests.fs b/test/UnitTests/Core/NBB.Core.Evented.FSharp.Tests/Tests.fs
index ad74b7a2..fa8a2eec 100644
--- a/test/UnitTests/Core/NBB.Core.Evented.FSharp.Tests/Tests.fs
+++ b/test/UnitTests/Core/NBB.Core.Evented.FSharp.Tests/Tests.fs
@@ -41,8 +41,8 @@ let ``Pure evented values should contain no events`` () =
[]
let ``List traverse evented should accumulate events`` () =
let xs = [1;2]
- let fn = fun i ->
- match i with
+ let fn =
+ function
|1 -> Evented (1,[Added])
|_ -> Evented (2,[Updated])
diff --git a/test/UnitTests/Core/NBB.Core.Pipeline.Tests/NBB.Core.Pipeline.Tests.csproj b/test/UnitTests/Core/NBB.Core.Pipeline.Tests/NBB.Core.Pipeline.Tests.csproj
index 24913978..105d72c8 100644
--- a/test/UnitTests/Core/NBB.Core.Pipeline.Tests/NBB.Core.Pipeline.Tests.csproj
+++ b/test/UnitTests/Core/NBB.Core.Pipeline.Tests/NBB.Core.Pipeline.Tests.csproj
@@ -1,7 +1,7 @@
- net7.0
+ net8.0
false
diff --git a/test/UnitTests/Data/NBB.Data.EntityFramework.MultiTenancy.Tests/NBB.Data.EntityFramework.MultiTenancy.Tests.csproj b/test/UnitTests/Data/NBB.Data.EntityFramework.MultiTenancy.Tests/NBB.Data.EntityFramework.MultiTenancy.Tests.csproj
index 0ea20e7f..fc458f79 100644
--- a/test/UnitTests/Data/NBB.Data.EntityFramework.MultiTenancy.Tests/NBB.Data.EntityFramework.MultiTenancy.Tests.csproj
+++ b/test/UnitTests/Data/NBB.Data.EntityFramework.MultiTenancy.Tests/NBB.Data.EntityFramework.MultiTenancy.Tests.csproj
@@ -8,7 +8,7 @@
- net7.0
+ net8.0
diff --git a/test/UnitTests/Data/NBB.Data.EntityFramework.Tests/NBB.Data.EntityFramework.Tests.csproj b/test/UnitTests/Data/NBB.Data.EntityFramework.Tests/NBB.Data.EntityFramework.Tests.csproj
index b9f388a8..aa21e4a6 100644
--- a/test/UnitTests/Data/NBB.Data.EntityFramework.Tests/NBB.Data.EntityFramework.Tests.csproj
+++ b/test/UnitTests/Data/NBB.Data.EntityFramework.Tests/NBB.Data.EntityFramework.Tests.csproj
@@ -8,7 +8,7 @@
- net7.0
+ net8.0
diff --git a/test/UnitTests/Data/NBB.Data.EventSourcing.Tests/EventSourcedRepositoryTests.cs b/test/UnitTests/Data/NBB.Data.EventSourcing.Tests/EventSourcedRepositoryTests.cs
index cf4c7fd0..db3fbcd5 100644
--- a/test/UnitTests/Data/NBB.Data.EventSourcing.Tests/EventSourcedRepositoryTests.cs
+++ b/test/UnitTests/Data/NBB.Data.EventSourcing.Tests/EventSourcedRepositoryTests.cs
@@ -1,90 +1,90 @@
// Copyright (c) TotalSoft.
// This source code is licensed under the MIT license.
-using FluentAssertions;
-using MediatR;
-using Microsoft.Extensions.Logging;
-using Moq;
-using NBB.Core.Abstractions;
-using NBB.Data.EventSourcing.Infrastructure;
-using NBB.Domain.Abstractions;
-using NBB.EventStore.Abstractions;
-using System;
-using System.Collections.Generic;
-using System.Threading;
-using System.Threading.Tasks;
-using Xunit;
-
-namespace NBB.Data.EventSourcing.Tests
-{
- public class EventSourcedRepositoryTests
- {
- public class TestEventSourcedAggregateRoot : IEventSourcedAggregateRoot, ISnapshotableEntity
- {
- public TestEventSourcedAggregateRoot()
- {
-
- }
-
- public TestEventSourcedAggregateRoot(Guid id, int version, List