-
Notifications
You must be signed in to change notification settings - Fork 763
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use IOptions<T> for DI options #101
Comments
@pakrym do you have suggestion on how Where the constructor of zipkin collector will get the options from?
I'm a bit lost in injections =) |
You can add a Then in UseZipkin method would become something like:
|
I just realized that this will mean that all packages will have a reference to |
I think you can design it in a way where only |
For example StackExchangeRedisCallsCollectorOptions can be be injected as
and StackExchangeRedisCallsCollector must have ctor with IOptions or IOptionsMonitor(for reloading options dynamically) for example:
link: https://docs.microsoft.com/en-US/aspnet/core/fundamentals/configuration/options?view=aspnetcore-2.2
The text was updated successfully, but these errors were encountered: