aspnetcore extensions removed

This commit is contained in:
2026-01-15 21:10:20 +01:00
Unverified
parent 86e71eb0dc
commit 4b1aa008b4
2 changed files with 0 additions and 27 deletions

View File

@@ -1,21 +0,0 @@
using Microsoft.AspNetCore.Builder;
using Microsoft.Extensions.DependencyInjection;
namespace TimetableDesigner.Backend.Events;
public static class BuilderExtensions
{
public static IServiceCollection AddEventQueue<T>(this IServiceCollection services, Action<T> configuration) where T : EventQueue, new()
{
T builder = new T();
configuration(builder);
builder.Setup(services);
return services;
}
public static void AddEventHandler<T>(this WebApplication app, Func<T, Task> handler) where T : class
{
IEventQueueSubscriber subscriber = app.Services.GetService<IEventQueueSubscriber>()!;
subscriber.Subscribe(handler);
}
}

View File

@@ -17,12 +17,6 @@
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="10.0.2" />
</ItemGroup>
<ItemGroup>
<Reference Include="Microsoft.AspNetCore">
<HintPath>C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App\10.0.2\Microsoft.AspNetCore.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<None Update="icon.png">
<Pack>True</Pack>