public static void Main(string[] args) { ServicePointManager.DefaultConnectionLimit = 12; XmlConfigurator.Configure(); GridServerBase app = new GridServerBase(); app.Startup(); app.Work(); }
public static void Main(string[] args) { // Please note that if you are changing something in this function you should check to see if you need to change the other server's Main functions as well. // Under any circumstance other than an explicit exit the exit code should be 1. Environment.ExitCode = 1; ServicePointManager.DefaultConnectionLimit = 12; // Add the arguments supplied when running the application to the configuration var configSource = new ArgvConfigSource(args); configSource.Alias.AddAlias("On", true); configSource.Alias.AddAlias("Off", false); configSource.Alias.AddAlias("True", true); configSource.Alias.AddAlias("False", false); configSource.Alias.AddAlias("Yes", true); configSource.Alias.AddAlias("No", false); configSource.AddSwitch("Startup", "background"); configSource.AddSwitch("Startup", "pidfile"); m_log.Info("[SERVER]: Launching GridServer..."); var pidFile = new PIDFileManager(configSource.Configs["Startup"].GetString("pidfile", string.Empty)); XmlConfigurator.Configure(); bool background = configSource.Configs["Startup"].GetBoolean("background", false); GridServerBase app; if (background) { m_log.Info("[GridServer MAIN]: set to background"); app = new GridServerBackground(); } else { m_log.Info("[GridServer MAIN]: set to foreground"); app = new GridServerBase(); } pidFile.SetStatus(PIDFileManager.Status.Starting); app.Startup(); pidFile.SetStatus(PIDFileManager.Status.Running); app.Work(); }
public static void Main(string[] args) { XmlConfigurator.Configure(); GridServerBase app = new GridServerBase(); // if (args.Length > 0 && args[0] == "-setuponly") // { // app.Config(); // } // else // { app.Startup(); app.Work(); // } }
public GridPluginInitializer(GridServerBase s) { server = s; }