You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
					
					
						
							30 lines
						
					
					
						
							926 B
						
					
					
				
			
		
		
		
			
			
			
				
					
				
				
					
				
			
		
		
	
	
							30 lines
						
					
					
						
							926 B
						
					
					
				
								using System;
							 | 
						|
								using Microsoft.Extensions.DependencyInjection;
							 | 
						|
								using Polly;
							 | 
						|
								using Volo.Abp.Autofac;
							 | 
						|
								using Volo.Abp.Http.Client;
							 | 
						|
								using Volo.Abp.Http.Client.IdentityModel;
							 | 
						|
								using Volo.Abp.Modularity;
							 | 
						|
								
							 | 
						|
								namespace Shentun.Sms.HttpApi.Client.ConsoleTestApp;
							 | 
						|
								
							 | 
						|
								[DependsOn(
							 | 
						|
								    typeof(AbpAutofacModule),
							 | 
						|
								    typeof(SmsHttpApiClientModule),
							 | 
						|
								    typeof(AbpHttpClientIdentityModelModule)
							 | 
						|
								    )]
							 | 
						|
								public class SmsConsoleApiClientModule : AbpModule
							 | 
						|
								{
							 | 
						|
								    public override void PreConfigureServices(ServiceConfigurationContext context)
							 | 
						|
								    {
							 | 
						|
								        PreConfigure<AbpHttpClientBuilderOptions>(options =>
							 | 
						|
								        {
							 | 
						|
								            options.ProxyClientBuildActions.Add((remoteServiceName, clientBuilder) =>
							 | 
						|
								            {
							 | 
						|
								                clientBuilder.AddTransientHttpErrorPolicy(
							 | 
						|
								                    policyBuilder => policyBuilder.WaitAndRetryAsync(3, i => TimeSpan.FromSeconds(Math.Pow(2, i)))
							 | 
						|
								                );
							 | 
						|
								            });
							 | 
						|
								        });
							 | 
						|
								    }
							 | 
						|
								}
							 |