6
6
using System . ComponentModel . Design ;
7
7
using System . IO ;
8
8
using System . Linq ;
9
- using System . ServiceModel . Configuration ;
10
9
using Autofac ;
11
10
using Autofac . Core ;
12
11
using Microsoft . Extensions . Configuration ;
@@ -101,14 +100,14 @@ protected override void ConfigureJobServices(IServiceCollection services, IConfi
101
100
services . AddTransient < IMessageServiceConfiguration , CoreMessageServiceConfiguration > ( ) ;
102
101
}
103
102
104
-
105
103
services . AddScoped < IEmailBuilderFactory , EmailBuilderFactory > ( ) ;
106
- services . AddScoped < ITelemetryClient , TelemetryClientWrapper > ( ) ;
104
+ services . AddScoped < ITelemetryClient , TelemetryClientWrapper > (
105
+ sp => TelemetryClientWrapper . UseTelemetryConfiguration ( ApplicationInsightsConfiguration . TelemetryConfiguration ) ) ;
107
106
108
- ConfigureGalleryServices ( services , configurationRoot ) ;
107
+ ConfigureGalleryServices ( services ) ;
109
108
}
110
109
111
- protected void ConfigureGalleryServices ( IServiceCollection services , IConfigurationRoot configurationRoot )
110
+ protected void ConfigureGalleryServices ( IServiceCollection services )
112
111
{
113
112
if ( IsDebugMode )
114
113
{
@@ -127,7 +126,6 @@ protected void ConfigureGalleryServices(IServiceCollection services, IConfigurat
127
126
services . AddScoped < IDeleteAccountService , DeleteAccountService > ( ) ;
128
127
129
128
services . AddScoped < IUserService , AccountDeleteUserService > ( ) ;
130
- services . AddScoped < ITelemetryClient > ( sp => { return TelemetryClientWrapper . Instance ; } ) ;
131
129
services . AddScoped < IDiagnosticsService , DiagnosticsService > ( ) ;
132
130
133
131
services . AddScoped < IPackageService , PackageService > ( ) ;
0 commit comments