feat(transport): add TransportOptions
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Options;
|
||||
|
||||
namespace ScadaLink.Transport;
|
||||
|
||||
@@ -9,7 +10,8 @@ public static class ServiceCollectionExtensions
|
||||
public static IServiceCollection AddTransport(this IServiceCollection services)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(services);
|
||||
// Concrete services and options binding added in later tasks.
|
||||
services.AddOptions<TransportOptions>().BindConfiguration(OptionsSection);
|
||||
// Concrete services added in later tasks.
|
||||
return services;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user