Skip to content

Commit

Permalink
Merge pull request #62 from neuroglia-io/feat-replace-plugins
Browse files Browse the repository at this point in the history
Replaced plugin-based services by explicit implementations
  • Loading branch information
cdavernas authored Aug 26, 2024
2 parents 0946f97 + 183714c commit 07a1ee8
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,8 @@
<ItemGroup>
<PackageReference Include="AspNetCore.HealthChecks.UI.Client" Version="8.0.1" />
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.21.0" />
<PackageReference Include="Neuroglia.Data.Expressions.JQ" Version="4.14.1" />
<PackageReference Include="Neuroglia.Plugins" Version="4.14.1" />
<PackageReference Include="Neuroglia.Security.AspNetCore" Version="4.14.1" />
<PackageReference Include="Neuroglia.Data.Expressions.JQ" Version="4.15.0" />
<PackageReference Include="Neuroglia.Security.AspNetCore" Version="4.15.0" />
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerGen" Version="6.7.3" />
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerUI" Version="6.7.3" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<ItemGroup>
<PackageReference Include="FluentValidation" Version="11.9.2" />
<PackageReference Include="Grpc.Core.Api" Version="2.65.0" />
<PackageReference Include="Neuroglia.Data.Expressions.Abstractions" Version="4.14.1" />
<PackageReference Include="Neuroglia.Data.Expressions.Abstractions" Version="4.15.0" />
<PackageReference Include="Polly" Version="8.4.1" />
</ItemGroup>

Expand Down
9 changes: 5 additions & 4 deletions src/core/CloudStreams.Core.Api/CloudStreams.Core.Api.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,11 @@
<PackageReference Include="FluentValidation.DependencyInjectionExtensions" Version="11.9.2" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="8.0.8" />
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.21.0" />
<PackageReference Include="Neuroglia.Mediation.AspNetCore" Version="4.14.1" />
<PackageReference Include="Neuroglia.Data.Expressions.JQ" Version="4.14.1" />
<PackageReference Include="Neuroglia.Plugins" Version="4.14.1" />
<PackageReference Include="Neuroglia.Security.AspNetCore" Version="4.14.1" />
<PackageReference Include="Neuroglia.Data.Infrastructure.EventSourcing.EventStore" Version="4.15.0" />
<PackageReference Include="Neuroglia.Data.Infrastructure.ResourceOriented.Redis" Version="4.15.0" />
<PackageReference Include="Neuroglia.Mediation.AspNetCore" Version="4.15.0" />
<PackageReference Include="Neuroglia.Data.Expressions.JQ" Version="4.15.0" />
<PackageReference Include="Neuroglia.Security.AspNetCore" Version="4.15.0" />
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerGen" Version="6.7.3" />
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerUI" Version="6.7.3" />
<PackageReference Include="OpenTelemetry.Exporter.OpenTelemetryProtocol" Version="1.9.0" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
using Microsoft.AspNetCore.ResponseCompression;
using Microsoft.OpenApi.Models;
using Neuroglia.Data.Expressions.JQ;
using Neuroglia.Data.Infrastructure.EventSourcing.Services;
using Neuroglia.Data.Infrastructure.EventSourcing;
using Neuroglia.Data.Infrastructure.ResourceOriented.Redis;
using Neuroglia.Data.PatchModel.Services;
using Neuroglia.Mediation.Services;
using Neuroglia.Plugins;
using Neuroglia.Security.Services;
using Neuroglia.Serialization.Json;
using Neuroglia.Serialization.Yaml;
Expand Down Expand Up @@ -50,6 +50,8 @@ public class CloudStreamsApplicationBuilder
/// <param name="logging">The service used to configure and build logging</param>
public CloudStreamsApplicationBuilder(ConfigurationManager configuration, IHostEnvironment environment, IServiceCollection services, ILoggingBuilder logging)
{
var esdbConnectionString = configuration.GetConnectionString("eventstore")!;
var redisConnectionString = configuration.GetConnectionString("redis")!;
this.Configuration = configuration;
this.Environment = environment;
this.Services = services;
Expand All @@ -71,10 +73,16 @@ public CloudStreamsApplicationBuilder(ConfigurationManager configuration, IHostE
this.Services.AddSingleton<IHttpContextAccessor, HttpContextAccessor>();
this.Services.AddSingleton<IUserAccessor, HttpContextUserAccessor>();
this.Services.AddSingleton<IUserInfoProvider, UserInfoProvider>();
this.Services.AddPluginProvider(this.Configuration);
this.Services.AddPlugin<IEventStore>();
this.Services.AddPlugin<IProjectionManager>();
this.Services.AddPlugin<IDatabase>();
//this.Services.AddPluginProvider(this.Configuration);
//this.Services.AddPlugin<IEventStore>();
//this.Services.AddPlugin<IProjectionManager>();
//this.Services.AddPlugin<IDatabase>();
this.Services.AddEventStoreClient(esdbConnectionString);
this.Services.AddEventStorePersistentSubscriptionsClient(esdbConnectionString);
this.Services.AddEventStoreProjectionManagementClient(esdbConnectionString);
this.Services.AddEsdbEventStore();
this.Services.AddEsdbProjectionManager();
this.Services.AddRedisDatabase(redisConnectionString);
this.Services.AddSingleton<CloudEventStore>();
this.Services.AddSingleton<ICloudEventStore>(provider => provider.GetRequiredService<CloudEventStore>());
this.Services.AddSingleton<IHostedService>(provider => provider.GetRequiredService<CloudEventStore>());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Diagnostics.HealthChecks" Version="8.0.8" />
<PackageReference Include="Neuroglia.Data.Infrastructure.EventSourcing" Version="4.14.1" />
<PackageReference Include="Neuroglia.Data.Infrastructure.ResourceOriented.Abstractions" Version="4.14.1" />
<PackageReference Include="Neuroglia.Data.Infrastructure.EventSourcing" Version="4.15.0" />
<PackageReference Include="Neuroglia.Data.Infrastructure.ResourceOriented.Abstractions" Version="4.15.0" />
<PackageReference Include="System.Linq.Async" Version="6.0.1" />
</ItemGroup>

Expand Down
6 changes: 3 additions & 3 deletions src/core/CloudStreams.Core/CloudStreams.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Neuroglia.Data.Infrastructure.EventSourcing.Abstractions" Version="4.14.1" />
<PackageReference Include="Neuroglia.Data.Infrastructure.ResourceOriented" Version="4.14.1" />
<PackageReference Include="Neuroglia.Eventing.CloudEvents" Version="4.14.1" />
<PackageReference Include="Neuroglia.Data.Infrastructure.EventSourcing.Abstractions" Version="4.15.0" />
<PackageReference Include="Neuroglia.Data.Infrastructure.ResourceOriented" Version="4.15.0" />
<PackageReference Include="Neuroglia.Eventing.CloudEvents" Version="4.15.0" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,8 @@

<ItemGroup>
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.21.0" />
<PackageReference Include="Neuroglia.Data.Expressions.JQ" Version="4.14.1" />
<PackageReference Include="Neuroglia.Plugins" Version="4.14.1" />
<PackageReference Include="Neuroglia.Security.AspNetCore" Version="4.14.1" />
<PackageReference Include="Neuroglia.Data.Expressions.JQ" Version="4.15.0" />
<PackageReference Include="Neuroglia.Security.AspNetCore" Version="4.15.0" />
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerGen" Version="6.7.3" />
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerUI" Version="6.7.3" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

<ItemGroup>
<PackageReference Include="FluentValidation" Version="11.9.2" />
<PackageReference Include="Neuroglia.Data.Expressions.Abstractions" Version="4.14.1" />
<PackageReference Include="Neuroglia.Data.Expressions.Abstractions" Version="4.15.0" />
</ItemGroup>

<ItemGroup>
Expand Down

0 comments on commit 07a1ee8

Please sign in to comment.