Пример #1
0
        public static void Handler1_Break(object sender, CallHandlerEventArgs <Request> e)
        {
            var handler = e.Handler;

            handler.HasBreakPoint = false;
            handler.Successors    = null;
            handler.HandleRequest(e.Request);
        }
        void Break(object sender, CallHandlerEventArgs args)
        {
            IHandler handler = args.Handler;

            currentType = PurchaseType.Mail;    // 为第二调用做的修改
            args.Handler.HasBreakPoint = false;
            args.Handler.Handle(args.Request);
        }
        void Break(object sender, CallHandlerEventArgs args)
        {
            IHandler handler = args.Handler;

            Assert.AreEqual <PurchaseType>(currentType, args.Handler.Type);
            currentType = PurchaseType.Mail;    // 为第二调用做的修改
            args.Handler.HasBreakPoint = false;
            args.Handler.HandleRequest(args.Request);
        }