public static void GrainTestsClassCleanUp() { try { hostDomain.DoCallBack(() => { siloHost.Dispose(); siloHost = null; //AppDomain.Unload(hostDomain); }); // vstest execution engine must die var startInfo = new ProcessStartInfo { FileName = "taskkill", Arguments = "/F /IM vstest.executionengine.x86.exe", UseShellExecute = false, WindowStyle = ProcessWindowStyle.Hidden, }; //Process.Start(startInfo); } catch { } }
static void InitSilo(string[] args) { siloHost = new OrleansSiloHost("test"); siloHost.ConfigFileName = "DevTestServerConfiguration.xml"; siloHost.DeploymentId = "1"; siloHost.InitializeOrleansSilo(); var ok = siloHost.StartOrleansSilo(); if (!ok) throw new SystemException(string.Format("Failed to start Orleans silo '{0}' as a {1} node.", siloHost.SiloName, siloHost.SiloType)); }
static void Shutdown() { if (host == null) return; host.StopOrleansSilo(); host.Dispose(); host = null; }
public void Start() { host = new OrleansSiloHost(Dns.GetHostName()) { ConfigFileName = "ServerConfiguration.xml" }; host.InitializeOrleansSilo(); host.StartOrleansSilo(); host.LoadOrleansConfig(); }
static void Shutdown() { if (host == null) { return; } host.StopOrleansSilo(); host.Dispose(); host = null; }
static void InitSilo(string[] args) { siloHost = new OrleansSiloHost("Primary"); siloHost.ConfigFileName = "DevTestServerConfiguration.xml"; siloHost.DeploymentId = "1"; siloHost.InitializeOrleansSilo(); var ok = siloHost.StartOrleansSilo(); if (!ok) { throw new SystemException(string.Format("Failed to start Orleans silo '{0}' as a {1} node.", siloHost.SiloName, siloHost.SiloType)); } }
static void Start(string[] args) { var serverConfigFileName = ConfigurationFilePath("OrleansServerConfigurationForTesting.xml"); host = new OrleansSiloHost(Dns.GetHostName()) { ConfigFileName = serverConfigFileName }; host.LoadOrleansConfig(); host.InitializeOrleansSilo(); host.Config.Globals.ReminderServiceType = GlobalConfiguration.ReminderServiceProviderType.ReminderTableGrain; host.StartOrleansSilo(); }
public static void GrainTestsClassCleanUp() { hostDomain.DoCallBack(() => { siloHost.Dispose(); siloHost = null; AppDomain.Unload(hostDomain); }); var startInfo = new ProcessStartInfo { FileName = "taskkill", Arguments = "/F /IM vstest.executionengine.x86.exe", UseShellExecute = false, WindowStyle = ProcessWindowStyle.Hidden, }; Process.Start(startInfo); }
private bool ParseArguments(string[] args) { string deploymentId = null; string configFileName = "DevTestServerConfiguration.xml"; string siloName = Dns.GetHostName(); // Default to machine name int argPos = 1; for (int i = 0; i < args.Length; i++) { string a = args[i]; if (a.StartsWith("-") || a.StartsWith("/")) { switch (a.ToLowerInvariant()) { case "/?": case "/help": case "-?": case "-help": // Query usage help return(false); default: Console.WriteLine("Bad command line arguments supplied: " + a); return(false); } } else if (a.Contains("=")) { string[] split = a.Split('='); if (String.IsNullOrEmpty(split[1])) { Console.WriteLine("Bad command line arguments supplied: " + a); return(false); } switch (split[0].ToLowerInvariant()) { case "deploymentid": deploymentId = split[1]; break; case "deploymentgroup": // TODO: Remove this at some point in future Console.WriteLine("Ignoring deprecated command line argument: " + a); break; default: Console.WriteLine("Bad command line arguments supplied: " + a); return(false); } } // unqualified arguments below else if (argPos == 1) { siloName = a; argPos++; } else if (argPos == 2) { configFileName = a; argPos++; } else { // Too many command line arguments Console.WriteLine("Too many command line arguments supplied: " + a); return(false); } } siloHost = new OrleansSiloHost(siloName); siloHost.ConfigFileName = configFileName; if (deploymentId != null) { siloHost.DeploymentId = deploymentId; } return(true); }
protected virtual void Dispose(bool dispose) { siloHost.Dispose(); siloHost = null; }
private bool ParseArguments(string[] args) { bool debug = false; string deploymentId = null; string configFileName = "DevTestServerConfiguration.xml"; string siloName = Dns.GetHostName(); // Default to machine name int argPos = 1; for (int i = 0; i < args.Length; i++) { string a = args[i]; if (a.StartsWith("-") || a.StartsWith("/")) { switch (a.ToLowerInvariant()) { case "/?": case "/help": case "-?": case "-help": // Query usage help return false; case "/debug": debug = true; break; default: Console.WriteLine("Bad command line arguments supplied: " + a); return false; } } else if (a.Contains("=")) { string[] split = a.Split('='); if (String.IsNullOrEmpty(split[1])) { Console.WriteLine("Bad command line arguments supplied: " + a); return false; } switch (split[0].ToLowerInvariant()) { case "deploymentid": deploymentId = split[1]; break; case "deploymentgroup": // TODO: Remove this at some point in future Console.WriteLine("Ignoring deprecated command line argument: " + a); break; default: Console.WriteLine("Bad command line arguments supplied: " + a); return false; } } // unqualified arguments below else if (argPos == 1) { siloName = a; argPos++; } else if (argPos == 2) { configFileName = a; argPos++; } else { // Too many command line arguments Console.WriteLine("Too many command line arguments supplied: " + a); return false; } } siloHost = new OrleansSiloHost(siloName); siloHost.ConfigFileName = configFileName; if (deploymentId != null) siloHost.DeploymentId = deploymentId; return true; }
internal OrleansService(OrleansSiloHost host) { _host = host; }