Ejemplo n.º 1
0
 /*
  * Demonstrate the use of factory method with chaining syntax
  */
 static void Main(string[] args)
 {
     AirConditioner
     .InitializeFactories()
     .ExecuteCreation(Actions.Cooling, 22.5)
     .Operate();
 }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            // Initialize all factories in system
            var factories = AirConditioner.InitializeFactories();

            factories.ExecuteCreation(Factories.Warming, 30).Operate();

            Thread.Sleep(3000);

            factories.ExecuteCreation(Factories.Cooling, 15.5).Operate();

            Thread.Sleep(6000);
        }