/// <summary> /// 設定 Donation Concrete Handlers whose extend DonateHandler. /// </summary> /// <returns>The first handler instance.</returns> private DonateHandler SetupHandlers() { DonateHandler people, enterprise, organization; // new all the concreate handlers people = new 個人Handler(); enterprise = new 營利事業Handler(); organization = new 人民團體Handler(); // Set the Handler's Successor people.Successor = enterprise; enterprise.Successor = organization; return people; }
/// <summary> /// 設定 Donation Concrete Handlers whose extend DonateHandler. /// </summary> /// <returns>The first handler instance.</returns> private DonateHandler SetupHandlers() { DonateHandler people, enterprise, organization; // new all the concreate handlers people = new 人Handler(); enterprise = new 營利事業Handler(); organization = new 人民團體Handler(); // Set the Handler's Successor people.Successor = enterprise; enterprise.Successor = organization; return(people); }