Skip to content

,System.IObservable},System.TimeSpan@,System.Reactive.Concurrency.IScheduler)}

DynamicReactiveView(IReactiveSource, IObservable>, TimeSpan, IScheduler) constructor

Defined in

Type: DynamicReactiveView Namespace: ReactiveList.Reactive.Views Assembly: ReactiveList.Reactive.dll

Applies to

net11.0, net10.0, net47, net471, net472, net48, net481

public DynamicReactiveView(IReactiveSource<T> source, IObservable<Func<T, bool>> filterObservable, in TimeSpan throttle, IScheduler scheduler)

View source (opens in a new tab)

Summary: Initializes a new instance of the DynamicReactiveView class, providing a filtered, observable, and throttled view over a quaternary source that can respond to dynamically changing filter predicates.

Parameters

NameTypeDescription
sourceIReactiveSourceThe quaternary source to observe for changes. Cannot be null.
filterObservableIObservable> (opens in a new tab)An observable sequence of filter predicates. When a new predicate is emitted, the view rebuilds its contents.
in throttleTimeSpan (opens in a new tab)The time interval used to batch incoming notifications from the stream before processing.
schedulerISchedulerThe scheduler on which to observe and process batched notifications, typically used to marshal updates to the appropriate thread (such as the UI thread).

Remarks

The view is populated with items from the source that satisfy the initial filter (all items by default), and then kept up to date by subscribing to the source's change stream. When the filter observable emits a new predicate, the view completely rebuilds its contents. Notifications are buffered according to the specified throttle interval and processed on the given scheduler.

Exceptions

TypeCondition
System.ArgumentNullException (opens in a new tab)Thrown if source, filterObservable, or scheduler is null.