-
Notifications
You must be signed in to change notification settings - Fork 67
Revisit OptionsMonitor/ReloadableOptions/ChangeTracking #145
Comments
is there a deadline for this feature? |
Assigning to 1.1.0 after talking to @glennc about @DamianEdwards feedback on this. |
@HaoK I see that this is still needing design, but if this is something that can be worked on by the community I'd like to take a stab at this (or part of it). |
|
We also decided that |
How about IOptions [Singleton permanent value] |
I prefer |
Snapshot works for me as well |
Not feeling it. Need to stew on it some more... |
Boo. |
I think it is a pretty good name but besides, Any problem if we go with it for an initial PR? We can keep looking and rename if we find something better. |
Ok I admit it's actually growing on me (but that might just be the 🍺 talking). But yes a PR would be good anyway. Have plenty of time to rename if needed. |
This is a ping to make everyone think about the name again. All the ideas I have had are technically incorrect for one reason or other. So I am hoping someone throws out something amazing... :) |
Looking at what it does, I almost feels like an OptionsCache in that it holds a value that can be invalidated based on a watcher or trigger. There isn't a timeout, but that would be easy to implement. The problem is that the name OptionsCache is already used, but I think it is the thing with the wrong name. It is really an OptionsBuilder/factory or DeferredOptionsBuilder. Just my 2 cents. |
@DamianEdwards how's the stew taste now? |
Go with Snapshot. It is the least bad of all the bad options. @DamianEdwards agrees. |
I'm not sure if this is by design, but it's really confusing and just took me about an hour to debug. There are two different AddOptions extension methods in two different class libraries. In order to get this to work I had to reference Microsoft.Extensions.Options.ConfigurationExtensions in my project.json. Shouldn't there just be a single extension method for consistency? Microsoft.Extensions.Options does not hook up the IOptionsMonitor Microsoft.Extensions.Options.ConfigurationExtensions does: Once I figured out the wrong method was being called, everything worked well. |
Yes this is how things are supposed to work, unless you bind options to an configuration instance, there's no way for the monitoring to be set up. |
Just to add to what @HaoK already said, keep in mind that configuration is right now the only sources of changes that Options knows about. If that changes in the future we may add sugar methods to register other Re the separate package for |
No description provided.
The text was updated successfully, but these errors were encountered: