Advertisement
Guest User

Untitled

a guest
Jan 30th, 2017
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. static void Main(string[] args)
  2. {
  3. HostFactory.Run(x =>
  4. {
  5. x.Service<OwinService>(s =>
  6. {
  7. s.ConstructUsing(() => new OwinService());
  8. s.WhenStarted(service => service.Start());
  9. s.WhenStopped(service => service.Stop());
  10. });
  11.  
  12. x.RunAsLocalSystem();
  13. x.StartAutomatically();
  14.  
  15. x.SetDescription("Serviço de testes do Web API Self-Host com Topshelf.");
  16. x.SetDisplayName("WebAPISelfHost");
  17. x.SetServiceName("WebAPISelfHost");
  18. });
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement