You are currently browsing legacy 3.0 version of documentation. Click here to switch to the newest 4.2 version.

We can help you with migration to the latest RavenDB

Contact Us Now
see on GitHub

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 subscribtions to notifications for all transformers.

Type: IObservableWithTask<TransformerChangeNotification>
Observable that allows to add subscriptions to notifications for all transformers.

Example

IDisposable subscribtion = 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.