Example #1
0
        /// <summary>
        /// A=>C
        /// </summary>
        /// <returns></returns>
        public static AbstractHander getACHandler()
        {
            ConcreateHandleA concreateHandleA = new ConcreateHandleA();
            ConcreateHandleC concreateHandleC = new ConcreateHandleC();

            concreateHandleA.Hander = concreateHandleC;

            return(concreateHandleA);
        }
Example #2
0
        /// <summary>
        /// C=>B=>A
        /// </summary>
        /// <returns></returns>
        public static AbstractHander getCBAHandler()
        {
            ConcreateHandleA concreateHandleA = new ConcreateHandleA();
            ConcreateHandleB concreateHandleB = new ConcreateHandleB();
            ConcreateHandleC concreateHandleC = new ConcreateHandleC();

            concreateHandleC.Hander = concreateHandleB;
            concreateHandleB.Hander = concreateHandleA;

            return(concreateHandleC);
        }