using Prism.Ioc; using Prism.Modularity; using Prism.Regions; using TcpModbusMasterModule.Views; namespace TcpModbusMasterModule { public class TcpModbusMasterModuleModule : IModule { public void OnInitialized(IContainerProvider containerProvider) { var regionManager = containerProvider.Resolve(); regionManager.RegisterViewWithRegion("ContentRegion", typeof(ViewA)); } public void RegisterTypes(IContainerRegistry containerRegistry) { // 注册服务为单例 containerRegistry.RegisterSingleton(); } } }