Add description to template pattern

This commit is contained in:
Petrutiu Mihai
2016-07-06 09:58:21 +03:00
parent 161e6b7c03
commit 97fb73c7fd

View File

@@ -9,7 +9,23 @@ namespace TemplatePattern
{ {
public static void Run() public static void Run()
{ {
Console.WriteLine(GetDescription());
GoToNextStep();
WorkersExample.WorkersExample.Run(); WorkersExample.WorkersExample.Run();
}
private static string GetDescription()
{
return @"
In software engineering, the template method pattern is a behavioral design pattern that defines the program skeleton of an algorithm in an operation,
defering some steps to subclasses. It lets one redefine certain steps of an algorithm without changing the algorithm's structure.
Template pattern works using 'the Hollywood principle' from the base class point of view: 'Don't call us, we'll call you'";
}
private static void GoToNextStep()
{
Console.ReadKey();
Console.Clear();
} }
} }
} }