Configuration provider

Overview

Configuration providerarrow-up-right 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);

Obtain settings from providerchevron-rightObserve settings via providerchevron-rightBinding nodes to modelschevron-rightConfiguration sourceschevron-rightAssign sources to typeschevron-rightCaching and performancechevron-rightError handlingchevron-right

Last updated

Was this helpful?