Add basic memento pattern
This commit is contained in:
@@ -9,22 +9,25 @@ namespace MediatorPattern
|
||||
{
|
||||
public static void Run()
|
||||
{
|
||||
//Console.WriteLine(GetPatternDescription());
|
||||
//Console.WriteLine(GetActors());
|
||||
//Console.WriteLine(WhenToUseIt());
|
||||
//GoToNextStep();
|
||||
Console.WriteLine(GetPatternDescription());
|
||||
Console.WriteLine(GetActors());
|
||||
Console.WriteLine(WhenToUseIt());
|
||||
Console.WriteLine(GetDisadvances());
|
||||
GoToNextStep();
|
||||
|
||||
//StockExchangeExample stockExample = new StockExchangeExample();
|
||||
//stockExample.Run();
|
||||
StockExchangeExample stockExample = new StockExchangeExample();
|
||||
stockExample.Run();
|
||||
|
||||
//GoToNextStep();
|
||||
//GroundAirTrafficControlExample groundAirControl = new GroundAirTrafficControlExample();
|
||||
//groundAirControl.Run();
|
||||
GoToNextStep();
|
||||
GroundAirTrafficControlExample groundAirControl = new GroundAirTrafficControlExample();
|
||||
groundAirControl.Run();
|
||||
|
||||
//GoToNextStep();
|
||||
GoToNextStep();
|
||||
|
||||
FlightAirTrafficControlExample flightAirControl = new FlightAirTrafficControlExample();
|
||||
flightAirControl.Run();
|
||||
|
||||
|
||||
}
|
||||
|
||||
static string GetPatternDescription()
|
||||
@@ -54,6 +57,12 @@ But, don’t play God!
|
||||
";
|
||||
}
|
||||
|
||||
static string GetDisadvances()
|
||||
{
|
||||
return @"Disatvantages:
|
||||
Mediator can become ver complicated as more colleagues are handled";
|
||||
}
|
||||
|
||||
private static void GoToNextStep()
|
||||
{
|
||||
Console.ReadKey();
|
||||
|
||||
Reference in New Issue
Block a user