Mono.CSharp.Driver.Main C# (CSharp) Method

Main() public static method

public static Main ( string args ) : int
args string
return int
		public static int Main (string[] args)
		{
			Location.InEmacs = Environment.GetEnvironmentVariable ("EMACS") == "t";
			var crp = new ConsoleReportPrinter ();
			Driver d = Driver.Create (args, true, null, crp);
			if (d == null)
				return 1;

			crp.Fatal = d.fatal_errors;

			if (d.Compile () && d.Report.Errors == 0) {
				if (d.Report.Warnings > 0) {
					Console.WriteLine ("Compilation succeeded - {0} warning(s)", d.Report.Warnings);
				}
				Environment.Exit (0);
				return 0;
			}
			
			
			Console.WriteLine("Compilation failed: {0} error(s), {1} warnings",
				d.Report.Errors, d.Report.Warnings);
			Environment.Exit (1);
			return 1;
		}