18 lines
722 B
C#
18 lines
722 B
C#
using Microsoft.Extensions.Configuration;
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
|
|
namespace Oms.Application.Integrations.Itfx;
|
|
|
|
public static class ItfxServiceExtensions
|
|
{
|
|
public static IServiceCollection AddOmsItfxIntegration(this IServiceCollection services, IConfiguration configuration)
|
|
{
|
|
services.Configure<ItfxGatewayOptions>(configuration.GetSection(ItfxGatewayOptions.SectionName));
|
|
services.AddHttpClient(ItfxMetadataClient.HttpClientName);
|
|
services.AddHttpClient(ItfxForwardClient.HttpClientName);
|
|
services.AddScoped<IItfxMetadataClient, ItfxMetadataClient>();
|
|
services.AddScoped<IItfxForwardClient, ItfxForwardClient>();
|
|
return services;
|
|
}
|
|
}
|