daily pastebin goal
45%
SHARE
TWEET

Untitled

a guest Jan 17th, 2018 48 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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.     }
RAW Paste Data
Top