public static void Main(string[] args)
 {
     ICloudServerFactory factory;
     if (args[1].Equals("-azure"))
     {
         factory = new AzureCloudServerFactory();
     }
     else
     {
         factory = new AWSCloudServerFactory();
     }
     ICloudServer computeServer = factory.LaunchComputeServer();
     ICloudServer databaseServer = factory.LaunchDatabaseServer();
     // end::ApplicationLauncher[]
 }
Ejemplo n.º 2
0
        public static void Main(string[] args)
        {
            ICloudServerFactory factory;

            if (args[1].Equals("-azure"))
            {
                factory = new AzureCloudServerFactory();
            }
            else
            {
                factory = new AWSCloudServerFactory();
            }
            ICloudServer computeServer  = factory.LaunchComputeServer();
            ICloudServer databaseServer = factory.LaunchDatabaseServer();
            // end::ApplicationLauncher[]
        }