Reactive.Boolean
0.2.0
See the version list below for details.
dotnet add package Reactive.Boolean --version 0.2.0
NuGet\Install-Package Reactive.Boolean -Version 0.2.0
<PackageReference Include="Reactive.Boolean" Version="0.2.0" />
paket add Reactive.Boolean --version 0.2.0
#r "nuget: Reactive.Boolean, 0.2.0"
// Install Reactive.Boolean as a Cake Addin #addin nuget:?package=Reactive.Boolean&version=0.2.0 // Install Reactive.Boolean as a Cake Tool #tool nuget:?package=Reactive.Boolean&version=0.2.0
Reactive.Boolean
Reactive Extensions meant specifically for implementations of IObservable<bool>
This documentation uses marble diagrams to explain the transformations of IObservable<bool>
. More on marble diagrams can be found in the documentation of ReactiveX.
Logical Operators
This library has extension methods for logical operators:
Not
And
And (not distinct)
Or
Or (not distinct)
XOr
Scheduling
This library also has extension methods for scheduling:
PersistTrueFor
Returns an observable that stays true for a time span once the base observable turns back to false.
WhenTrueFor
Returns an observable that emits true once the base observable emits true for a minimum time span.
LimitTrueDuration
Returns an observable that stays true for a maximum of time span. If the base observable emits false before the time has passed, the resulting observable also emits false.
Subscribing
Besides transformations, this library has extension methods that help with common cases of subscribing to implementations of IObservable<bool>
: SubscribeTrueFalse
, SubscribeFalse
and SubscribeTrue
.
Example
boolObservable.SubscribeTrueFalse(
() => {
// Logic for when observable emits true.
},
() => {
// Logic for when observable emits false.
}
)
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. |
-
net6.0
- System.Reactive (>= 6.0.1)
-
net7.0
- System.Reactive (>= 6.0.1)
-
net8.0
- System.Reactive (>= 6.0.1)
-
net9.0
- System.Reactive (>= 6.0.1)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Reactive.Boolean:
Package | Downloads |
---|---|
DevJasper.NetDaemon.Extensions.Observables
Collection of extension methods meant to enhance NetDaemon entities with stateful and boolean observables allowing for more robust implementations and a more intuitive coding experience. |
GitHub repositories
This package is not used by any popular GitHub repositories.