File tree Expand file tree Collapse file tree
application/CohortManager/src/Functions/DemographicServices/RetrievePDSDemographic Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2525 } )
2626 . AddJwtTokenSigning ( config . UseFakePDSServices )
2727 . AddTelemetry ( )
28- . AddServiceBusClient ( config . EffectiveServiceBusConnectionString )
28+ . AddServiceBusClient ( config . ServiceBusConnectionString_client_internal )
2929 . AddHttpClient ( config . UseFakePDSServices )
3030 . Build ( ) ;
3131
Original file line number Diff line number Diff line change 11namespace NHS . CohortManager . DemographicServices ;
22
33using System . ComponentModel . DataAnnotations ;
4- using Microsoft . Extensions . Configuration ;
54
65public class RetrievePDSDemographicConfig
76{
8-
97 [ Required ]
108 public required string RetrievePdsParticipantURL { get ; set ; }
119
@@ -24,33 +22,9 @@ public class RetrievePDSDemographicConfig
2422 [ Required ]
2523 public required string ParticipantManagementTopic { get ; set ; }
2624
27- [ Required ]
28- public required string ServiceBusConnectionString { get ; set ; }
25+ public string ServiceBusConnectionString_client_internal { get ; set ; }
2926
3027 public required bool UseFakePDSServices { get ; set ; } = false ;
31- public string ClientId { get ; set ; } = string . Empty ;
3228
33- [ ConfigurationKeyName ( "ServiceBusConnectionString_client_internal" ) ]
34- public string ? ServiceBusConnectionStringClientInternal { get ; set ; }
35-
36- [ Required ]
37- public string EffectiveServiceBusConnectionString
38- {
39- get
40- {
41- if ( ! string . IsNullOrWhiteSpace ( ServiceBusConnectionString ) )
42- {
43- return ServiceBusConnectionString ;
44- }
45-
46- if ( ! string . IsNullOrWhiteSpace ( ServiceBusConnectionStringClientInternal ) )
47- {
48- return ServiceBusConnectionStringClientInternal ;
49- }
50-
51- throw new InvalidOperationException (
52- "Missing Service Bus connection string. " +
53- "Set ServiceBusConnectionString or ServiceBusConnectionString_client_internal." ) ;
54- }
55- }
29+ public string ClientId { get ; set ; } = string . Empty ;
5630}
You can’t perform that action at this time.
0 commit comments