/// <summary> /// A=>C /// </summary> /// <returns></returns> public static AbstractHander getACHandler() { ConcreateHandleA concreateHandleA = new ConcreateHandleA(); ConcreateHandleC concreateHandleC = new ConcreateHandleC(); concreateHandleA.Hander = concreateHandleC; return(concreateHandleA); }
/// <summary> /// B=>C /// </summary> /// <returns></returns> public static AbstractHander getbCHandler() { ConcreateHandleB concreateHandleB = new ConcreateHandleB(); ConcreateHandleC concreateHandleC = new ConcreateHandleC(); concreateHandleB.Hander = concreateHandleC; return(concreateHandleB); }
/// <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); }