feat(DependencyInjection): Hinzufügen von ClientOptions zu Diensten über IOptions.
This commit is contained in:
parent
cf8f9d76e3
commit
2fbd50d52e
@ -4,8 +4,10 @@ namespace Leanetec.EConnect.Client;
|
|||||||
|
|
||||||
public static class DependencyInjection
|
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));
|
services.AddMediatR(cfg => cfg.RegisterServicesFromAssembly(typeof(DependencyInjection).Assembly));
|
||||||
return services;
|
return services;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user