Configuration provider
Overview
Configuration provider is responsible for the binding process and offers methods to obtain final settings models. It's also responsible for caching and error handling. Providers are used directly by the application code to either obtain settings on demand or subscribe to updates.
Methods
Get method
Fetches the newest version of settings of given type:
var settings = provider.Get<MySettings>();
Observe method
Allows to subscribe for updates of settings of given type:
provider.Observe<MySettings>.Subscribe(newSettings => {});
Overloads
Both Get and Observe methods have 2 variations:
The one without any parameters requires a prior assignment of a source to the requested type;
Related pages
Obtain settings from providerObserve settings via providerBinding nodes to modelsConfiguration sourcesAssign sources to typesCaching and performanceError handlingLast updated
Was this helpful?