Skip to main content

How to subscribe to configuration item changes?

Remarks

#How to subscribe to configuration item changes?

All configuration changes can be tracked by using ForConfiguration method.

IObservableWithTask<ConfigurationChangeNotification> ForConfiguration();
Return Value
IObservableWithTask<ConfigurationChangeNotification>The observable that allows to add subscriptions to received notifications

Example

IDisposable subscription = store
.Changes()
.ForConfiguration()
.Subscribe(change =>
{
switch (change.Action)
{
case ConfigurationChangeAction.Set:
// do something
break;
case ConfigurationChangeAction.Delete:
// do something
break;
}
});

Remarks

To get more method overloads, especially the ones supporting delegates, please add Reactive Extensions package to your project.