/// <summary> /// 添加新的执行器到执行器链的链尾 /// </summary> /// <param name="Executor">新加的执行器,该执行器的next必须是null,否则可能导致抛出异常或死循环。</param> public void AppendExecutor(SvCommandExecutor Executor) { if (Executor == null) { return; } else { if (this.next == null) { this.next = Executor; } else { this.next.AppendExecutor(Executor); } } }
/// <summary> /// 注册处理函数 /// </summary> /// <param ></param> public void RegisteredModelHandler(SvCommandExecutor handler) { //加入到处理链中 SvCommandChainHeader.AppendExecutor(handler); }