Open Source Web Application Framework for ASP.NET Core
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.
 
 
 
 
 
 

33 lines
1.1 KiB

using Microsoft.AspNetCore.Mvc.ApplicationParts;
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.AspNetCore.Mvc;
using Volo.Abp.Http.Client;
using Volo.Abp.Http.DynamicProxying;
using Volo.Abp.Modularity;
using Volo.Abp.TestApp;
namespace Volo.Abp.Http
{
[DependsOn(
typeof(AbpHttpClientModule),
typeof(AbpAspNetCoreMvcTestModule)
)]
public class AbpHttpClientTestModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
context.Services.AddHttpClientProxies(typeof(TestAppModule).Assembly);
context.Services.AddHttpClientProxy<IRegularTestController>();
Configure<RemoteServiceOptions>(options =>
{
options.RemoteServices.Default = new RemoteServiceConfiguration("/");
});
//This is needed after ASP.NET Core 3.0 upgrade.
context.Services.AddMvc()
.PartManager.ApplicationParts
.Add(new AssemblyPart(typeof(AbpAspNetCoreMvcModule).Assembly));
}
}
}