},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
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
| Name | Description |
|---|---|
TObject | The type of the object. |
TKey | The type of the key. |
Parameters
| Name | Type | Description |
|---|---|---|
source | IObservable | The source. |
pauseIfTrueSelector | IObservable | When true, observable begins to buffer and when false, window closes and buffered result if notified. |
scheduler = null | [IScheduler?](# | The scheduler. |
Returns: IObservable
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | source. |
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
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
| Name | Description |
|---|---|
TObject | The type of the object. |
TKey | The type of the key. |
Parameters
| Name | Type | Description |
|---|---|---|
source | IObservable | The source. |
pauseIfTrueSelector | IObservable | When true, observable begins to buffer and when false, window closes and buffered result if notified. |
initialPauseState = false | bool | if set to true [initial pause state]. |
scheduler = null | [IScheduler?](# | The scheduler. |
Returns: IObservable
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | source. |
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
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
| Name | Description |
|---|---|
TObject | The type of the object. |
TKey | The type of the key. |
Parameters
| Name | Type | Description |
|---|---|---|
source | IObservable | The source. |
pauseIfTrueSelector | IObservable | When true, observable begins to buffer and when false, window closes and buffered result if notified. |
timeOut = null | TimeSpan? | 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
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | source. |
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
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
| Name | Description |
|---|---|
TObject | The type of the object. |
TKey | The type of the key. |
Parameters
| Name | Type | Description |
|---|---|---|
source | IObservable | The source. |
pauseIfTrueSelector | IObservable | When true, observable begins to buffer and when false, window closes and buffered result if notified. |
initialPauseState = false | bool | if set to true [initial pause state]. |
timeOut = null | TimeSpan? | 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
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | source. |
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
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
| Name | Description |
|---|---|
TObject | The type of the object. |
TKey | The type of the key. |
Parameters
| Name | Type | Description |
|---|---|---|
source | IObservable | The source. |
pauseIfTrueSelector | IObservable | When true, observable begins to buffer and when false, window closes and buffered result if notified. |
initialPauseState = false | bool | if set to true [initial pause state]. |
timer = null | IObservable | 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
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | source. |