32 lines
1.0 KiB
C#
32 lines
1.0 KiB
C#
using Prism.Ioc;
|
|
using Prism.Modularity;
|
|
using Prism.Regions;
|
|
using RIZO_Application.Core;
|
|
using System.Reflection;
|
|
using RIZO_Application.Core.Infrastructure.CustomExtensions;
|
|
|
|
namespace RIZO_Application.Modules.LogModule
|
|
{
|
|
public class LogModule : IModule
|
|
{
|
|
private readonly IRegionManager _regionManager;
|
|
|
|
public LogModule(IRegionManager regionManager)
|
|
{
|
|
_regionManager = regionManager;
|
|
}
|
|
|
|
public void OnInitialized(IContainerProvider containerProvider)
|
|
{
|
|
_regionManager.RequestNavigate(RegionNames.LogRegion, "SystemLog");
|
|
}
|
|
|
|
public void RegisterTypes(IContainerRegistry containerRegistry)
|
|
{
|
|
// 自动注册当前程序集中所有带 [AppService] 的类
|
|
containerRegistry.AutoRegisterServices(Assembly.GetExecutingAssembly());
|
|
// 自动注册当前程序集的所有带 [AutoRegisterView] 的视图
|
|
containerRegistry.AutoRegisterViews(Assembly.GetExecutingAssembly());
|
|
}
|
|
}
|
|
} |