ReactiveVars 0.1.4

There is a newer version of this package available.
See the version list below for details.
dotnet add package ReactiveVars --version 0.1.4                
NuGet\Install-Package ReactiveVars -Version 0.1.4                
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="ReactiveVars" Version="0.1.4" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add ReactiveVars --version 0.1.4                
#r "nuget: ReactiveVars, 0.1.4"                
#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.
// Install ReactiveVars as a Cake Addin
#addin nuget:?package=ReactiveVars&version=0.1.4

// Install ReactiveVars as a Cake Tool
#tool nuget:?package=ReactiveVars&version=0.1.4                

ReactiveVars

Usings

global using LanguageExt;
global using LanguageExt.Common;
global using static LanguageExt.Prelude;
global using Unit = LanguageExt.Unit;

global using Obs = System.Reactive.Linq.Observable;
global using Disp = System.Reactive.Disposables.CompositeDisposable;
global using static ReactiveVars.DispMaker;

global using LR = ReactiveVars.ReactiveVarsLogger;

Disp Tracking

// Create disps (this function is in the DispMaker class)
var d = MkD("Name");

// Call this at the end of your program (or test)
DispDiag.CheckForUndisposedDisps();

Tests

[SetUp] void Setup() {
	Reseter.ResetDispsForTests();
}
[TearDown] void Teardown() {
	DispDiag.CheckForUndisposedDisps();
}

LINQPad

void OnStart() => Reseter.Reset();

Config Tracker

public record struct CfgLog(
	bool WinGeom,
	bool NcHitTest
);

public record struct Cfg(
	CfgLog Log
);

public static class G
{
	private const string ConfigFile = @"config\config.json";

	private static readonly Disp D = new();
	private static readonly IRwVar<IRoVar<Cfg>> CfgVar = Var.Make(RxCfg.Make(ConfigFile, default(Cfg), SysJsoner.Config), D);

	static G()
	{
		var schedD = new ScheduledDisposable(TaskPoolScheduler.Default, D);
		AppDomain.CurrentDomain.ProcessExit += (_, _) =>
		{
			schedD.Dispose();
		};
	}

	public static IRoVar<Cfg> Cfg => CfgVar.Switch().ToVar();
}
Product Compatible and additional computed target framework versions.
.NET 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. 
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
0.2.1 117 6/30/2024
0.2.0 110 6/30/2024
0.1.6 130 2/12/2024
0.1.5 116 1/31/2024
0.1.4 94 1/31/2024
0.1.3 107 1/31/2024
0.1.1 115 1/19/2024
0.1.0 104 1/19/2024