public void Start()
        {
            var component1 = new Component1();
            var component2 = new Component2();

            IMediator mediator = new ConcreteMediator(component1, component2);

            component1.SetMediator(mediator);
            component2.SetMediator(mediator);

            Console.WriteLine("Run operation A.");
            component1.MethodA();

            Console.WriteLine();

            Console.WriteLine("Run operation D.");
            component2.MethodD();
        }
 public ConcreteMediator(Component1 component1, Component2 component2)
 {
     _component1 = component1;
     _component2 = component2;
 }