static int Main()

in ILRepack/Application.cs [9:53]


        static int Main(string[] args)
        {
            RepackLogger logger = new RepackLogger();
            RepackOptions options = new RepackOptions(args);
            int returnCode = -1;
            try
            {
                if (options.ShouldShowUsage)
                {
                    Usage();
                    Exit(2);
                }
                logger.ShouldLogVerbose = options.LogVerbose;
                //TODO: Open the Logger before the parse
                if (logger.Open(options.LogFile))
                {
                    options.Log = true;
                }

                ILRepack repack = new ILRepack(options, logger);
                repack.Repack();
                returnCode = 0;
            }
            catch (RepackOptions.InvalidTargetKindException e)
            {
                Console.WriteLine(e.Message);
                Usage();
                Exit(2);
            }
            catch (Exception e)
            {
                logger.Log(e);
                returnCode = 1;
            }
            finally
            {
                logger.Close();
                if (options.PauseBeforeExit)
                {
                    Console.WriteLine("Press Any Key To Continue");
                    Console.ReadKey(true);
                }
            }
            return returnCode;
        }