コード例 #1
0
        public void ShutdownModules(CafApplicationContext context)
        {
            var modules = _moduleContainer.Modules.Reverse().ToList();

            foreach (var module in modules)
            {
                ((IOnApplicationShutdown)module.Instance).OnApplicationShutdown(context);
            }
        }
コード例 #2
0
 public void InitializeModules(CafApplicationContext context)
 {
     foreach (var module in _moduleContainer.Modules)
     {
         ((IApplicationInitialization)module.Instance).OnPreApplicationInitialization(context);
     }
     foreach (var module in _moduleContainer.Modules)
     {
         ((IApplicationInitialization)module.Instance).OnApplicationInitialization(context);
     }
     foreach (var module in _moduleContainer.Modules)
     {
         ((IApplicationInitialization)module.Instance).OnPostApplicationInitialization(context);
     }
 }