public void ShutDown(ModuleBearingContext context) { _logger.LogInformation("ShutDown MiCake Application..."); for (int index = 0; index < shutdownLifetimes.Count; index++) { var des = shutdownDes[index]; foreach (var miCakeModule in _modules) { _moduleLogger.LogModuleInfo(miCakeModule, $"MiCake {des}: "); shutdownLifetimes[index](miCakeModule.Instance, context); } } _logger.LogInformation("ShutDown MiCake Application Completed."); }
public void Initialization(ModuleBearingContext context) { _logger.LogInformation("Initialization MiCake Application..."); for (int index = 0; index < initializationLifetimes.Count; index++) { var des = initializationDes[index]; foreach (var miCakeModule in _modules) { _moduleLogger.LogModuleInfo(miCakeModule, $"MiCake {des}: "); initializationLifetimes[index](miCakeModule.Instance, context); } } _initializationActions?.Invoke(context); _logger.LogInformation("Initialization MiCake Application Completed."); }
public virtual void Shutdown(ModuleBearingContext context) { }
public virtual void PreShutDown(ModuleBearingContext context) { }
public virtual void PreInitialization(ModuleBearingContext context) { }