Skip to content

},System.IObservable{System.Boolean},System.Reactive.Concurrency.IScheduler)} },System.IObservable{System.Boolean},System.Boolean,System.Reactive.Concurrency.IScheduler)} },System.IObservable{System.Boolean},System.Nullable{System.TimeSpan},System.Reactive.Concurrency.IScheduler)} },System.IObservable{System.Boolean},System.Boolean,System.Nullable{System.TimeSpan},System.Reactive.Concurrency.IScheduler)} },System.IObservable{System.Boolean},System.Boolean,System.IObservable{System.Reactive.Unit},System.Reactive.Concurrency.IScheduler)}

ObservableCacheEx.BatchIf(IObservable>, IObservable, IScheduler?) method

Defined in

Type: ObservableCacheEx Namespace: DynamicData Assembly: DynamicData.dll

Applies to

net10.0, net10.0-browserwasm1.0, net10.0-desktop1.0, net9.0, net9.0-browserwasm1.0, net9.0-desktop1.0, net8.0, net8.0-ios17.5, net8.0-maccatalyst17.5, net8.0-macos14.2, net8.0-macos14.5, net8.0-tvos17.2, netstandard2.1, netstandard2.0, net462

Overloads

  • 1. public static IObservable<IChangeSet<TObject, TKey>> BatchIf<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source, IObservable<bool> pauseIfTrueSelector, IScheduler? scheduler = null) where TObject : notnull where TKey : notnull
  • 2. public static IObservable<IChangeSet<TObject, TKey>> BatchIf<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source, IObservable<bool> pauseIfTrueSelector, bool initialPauseState = false, IScheduler? scheduler = null) where TObject : notnull where TKey : notnull
  • 3. public static IObservable<IChangeSet<TObject, TKey>> BatchIf<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source, IObservable<bool> pauseIfTrueSelector, TimeSpan? timeOut = null, IScheduler? scheduler = null) where TObject : notnull where TKey : notnull
  • 4. public static IObservable<IChangeSet<TObject, TKey>> BatchIf<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source, IObservable<bool> pauseIfTrueSelector, bool initialPauseState = false, TimeSpan? timeOut = null, IScheduler? scheduler = null) where TObject : notnull where TKey : notnull
  • 5. public static IObservable<IChangeSet<TObject, TKey>> BatchIf<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source, IObservable<bool> pauseIfTrueSelector, bool initialPauseState = false, IObservable<Unit>? timer = null, IScheduler? scheduler = null) where TObject : notnull where TKey : notnull

1. Overload

public static IObservable<IChangeSet<TObject, TKey>> BatchIf<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source, IObservable<bool> pauseIfTrueSelector, IScheduler? scheduler = null) where TObject : notnull where TKey : notnull

View source

Summary: Batches the underlying updates if a pause signal (i.e when the buffer selector return true) has been received. When a resume signal has been received the batched updates will be fired.

Type parameters

NameDescription
TObjectThe type of the object.
TKeyThe type of the key.

Parameters

NameTypeDescription
sourceIObservable>The source.
pauseIfTrueSelectorIObservableWhen true, observable begins to buffer and when false, window closes and buffered result if notified.
scheduler = null[IScheduler?](#The scheduler.

Returns: IObservable> -- An observable which emits change sets.

Exceptions

TypeCondition
System.ArgumentNullExceptionsource.

2. Overload

public static IObservable<IChangeSet<TObject, TKey>> BatchIf<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source, IObservable<bool> pauseIfTrueSelector, bool initialPauseState = false, IScheduler? scheduler = null) where TObject : notnull where TKey : notnull

View source

Summary: Batches the underlying updates if a pause signal (i.e when the buffer selector return true) has been received. When a resume signal has been received the batched updates will be fired.

Type parameters

NameDescription
TObjectThe type of the object.
TKeyThe type of the key.

Parameters

NameTypeDescription
sourceIObservable>The source.
pauseIfTrueSelectorIObservableWhen true, observable begins to buffer and when false, window closes and buffered result if notified.
initialPauseState = falseboolif set to true [initial pause state].
scheduler = null[IScheduler?](#The scheduler.

Returns: IObservable> -- An observable which emits change sets.

Exceptions

TypeCondition
System.ArgumentNullExceptionsource.

3. Overload

public static IObservable<IChangeSet<TObject, TKey>> BatchIf<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source, IObservable<bool> pauseIfTrueSelector, TimeSpan? timeOut = null, IScheduler? scheduler = null) where TObject : notnull where TKey : notnull

View source

Summary: Batches the underlying updates if a pause signal (i.e when the buffer selector return true) has been received. When a resume signal has been received the batched updates will be fired.

Type parameters

NameDescription
TObjectThe type of the object.
TKeyThe type of the key.

Parameters

NameTypeDescription
sourceIObservable>The source.
pauseIfTrueSelectorIObservableWhen true, observable begins to buffer and when false, window closes and buffered result if notified.
timeOut = nullTimeSpan?Specify a time to ensure the buffer window does not stay open for too long. On completion buffering will cease.
scheduler = null[IScheduler?](#The scheduler.

Returns: IObservable> -- An observable which emits change sets.

Exceptions

TypeCondition
System.ArgumentNullExceptionsource.

4. Overload

public static IObservable<IChangeSet<TObject, TKey>> BatchIf<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source, IObservable<bool> pauseIfTrueSelector, bool initialPauseState = false, TimeSpan? timeOut = null, IScheduler? scheduler = null) where TObject : notnull where TKey : notnull

View source

Summary: Batches the underlying updates if a pause signal (i.e when the buffer selector return true) has been received. When a resume signal has been received the batched updates will be fired.

Type parameters

NameDescription
TObjectThe type of the object.
TKeyThe type of the key.

Parameters

NameTypeDescription
sourceIObservable>The source.
pauseIfTrueSelectorIObservableWhen true, observable begins to buffer and when false, window closes and buffered result if notified.
initialPauseState = falseboolif set to true [initial pause state].
timeOut = nullTimeSpan?Specify a time to ensure the buffer window does not stay open for too long. On completion buffering will cease.
scheduler = null[IScheduler?](#The scheduler.

Returns: IObservable> -- An observable which emits change sets.

Exceptions

TypeCondition
System.ArgumentNullExceptionsource.

5. Overload

public static IObservable<IChangeSet<TObject, TKey>> BatchIf<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source, IObservable<bool> pauseIfTrueSelector, bool initialPauseState = false, IObservable<Unit>? timer = null, IScheduler? scheduler = null) where TObject : notnull where TKey : notnull

View source

Summary: Batches the underlying updates if a pause signal (i.e when the buffer selector return true) has been received. When a resume signal has been received the batched updates will be fired.

Type parameters

NameDescription
TObjectThe type of the object.
TKeyThe type of the key.

Parameters

NameTypeDescription
sourceIObservable>The source.
pauseIfTrueSelectorIObservableWhen true, observable begins to buffer and when false, window closes and buffered result if notified.
initialPauseState = falseboolif set to true [initial pause state].
timer = nullIObservable?Specify a time observable. The buffer will be emptied each time the timer produces a value and when it completes. On completion buffering will cease.
scheduler = null[IScheduler?](#The scheduler.

Returns: IObservable> -- An observable which emits change sets.

Exceptions

TypeCondition
System.ArgumentNullExceptionsource.