/// <summary> /// 应用模块服务 /// </summary> /// <param name="provider">服务提供者</param> public override void UsePack(IServiceProvider provider) { IModuleHandler moduleHandler = provider.GetService <IModuleHandler>(); moduleHandler.Initialize(); //初始化各种缓存 IFunctionHandler functionHandler = provider.GetService <IFunctionHandler>(); functionHandler.RefreshCache(); IEntityInfoHandler entityInfoHandler = provider.GetService <IEntityInfoHandler>(); entityInfoHandler.RefreshCache(); IFunctionAuthCache functionAuthCache = provider.GetService <IFunctionAuthCache>(); functionAuthCache.BuildRoleCaches(); IDataAuthCache dataAuthCache = provider.GetService <IDataAuthCache>(); dataAuthCache.BuildCaches(); IsEnabled = true; }
/// <summary> /// 应用模块服务 /// </summary> /// <param name="provider">服务提供者</param> public override void UsePack(IServiceProvider provider) { IEntityInfoHandler entityInfoHandler = provider.GetService <IEntityInfoHandler>(); entityInfoHandler.RefreshCache(); IDataAuthCache dataAuthCache = provider.GetService <IDataAuthCache>(); dataAuthCache.BuildCaches(); IsEnabled = true; }