aspnetcore extensions removed
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user