minor fix to removal of deprecated Azure Dev Spaces support
This commit is contained in:
		
							parent
							
								
									e43cf8effa
								
							
						
					
					
						commit
						242cbeabaf
					
				| @ -17,7 +17,6 @@ public class Startup | |||||||
|             .AddAppInsight(Configuration) |             .AddAppInsight(Configuration) | ||||||
|             .AddHealthChecks(Configuration) |             .AddHealthChecks(Configuration) | ||||||
|             .AddCustomMvc(Configuration) |             .AddCustomMvc(Configuration) | ||||||
|             .AddDevspaces() |  | ||||||
|             .AddHttpClientServices(Configuration); |             .AddHttpClientServices(Configuration); | ||||||
| 
 | 
 | ||||||
|         IdentityModelEventSource.ShowPII = true;       // Caution! Do NOT use in production: https://aka.ms/IdentityModel/PII |         IdentityModelEventSource.ShowPII = true;       // Caution! Do NOT use in production: https://aka.ms/IdentityModel/PII | ||||||
| @ -126,21 +125,18 @@ static class ServiceCollectionExtensions | |||||||
|         services.AddTransient<HttpClientRequestIdDelegatingHandler>(); |         services.AddTransient<HttpClientRequestIdDelegatingHandler>(); | ||||||
| 
 | 
 | ||||||
|         //set 5 min as the lifetime for each HttpMessageHandler int the pool |         //set 5 min as the lifetime for each HttpMessageHandler int the pool | ||||||
|         services.AddHttpClient("extendedhandlerlifetime").SetHandlerLifetime(TimeSpan.FromMinutes(5)).AddDevspacesSupport(); |         services.AddHttpClient("extendedhandlerlifetime").SetHandlerLifetime(TimeSpan.FromMinutes(5)); | ||||||
| 
 | 
 | ||||||
|         //add http client services |         //add http client services | ||||||
|         services.AddHttpClient<IBasketService, BasketService>() |         services.AddHttpClient<IBasketService, BasketService>() | ||||||
|                 .SetHandlerLifetime(TimeSpan.FromMinutes(5))  //Sample. Default lifetime is 2 minutes |                 .SetHandlerLifetime(TimeSpan.FromMinutes(5))  //Sample. Default lifetime is 2 minutes | ||||||
|                 .AddHttpMessageHandler<HttpClientAuthorizationDelegatingHandler>() |                 .AddHttpMessageHandler<HttpClientAuthorizationDelegatingHandler>(); | ||||||
|                 .AddDevspacesSupport(); |  | ||||||
| 
 | 
 | ||||||
|         services.AddHttpClient<ICatalogService, CatalogService>() |         services.AddHttpClient<ICatalogService, CatalogService>(); | ||||||
|                 .AddDevspacesSupport(); |  | ||||||
| 
 | 
 | ||||||
|         services.AddHttpClient<IOrderingService, OrderingService>() |         services.AddHttpClient<IOrderingService, OrderingService>() | ||||||
|                 .AddHttpMessageHandler<HttpClientAuthorizationDelegatingHandler>() |                 .AddHttpMessageHandler<HttpClientAuthorizationDelegatingHandler>() | ||||||
|                 .AddHttpMessageHandler<HttpClientRequestIdDelegatingHandler>() |                 .AddHttpMessageHandler<HttpClientRequestIdDelegatingHandler>(); | ||||||
|                 .AddDevspacesSupport(); |  | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|         //add custom application services |         //add custom application services | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user