Class FilterableChangeObserver<UNIT>
An IObserver
that handles change notifications and has an optional
predicate that automatically filters results so only results that match
the predicate will reach the subscriber.
Assembly: Meadow.Contracts.dll
View Source
public class FilterableChangeObserver<UNIT> : IObserver<IChangeResult<UNIT>> where UNIT : struct
Implements:
System.IObserver<Meadow.IChangeResult<<UNIT>>>
Properties
Handler
Than handler that is called in OnNext
if the filter is satisfied.
View Source
protected Action<IChangeResult<UNIT>> Handler { get; }
Filter
A filter that specifies whether or not the observer should get notified.
View Source
protected Predicate<IChangeResult<UNIT>>? Filter { get; }
Fields
lastNotifiedValue
The last notified value. Note that this may differ from the Old
property on the result, because this only gets updated if the filter
is satisfied and the result is sent to the observer.
View Source
protected UNIT? lastNotifiedValue
Methods
OnNext(IChangeResult<UNIT>)
Called by an Observable when a change occurs.
View Source
public void OnNext(IChangeResult<UNIT> result)
Parameters
Type | Name |
---|---|
Meadow.IChangeResult<UNIT> | result |
OnCompleted()
Notifies the observer that the provider has finished sending push-based notifications.
View Source
public void OnCompleted()
OnError(Exception)
Notifies the observer that the provider has experienced an error condition.
View Source
public void OnError(Exception error)
Parameters
Type | Name | Description |
---|---|---|
System.Exception | error | An object that provides additional information about the error. |
Implements
System.IObserver<Meadow.IChangeResult<<UNIT>>>