RecurringThings 0.1.0-alpha.8

This is a prerelease version of RecurringThings.
dotnet add package RecurringThings --version 0.1.0-alpha.8
                    
NuGet\Install-Package RecurringThings -Version 0.1.0-alpha.8
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="RecurringThings" Version="0.1.0-alpha.8" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="RecurringThings" Version="0.1.0-alpha.8" />
                    
Directory.Packages.props
<PackageReference Include="RecurringThings" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add RecurringThings --version 0.1.0-alpha.8
                    
#r "nuget: RecurringThings, 0.1.0-alpha.8"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package RecurringThings@0.1.0-alpha.8
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=RecurringThings&version=0.1.0-alpha.8&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=RecurringThings&version=0.1.0-alpha.8&prerelease
                    
Install as a Cake Tool

RecurringThings

CI NuGet License

A .NET library for managing recurring events with on-demand virtualization. Instead of pre-materializing all future instances, RecurringThings generates occurrences dynamically during queries.

Features

  • On-demand virtualization - Generate recurring instances only when queried
  • Multi-tenant isolation - Built-in organization and resource path scoping
  • Time zone correctness - Proper DST handling using IANA time zones (NodaTime)
  • RFC 5545 RRule support - Full recurrence rules via Ical.Net
  • Transaction support - ACID operations via Transactional library

Installation

# Core library (required)
dotnet add package RecurringThings

# Choose ONE persistence provider:
dotnet add package RecurringThings.MongoDB
dotnet add package RecurringThings.PostgreSQL

Setup

Register RecurringThings in your Program.cs or Startup.cs:

// Using MongoDB
services.AddRecurringThings(builder =>
    builder.UseMongoDb(options =>
    {
        options.ConnectionString = "mongodb://localhost:27017";
        options.DatabaseName = "myapp";
    }));

// Or using PostgreSQL
services.AddRecurringThings(builder =>
    builder.UsePostgreSql(options =>
    {
        options.ConnectionString = "Host=localhost;Database=myapp;Username=user;Password=pass";
    }));

Then inject IRecurrenceEngine wherever you need it:

public class CalendarService(IRecurrenceEngine engine)
{
    public async Task CreateMeetingAsync() { /* use engine */ }
}

Quick Example

using Ical.Net.DataTypes;
using RecurringThings;

// Build a recurrence pattern using Ical.Net
var pattern = new RecurrencePattern
{
    Frequency = FrequencyType.Weekly,
    Until = new CalDateTime(new DateTime(2025, 12, 31, 23, 59, 59, DateTimeKind.Local).ToUniversalTime())
};
pattern.ByDay.Add(new WeekDay(DayOfWeek.Monday));

// Create a weekly recurring meeting
// Note: RecurrenceEndTime is automatically extracted from the RRule UNTIL clause
await engine.CreateRecurrenceAsync(
    organization: "tenant1",
    resourcePath: "user123/calendar",
    type: "meeting",
    startTime: DateTime.Now,
    duration: TimeSpan.FromHours(1),
    rrule: pattern.ToString(),
    timeZone: "America/New_York");

// Query occurrences in a date range
await foreach (var entry in engine.GetOccurrencesAsync("tenant1", "user123/calendar", start, end, null))
{
    Console.WriteLine($"{entry.Type}: {entry.StartTime} ({entry.EntryType})");
}

// Query recurrence patterns in a date range
await foreach (var entry in engine.GetRecurrencesAsync("tenant1", "user123/calendar", start, end, null))
{
    Console.WriteLine($"Recurrence: {entry.RecurrenceDetails?.RRule}");
}

Domain Model

Entity Description
Recurrence RRule pattern with time window and timezone
Occurrence Standalone non-repeating event
OccurrenceException Cancels a virtualized instance
OccurrenceOverride Modifies a virtualized instance
CalendarEntry Unified query result for all types

Supported Databases

Provider Documentation
MongoDB RecurringThings.MongoDB
PostgreSQL RecurringThings.PostgreSQL

Benchmarking

Run benchmarks locally against MongoDB and/or PostgreSQL:

# Set connection strings (PowerShell)
$env:MONGODB_CONNECTION_STRING = "mongodb://localhost:27017"
$env:POSTGRES_CONNECTION_STRING = "Host=localhost;Database=postgres;Username=postgres;Password=password"

# Run all benchmarks
dotnet run -c Release --project benchmarks/RecurringThings.Benchmarks

# Run specific benchmark class
dotnet run -c Release --project benchmarks/RecurringThings.Benchmarks -- --filter *QueryBenchmarks*

Results are generated in ./BenchmarkResults/ including HTML reports and PNG charts.

License

Apache 2.0 - see LICENSE

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on RecurringThings:

Package Downloads
RecurringThings.PostgreSQL

PostgreSQL persistence provider for RecurringThings library.

RecurringThings.MongoDB

MongoDB persistence provider for RecurringThings library.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.0-alpha.8 20 1/28/2026
0.1.0-alpha.7 23 1/28/2026
0.1.0-alpha.6 21 1/28/2026
0.1.0-alpha.5 25 1/27/2026
0.1.0-alpha.4 25 1/27/2026
0.1.0-alpha.3 29 1/27/2026
0.1.0-alpha.2 25 1/27/2026
0.1.0-alpha.1 25 1/27/2026