public abstract class RegexNotificationHandler : INotificationHandler
Constructors| Improve this Doc View Source
Initializes a new instance of the RegexNotificationHandler class.
protected RegexNotificationHandler(string regex)
A regular expression that will be used to match Realm paths against.
Methods| Improve this Doc View Source
public abstract Task HandleChangeAsync(IChangeDetails details)
An instance of IChangeDetails, containing detailed information about the changes that have occurred in the Realm.
An awaitable task that, upon completion, signifies that the changes have been processed.
Handlers will be invoked sequentially in the order in which they have been supplied in the Handlers.
This method will be invoked sequentially for Realms with the same path and in parallel for different Realms. This means that if the processing takes a lot of time, it will build up a queue of changes for that Realm path but will not affect notifications from other Realms.
public bool ShouldHandle(string path)
The path to the Realm that has changed. It will be a path relative to the root of your server.
If the handler returns
false and no other handler wants to be notified about
the Realm at this path, then this method will no longer will be called for Realms
with that path. It is recommended that you always return the same value for a path
and perform any additional handling in the HandleChangeAsync(IChangeDetails) method.