Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
pwelter34 authored Oct 2, 2023
1 parent 46391e9 commit eb5afc0
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,13 @@ public class RegistrationModule
[RegisterServices]
public static void Register(IServiceCollection services)
{
services.TryAddTransient<IModuleService, ModuleService>();
// add configuration options
services
.AddOptions<PollingOption>()
.Configure<IConfiguration>((settings, configuration) => configuration
.GetSection(PollingOption.SectionName)
.Bind(settings)
);
}
}
```
Expand Down

0 comments on commit eb5afc0

Please sign in to comment.