mirror of
https://github.com/meysamhadeli/booking-microservices.git
synced 2026-04-30 09:55:45 +08:00
.
This commit is contained in:
parent
31db8aa1ba
commit
6da82e39ce
1
.husky/pre-commit
Normal file
1
.husky/pre-commit
Normal file
@ -0,0 +1 @@
|
|||||||
|
npm run format
|
||||||
@ -1,8 +1,45 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project>
|
<Project>
|
||||||
|
<PropertyGroup>
|
||||||
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
|
<Nullable>enable</Nullable>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<GlobalPackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="7.0.0" />
|
<PackageReference Include="StyleCop.Analyzers" PrivateAssets="all" Version="1.1.118">
|
||||||
<GlobalPackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" />
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
<GlobalPackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.435" />
|
</PackageReference>
|
||||||
|
<PackageReference Include="Meziantou.Analyzer" PrivateAssets="all" Version="2.0.163">
|
||||||
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
|
</PackageReference>
|
||||||
|
<PackageReference Include="Roslynator.Analyzers" PrivateAssets="all" Version="4.12.5">
|
||||||
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
|
</PackageReference>
|
||||||
|
<PackageReference Include="Roslynator.CodeAnalysis.Analyzers" PrivateAssets="all" Version="4.12.5">
|
||||||
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
|
</PackageReference>
|
||||||
|
<PackageReference Include="Roslynator.Formatting.Analyzers" PrivateAssets="all" Version="4.12.5">
|
||||||
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
|
</PackageReference>
|
||||||
|
<PackageReference Include="Microsoft.VisualStudio.Threading.Analyzers" PrivateAssets="all" Version="17.11.20">
|
||||||
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
|
</PackageReference>
|
||||||
|
<PackageReference Include="AsyncAwaitBestPractices" PrivateAssets="all" Version="8.0.0">
|
||||||
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
|
</PackageReference>
|
||||||
|
<PackageReference Include="SerilogAnalyzer" PrivateAssets="all" Version="0.15.0">
|
||||||
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
|
</PackageReference>
|
||||||
|
<PackageReference Include="CSharpGuidelinesAnalyzer" PrivateAssets="all" Version="3.8.5">
|
||||||
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
|
</PackageReference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<RunAnalyzersDuringBuild>true</RunAnalyzersDuringBuild>
|
||||||
|
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
|
||||||
|
<AnalysisMode>All</AnalysisMode>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
3
commitlint.config.js
Normal file
3
commitlint.config.js
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
module.exports = {
|
||||||
|
extends: ["@commitlint/config-conventional"],
|
||||||
|
}
|
||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"sdk": {
|
"sdk": {
|
||||||
"version": "8.0.303",
|
"version": "8.0.401",
|
||||||
"rollForward": "latestFeature"
|
"rollForward": "latestFeature"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
1346
package-lock.json
generated
Normal file
1346
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
18
package.json
Normal file
18
package.json
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
{
|
||||||
|
"name": "booking-microservices",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"description": "",
|
||||||
|
"author": "Meysam Hadeli",
|
||||||
|
"license": "MIT",
|
||||||
|
"main": "index.js",
|
||||||
|
"scripts": {
|
||||||
|
"prepare": "husky && dotnet tool restore",
|
||||||
|
"format": "dotnet format booking-microservices-sample.sln --severity error --verbosity detailed",
|
||||||
|
"upgrade-packages": "dotnet outdated --upgrade"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@commitlint/cli": "^19.5.0",
|
||||||
|
"@commitlint/config-conventional": "^19.5.0",
|
||||||
|
"husky": "^9.1.6"
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,39 +1,32 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
|
||||||
<TargetFramework>net8.0</TargetFramework>
|
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
|
||||||
<Nullable>enable</Nullable>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Ardalis.GuardClauses" Version="4.6.0" />
|
<PackageReference Include="Ardalis.GuardClauses" Version="4.6.0" />
|
||||||
<PackageReference Include="Asp.Versioning.Abstractions" Version="8.1.0" />
|
<PackageReference Include="Asp.Versioning.Abstractions" Version="8.1.0" />
|
||||||
<PackageReference Include="Asp.Versioning.Http" Version="8.1.0" />
|
<PackageReference Include="Asp.Versioning.Http" Version="8.1.0" />
|
||||||
<PackageReference Include="Asp.Versioning.Mvc" Version="8.1.0" />
|
<PackageReference Include="Asp.Versioning.Mvc" Version="8.1.0" />
|
||||||
<PackageReference Include="Asp.Versioning.Mvc.ApiExplorer" Version="8.1.0" />
|
<PackageReference Include="Asp.Versioning.Mvc.ApiExplorer" Version="8.1.0" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Diagnostics.HealthChecks" Version="8.0.7" />
|
<PackageReference Include="Microsoft.Extensions.Diagnostics.HealthChecks" Version="8.0.8" />
|
||||||
<PackageReference Include="AspNetCore.HealthChecks.UI" Version="8.0.1" />
|
<PackageReference Include="AspNetCore.HealthChecks.UI" Version="8.0.2" />
|
||||||
<PackageReference Include="AspNetCore.HealthChecks.UI.Client" Version="8.0.1" />
|
<PackageReference Include="AspNetCore.HealthChecks.UI.Client" Version="8.0.1" />
|
||||||
<PackageReference Include="AspNetCore.HealthChecks.UI.InMemory.Storage" Version="8.0.1" />
|
<PackageReference Include="AspNetCore.HealthChecks.UI.InMemory.Storage" Version="8.0.1" />
|
||||||
<PackageReference Include="AspNetCore.HealthChecks.Elasticsearch" Version="8.0.1" />
|
<PackageReference Include="AspNetCore.HealthChecks.Elasticsearch" Version="8.0.1" />
|
||||||
<PackageReference Include="AspNetCore.HealthChecks.EventStore" Version="8.0.1" />
|
<PackageReference Include="AspNetCore.HealthChecks.EventStore" Version="8.0.1" />
|
||||||
<PackageReference Include="AspNetCore.HealthChecks.NpgSql" Version="8.0.1" />
|
<PackageReference Include="AspNetCore.HealthChecks.NpgSql" Version="8.0.2" />
|
||||||
<PackageReference Include="AspNetCore.HealthChecks.Rabbitmq" Version="8.0.1" />
|
<PackageReference Include="AspNetCore.HealthChecks.Rabbitmq" Version="8.0.2" />
|
||||||
<PackageReference Include="AspNetCore.HealthChecks.UI.SQLite.Storage" Version="8.0.1" />
|
<PackageReference Include="AspNetCore.HealthChecks.UI.SQLite.Storage" Version="8.0.1" />
|
||||||
<PackageReference Include="AspNetCore.HealthChecks.MongoDb" Version="8.0.1" />
|
<PackageReference Include="AspNetCore.HealthChecks.MongoDb" Version="8.1.0" />
|
||||||
<PackageReference Include="Grpc.Core.Testing" Version="2.46.6" />
|
<PackageReference Include="Grpc.Core.Testing" Version="2.46.6" />
|
||||||
<PackageReference Include="EasyCaching.Core" Version="1.9.2" />
|
<PackageReference Include="EasyCaching.Core" Version="1.9.2" />
|
||||||
<PackageReference Include="EasyCaching.InMemory" Version="1.9.2" />
|
<PackageReference Include="EasyCaching.InMemory" Version="1.9.2" />
|
||||||
<PackageReference Include="EasyNetQ.Management.Client" Version="2.0.0" />
|
<PackageReference Include="EasyNetQ.Management.Client" Version="2.0.0" />
|
||||||
<PackageReference Include="EFCore.NamingConventions" Version="8.0.3" />
|
<PackageReference Include="EFCore.NamingConventions" Version="8.0.3" />
|
||||||
<PackageReference Include="Figgle" Version="0.5.1" />
|
<PackageReference Include="Figgle" Version="0.5.1" />
|
||||||
<PackageReference Include="FluentValidation" Version="11.9.2" />
|
<PackageReference Include="FluentValidation" Version="11.10.0" />
|
||||||
<PackageReference Include="FluentValidation.AspNetCore" Version="11.3.0" />
|
<PackageReference Include="FluentValidation.AspNetCore" Version="11.3.0" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="8.0.7" />
|
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="8.0.8" />
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="8.0.7" />
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="8.0.8" />
|
||||||
<PackageReference Include="Microsoft.Extensions.DependencyModel" Version="8.0.1" />
|
<PackageReference Include="Microsoft.Extensions.DependencyModel" Version="8.0.1" />
|
||||||
<PackageReference Include="Npgsql" Version="8.0.3" />
|
<PackageReference Include="Npgsql" Version="8.0.4" />
|
||||||
<PackageReference Include="NSubstitute" Version="5.1.0" />
|
<PackageReference Include="NSubstitute" Version="5.1.0" />
|
||||||
<PackageReference Include="OpenTelemetry.Exporter.Prometheus.AspNetCore" Version="1.9.0-beta.2" />
|
<PackageReference Include="OpenTelemetry.Exporter.Prometheus.AspNetCore" Version="1.9.0-beta.2" />
|
||||||
<PackageReference Include="OpenTelemetry.Instrumentation.GrpcNetClient" Version="1.9.0-beta.1" />
|
<PackageReference Include="OpenTelemetry.Instrumentation.GrpcNetClient" Version="1.9.0-beta.1" />
|
||||||
@ -42,25 +35,25 @@
|
|||||||
<PackageReference Include="IdGen" Version="3.0.7" />
|
<PackageReference Include="IdGen" Version="3.0.7" />
|
||||||
<PackageReference Include="Mapster" Version="7.4.0" />
|
<PackageReference Include="Mapster" Version="7.4.0" />
|
||||||
<PackageReference Include="Mapster.DependencyInjection" Version="1.0.1" />
|
<PackageReference Include="Mapster.DependencyInjection" Version="1.0.1" />
|
||||||
<PackageReference Include="MediatR" Version="12.4.0" />
|
<PackageReference Include="MediatR" Version="12.4.1" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="8.0.7" />
|
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="8.0.8" />
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.7" />
|
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.8" />
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="8.0.7" />
|
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="8.0.8" />
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.7" />
|
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.8" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="8.0.0" />
|
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="8.0.0" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="8.0.2" />
|
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="8.0.2" />
|
||||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" />
|
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" />
|
||||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.1" />
|
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.1" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Http.Polly" Version="8.0.7" />
|
<PackageReference Include="Microsoft.Extensions.Http.Polly" Version="8.0.8" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.1" />
|
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.1" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Hosting" Version="8.0.0" />
|
<PackageReference Include="Microsoft.Extensions.Hosting" Version="8.0.0" />
|
||||||
<PackageReference Include="MongoDB.Driver" Version="2.24.0" />
|
<PackageReference Include="MongoDB.Driver" Version="2.28.0" />
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
||||||
<PackageReference Include="OpenTelemetry.Contrib.Instrumentation.MassTransit" Version="1.0.0-beta2" />
|
<PackageReference Include="OpenTelemetry.Contrib.Instrumentation.MassTransit" Version="1.0.0-beta2" />
|
||||||
<PackageReference Include="Scrutor" Version="4.2.2" />
|
<PackageReference Include="Scrutor" Version="4.2.2" />
|
||||||
<PackageReference Include="Sentry.Serilog" Version="4.9.0" />
|
<PackageReference Include="Sentry.Serilog" Version="4.9.0" />
|
||||||
<PackageReference Include="Serilog" Version="4.0.0" />
|
<PackageReference Include="Serilog" Version="4.0.1" />
|
||||||
<PackageReference Include="Serilog.AspNetCore" Version="8.0.1" />
|
<PackageReference Include="Serilog.AspNetCore" Version="8.0.2" />
|
||||||
<PackageReference Include="Serilog.Enrichers.Span" Version="3.1.0" />
|
<PackageReference Include="Serilog.Enrichers.Span" Version="3.1.0" />
|
||||||
<PackageReference Include="Serilog.Exceptions" Version="8.4.0" />
|
<PackageReference Include="Serilog.Exceptions" Version="8.4.0" />
|
||||||
<PackageReference Include="Serilog.Formatting.Elasticsearch" Version="10.0.0" />
|
<PackageReference Include="Serilog.Formatting.Elasticsearch" Version="10.0.0" />
|
||||||
@ -70,25 +63,25 @@
|
|||||||
<PackageReference Include="Serilog.Sinks.SpectreConsole" Version="0.3.3" />
|
<PackageReference Include="Serilog.Sinks.SpectreConsole" Version="0.3.3" />
|
||||||
<PackageReference Include="Serilog.Sinks.XUnit" Version="3.0.5" />
|
<PackageReference Include="Serilog.Sinks.XUnit" Version="3.0.5" />
|
||||||
<PackageReference Include="Sieve" Version="2.5.5" />
|
<PackageReference Include="Sieve" Version="2.5.5" />
|
||||||
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.6.2" />
|
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.7.3" />
|
||||||
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerGen" Version="6.6.2" />
|
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerGen" Version="6.7.3" />
|
||||||
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerUI" Version="6.6.2" />
|
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerUI" Version="6.7.3" />
|
||||||
<PackageReference Include="MassTransit" Version="8.2.3" />
|
<PackageReference Include="MassTransit" Version="8.2.5" />
|
||||||
<PackageReference Include="MassTransit.RabbitMQ" Version="8.2.3" />
|
<PackageReference Include="MassTransit.RabbitMQ" Version="8.2.5" />
|
||||||
<PackageReference Include="Duende.IdentityServer" Version="7.0.5" />
|
<PackageReference Include="Duende.IdentityServer" Version="7.0.6" />
|
||||||
<PackageReference Include="Duende.IdentityServer.AspNetIdentity" Version="7.0.5" />
|
<PackageReference Include="Duende.IdentityServer.AspNetIdentity" Version="7.0.6" />
|
||||||
<PackageReference Include="Duende.IdentityServer.EntityFramework" Version="7.0.5" />
|
<PackageReference Include="Duende.IdentityServer.EntityFramework" Version="7.0.6" />
|
||||||
<PackageReference Include="Duende.IdentityServer.EntityFramework.Storage" Version="7.0.5" />
|
<PackageReference Include="Duende.IdentityServer.EntityFramework.Storage" Version="7.0.6" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="8.0.7" />
|
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="8.0.8" />
|
||||||
<PackageReference Include="System.Linq.Async" Version="6.0.1" />
|
<PackageReference Include="System.Linq.Async" Version="6.0.1" />
|
||||||
<PackageReference Include="System.Linq.Async.Queryable" Version="6.0.1" />
|
<PackageReference Include="System.Linq.Async.Queryable" Version="6.0.1" />
|
||||||
<PackageReference Include="Testcontainers" Version="3.9.0" />
|
<PackageReference Include="Testcontainers" Version="3.10.0" />
|
||||||
<PackageReference Include="Testcontainers.EventStoreDb" Version="3.9.0" />
|
<PackageReference Include="Testcontainers.EventStoreDb" Version="3.10.0" />
|
||||||
<PackageReference Include="Testcontainers.MongoDb" Version="3.9.0" />
|
<PackageReference Include="Testcontainers.MongoDb" Version="3.10.0" />
|
||||||
<PackageReference Include="Testcontainers.PostgreSql" Version="3.9.0" />
|
<PackageReference Include="Testcontainers.PostgreSql" Version="3.10.0" />
|
||||||
<PackageReference Include="Testcontainers.RabbitMq" Version="3.9.0" />
|
<PackageReference Include="Testcontainers.RabbitMq" Version="3.10.0" />
|
||||||
<PackageReference Include="Unchase.Swashbuckle.AspNetCore.Extensions" Version="2.7.1" />
|
<PackageReference Include="Unchase.Swashbuckle.AspNetCore.Extensions" Version="2.7.1" />
|
||||||
<PackageReference Include="Yarp.ReverseProxy" Version="2.1.0" />
|
<PackageReference Include="Yarp.ReverseProxy" Version="2.2.0" />
|
||||||
|
|
||||||
<PackageReference Include="prometheus-net" Version="8.2.1" />
|
<PackageReference Include="prometheus-net" Version="8.2.1" />
|
||||||
<PackageReference Include="prometheus-net.AspNetCore" Version="8.2.1" />
|
<PackageReference Include="prometheus-net.AspNetCore" Version="8.2.1" />
|
||||||
@ -99,30 +92,19 @@
|
|||||||
<PackageReference Include="OpenTelemetry.Instrumentation.AspNetCore" Version="1.9.0" />
|
<PackageReference Include="OpenTelemetry.Instrumentation.AspNetCore" Version="1.9.0" />
|
||||||
<PackageReference Include="OpenTelemetry.Instrumentation.Http" Version="1.9.0" />
|
<PackageReference Include="OpenTelemetry.Instrumentation.Http" Version="1.9.0" />
|
||||||
|
|
||||||
<PackageReference Include="EventStore.Client.Grpc.Streams" Version="23.3.3" />
|
<PackageReference Include="EventStore.Client.Grpc.Streams" Version="23.3.5" />
|
||||||
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="8.0.4" />
|
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="8.0.4" />
|
||||||
|
|
||||||
<PackageReference Include="AutoBogus" Version="2.13.1" />
|
<PackageReference Include="AutoBogus" Version="2.13.1" />
|
||||||
<PackageReference Include="Bogus" Version="35.6.0" />
|
<PackageReference Include="Bogus" Version="35.6.1" />
|
||||||
<PackageReference Include="FluentAssertions" Version="6.12.0" />
|
<PackageReference Include="FluentAssertions" Version="6.12.1" />
|
||||||
<PackageReference Include="Respawn" Version="6.2.1" />
|
<PackageReference Include="Respawn" Version="6.2.1" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.TestHost" Version="8.0.7" />
|
<PackageReference Include="Microsoft.AspNetCore.TestHost" Version="8.0.8" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="8.0.7" />
|
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="8.0.8" />
|
||||||
<PackageReference Include="WebMotions.Fake.Authentication.JwtBearer" Version="8.0.1" />
|
<PackageReference Include="WebMotions.Fake.Authentication.JwtBearer" Version="8.0.1" />
|
||||||
|
|
||||||
<PackageReference Include="Google.Protobuf" Version="3.27.2" />
|
<PackageReference Include="Google.Protobuf" Version="3.28.1" />
|
||||||
<PackageReference Include="Grpc.Net.ClientFactory" Version="2.64.0" />
|
<PackageReference Include="Grpc.Net.ClientFactory" Version="2.65.0" />
|
||||||
|
|
||||||
<PackageReference Include="Microsoft.VisualStudio.Threading.Analyzers" Version="17.10.48">
|
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
|
||||||
<PrivateAssets>all</PrivateAssets>
|
|
||||||
</PackageReference>
|
|
||||||
<PackageReference Update="Meziantou.Analyzer" Version="2.0.146" />
|
|
||||||
<PackageReference Update="AsyncFixer" Version="1.6.0" />
|
|
||||||
<PackageReference Update="Roslynator.Analyzers" Version="4.12.0" />
|
|
||||||
<PackageReference Update="Roslynator.CodeAnalysis.Analyzers" Version="4.11.0" />
|
|
||||||
<PackageReference Update="Roslynator.Formatting.Analyzers" Version="4.12.0" />
|
|
||||||
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
using EasyCaching.Core;
|
using EasyCaching.Core;
|
||||||
using MediatR;
|
using MediatR;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
using MediatR;
|
using MediatR;
|
||||||
|
|
||||||
namespace BuildingBlocks.Core.CQRS;
|
namespace BuildingBlocks.Core.CQRS;
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
using MediatR;
|
using MediatR;
|
||||||
|
|
||||||
namespace BuildingBlocks.Core.CQRS;
|
namespace BuildingBlocks.Core.CQRS;
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
using MediatR;
|
using MediatR;
|
||||||
|
|
||||||
namespace BuildingBlocks.Core.CQRS;
|
namespace BuildingBlocks.Core.CQRS;
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
using MediatR;
|
using MediatR;
|
||||||
|
|
||||||
namespace BuildingBlocks.Core.CQRS;
|
namespace BuildingBlocks.Core.CQRS;
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
namespace BuildingBlocks.Core.Event;
|
namespace BuildingBlocks.Core.Event;
|
||||||
|
|
||||||
public interface IInternalCommand : IEvent
|
public interface IInternalCommand : IEvent
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
using BuildingBlocks.Core.CQRS;
|
using BuildingBlocks.Core.CQRS;
|
||||||
|
|
||||||
namespace BuildingBlocks.Core.Event;
|
namespace BuildingBlocks.Core.Event;
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
using Google.Protobuf;
|
using Google.Protobuf;
|
||||||
|
|
||||||
namespace BuildingBlocks.Core.Event;
|
namespace BuildingBlocks.Core.Event;
|
||||||
|
|
||||||
|
|||||||
@ -104,7 +104,8 @@ public sealed class EventDispatcher : IEventDispatcher
|
|||||||
|
|
||||||
var integrationEvent = _eventMapper.MapToIntegrationEvent(@event);
|
var integrationEvent = _eventMapper.MapToIntegrationEvent(@event);
|
||||||
|
|
||||||
if (integrationEvent is null) continue;
|
if (integrationEvent is null)
|
||||||
|
continue;
|
||||||
|
|
||||||
integrationEvents.Add(integrationEvent);
|
integrationEvents.Add(integrationEvent);
|
||||||
}
|
}
|
||||||
@ -129,7 +130,8 @@ public sealed class EventDispatcher : IEventDispatcher
|
|||||||
|
|
||||||
var integrationEvent = _eventMapper.MapToInternalCommand(@event);
|
var integrationEvent = _eventMapper.MapToInternalCommand(@event);
|
||||||
|
|
||||||
if (integrationEvent is null) continue;
|
if (integrationEvent is null)
|
||||||
|
continue;
|
||||||
|
|
||||||
internalCommands.Add(integrationEvent);
|
internalCommands.Add(integrationEvent);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
using BuildingBlocks.Core.Event;
|
using BuildingBlocks.Core.Event;
|
||||||
|
|
||||||
namespace BuildingBlocks.Core.Model;
|
namespace BuildingBlocks.Core.Model;
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
namespace BuildingBlocks.Core.Model;
|
namespace BuildingBlocks.Core.Model;
|
||||||
|
|
||||||
public abstract record Entity<T> : IEntity<T>
|
public abstract record Entity<T> : IEntity<T>
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
using BuildingBlocks.Core.Event;
|
using BuildingBlocks.Core.Event;
|
||||||
|
|
||||||
namespace BuildingBlocks.Core.Model;
|
namespace BuildingBlocks.Core.Model;
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
namespace BuildingBlocks.Core.Model;
|
namespace BuildingBlocks.Core.Model;
|
||||||
|
|
||||||
public interface IEntity<T> : IEntity
|
public interface IEntity<T> : IEntity
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
namespace BuildingBlocks.Core.Model;
|
namespace BuildingBlocks.Core.Model;
|
||||||
|
|
||||||
// For handling optimistic concurrency
|
// For handling optimistic concurrency
|
||||||
public interface IVersion
|
public interface IVersion
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
namespace BuildingBlocks.Core.Pagination;
|
namespace BuildingBlocks.Core.Pagination;
|
||||||
|
|
||||||
using Sieve.Models;
|
using Sieve.Models;
|
||||||
using Sieve.Services;
|
using Sieve.Services;
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
namespace BuildingBlocks.Core.Pagination;
|
namespace BuildingBlocks.Core.Pagination;
|
||||||
|
|
||||||
public interface IPageList<T>
|
public interface IPageList<T>
|
||||||
where T : class
|
where T : class
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
namespace BuildingBlocks.Core.Pagination;
|
namespace BuildingBlocks.Core.Pagination;
|
||||||
|
|
||||||
using MediatR;
|
using MediatR;
|
||||||
|
|
||||||
public interface IPageQuery<out TResponse> : IPageRequest, IRequest<TResponse>
|
public interface IPageQuery<out TResponse> : IPageRequest, IRequest<TResponse>
|
||||||
where TResponse : class { }
|
where TResponse : class
|
||||||
|
{ }
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
namespace BuildingBlocks.Core.Pagination;
|
namespace BuildingBlocks.Core.Pagination;
|
||||||
|
|
||||||
public interface IPageRequest
|
public interface IPageRequest
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
namespace BuildingBlocks.Core.Pagination;
|
namespace BuildingBlocks.Core.Pagination;
|
||||||
|
|
||||||
public record PageList<T>(IReadOnlyList<T> Items, int PageNumber, int PageSize, int TotalCount) : IPageList<T>
|
public record PageList<T>(IReadOnlyList<T> Items, int PageNumber, int PageSize, int TotalCount) : IPageList<T>
|
||||||
where T : class
|
where T : class
|
||||||
|
|||||||
@ -32,7 +32,8 @@ public abstract class AppDbContextBase : DbContext, IDbContext
|
|||||||
|
|
||||||
public async Task BeginTransactionAsync(CancellationToken cancellationToken = default)
|
public async Task BeginTransactionAsync(CancellationToken cancellationToken = default)
|
||||||
{
|
{
|
||||||
if (_currentTransaction != null) return;
|
if (_currentTransaction != null)
|
||||||
|
return;
|
||||||
|
|
||||||
_currentTransaction = await Database.BeginTransactionAsync(IsolationLevel.ReadCommitted, cancellationToken);
|
_currentTransaction = await Database.BeginTransactionAsync(IsolationLevel.ReadCommitted, cancellationToken);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
using Microsoft.Extensions.Hosting;
|
using Microsoft.Extensions.Hosting;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
|
|
||||||
namespace BuildingBlocks.EventStoreDB.BackgroundWorkers;
|
namespace BuildingBlocks.EventStoreDB.BackgroundWorkers;
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
using BuildingBlocks.Core.Event;
|
using BuildingBlocks.Core.Event;
|
||||||
using BuildingBlocks.Core.Model;
|
using BuildingBlocks.Core.Model;
|
||||||
|
|
||||||
namespace BuildingBlocks.EventStoreDB.Events
|
namespace BuildingBlocks.EventStoreDB.Events
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
using BuildingBlocks.EventStoreDB.Serialization;
|
using BuildingBlocks.EventStoreDB.Serialization;
|
||||||
using EventStore.Client;
|
using EventStore.Client;
|
||||||
|
|
||||||
namespace BuildingBlocks.EventStoreDB.Events;
|
namespace BuildingBlocks.EventStoreDB.Events;
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
using System.Collections.Concurrent;
|
using System.Collections.Concurrent;
|
||||||
using BuildingBlocks.Utils;
|
using BuildingBlocks.Utils;
|
||||||
|
|
||||||
namespace BuildingBlocks.EventStoreDB.Events;
|
namespace BuildingBlocks.EventStoreDB.Events;
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
namespace BuildingBlocks.EventStoreDB.Events;
|
namespace BuildingBlocks.EventStoreDB.Events;
|
||||||
|
|
||||||
public interface IProjection
|
public interface IProjection
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
using BuildingBlocks.Core.Event;
|
using BuildingBlocks.Core.Event;
|
||||||
|
|
||||||
namespace BuildingBlocks.EventStoreDB.Events;
|
namespace BuildingBlocks.EventStoreDB.Events;
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
using System.Diagnostics.Eventing.Reader;
|
using System.Diagnostics.Eventing.Reader;
|
||||||
using BuildingBlocks.EventStoreDB.Serialization;
|
using BuildingBlocks.EventStoreDB.Serialization;
|
||||||
using EventStore.Client;
|
using EventStore.Client;
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
using System.Collections.Concurrent;
|
using System.Collections.Concurrent;
|
||||||
|
|
||||||
namespace BuildingBlocks.EventStoreDB.Events;
|
namespace BuildingBlocks.EventStoreDB.Events;
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using Microsoft.Extensions.Configuration;
|
using Microsoft.Extensions.Configuration;
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
using BuildingBlocks.EventStoreDB.Events;
|
using BuildingBlocks.EventStoreDB.Events;
|
||||||
using BuildingBlocks.EventStoreDB.Serialization;
|
using BuildingBlocks.EventStoreDB.Serialization;
|
||||||
using EventStore.Client;
|
using EventStore.Client;
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using BuildingBlocks.EventStoreDB.Events;
|
using BuildingBlocks.EventStoreDB.Events;
|
||||||
using EventStore.Client;
|
using EventStore.Client;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
using System.Collections.Concurrent;
|
using System.Collections.Concurrent;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Newtonsoft.Json.Serialization;
|
using Newtonsoft.Json.Serialization;
|
||||||
@ -18,7 +18,8 @@ public static class JsonObjectContractProvider
|
|||||||
{
|
{
|
||||||
var nonDefaultConstructor = GetNonDefaultConstructor(objectType);
|
var nonDefaultConstructor = GetNonDefaultConstructor(objectType);
|
||||||
|
|
||||||
if (nonDefaultConstructor == null) return contract;
|
if (nonDefaultConstructor == null)
|
||||||
|
return contract;
|
||||||
|
|
||||||
contract.OverrideCreator = GetObjectConstructor(nonDefaultConstructor);
|
contract.OverrideCreator = GetObjectConstructor(nonDefaultConstructor);
|
||||||
contract.CreatorParameters.Clear();
|
contract.CreatorParameters.Clear();
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
using Newtonsoft.Json.Serialization;
|
using Newtonsoft.Json.Serialization;
|
||||||
|
|
||||||
namespace BuildingBlocks.EventStoreDB.Serialization;
|
namespace BuildingBlocks.EventStoreDB.Serialization;
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
using BuildingBlocks.Core.Event;
|
using BuildingBlocks.Core.Event;
|
||||||
using BuildingBlocks.EventStoreDB.Events;
|
using BuildingBlocks.EventStoreDB.Events;
|
||||||
using BuildingBlocks.EventStoreDB.Serialization;
|
using BuildingBlocks.EventStoreDB.Serialization;
|
||||||
using EventStore.Client;
|
using EventStore.Client;
|
||||||
|
|||||||
@ -79,7 +79,8 @@ public class EventStoreDBSubscriptionToAll
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (IsEventWithEmptyData(resolvedEvent) || IsCheckpointEvent(resolvedEvent)) return;
|
if (IsEventWithEmptyData(resolvedEvent) || IsCheckpointEvent(resolvedEvent))
|
||||||
|
return;
|
||||||
|
|
||||||
var streamEvent = resolvedEvent.ToStreamEvent();
|
var streamEvent = resolvedEvent.ToStreamEvent();
|
||||||
|
|
||||||
@ -172,7 +173,8 @@ public class EventStoreDBSubscriptionToAll
|
|||||||
|
|
||||||
private bool IsEventWithEmptyData(ResolvedEvent resolvedEvent)
|
private bool IsEventWithEmptyData(ResolvedEvent resolvedEvent)
|
||||||
{
|
{
|
||||||
if (resolvedEvent.Event.Data.Length != 0) return false;
|
if (resolvedEvent.Event.Data.Length != 0)
|
||||||
|
return false;
|
||||||
|
|
||||||
logger.LogInformation("Event without data received");
|
logger.LogInformation("Event without data received");
|
||||||
return true;
|
return true;
|
||||||
@ -180,7 +182,8 @@ public class EventStoreDBSubscriptionToAll
|
|||||||
|
|
||||||
private bool IsCheckpointEvent(ResolvedEvent resolvedEvent)
|
private bool IsCheckpointEvent(ResolvedEvent resolvedEvent)
|
||||||
{
|
{
|
||||||
if (resolvedEvent.Event.EventType != EventTypeMapper.ToName<CheckpointStored>()) return false;
|
if (resolvedEvent.Event.EventType != EventTypeMapper.ToName<CheckpointStored>())
|
||||||
|
return false;
|
||||||
|
|
||||||
logger.LogInformation("Checkpoint event - ignoring");
|
logger.LogInformation("Checkpoint event - ignoring");
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
namespace BuildingBlocks.EventStoreDB.Subscriptions;
|
namespace BuildingBlocks.EventStoreDB.Subscriptions;
|
||||||
|
|
||||||
public interface ISubscriptionCheckpointRepository
|
public interface ISubscriptionCheckpointRepository
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
using System.Collections.Concurrent;
|
using System.Collections.Concurrent;
|
||||||
|
|
||||||
namespace BuildingBlocks.EventStoreDB.Subscriptions;
|
namespace BuildingBlocks.EventStoreDB.Subscriptions;
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
using System.Text.Json.Serialization;
|
using System.Text.Json.Serialization;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
|
||||||
namespace BuildingBlocks.Exception;
|
namespace BuildingBlocks.Exception;
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
using BuildingBlocks.EFCore;
|
using BuildingBlocks.EFCore;
|
||||||
using BuildingBlocks.Logging;
|
using BuildingBlocks.Logging;
|
||||||
using BuildingBlocks.MassTransit;
|
using BuildingBlocks.MassTransit;
|
||||||
using BuildingBlocks.Mongo;
|
using BuildingBlocks.Mongo;
|
||||||
@ -18,7 +18,8 @@ public static class Extensions
|
|||||||
{
|
{
|
||||||
var healthOptions = services.GetOptions<HealthOptions>(nameof(HealthOptions));
|
var healthOptions = services.GetOptions<HealthOptions>(nameof(HealthOptions));
|
||||||
|
|
||||||
if (!healthOptions.Enabled) return services;
|
if (!healthOptions.Enabled)
|
||||||
|
return services;
|
||||||
|
|
||||||
var appOptions = services.GetOptions<AppOptions>(nameof(AppOptions));
|
var appOptions = services.GetOptions<AppOptions>(nameof(AppOptions));
|
||||||
var postgresOptions = services.GetOptions<PostgresOptions>(nameof(PostgresOptions));
|
var postgresOptions = services.GetOptions<PostgresOptions>(nameof(PostgresOptions));
|
||||||
@ -51,7 +52,8 @@ public static class Extensions
|
|||||||
{
|
{
|
||||||
var healthOptions = app.Configuration.GetOptions<HealthOptions>(nameof(HealthOptions));
|
var healthOptions = app.Configuration.GetOptions<HealthOptions>(nameof(HealthOptions));
|
||||||
|
|
||||||
if (!healthOptions.Enabled) return app;
|
if (!healthOptions.Enabled)
|
||||||
|
return app;
|
||||||
|
|
||||||
app.UseHealthChecks("/healthz",
|
app.UseHealthChecks("/healthz",
|
||||||
new HealthCheckOptions
|
new HealthCheckOptions
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
namespace BuildingBlocks.HealthCheck;
|
namespace BuildingBlocks.HealthCheck;
|
||||||
|
|
||||||
public class HealthOptions
|
public class HealthOptions
|
||||||
{
|
{
|
||||||
|
|||||||
@ -13,7 +13,8 @@ public static class JwtExtensions
|
|||||||
{
|
{
|
||||||
var jwtOptions = services.GetOptions<JwtBearerOptions>("Jwt");
|
var jwtOptions = services.GetOptions<JwtBearerOptions>("Jwt");
|
||||||
|
|
||||||
services.AddAuthentication(o => {
|
services.AddAuthentication(o =>
|
||||||
|
{
|
||||||
o.DefaultAuthenticateScheme = JwtBearerDefaults.AuthenticationScheme;
|
o.DefaultAuthenticateScheme = JwtBearerDefaults.AuthenticationScheme;
|
||||||
o.DefaultChallengeScheme = JwtBearerDefaults.AuthenticationScheme;
|
o.DefaultChallengeScheme = JwtBearerDefaults.AuthenticationScheme;
|
||||||
})
|
})
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
namespace BuildingBlocks.Logging;
|
namespace BuildingBlocks.Logging;
|
||||||
|
|
||||||
public class ElasticOptions
|
public class ElasticOptions
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using BuildingBlocks.Web;
|
using BuildingBlocks.Web;
|
||||||
using Microsoft.AspNetCore.Builder;
|
using Microsoft.AspNetCore.Builder;
|
||||||
using Microsoft.AspNetCore.Hosting;
|
using Microsoft.AspNetCore.Hosting;
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
namespace BuildingBlocks.Logging;
|
namespace BuildingBlocks.Logging;
|
||||||
|
|
||||||
public class FileOptions
|
public class FileOptions
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
using System.Security.Claims;
|
using System.Security.Claims;
|
||||||
using Microsoft.AspNetCore.Http;
|
using Microsoft.AspNetCore.Http;
|
||||||
using Serilog;
|
using Serilog;
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
namespace BuildingBlocks.Logging
|
namespace BuildingBlocks.Logging
|
||||||
{
|
{
|
||||||
public class LogOptions
|
public class LogOptions
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
namespace BuildingBlocks.Logging;
|
namespace BuildingBlocks.Logging;
|
||||||
|
|
||||||
public class SentryOptions
|
public class SentryOptions
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
using BuildingBlocks.Core.Event;
|
using BuildingBlocks.Core.Event;
|
||||||
using BuildingBlocks.PersistMessageProcessor;
|
using BuildingBlocks.PersistMessageProcessor;
|
||||||
using MassTransit;
|
using MassTransit;
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
||||||
|
|
||||||
namespace BuildingBlocks.PersistMessageProcessor.Data.Configurations;
|
namespace BuildingBlocks.PersistMessageProcessor.Data.Configurations;
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
using BuildingBlocks.EFCore;
|
using BuildingBlocks.EFCore;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
|
||||||
namespace BuildingBlocks.PersistMessageProcessor.Data;
|
namespace BuildingBlocks.PersistMessageProcessor.Data;
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
using BuildingBlocks.PersistMessageProcessor.Data;
|
using BuildingBlocks.PersistMessageProcessor.Data;
|
||||||
using BuildingBlocks.Web;
|
using BuildingBlocks.Web;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
|
||||||
namespace BuildingBlocks.PersistMessageProcessor;
|
namespace BuildingBlocks.PersistMessageProcessor;
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
using System.Linq.Expressions;
|
using System.Linq.Expressions;
|
||||||
using BuildingBlocks.Core.Event;
|
using BuildingBlocks.Core.Event;
|
||||||
|
|
||||||
namespace BuildingBlocks.PersistMessageProcessor;
|
namespace BuildingBlocks.PersistMessageProcessor;
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
namespace BuildingBlocks.PersistMessageProcessor;
|
namespace BuildingBlocks.PersistMessageProcessor;
|
||||||
|
|
||||||
[Flags]
|
[Flags]
|
||||||
public enum MessageDeliveryType
|
public enum MessageDeliveryType
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
namespace BuildingBlocks.PersistMessageProcessor;
|
namespace BuildingBlocks.PersistMessageProcessor;
|
||||||
|
|
||||||
public enum MessageStatus
|
public enum MessageStatus
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
namespace BuildingBlocks.PersistMessageProcessor;
|
namespace BuildingBlocks.PersistMessageProcessor;
|
||||||
|
|
||||||
using Core.Model;
|
using Core.Model;
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
using Microsoft.Extensions.Hosting;
|
using Microsoft.Extensions.Hosting;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
using Microsoft.Extensions.Options;
|
using Microsoft.Extensions.Options;
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
namespace BuildingBlocks.PersistMessageProcessor;
|
namespace BuildingBlocks.PersistMessageProcessor;
|
||||||
|
|
||||||
public class PersistMessageOptions
|
public class PersistMessageOptions
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
using System.Linq.Expressions;
|
using System.Linq.Expressions;
|
||||||
using System.Text.Json;
|
using System.Text.Json;
|
||||||
using Ardalis.GuardClauses;
|
using Ardalis.GuardClauses;
|
||||||
using BuildingBlocks.Core.Event;
|
using BuildingBlocks.Core.Event;
|
||||||
@ -145,7 +145,8 @@ public class PersistMessageProcessor : IPersistMessageProcessor
|
|||||||
|
|
||||||
await _publishEndpoint.Publish(data, context =>
|
await _publishEndpoint.Publish(data, context =>
|
||||||
{
|
{
|
||||||
foreach (var header in messageEnvelope.Headers) context.Headers.Set(header.Key, header.Value);
|
foreach (var header in messageEnvelope.Headers)
|
||||||
|
context.Headers.Set(header.Key, header.Value);
|
||||||
}, cancellationToken);
|
}, cancellationToken);
|
||||||
|
|
||||||
_logger.LogInformation(
|
_logger.LogInformation(
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
namespace BuildingBlocks.Polly;
|
namespace BuildingBlocks.Polly;
|
||||||
|
|
||||||
using global::Polly;
|
using global::Polly;
|
||||||
using Serilog;
|
using Serilog;
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
namespace BuildingBlocks.Polly;
|
namespace BuildingBlocks.Polly;
|
||||||
|
|
||||||
using System.Net;
|
using System.Net;
|
||||||
using Ardalis.GuardClauses;
|
using Ardalis.GuardClauses;
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
namespace BuildingBlocks.Polly;
|
namespace BuildingBlocks.Polly;
|
||||||
|
|
||||||
using System.Net;
|
using System.Net;
|
||||||
using Ardalis.GuardClauses;
|
using Ardalis.GuardClauses;
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
namespace BuildingBlocks.Polly;
|
namespace BuildingBlocks.Polly;
|
||||||
|
|
||||||
using System.Net;
|
using System.Net;
|
||||||
using Ardalis.GuardClauses;
|
using Ardalis.GuardClauses;
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
namespace BuildingBlocks.Polly;
|
namespace BuildingBlocks.Polly;
|
||||||
|
|
||||||
using System.Net;
|
using System.Net;
|
||||||
using Ardalis.GuardClauses;
|
using Ardalis.GuardClauses;
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
namespace BuildingBlocks.Polly;
|
namespace BuildingBlocks.Polly;
|
||||||
|
|
||||||
public class PolicyOptions
|
public class PolicyOptions
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
namespace BuildingBlocks.ProblemDetails;
|
namespace BuildingBlocks.ProblemDetails;
|
||||||
|
|
||||||
using Exception;
|
using Exception;
|
||||||
using Grpc.Core;
|
using Grpc.Core;
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using Asp.Versioning;
|
using Asp.Versioning;
|
||||||
using Asp.Versioning.ApiExplorer;
|
using Asp.Versioning.ApiExplorer;
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using Microsoft.AspNetCore.Builder;
|
using Microsoft.AspNetCore.Builder;
|
||||||
using Microsoft.Extensions.Configuration;
|
using Microsoft.Extensions.Configuration;
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
@ -33,7 +33,8 @@ public static class ServiceCollectionExtensions
|
|||||||
{
|
{
|
||||||
var xmlFile = XmlCommentsFilePath(assembly);
|
var xmlFile = XmlCommentsFilePath(assembly);
|
||||||
|
|
||||||
if (File.Exists(xmlFile)) options.IncludeXmlComments(xmlFile);
|
if (File.Exists(xmlFile))
|
||||||
|
options.IncludeXmlComments(xmlFile);
|
||||||
}
|
}
|
||||||
|
|
||||||
options.AddEnumsWithValuesFixFilters();
|
options.AddEnumsWithValuesFixFilters();
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Humanizer;
|
using Humanizer;
|
||||||
using Microsoft.AspNetCore.Mvc.ApiExplorer;
|
using Microsoft.AspNetCore.Mvc.ApiExplorer;
|
||||||
using Microsoft.OpenApi.Models;
|
using Microsoft.OpenApi.Models;
|
||||||
|
|||||||
@ -1,4 +1,6 @@
|
|||||||
using Ardalis.GuardClauses;
|
using System.Net;
|
||||||
|
using System.Security.Claims;
|
||||||
|
using Ardalis.GuardClauses;
|
||||||
using BuildingBlocks.Core.Event;
|
using BuildingBlocks.Core.Event;
|
||||||
using BuildingBlocks.Core.Model;
|
using BuildingBlocks.Core.Model;
|
||||||
using BuildingBlocks.EFCore;
|
using BuildingBlocks.EFCore;
|
||||||
@ -20,12 +22,10 @@ using MongoDB.Driver;
|
|||||||
using NSubstitute;
|
using NSubstitute;
|
||||||
using Respawn;
|
using Respawn;
|
||||||
using Serilog;
|
using Serilog;
|
||||||
|
using WebMotions.Fake.Authentication.JwtBearer;
|
||||||
using Xunit;
|
using Xunit;
|
||||||
using Xunit.Abstractions;
|
using Xunit.Abstractions;
|
||||||
using ILogger = Serilog.ILogger;
|
using ILogger = Serilog.ILogger;
|
||||||
using System.Net;
|
|
||||||
using System.Security.Claims;
|
|
||||||
using WebMotions.Fake.Authentication.JwtBearer;
|
|
||||||
|
|
||||||
namespace BuildingBlocks.TestBase;
|
namespace BuildingBlocks.TestBase;
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
namespace BuildingBlocks.TestBase;
|
namespace BuildingBlocks.TestBase;
|
||||||
|
|
||||||
using Testcontainers.EventStoreDb;
|
using Testcontainers.EventStoreDb;
|
||||||
using Testcontainers.MongoDb;
|
using Testcontainers.MongoDb;
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
namespace BuildingBlocks.Utils;
|
namespace BuildingBlocks.Utils;
|
||||||
|
|
||||||
public static class NoSynchronizationContextScope
|
public static class NoSynchronizationContextScope
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
|
|
||||||
namespace BuildingBlocks.Utils;
|
namespace BuildingBlocks.Utils;
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
using Asp.Versioning;
|
using Asp.Versioning;
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
|
|
||||||
namespace BuildingBlocks.Web;
|
namespace BuildingBlocks.Web;
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
using Asp.Versioning;
|
using Asp.Versioning;
|
||||||
using MediatR;
|
using MediatR;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
using Microsoft.Extensions.Configuration;
|
using Microsoft.Extensions.Configuration;
|
||||||
|
|
||||||
namespace BuildingBlocks.Web
|
namespace BuildingBlocks.Web
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
using System.Security.Claims;
|
using System.Security.Claims;
|
||||||
using Microsoft.AspNetCore.Http;
|
using Microsoft.AspNetCore.Http;
|
||||||
|
|
||||||
namespace BuildingBlocks.Web;
|
namespace BuildingBlocks.Web;
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
using Asp.Versioning.Builder;
|
using Asp.Versioning.Builder;
|
||||||
|
|
||||||
namespace BuildingBlocks.Web;
|
namespace BuildingBlocks.Web;
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
using Microsoft.AspNetCore.Routing;
|
using Microsoft.AspNetCore.Routing;
|
||||||
|
|
||||||
namespace BuildingBlocks.Web;
|
namespace BuildingBlocks.Web;
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using BuildingBlocks.Utils;
|
using BuildingBlocks.Utils;
|
||||||
using Microsoft.AspNetCore.Builder;
|
using Microsoft.AspNetCore.Builder;
|
||||||
using Microsoft.AspNetCore.Routing;
|
using Microsoft.AspNetCore.Routing;
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
using NSubstitute;
|
using NSubstitute;
|
||||||
|
|
||||||
namespace BuildingBlocks.Web;
|
namespace BuildingBlocks.Web;
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
using Microsoft.Extensions.Hosting;
|
using Microsoft.Extensions.Hosting;
|
||||||
|
|
||||||
namespace BuildingBlocks.Web;
|
namespace BuildingBlocks.Web;
|
||||||
|
|
||||||
|
|||||||
@ -1,11 +1,5 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||||
|
|
||||||
<PropertyGroup>
|
|
||||||
<TargetFramework>net8.0</TargetFramework>
|
|
||||||
<Nullable>enable</Nullable>
|
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\Booking\Booking.csproj" />
|
<ProjectReference Include="..\Booking\Booking.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|||||||
@ -1,21 +1,15 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
|
||||||
<TargetFramework>net8.0</TargetFramework>
|
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
|
||||||
<Nullable>enable</Nullable>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\..\..\..\BuildingBlocks\BuildingBlocks.csproj" />
|
<ProjectReference Include="..\..\..\..\BuildingBlocks\BuildingBlocks.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Grpc.Tools" Version="2.65.0">
|
<PackageReference Include="Grpc.Tools" Version="2.66.0">
|
||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.7">
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.8">
|
||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
namespace Booking.Booking.Exceptions;
|
namespace Booking.Booking.Exceptions;
|
||||||
|
|
||||||
using BuildingBlocks.Exception;
|
using BuildingBlocks.Exception;
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
namespace Booking.Booking.Exceptions;
|
namespace Booking.Booking.Exceptions;
|
||||||
|
|
||||||
using BuildingBlocks.Exception;
|
using BuildingBlocks.Exception;
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
namespace Booking.Booking.Exceptions;
|
namespace Booking.Booking.Exceptions;
|
||||||
|
|
||||||
using BuildingBlocks.Exception;
|
using BuildingBlocks.Exception;
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
namespace Booking.Booking.Exceptions;
|
namespace Booking.Booking.Exceptions;
|
||||||
|
|
||||||
using BuildingBlocks.Exception;
|
using BuildingBlocks.Exception;
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
namespace Booking.Booking.Exceptions;
|
namespace Booking.Booking.Exceptions;
|
||||||
|
|
||||||
using BuildingBlocks.Exception;
|
using BuildingBlocks.Exception;
|
||||||
public class InvalidFlightNumberException : BadRequestException
|
public class InvalidFlightNumberException : BadRequestException
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
namespace Booking.Booking.Exceptions;
|
namespace Booking.Booking.Exceptions;
|
||||||
|
|
||||||
using BuildingBlocks.Exception;
|
using BuildingBlocks.Exception;
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
namespace Booking.Booking.Exceptions;
|
namespace Booking.Booking.Exceptions;
|
||||||
|
|
||||||
using BuildingBlocks.Exception;
|
using BuildingBlocks.Exception;
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
namespace Booking.Booking.Exceptions;
|
namespace Booking.Booking.Exceptions;
|
||||||
|
|
||||||
using BuildingBlocks.Exception;
|
using BuildingBlocks.Exception;
|
||||||
|
|
||||||
|
|||||||
@ -133,7 +133,8 @@ internal class CreateBookingCommandHandler : ICommandHandler<CreateBooking, Crea
|
|||||||
|
|
||||||
await _flightGrpcServiceClient.ReserveSeatAsync(new ReserveSeatRequest
|
await _flightGrpcServiceClient.ReserveSeatAsync(new ReserveSeatRequest
|
||||||
{
|
{
|
||||||
FlightId = flight.FlightDto.Id, SeatNumber = emptySeat?.SeatNumber
|
FlightId = flight.FlightDto.Id,
|
||||||
|
SeatNumber = emptySeat?.SeatNumber
|
||||||
}, cancellationToken: cancellationToken);
|
}, cancellationToken: cancellationToken);
|
||||||
|
|
||||||
var result = await _eventStoreDbRepository.Add(
|
var result = await _eventStoreDbRepository.Add(
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user