public void ShutdownModules(CafApplicationContext context) { var modules = _moduleContainer.Modules.Reverse().ToList(); foreach (var module in modules) { ((IOnApplicationShutdown)module.Instance).OnApplicationShutdown(context); } }
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); } }