Add partial example UsersToGroups
This commit is contained in:
@@ -13,11 +13,11 @@ namespace MediatorPattern
|
||||
{
|
||||
Console.WriteLine(GetPatternDescription());
|
||||
Console.WriteLine(GetActors());
|
||||
Console.WriteLine(WhenToUseIt());
|
||||
GoToNextStep();
|
||||
|
||||
//GoToNextStep();
|
||||
|
||||
//StockExchangeExample stockExample = new StockExchangeExample();
|
||||
//stockExample.Run();
|
||||
StockExchangeExample stockExample = new StockExchangeExample();
|
||||
stockExample.Run();
|
||||
|
||||
GoToNextStep();
|
||||
AirTrafficControlExample airTraficExample = new AirTrafficControlExample();
|
||||
@@ -41,6 +41,16 @@ Colleague: objects that communicate through the mediator
|
||||
";
|
||||
}
|
||||
|
||||
static string WhenToUseIt()
|
||||
{
|
||||
return @"When to use it:
|
||||
Identify a collection of interacting objects whose interaction needs simplification
|
||||
Get a new abstract class that encapsulates that interaction
|
||||
Create a instance of that class and redo the interaction with that class alone
|
||||
But, don’t play God!
|
||||
";
|
||||
}
|
||||
|
||||
private static void GoToNextStep()
|
||||
{
|
||||
Console.ReadKey();
|
||||
|
||||
Reference in New Issue
Block a user