Guest User

Untitled

a guest
Dec 16th, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. using System;
  2. using Orleans.Runtime.Host;
  3.  
  4. namespace Silo
  5. {
  6. class Program
  7. {
  8. private static SiloHost _siloHost;
  9.  
  10. static void Main(string[] args)
  11. {
  12. _siloHost = new SiloHost(System.Net.Dns.GetHostName())
  13. {
  14. ConfigFileName = "OrleansConfiguration.xml"
  15. };
  16. _siloHost.InitializeOrleansSilo();
  17. var start = _siloHost.StartOrleansSilo();
  18. if (!start)
  19. {
  20. throw new SystemException(String.Format("Failed to start Orleans silo '{0}' as a {1} node",
  21. _siloHost.Name, _siloHost.Type));
  22. }
  23.  
  24. Console.WriteLine("Silo is running...");
  25. Console.ReadLine();
  26. }
  27. }
  28. }
Add Comment
Please, Sign In to add comment