Exemple #1
0
 public static void Main(string[] args)
 {
     if (args.Length > 0)
     {
         if (args[0] == "-i")
         {
             Install();
         }
         else if (args[0] == "-u")
         {
             Uninstall();
         }
         else if (args[0] == "-d")
         {
             RunAsConsole();
         }
         else
         {
             CommandLine command = new CommandLine();
             if (command.ParseAndContinue(args))
             {
                 try
                 {
                     Encrypter.Encrypt(command);
                 }
                 catch (Exception ex)
                 {
                     Console.WriteLine(command.GetUsage());
                     Console.WriteLine(ex);
                 }
             }
             else
             {
                 Console.WriteLine(command.GetUsage());
             }
         }
     }
     else
     {
         ServiceBase.Run(new TfsDeployerService());
     }
 }