private void OnKernelComponentRegistered(string key, IHandler handler) { bool isRunnable = (bool)handler.ComponentModel.ExtendedProperties[IsServiceModelPropertyName]; if (isRunnable) { if (handler.CurrentState == HandlerState.WaitingDependency) { _logger.DebugFormat("添加自启动组件 '{0}' 到时等待列表!.", key); _unresolvedComponentsWaitingList.Add(handler); } else { _logger.DebugFormat("启动自启动组件 '{0}'.", key); RunComponent(key); } } CheckUnresolvedWaitingComponents(); }
public void Start() { _logger.DebugFormat("启动服务 {0}.", ComponentId); internalStart(); }
private void Kernel_HandlerRegistered(IHandler handler, ref bool stateChanged) { _logger.DebugFormat("+ Registered new handler for '{0}' - State: _{1}_", handler.ComponentModel.Service.Name, handler.CurrentState.ToString()); }