2025-10-11 11:33:46 +02:00
|
|
|
using BimAI.UI.Shared.Services;
|
2025-07-17 14:29:02 +02:00
|
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
|
|
|
|
2025-10-11 11:33:46 +02:00
|
|
|
namespace BimAI.UI.Shared.Extensions;
|
2025-07-17 14:29:02 +02:00
|
|
|
|
|
|
|
|
public static class ServiceCollectionExtensions
|
|
|
|
|
{
|
|
|
|
|
public static IServiceCollection AddSharedServices(this IServiceCollection services, string apiBaseUrl)
|
|
|
|
|
{
|
|
|
|
|
services.AddHttpClient<ProductService>(client =>
|
|
|
|
|
{
|
|
|
|
|
client.BaseAddress = new Uri(apiBaseUrl);
|
|
|
|
|
});
|
2025-11-27 23:52:32 +01:00
|
|
|
|
|
|
|
|
services.AddHttpClient<InvoiceService>(client =>
|
|
|
|
|
{
|
|
|
|
|
client.BaseAddress = new Uri(apiBaseUrl);
|
|
|
|
|
});
|
|
|
|
|
|
2025-07-17 14:29:02 +02:00
|
|
|
return services;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|