12345678910111213141516171819202122 |
- using Prism.Ioc;
- using Prism.Modularity;
- using Prism.Regions;
- using TcpModbusSlaveModule.Views;
- namespace TcpModbusSlaveModule
- {
- public class TcpModbusSlaveModuleModule : IModule
- {
- public void OnInitialized(IContainerProvider containerProvider)
- {
- var regionManager = containerProvider.Resolve<RegionManager>();
- regionManager.RegisterViewWithRegion("ContentRegion", typeof(ViewA));
- }
- public void RegisterTypes(IContainerRegistry containerRegistry)
- {
- // 注册服务为单例
- containerRegistry.RegisterSingleton<Service>();
- }
- }
- }
|