2025-04-25 14:23:06 +08:00
|
|
|
|
using JiShe.CollectBus.Protocol.Interfaces;
|
2024-11-13 00:30:24 +08:00
|
|
|
|
using Microsoft.Extensions.DependencyInjection;
|
2025-04-22 16:48:53 +08:00
|
|
|
|
using System.Reflection;
|
2024-11-13 00:30:24 +08:00
|
|
|
|
using Volo.Abp;
|
|
|
|
|
|
using Volo.Abp.Modularity;
|
|
|
|
|
|
|
|
|
|
|
|
namespace JiShe.CollectBus.Protocol
|
|
|
|
|
|
{
|
2025-04-25 12:01:15 +08:00
|
|
|
|
public class JiSheCollectBusProtocolT6452007Module : AbpModule
|
2024-11-13 00:30:24 +08:00
|
|
|
|
{
|
|
|
|
|
|
public override void ConfigureServices(ServiceConfigurationContext context)
|
|
|
|
|
|
{
|
2025-04-25 12:01:15 +08:00
|
|
|
|
context.Services.AddKeyedSingleton<IProtocolPlugin, T6452007ProtocolPlugin>(nameof(T6452007ProtocolPlugin));
|
2024-11-13 00:30:24 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2025-04-15 17:57:47 +08:00
|
|
|
|
public override async Task OnApplicationInitializationAsync(ApplicationInitializationContext context)
|
2024-11-13 00:30:24 +08:00
|
|
|
|
{
|
2025-04-25 15:21:46 +08:00
|
|
|
|
Console.WriteLine($"{nameof(T6452007ProtocolPlugin)} OnApplicationInitializationAsync");
|
2025-04-25 12:01:15 +08:00
|
|
|
|
var standardProtocol = context.ServiceProvider.GetRequiredKeyedService<IProtocolPlugin>(nameof(T6452007ProtocolPlugin));
|
2025-04-22 21:01:28 +08:00
|
|
|
|
await standardProtocol.LoadAsync();
|
2024-11-13 00:30:24 +08:00
|
|
|
|
}
|
2025-04-22 16:48:53 +08:00
|
|
|
|
|
2025-04-24 21:01:01 +08:00
|
|
|
|
public override void OnApplicationShutdown(ApplicationShutdownContext context)
|
|
|
|
|
|
{
|
2025-04-25 15:21:46 +08:00
|
|
|
|
Console.WriteLine($"{nameof(T6452007ProtocolPlugin)} OnApplicationShutdown");
|
2025-04-24 21:01:01 +08:00
|
|
|
|
base.OnApplicationShutdown(context);
|
|
|
|
|
|
}
|
2024-11-13 00:30:24 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|