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;

  • The one with a source parameter requires no such assignment (check out caching for gotchas);

pageObtain settings from providerpageObserve settings via providerpageBinding nodes to modelspageConfiguration sourcespageAssign sources to typespageCaching and performancepageError handling

Last updated