Changes API: How to subscribe to transformer changes?
All transformer changes can be tracked using ForAllTransformers
method.
Syntax
IObservableWithTask<TransformerChangeNotification>
ForAllTransformers();
Return value | |
---|---|
IObservableWithTask<TransformerChangeNotification> | Observable that allows to add subscriptions to notifications for all transformers. |
Type: IObservableWithTask<TransformerChangeNotification>
Observable that allows to add subscriptions to notifications for all transformers.
Example
IDisposable subscription = store
.Changes()
.ForAllTransformers()
.Subscribe(
change =>
{
switch (change.Type)
{
case TransformerChangeTypes.TransformerAdded:
// do something
break;
case TransformerChangeTypes.TransformerRemoved:
// do something
break;
}
});
Remarks
Information
To get more method overloads, especially the ones supporting delegates, please add Reactive Extensions package to your project.