示例#1
0
 // The client code calls the template method to execute the algorithm.
 // Client code does not have to know the concrete class of an object it
 // works with, as long as it works with objects through the interface of
 // their base class.
 public static void ClientCode(AbstractClass abstractClass)
 {
     abstractClass.TemplateMethod();
 }
示例#2
0
 public void ClientCode(AbstractClass abstracted)
 {
     abstracted.TemplateMethod();
 }