Rumrunner0.BackToReality.SharedExtensions 0.10.1

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

Back to reality: Shared extensions

General-purpose toolkit of utilities and extensions for everyday .NET code.

dotnet add package Rumrunner0.BackToReality.SharedExtensions

What's inside

Area Highlights
Collections Bounded counting predicates (Some, None, Many, Exactly, AtLeast, MoreThan, LessThan) that never enumerate further than needed; inclusive range removal for lists; tuple deconstruction of lists; collection-initializer Add for any ICollection<T>; reference-equality hash sets; Cycle over a collection.
Cryptography AES-256-GCM string encryption packed into a single Base64 blob (nonce\|tag\|cipher), with strict UTF-8 and zeroing of transient key material; fixed-time string equality.
Disposing DisposableGroup treats many disposables as one: reverse-order disposal, thread-safe single shot, failures collected instead of thrown.
Environment Required environment variables (GetRequired, GetRequiredInt) with culture-invariant parsing.
Exceptions Guard helpers (ThrowIfNull, ThrowIfNullOrEmpty, ThrowIfAnyNull, ...) that capture the argument expression; AggregateException-aware inner-exception search (IsOrHasInner, HasInner) and message joining (JoinMessages).
Extensions String emptiness checks, JSON validation, Base64 decoding, GUID parsing, whitespace splitting, and fluent object shaping (Shape, Chain, Follow).
Serialization JsonSerializerOptionsExtensions.BetterWeb — a shared, read-only JsonSerializerOptions preconfigured with sane web defaults.
Tasks ContinueWithoutContextCaptureConfigureAwait(false) with a name that says what it does, for Task, Task<T>, ValueTask, and ValueTask<T>.
Time DateTimeOffset.Truncate(resolution) and TruncatedTimeProvider which is a TimeProvider truncated to microseconds for storage-friendly timestamps.
ValueObjects IValueObject<TSelf, TValue> — a minimal contract for strongly-typed value wrappers.

Some examples

Counting without over-enumerating:

using Rumrunner0.BackToReality.SharedExtensions.Collections;

var ready = requests.AtLeast(2) && requests.LessThan(100); // enumerates at most 100 items

Guards that report the caller's argument name and teach the compiler:

using Rumrunner0.BackToReality.SharedExtensions.Exceptions;

void Send(Message? message)
{
	ArgumentExceptionExtensions.ThrowIfNull(message); // ArgumentNullException with ParamName "message"
	Deliver(message.Body); // no null warning — the guard is annotated with [NotNull]
}

Symmetric encryption in one line each:

using Rumrunner0.BackToReality.SharedExtensions.Cryptography;

var key = AesGcmSymmetricEncryption.GenerateKey();           // Base64-encoded 256-bit key
var blob = AesGcmSymmetricEncryption.Encrypt("secret", key); // Base64: nonce|tag|cipher
var text = AesGcmSymmetricEncryption.Decrypt(blob, key);     // "secret"

Many disposables as one:

using Rumrunner0.BackToReality.SharedExtensions.Disposing;

using var resources = new DisposableGroup([connection, transaction, reader]);
// Disposed in reverse order; failures are collected into resources.DisposalExceptions.

Development notes

Packages from earlier releases accumulate in bin/Release, and that is expected: dotnet clean runs MSBuild's Clean target, which deletes only the build outputs recorded during the previous build, and the Pack target never records the .nupkg/.snupkg files it produces. These leftover packages are intentionally kept — do not delete them. They are harmless: Nuget/push.zsh picks the exact package file by version, so stale packages are never pushed.

Product Compatible and additional computed target framework versions.
.NET 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.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net9.0

    • No dependencies.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on Rumrunner0.BackToReality.SharedExtensions:

Package Downloads
Rumrunner0.BackToReality.Suspicious

Result monad with rich error semantics and traceable context.

Rumrunner0.BackToReality.PasswordHashing

Password hashing implementations with a convenient API.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.10.1 116 7/19/2026
0.10.0 85 7/19/2026
0.10.0-dev.20260718.1 38 7/18/2026
0.9.0 134 6/28/2026
0.8.10 151 5/19/2026
0.8.9 145 1/7/2026
0.8.7 127 1/2/2026
0.8.4 265 12/13/2025
0.8.3 248 12/13/2025
0.8.2 260 12/12/2025
0.8.1 191 12/12/2025
0.8.0 535 12/10/2025
Loading failed