Occurify.Reactive
0.1.0
See the version list below for details.
dotnet add package Occurify.Reactive --version 0.1.0
NuGet\Install-Package Occurify.Reactive -Version 0.1.0
<PackageReference Include="Occurify.Reactive" Version="0.1.0" />
<PackageVersion Include="Occurify.Reactive" Version="0.1.0" />
<PackageReference Include="Occurify.Reactive" />
paket add Occurify.Reactive --version 0.1.0
#r "nuget: Occurify.Reactive, 0.1.0"
#addin nuget:?package=Occurify.Reactive&version=0.1.0
#tool nuget:?package=Occurify.Reactive&version=0.1.0
Occurify.Reactive
Reactive Extensions for Occurify: Enabling seamless scheduling of instant and period-based timelines.
For details on the Occurify ecosystem including examples for this library, please check the following documentation: Occurify main README.
Installation
Occurify.Reactive is distributed as a NuGet package, you can install it from the official NuGet Gallery. Please use the following command to install it using the NuGet Package Manager Console window.
PM> Install-Package Occurify.Reactive
Usage
Rather than working with concrete instants and periods in time, Occurify allows for conceptual representation of time using intstant and period timelines.
For example, rather than listing all workdays of a year to work with, you can define the concept of "all workdays", apply transformations or filters, and extract the relevant periods as needed.
The following example demonstrates how to define a period timeline, workingHours
that includes all periods between 8 AM and 6 PM. By subtracting weekends, we obtain a new period timeline, workingTime
, that represents all workdays within that range:
IPeriodTimeline workingHours = TimeZonePeriods.Between(startHour: 8, endHour: 18);
IPeriodTimeline weekends = TimeZonePeriods.Days(DayOfWeek.Saturday, DayOfWeek.Sunday);
IPeriodTimeline workingTime = workingHours - weekends;
Now, workingTime
represents all workdays from 8 AM and 6 PM and can be used to schedule:
workingTime.ToBooleanObservable(scheduler)
.Subscribe(wt =>
{
if (wt)
{
Console.WriteLine("Time to start working!");
return;
}
Console.WriteLine("Have a nice evening!");
});
License
Copyright © 2025 Jasper Lammers. Occurify.Reactive is licensed under The MIT License (MIT).
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
- Occurify (>= 0.1.0)
- System.Reactive (>= 6.0.1)
-
net7.0
- Occurify (>= 0.1.0)
- System.Reactive (>= 6.0.1)
-
net8.0
- Occurify (>= 0.1.0)
- System.Reactive (>= 6.0.1)
-
net9.0
- Occurify (>= 0.1.0)
- System.Reactive (>= 6.0.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.