Beispiel #1
0
 static void Main(string[] args)
 {
     var options = new Options();
     if (CommandLineParser.Default.ParseArguments(args, options))
     {
         var webClient = new Core.WebClient();
         var controller = new Core.Controller(webClient, new Uri("https://" + options.Host));
         switch (options.Command)
         {
             case Command.GetPowerState:
                 System.Console.WriteLine("PowerStatus: " + controller.GetPowerState());
                 break;
             case Command.PowerOn:
                 controller.PowerOn();
                 break;
         }
     }
 }
Beispiel #2
0
        static void Main(string[] args)
        {
            var options = new Options();

            if (CommandLineParser.Default.ParseArguments(args, options))
            {
                var webClient  = new Core.WebClient();
                var controller = new Core.Controller(webClient, new Uri("https://" + options.Host));
                switch (options.Command)
                {
                case Command.GetPowerState:
                    System.Console.WriteLine("PowerStatus: " + controller.GetPowerState());
                    break;

                case Command.PowerOn:
                    controller.PowerOn();
                    break;
                }
            }
        }