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();
        }
示例#2
0
        public void Start()
        {
            _logger.DebugFormat("启动服务 {0}.", ComponentId);

            internalStart();
        }
示例#3
0
 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());
 }