From 97fb73c7fd9f6fa093e43a06ed1b09e7621f281c Mon Sep 17 00:00:00 2001 From: Petrutiu Mihai Date: Wed, 6 Jul 2016 09:58:21 +0300 Subject: [PATCH] Add description to template pattern --- src/TemplatePattern/TemplatePatternExamples.cs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/TemplatePattern/TemplatePatternExamples.cs b/src/TemplatePattern/TemplatePatternExamples.cs index 02433ae..327a7b5 100644 --- a/src/TemplatePattern/TemplatePatternExamples.cs +++ b/src/TemplatePattern/TemplatePatternExamples.cs @@ -9,7 +9,23 @@ namespace TemplatePattern { public static void Run() { + Console.WriteLine(GetDescription()); + GoToNextStep(); 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(); } } }