feat(DependencyInjection): Hinzufügen von ClientOptions zu Diensten über IOptions.

This commit is contained in:
tekh 2025-07-07 15:49:58 +02:00
parent cf8f9d76e3
commit 2fbd50d52e

View File

@ -4,8 +4,10 @@ namespace Leanetec.EConnect.Client;
public static class DependencyInjection
{
public static IServiceCollection AddEConnectClient(this IServiceCollection services)
public static IServiceCollection AddEConnectClient(this IServiceCollection services, Action<ClientOptions>? clientOptions = null)
{
clientOptions ??= _ => { };
services.Configure(clientOptions);
services.AddMediatR(cfg => cfg.RegisterServicesFromAssembly(typeof(DependencyInjection).Assembly));
return services;
}