Skip to content

Instantly share code, notes, and snippets.

@dcomartin

dcomartin/Program.cs

Created Dec 14, 2017
Embed
What would you like to do?
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