Skip to main content

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​
Declaration
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​
Declaration
protected Action<IChangeResult<UNIT>> Handler { get; }

Filter​

A filter that specifies whether or not the observer should get notified.

View Source​
Declaration
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​
Declaration
protected UNIT? lastNotifiedValue

Methods​

OnNext(IChangeResult<UNIT>)​

Called by an Observable when a change occurs.

View Source​
Declaration
public void OnNext(IChangeResult<UNIT> result)
Parameters​
TypeName
Meadow.IChangeResult<UNIT>result

OnCompleted()​

Notifies the observer that the provider has finished sending push-based notifications.

View Source​
Declaration
public void OnCompleted()

OnError(Exception)​

Notifies the observer that the provider has experienced an error condition.

View Source​
Declaration
public void OnError(Exception error)
Parameters​
TypeNameDescription
System.ExceptionerrorAn object that provides additional information about the error.

Implements​

  • System.IObserver<Meadow.IChangeResult<<UNIT>>>