Skip to content

Commit 540e07b

Browse files
committed
ConfigurationBinder static class -> extension
1 parent a6d160b commit 540e07b

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

src/fdc3/dotnet/DesktopAgent/src/DesktopAgent/DependencyInjection/ServiceCollectionExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public static IServiceCollection InjectFdc3BackendServiceIfEnabledFromConfig(
4949
IConfiguration configuration,
5050
Action<Fdc3DesktopAgentBuilder>? builderAction = null)
5151
{
52-
var fdc3Options = ConfigurationBinder.Get<Fdc3Options>(configuration);
52+
var fdc3Options = configuration.Get<Fdc3Options>();
5353

5454
//TODO: This should be feature toggle, once we have feature toggles in the future - instead of having `EnableFdc3` inside Fdc3Options.
5555
if (fdc3Options.EnableFdc3)

src/shell/dotnet/Shell/App.xaml.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,8 @@ private void ConfigureServices(HostBuilderContext context, IServiceCollection se
113113
.UseAccessToken(_messageRouterAccessToken));
114114

115115
//This can be replaced by the `InjectFdc3BackendServiceIfEnabledFromConfig` extension method
116-
///* services.InjectFdc3BackendServiceIfEnabledFromConfig(fdc3ConfigurationSection);
117-
var fdc3ConfigurationSection = context.Configuration.GetSection(Fdc3Options.Fdc3OptionsName);
118-
var fdc3Options = ConfigurationBinder.Get<Fdc3Options>(fdc3ConfigurationSection);
116+
///* services.InjectFdc3BackendServiceIfEnabledFromConfig(context.Configuration.GetSection(Fdc3Options.Fdc3OptionsName));
117+
var fdc3Options = context.Configuration.GetSection(Fdc3Options.Fdc3OptionsName).Get<Fdc3Options>();
119118

120119
//TODO: This should be feature toggle, once we have feature toggles - instead of having `EnableFdc3` inside Fdc3Options.
121120
if (fdc3Options != null && fdc3Options.EnableFdc3)

0 commit comments

Comments
 (0)