main() private method

private main ( string args ) : int
args string
return int
コード例 #1
0
ファイル: Program.cs プロジェクト: Ribeiro/Squirrel.Windows
 public static int Main(string[] args)
 {
     var pg = new Program();
     try {
         return pg.main(args);
     } catch (Exception ex) {
         // NB: Normally this is a terrible idea but we want to make
         // sure Setup.exe above us gets the nonzero error code
         Console.Error.WriteLine(ex);
         return -1;
     }
 }
コード例 #2
0
        public static int Main(string[] args)
        {
            var pg = new Program();

            try {
                return(pg.main(args));
            } catch (Exception ex) {
                // NB: Normally this is a terrible idea but we want to make
                // sure Setup.exe above us gets the nonzero error code
                Console.Error.WriteLine(ex);
                return(-1);
            }
        }
コード例 #3
0
        public static int Main(string[] args)
        {
            var pg = new Program();

            try {
                return(pg.main(args));
            } catch (AggregateException ex) {
                Console.Error.WriteLine(ex);
                var installing64bitOn32Bit = ex.InnerExceptions.OfType <Win32Exception>().Any(i => i.NativeErrorCode == ERROR_EXE_MACHINE_TYPE_MISMATCH);
                return(installing64bitOn32Bit ? -2 : -1);
            } catch (Exception ex) {
                // NB: Normally this is a terrible idea but we want to make
                // sure Setup.exe above us gets the nonzero error code
                Console.Error.WriteLine(ex);
                return(-1);
            }
        }