Guest User

Untitled

a guest
Jan 17th, 2018
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.16 KB | None | 0 0
  1. AddApplicationInsightsTelemetry("XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX")
  2.  
  3. protected override IEnumerable<ServiceInstanceListener> CreateServiceInstanceListeners()
  4. {
  5. return new ServiceInstanceListener[]
  6. {
  7. new ServiceInstanceListener(serviceContext =>
  8. new HttpSysCommunicationListener(serviceContext, "ServiceEndpoint", (url, listener) =>
  9. {
  10. return new WebHostBuilder()
  11. .UseHttpSys()
  12. .ConfigureServices(
  13. services => services
  14. .AddSingleton<StatelessServiceContext>(serviceContext)
  15. .AddApplicationInsightsTelemetry("XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX"))
  16. .UseContentRoot(Directory.GetCurrentDirectory())
  17. .UseStartup<Startup>()
  18. .UseServiceFabricIntegration(listener, ServiceFabricIntegrationOptions.None)
  19. .UseUrls(url)
  20. .Build();
  21. }))
  22. };
  23. }
Add Comment
Please, Sign In to add comment