Moved using statements to globalusing Devspaces
This commit is contained in:
		
							parent
							
								
									4ef6c63bdd
								
							
						
					
					
						commit
						2276c46027
					
				| @ -1,13 +1,7 @@ | |||||||
| using Microsoft.AspNetCore.Http; | namespace Devspaces.Support; | ||||||
| using System.Collections.Generic; |  | ||||||
| using System.Net.Http; |  | ||||||
| using System.Threading; |  | ||||||
| using System.Threading.Tasks; |  | ||||||
| 
 | 
 | ||||||
| namespace Devspaces.Support | public class DevspacesMessageHandler : DelegatingHandler | ||||||
| { | { | ||||||
|     public class DevspacesMessageHandler : DelegatingHandler |  | ||||||
|     { |  | ||||||
|     private const string DevspacesHeaderName = "azds-route-as"; |     private const string DevspacesHeaderName = "azds-route-as"; | ||||||
|     private readonly IHttpContextAccessor _httpContextAccessor; |     private readonly IHttpContextAccessor _httpContextAccessor; | ||||||
|     public DevspacesMessageHandler(IHttpContextAccessor httpContextAccessor) |     public DevspacesMessageHandler(IHttpContextAccessor httpContextAccessor) | ||||||
| @ -25,5 +19,4 @@ namespace Devspaces.Support | |||||||
|         } |         } | ||||||
|         return base.SendAsync(request, cancellationToken); |         return base.SendAsync(request, cancellationToken); | ||||||
|     } |     } | ||||||
|     } |  | ||||||
| } | } | ||||||
|  | |||||||
| @ -1,13 +1,10 @@ | |||||||
| using Microsoft.Extensions.DependencyInjection; | namespace Devspaces.Support; | ||||||
| 
 | 
 | ||||||
| namespace Devspaces.Support | public static class HttpClientBuilderDevspacesExtensions | ||||||
| { | { | ||||||
|     public static class HttpClientBuilderDevspacesExtensions |  | ||||||
|     { |  | ||||||
|     public static IHttpClientBuilder AddDevspacesSupport(this IHttpClientBuilder builder) |     public static IHttpClientBuilder AddDevspacesSupport(this IHttpClientBuilder builder) | ||||||
|     { |     { | ||||||
|         builder.AddHttpMessageHandler<DevspacesMessageHandler>(); |         builder.AddHttpMessageHandler<DevspacesMessageHandler>(); | ||||||
|         return builder; |         return builder; | ||||||
|     } |     } | ||||||
|     } |  | ||||||
| } | } | ||||||
|  | |||||||
| @ -1,13 +1,10 @@ | |||||||
| using Microsoft.Extensions.DependencyInjection; | namespace Devspaces.Support; | ||||||
| 
 | 
 | ||||||
| namespace Devspaces.Support | public static class ServiceCollectionDevspacesExtensions | ||||||
| { | { | ||||||
|     public static class ServiceCollectionDevspacesExtensions |  | ||||||
|     { |  | ||||||
|     public static IServiceCollection AddDevspaces(this IServiceCollection services) |     public static IServiceCollection AddDevspaces(this IServiceCollection services) | ||||||
|     { |     { | ||||||
|         services.AddTransient<DevspacesMessageHandler>(); |         services.AddTransient<DevspacesMessageHandler>(); | ||||||
|         return services; |         return services; | ||||||
|     } |     } | ||||||
|     } |  | ||||||
| } | } | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user