feat: Legacy-Version des Client Services erstellt und bestehende Services und Routen integriert
This commit is contained in:
23
src/WindreamHub.Legacy.Client/DIExtensions.cs
Normal file
23
src/WindreamHub.Legacy.Client/DIExtensions.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
using DigitalData.Core.Legacy.Client;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using WindreamHub.Legacy.Client.Route;
|
||||
|
||||
namespace WindreamHub.Legacy.Client
|
||||
{
|
||||
public static class DIExtensions
|
||||
{
|
||||
public static IServiceCollection AddWindreamClientService(this IServiceCollection services, string uri)
|
||||
{
|
||||
services
|
||||
.AddHttpClientService<WindreamClientOptions>(opt =>
|
||||
{
|
||||
opt.Uri = uri;
|
||||
})
|
||||
.AddSingleton<WindreamClientService>()
|
||||
.AddSingleton<SubscriptionsRouteService>()
|
||||
.AddSingleton<SystemDetailsRouteService>();
|
||||
|
||||
return services;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user