BeatyBit.Bits
0.0.21
Requires NuGet 2.8 or higher.
dotnet add package BeatyBit.Bits --version 0.0.21
NuGet\Install-Package BeatyBit.Bits -Version 0.0.21
<PackageReference Include="BeatyBit.Bits" Version="0.0.21" />
<PackageVersion Include="BeatyBit.Bits" Version="0.0.21" />
<PackageReference Include="BeatyBit.Bits" />
paket add BeatyBit.Bits --version 0.0.21
#r "nuget: BeatyBit.Bits, 0.0.21"
#:package BeatyBit.Bits@0.0.21
#addin nuget:?package=BeatyBit.Bits&version=0.0.21
#tool nuget:?package=BeatyBit.Bits&version=0.0.21
Useful bits of architecture and code for .NET projects
Lifetime Management (Lifetime / LifetimeDefinition)
Instead of the standard IDisposable pattern, which scales poorly across complex object hierarchies, Lifetime provides an advanced system for managing object lifecycles.
Leak Prevention
No longer need to remember to manually call Dispose() in multiple locations. A resource is simply "bound" to the current scope.
Hierarchical Structure:
Lifetime enables the creation of dependency trees. When a parent LifetimeDefinition is terminated, all child Lifetimes and their associated resources are automatically released.
Determinism:
All resources (such as files, network connections, or event subscriptions) are released predictably and in the correct order.
Path Buddy: Type-Safe Path Management
Path Buddy is a lightweight library designed to replace fragile string-based path manipulation with strongly-typed AbsolutePath and RelativePath objects. It integrates with a Lifetime system to handle temporary file cleanup automatically.
Purpose
The primary goal is to eliminate "path-string soup" and manual resource cleanup. By distinguishing between absolute and relative paths at the type level, PathBuddy prevents common bugs (like combining two absolute paths).
Intuitive Path Combining
Uses the / operator for clean, readable path joining (e.g., baseDir / "logs" / "app.log"), replacing cumbersome Path.Combine calls.
Other bits
Maybemonad- A couple of extensions for working with
Dictionary:GetOrCreateValue— encapsulation of often necessary action.GetValueSafe— for use in places where it doesn't matter whether the value is in the Dictionary or not.
LeanList4— list implementation that stores the first four elements inline and falls back to List.Apply— function programming style method
| Product | Versions 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 was computed. |
| .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. |
-
.NETStandard 2.0
NuGet packages (1)
Showing the top 1 NuGet packages that depend on BeatyBit.Bits:
| Package | Downloads |
|---|---|
|
BeatyBit.Binstate
A thread-safe, hierarchical state machine library for .NET. Features include support for async methods, argument passing, state serialization, and more. |
GitHub repositories
This package is not used by any popular GitHub repositories.
# Lifetime Management (Lifetime / LifetimeDefinition)
Instead of the standard `IDisposable` pattern, which scales poorly across complex object hierarchies, `Lifetime` provides an advanced system for managing object lifecycles.
## Leak Prevention
No longer need to remember to manually call `Dispose()` in multiple locations. A resource is simply "bound" to the current scope.
## Hierarchical Structure:
`Lifetime` enables the creation of dependency trees. When a parent `LifetimeDefinition` is terminated, all child `Lifetimes` and their associated resources are automatically released.
## Determinism:
All resources (such as files, network connections, or event subscriptions) are released predictably and in the correct order.
# PathBuddy: Type-Safe Path Management
PathBuddy is a lightweight library designed to replace fragile string-based path manipulation with strongly-typed `AbsolutePath` and `RelativePath` objects. It integrates with a `Lifetime` system to handle temporary file cleanup automatically.
## Purpose
The primary goal is to eliminate "path-string soup" and manual resource cleanup. By distinguishing between absolute and relative paths at the type level, PathBuddy prevents common bugs (like combining two absolute paths).
## Intuitive Path Combining
Uses the / operator for clean, readable path joining (e.g., baseDir / "logs" / "app.log"), replacing cumbersome Path.Combine calls.
# Fixes
`LeanList` inherits IReadonlyList