14 lines
375 B
C#
14 lines
375 B
C#
|
|
using Microsoft.Extensions.DependencyInjection;
|
||
|
|
|
||
|
|
namespace Hncore.Infrastructure.Service
|
||
|
|
{
|
||
|
|
public static class IServiceCollectionExtension
|
||
|
|
{
|
||
|
|
public static void AddServiceClient(this IServiceCollection service, string baseUrl)
|
||
|
|
{
|
||
|
|
ServiceHttpClient._BaseUrl = baseUrl;
|
||
|
|
|
||
|
|
service.AddSingleton<ServiceHttpClient>();
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|