Skip to content
This repository has been archived by the owner on Dec 20, 2018. It is now read-only.

Change IOptions<> to IOptionsSnapshot<> #1085

Closed
VahidN opened this issue Jan 25, 2017 · 2 comments
Closed

Change IOptions<> to IOptionsSnapshot<> #1085

VahidN opened this issue Jan 25, 2017 · 2 comments

Comments

@VahidN
Copy link

VahidN commented Jan 25, 2017

reloadOnChange parameter on the AddJsonFile method has no effect on the strongly typed configuration IOptions<> and only IConfigurationRoot is automatically updated whenever the underlying appsettings.json file changes. In ASP.NET Core 1.1.0 IOptionsSnapshot<> has the same behavior.
More info
ASP.NET Core Identity uses IOptions<> everywhere. so it would ne nice to replace IOptions<> with IOptionsSnapshot<> in this framework.

@RehanSaeed
Copy link

What is the point of IOptions<>? I fully expected the reason for it's existence being the reloading ability. Why was IOptionsSnapshot<> created instead and what use is IOptions<> anymore? Why not just register the options type directly?

@blowdart
Copy link
Member

Dupe of aspnet/Options#163

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants