server-master/srcs/_plugins/WingsEmu.Plugins.BasicImplementation/Warehouse/WarehouseExtensions.cs
2026-02-10 18:21:30 +01:00

18 lines
No EOL
805 B
C#

using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions;
using PhoenixLib.Events;
using WingsEmu.Game.Warehouse;
using WingsEmu.Game.Warehouse.Events;
namespace WingsEmu.Plugins.BasicImplementations.Warehouse;
public static class WarehouseExtensions
{
public static void AddWarehouseModule(this IServiceCollection services)
{
services.TryAddSingleton<IAccountWarehouseManager, AccountWarehouseManager>();
services.TryAddTransient<IWarehouseFactory, WarehouseFactory>();
services.TryAddTransient<IAsyncEventProcessor<AccountWarehouseAddItemEvent>, AccountWarehouseAddEventHandler>();
services.TryAddTransient<IAsyncEventProcessor<AccountWarehouseWithdrawItemEvent>, AccountWarehouseWithdrawEventHandler>();
}
}