Esempio n. 1
0
        public static void Test()
        {
            Console.WriteLine("============ ChainOfResponsibility Test=============================");

            handle1 = new ConcreteHandle();
            handle2 = new ConcreteHandle();

            //设置了传递的顺序
            handle1.SetNext(handle2);
            handle1.HandleRequest();
        }
Esempio n. 2
0
 /// <summary>
 /// 动态设置下一责任人
 /// </summary>
 /// <param name="next"></param>
 public void SetNext(Handle next)
 {
     this.next = next;
 }