Add comments so that it's easy to know what each class represents on Template method pattern

This commit is contained in:
Petrutiu Mihai
2016-07-26 14:27:47 +03:00
parent 3aa1362369
commit 9e7f17df12
6 changed files with 16 additions and 1 deletions

View File

@@ -5,6 +5,9 @@ using System.Threading.Tasks;
namespace TemplatePattern.GameExample
{
/// <summary>
/// Concrete class
/// </summary>
public class Basketball : Game
{
protected override void EndGame()

View File

@@ -5,6 +5,9 @@ using System.Threading.Tasks;
namespace TemplatePattern.GameExample
{
/// <summary>
/// Concrete class
/// </summary>
public class Football : Game
{
protected override void EndGame()

View File

@@ -5,6 +5,9 @@ using System.Threading.Tasks;
namespace TemplatePattern.GameExample
{
/// <summary>
/// Framework/Abstract class
/// </summary>
public abstract class Game
{
protected abstract void InitGame();

View File

@@ -5,6 +5,9 @@ using System.Threading.Tasks;
namespace TemplatePattern.WorkersExample
{
/// <summary>
/// ConcreteClass
/// </summary>
public class Manager : Worker
{
protected override void GoToWork()

View File

@@ -5,6 +5,9 @@ using System.Threading.Tasks;
namespace TemplatePattern.WorkersExample
{
/// <summary>
/// Concrete class
/// </summary>
public class Student : Worker
{
protected override void WakeUpAndDrinkCoffee()

View File

@@ -6,7 +6,7 @@ using System.Threading.Tasks;
namespace TemplatePattern.WorkersExample
{
/// <summary>
/// Framework class
/// Framework-Abstract class
/// </summary>
public abstract class Worker
{