public void OrleansHostParsePrimarySiloNameArg() { var expectedSiloName = "Primary"; var expectedSiloType = Silo.SiloType.Primary; WindowsServerHost prog = new WindowsServerHost(); Assert.IsTrue(prog.ParseArguments(new string[] { expectedSiloName })); prog.Init(); Assert.AreEqual(expectedSiloType, prog.SiloHost.Type); Assert.AreEqual(expectedSiloName, prog.SiloHost.Name); }
//------------------------------------------------------------------------- static void Main(string[] args) { Console.Title = "FishingCell"; EsEngineSettings settings; settings.NodeType = 3; settings.NodeTypeString = "Cell"; settings.ListenIp = ""; settings.ListenPort = 0; settings.RootEntityType = "EtRoot"; settings.EnableCoSupersocket = false; settings.Log4NetConfigPath = "../../../Media/Fishing/Config/FishingCell.log4net.config"; EsEngine e = new EsEngine(ref settings, new EsEngineListener()); var silo_host = new WindowsServerHost(); int exit_code; try { if (!silo_host.ParseArguments(args)) { silo_host.PrintUsage(); exit_code = -1; } else { silo_host.Init(); exit_code = silo_host.Run(); } } catch (Exception ex) { EbLog.Error(string.Format("halting due to error - {0}", ex.ToString())); exit_code = 1; } finally { silo_host.Dispose(); e.close(); } Environment.Exit(exit_code); }