Skip to content

Instantly share code, notes, and snippets.

@dcomartin
Created December 14, 2017 02:17
Show Gist options
  • Save dcomartin/ac6a4fd03ba3f06366458f08dd64913c to your computer and use it in GitHub Desktop.
Save dcomartin/ac6a4fd03ba3f06366458f08dd64913c to your computer and use it in GitHub Desktop.
using System;
using Orleans.Runtime.Host;
namespace Silo
{
class Program
{
private static SiloHost _siloHost;
static void Main(string[] args)
{
_siloHost = new SiloHost(System.Net.Dns.GetHostName())
{
ConfigFileName = "OrleansConfiguration.xml"
};
_siloHost.InitializeOrleansSilo();
var start = _siloHost.StartOrleansSilo();
if (!start)
{
throw new SystemException(String.Format("Failed to start Orleans silo '{0}' as a {1} node",
_siloHost.Name, _siloHost.Type));
}
Console.WriteLine("Silo is running...");
Console.ReadLine();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment