Files
6098/Cowain.Bake.BLL/BLLModule.cs

56 lines
2.6 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
using Cowain.Bake.Common.Interface;
using Prism.Ioc;
using Prism.Modularity;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Cowain.Bake.BLL
{
public class BLLModule : IModule
{
public void OnInitialized(IContainerProvider containerProvider) //IUnityContainer
{
// 将容器实例注册为单例
MyAppContainer.Current = containerProvider;
//containerProvider.Resolve<MemoryDataProvider>();
//
}
public void RegisterTypes(IContainerRegistry containerRegistry)
{
containerRegistry.RegisterSingleton<BLL.AlarmContentService>();
containerRegistry.RegisterSingleton<BLL.AlarmService>();
containerRegistry.RegisterSingleton<BLL.BatteryInfoService>();
containerRegistry.RegisterSingleton<BLL.BatteryNGService>();
containerRegistry.RegisterSingleton<BLL.CavityInfoService>();
containerRegistry.RegisterSingleton<BLL.MesDataService>();
containerRegistry.RegisterSingleton<BLL.CavityInfoService>();
containerRegistry.RegisterSingleton<BLL.DeviceConfigService>();
containerRegistry.RegisterSingleton<BLL.ElectricEnergyService>();
containerRegistry.RegisterSingleton<BLL.LogService>();
//containerRegistry.RegisterSingleton<BLL.MemoryDataProvider>(); //IMemoryDataProvider
containerRegistry.RegisterSingleton<BLL.MenuInfoService>();
containerRegistry.RegisterSingleton<BLL.PalletInfoService>();
containerRegistry.RegisterSingleton<BLL.ProcessParamService>();
containerRegistry.RegisterSingleton<BLL.ProductionInformationService>();
containerRegistry.RegisterSingleton<BLL.RoleInfoService>();
containerRegistry.RegisterSingleton<BLL.StationService>();
containerRegistry.RegisterSingleton<BLL.SysSetupService>();
containerRegistry.RegisterSingleton<BLL.StoveSctualPatrolService>();
containerRegistry.RegisterSingleton<BLL.TagListService>();
containerRegistry.RegisterSingleton<BLL.TaskRecordService>();
containerRegistry.RegisterSingleton<BLL.TaskStepService>();
containerRegistry.RegisterSingleton<BLL.TaskTypeService>();
containerRegistry.RegisterSingleton<BLL.UserService>();
}
}
// 定义一个静态类用于保存全局的IUnityContainer实例
public static class MyAppContainer
{
public static IContainerProvider Current { get; set; }
}
}