-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathProgram.cs
More file actions
27 lines (25 loc) · 894 Bytes
/
Program.cs
File metadata and controls
27 lines (25 loc) · 894 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
using Common;
using DataServices.Client;
using HealthChecks.Extensions;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Model;
using NHS.CohortManager.ParticipantManagementServices;
var host = new HostBuilder()
.AddConfiguration(out ManageServiceNowParticipantConfig config)
.AddDataServicesHandler()
.AddDataService<ParticipantManagement>(config.ParticipantManagementURL)
.Build()
.ConfigureFunctionsWorkerDefaults()
.ConfigureServices(services =>
{
// Register health checks
services.AddBasicHealthCheck("ManageServiceNowParticipant");
services.AddTransient<IBlobStorageHelper, BlobStorageHelper>();
})
.AddServiceBusClient(config.ServiceBusConnectionString_client_internal)
.AddTelemetry()
.AddExceptionHandler()
.AddHttpClient()
.Build();
await host.RunAsync();