Esempio n. 1
0
        public static int Main(string[] args)
        {
            int exitcode;

#if !CORE
            if (args.Length > 0)
            {
                try
                {
                    Program p = new Program();
                    exitcode = p.ConsoleMain(args);

                }
                catch (Exception e)
                {
                    Utils.WriteToConsole("Exception: " + e.ToString());
                    exitcode = 1;
                }
            }
            else
            {
                ICSharpCode.ILSpy.App app = new ICSharpCode.ILSpy.App();
                app.InitializeComponent();
                app.Run();
                exitcode = 0;
            }
#else
            if (args.Length >= 0)
            {
                try
                {
                    Program p = new Program();
                    exitcode = p.ConsoleMain(args);

                }
                catch (Exception e)
                {
                    Utils.WriteToConsole("Exception: " + e.ToString());
                    exitcode = 1;
                }
            }
            else
            {
                exitcode = 1;
            }
#endif

            return exitcode;
        }
Esempio n. 2
0
        public static int Main(string[] args)
        {
            int exitcode;

#if !CORE
            if (args.Length > 0)
            {
                try
                {
                    Program p = new Program();
                    exitcode = p.ConsoleMain(args);
                }
                catch (Exception e)
                {
                    Utils.WriteToConsole("Exception: " + e.ToString());
                    exitcode = 1;
                }
            }
            else
            {
                ICSharpCode.ILSpy.App app = new ICSharpCode.ILSpy.App();
                app.InitializeComponent();
                app.Run();
                exitcode = 0;
            }
#else
            if (args.Length >= 0)
            {
                try
                {
                    Program p = new Program();
                    exitcode = p.ConsoleMain(args);
                }
                catch (Exception e)
                {
                    Utils.WriteToConsole("Exception: " + e.ToString());
                    exitcode = 1;
                }
            }
            else
            {
                exitcode = 1;
            }
#endif

            return(exitcode);
        }