Guest User

Untitled

a guest
Nov 23rd, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. using System;
  2. using System.Threading.Tasks;
  3. using Microsoft.Extensions.Logging;
  4. using Orleans.Hosting;
  5. using Orleans.Runtime.Configuration;
  6.  
  7. namespace Silo
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. var silo = BuildSilo();
  14. silo.StartAsync().Wait();
  15.  
  16. Console.ReadLine();
  17. silo.StopAsync().Wait();
  18. }
  19.  
  20. private static ISiloHost BuildSilo()
  21. {
  22. var localConfiguration = ClusterConfiguration.LocalhostPrimarySilo();
  23. localConfiguration.AddMemoryStorageProvider();
  24. return new SiloHostBuilder()
  25. .UseConfiguration(localConfiguration)
  26. .ConfigureLogging(logging => logging.AddConsole())
  27. .Build();
  28. }
  29. }
  30. }
Add Comment
Please, Sign In to add comment