Prognosis.Reactive 2.1.0

dotnet add package Prognosis.Reactive --version 2.1.0
                    
NuGet\Install-Package Prognosis.Reactive -Version 2.1.0
                    
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="Prognosis.Reactive" Version="2.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Prognosis.Reactive" Version="2.1.0" />
                    
Directory.Packages.props
<PackageReference Include="Prognosis.Reactive" />
                    
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 Prognosis.Reactive --version 2.1.0
                    
#r "nuget: Prognosis.Reactive, 2.1.0"
                    
#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 Prognosis.Reactive@2.1.0
                    
#: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=Prognosis.Reactive&version=2.1.0
                    
Install as a Cake Addin
#tool nuget:?package=Prognosis.Reactive&version=2.1.0
                    
Install as a Cake Tool

Prognosis.Reactive

System.Reactive extensions for the Prognosis service health graph. Provides Rx-based alternatives to the polling-based HealthMonitor in the core package.

Installation

dotnet add package Prognosis.Reactive

API

PollHealthReport — timer-driven polling

Polls the full health graph on a fixed interval, notifying all observable services and emitting a HealthReport whenever the graph state changes:

using Prognosis.Reactive;

var roots = new IServiceHealth[] { app };

roots.PollHealthReport(TimeSpan.FromSeconds(30))
    .Subscribe(report =>
        Console.WriteLine($"Overall: {report.OverallStatus}"));

ObserveHealthReport — push-triggered evaluation

Reacts to StatusChanged events from leaf nodes (services with no dependencies), throttles to avoid evaluation storms, then runs a single-pass graph evaluation:

roots.ObserveHealthReport(TimeSpan.FromMilliseconds(500))
    .Subscribe(report =>
        Console.WriteLine($"Overall: {report.OverallStatus}"));

Only leaf nodes are observed as triggers since parent status changes are always a consequence of HealthAggregator.NotifyGraph, not exogenous events.

SelectServiceChanges — diff-based change stream

Projects consecutive HealthReport emissions into individual ServiceStatusChange events by diffing the reports. Composable with any report source:

roots.PollHealthReport(TimeSpan.FromSeconds(30))
    .SelectServiceChanges()
    .Subscribe(change =>
        Console.WriteLine($"{change.Name}: {change.Previous} → {change.Current}"));

Each ServiceStatusChange includes the service name, previous status, current status, and optional reason — derived from HealthAggregator.Diff in the core library.

Sharing patterns

The Rx helpers in this package produce cold IObservable<HealthReport> streams — each subscription runs an independent pipeline and triggers its own evaluations. To avoid duplicate work across multiple subscribers, multicast the stream with one of the common patterns:

  • Auto-start while there are subscribers (stop when last unsubscribes):
var shared = roots.ObserveHealthReport(TimeSpan.FromMilliseconds(500))
    .Publish()
    .RefCount();

shared.Subscribe(...);
shared.Subscribe(...);
  • Replay the latest report to late subscribers:
var shared = roots.ObserveHealthReport(TimeSpan.FromMilliseconds(500))
    .Replay(1)
    .RefCount();

shared.Subscribe(...); // immediate get latest

If you prefer a convenience helper, this package also provides CreateSharedReportStream and CreateSharedObserveStream which wrap these patterns. They are opt-in and live in Prognosis.Reactive.

Dependencies

Requirements

  • .NET Standard 2.0+ (.NET Framework 4.6.1+, .NET Core 2.0+, .NET 5+)
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  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 was computed.  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 was computed.  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 was computed.  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.  net10.0 was computed.  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. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 is compatible. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.1.0 32 2/16/2026
2.0.0 30 2/15/2026
1.0.0 43 2/14/2026