// https://github.com/dotnet/coreclr/blob/master/src/coreclr/hosts/coreconsole/coreconsole.cpp private static int Main(string[] args) { EntryConfiguration configuration = new EntryConfiguration(); var localpath = XAssembliesBase.GetEntryAssemblyLocalPath(); if (localpath == null) { XLogBase.LogCritical("Failed to get the path to the current executable."); XConsole.Api.WaitForAcknowledgement(5000); // https://stackoverflow.com/questions/57615/how-to-add-a-timeout-to-console-readline return(-1); } char[] extension = null; //XIO.GetExtensionAsArray(localpath, Case.Lower); // Case.Default, Case.Unknown, Case.Upper extension[1] = 'd'; extension[2] = 'l'; extension[3] = 'l'; bool verbose = false; bool waitForDebugger; bool helpRequested = false; if (helpRequested) { ShowHelp(); return(-1); } else { if (verbose) { XLog.SetLogLevel(LogLevels.Trace); } ProgramResult result = TryRun(configuration); if (result.Successful) { Console.WriteLine("Execution succeeded"); return(0); } else { Console.WriteLine("Execution failed."); return(-1); } } }
private static ProgramResult TryRun(EntryConfiguration configuration) { throw new NotImplementedException(); }