ThunderPropagator.BuildingBlocks.Modules 1.0.1-beta.26

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

ThunderPropagator BuildingBlocks (Project ARC)

ThunderPropagator BuildingBlocks (Project ARC) is a comprehensive .NET library providing production-ready, reusable components for building high-performance, cloud-native applications. Targets .NET 8.0, 9.0, and 10.0 with multi-platform support (AnyCPU, x86, x64, ARM64).


๐Ÿ“š Documentation

Main Documentation Hub: docs/README.md

Documentation Catalog

Application Layer (Core Building Blocks)
Area Types Files Diagrams Description
BuildingBlocks.Application 15 12 โœ“ Core abstractions (FeederMessage, ServiceConfiguration, Telemetry)
โ”œโ”€ Attributes 2 2 โœ“ JSON serialization control and member ignore attributes
โ”œโ”€ Certificate 1 1 โœ— X.509 certificate handling and management
โ”œโ”€ ChangeTrackingItems 5 5 โœ— Property change tracking with observable patterns
โ”œโ”€ Ciphering 3 3 โœ“ AES/RSA encryption and password generation
โ”œโ”€ Collections 3 3 โœ“ LinkedArray, BindingDictionary, GenericOrderedDictionary
โ”œโ”€ CorrelationId 3 3 โœ— Correlation ID management for distributed tracing
โ”œโ”€ Enums 4 4 โœ— Common enumerations (AuthenticationType, CastType, DataType)
โ”œโ”€ Helpers 18 18 โœ“ Serialization, collection, string, date/time utilities
โ”œโ”€ Identity 2 2 โœ— JWT identity helper utilities
โ”œโ”€ Objects 5 5 โœ“ Base classes (DisposableObject, EquatableObject, NotifiableObject)
โ””โ”€ Serializations 4 4 โœ— Serialization abstractions and Kafka serializer types
Infrastructure Layer (System-Level Components)
Area Types Files Diagrams Description
BuildingBlocks.Infrastructure 0 1 โœ“ Infrastructure layer entry point
โ”œโ”€ HealthChecks 0 0 โœ— ASP.NET Core health check integrations
โ”œโ”€ System 0 0 โœ— System-level utilities and abstractions
โ”‚ โ””โ”€ Network 2 2 โœ— Network performance monitoring
โ””โ”€ SystemResourceMonitor 4 4 โœ“ Cross-platform resource monitoring
โ”œโ”€ Metrics 2 2 โœ— Metrics client abstractions
โ”œโ”€ Battery 3 2 โœ— Battery status, charge, health (Windows/macOS/Linux)
โ”œโ”€ Cpu 4 4 โœ— CPU usage and temperature monitoring
โ”œโ”€ Disk 6 4 โœ— Disk health (SMART) and I/O performance
โ”œโ”€ Gpu 3 2 โœ— GPU utilization, memory, temperature
โ”œโ”€ Memory 2 2 โœ— System and process memory usage
โ””โ”€ SystemDrives 2 2 โœ— System drive enumeration and space

Total: 100+ types, 92 files, 25+ diagrams created

Last generated: December 28, 2025


๐Ÿ“ฆ NuGet Installation (GitHub Packages)

ThunderPropagator packages are hosted on GitHub Packages: https://nuget.pkg.github.com/KiarashMinoo/index.json

Configure NuGet Source

Option 1: nuget.config (recommended)


<configuration>
  <packageSources>
    <add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
    <add key="github" value="https://nuget.pkg.github.com/KiarashMinoo/index.json" />
  </packageSources>
  <packageSourceMapping>
    <packageSource key="github">
      <package pattern="ThunderPropagator.*" />
    </packageSource>
    <packageSource key="nuget.org">
      <package pattern="*" />
    </packageSource>
  </packageSourceMapping>
  <packageSourceCredentials>
    <github>
      <add key="Username" value="YOUR_GITHUB_USERNAME" />
      <add key="ClearTextPassword" value="YOUR_GITHUB_PAT" />
    </github>
  </packageSourceCredentials>
</configuration>

Option 2: CLI

dotnet nuget add source https://nuget.pkg.github.com/KiarashMinoo/index.json \
  --name github \
  --username YOUR_GITHUB_USERNAME \
  --password YOUR_GITHUB_PAT \
  --store-password-in-clear-text

Install Packages

# Core application building blocks
dotnet add package ThunderPropagator.BuildingBlocks.Application

# Infrastructure components
dotnet add package ThunderPropagator.BuildingBlocks.Infrastructure

๐ŸŽฏ Quick Start

FeederMessage Pattern

using ThunderPropagator.BuildingBlocks.Application;

public class OrderMessage : FeederMessage
{
    public Guid OrderId
    {
        get => GetValueOrDefault(Guid.NewGuid());
        set => SetValue(value);
    }
    
    public decimal Amount
    {
        get => GetValueOrDefault(0m);
        set => SetValue(value);
    }
}

var order = new OrderMessage
{
    OrderId = Guid.NewGuid(),
    Amount = 99.99m,
    CorrelationId = "req-12345"
};

System Resource Monitoring

using ThunderPropagator.BuildingBlocks.Infrastructure.SystemResourceMonitor;

services.AddSystemResourceMonitor(options =>
{
    options.EnableCpuMetrics = true;
    options.EnableMemoryMetrics = true;
    options.EnableDiskHealth = true;
    options.DefaultSamplingWindowMs = 500;
});

// Inject and use
public class MonitoringService
{
    private readonly ISystemResourceMonitor _monitor;
    
    public MonitoringService(ISystemResourceMonitor monitor)
    {
        _monitor = monitor;
    }
    
    public async Task<SystemResourceMonitorMetrics> GetMetricsAsync()
    {
        return await _monitor.GetMetricsAsync();
    }
}

Serialization Helpers

using ThunderPropagator.BuildingBlocks.Application.Helpers;

// JSON
var json = myObject.ToJson();
var obj = json.FromJson<MyType>();

// YAML
var yaml = myObject.ToYaml();

// ProtoBuf
var bytes = myObject.ToProtoBufBytes();

// MessagePack
var base64 = myObject.ToMessagePackBase64();

๐Ÿ›  Build & Test

# Restore dependencies
dotnet restore

# Build (Release)
dotnet build -c Release

# Run tests
dotnet test -c Release

# Package
dotnet pack -c Release -o artifacts/pkg

Multi-Platform Builds:

  • Platforms: AnyCPU, x86, x64, ARM64
  • Frameworks: net8.0, net9.0, net10.0

๐Ÿ“„ Available Packages

Package Version Description Documentation
ThunderPropagator.BuildingBlocks.Application 1.0.1-beta.* Core application building blocks (FeederMessage, ServiceConfiguration, Helpers, Serialization) docs/BuildingBlocks.Application
ThunderPropagator.BuildingBlocks.Infrastructure 1.0.1-beta.* Infrastructure components (SystemResourceMonitor, HealthChecks, Network) docs/BuildingBlocks.Infrastructure

๐Ÿ“– Key Features

Application Layer

  • FeederMessage: Dictionary-based message abstraction with correlation ID
  • ServiceConfiguration: Strongly-typed configuration with change notifications
  • Telemetry: OpenTelemetry integration (Activities, Counters, Histograms)
  • Helpers: Comprehensive serialization (JSON, YAML, ProtoBuf, MessagePack, NetJSON, Newtonsoft.Json)
  • Collections: LinkedArray, BindingDictionary, GenericOrderedDictionary
  • Ciphering: AES/RSA encryption, password generation
  • Objects: DisposableObject, EquatableObject, NotifiableObject base classes

Infrastructure Layer

  • SystemResourceMonitor: Cross-platform monitoring (CPU, Memory, Disk, GPU, Battery)
  • Platform Providers: Windows/Linux/macOS with graceful degradation
  • SMART Disk Health: Disk health monitoring via platform-specific tools
  • GPU Metrics: nvidia-smi/rocm-smi integration
  • Battery Status: Power management metrics
  • No External Packages: Uses .NET BCL and CLI tools only

๐Ÿ— Architecture

The solution follows a strict two-layer architecture:

  1. Application Layer (ThunderPropagator.BuildingBlocks.Application)

    • Core building blocks with NO infrastructure dependencies
    • Helpers, serialization, collections, base classes
    • Verified by Tests/ArchTests/ArchitectureTests.cs
  2. Infrastructure Layer (ThunderPropagator.BuildingBlocks.Infrastructure)

    • System-level components (monitoring, health checks)
    • Depends on Application layer
    • Platform-specific providers with graceful degradation

Critical Rule: Application layer MUST NEVER depend on Infrastructure layer.


๐Ÿงช Testing

Run All Tests

dotnet test -c Release

Architecture Tests

Architecture constraints are enforced by NetArchTest.Rules in Tests/ArchTests/:

  • Application layer has no Infrastructure dependencies
  • Naming conventions
  • Layer boundaries

Unit Tests

Comprehensive unit tests with xUnit and NSubstitute in Tests/ThunderPropagator.UnitTests/:

  • FeederMessage, ServiceConfiguration tests
  • Helper method tests
  • Collection tests
  • SystemResourceMonitor tests

Benchmarks

BenchmarkDotNet benchmarks for performance-critical code:

  • CollectionHelperBenchmark.cs
  • SizeBenchmark.cs

๐Ÿš€ CI/CD Workflows

  • develop branch โ†’ develop-beta-ci.yml โ†’ Increments beta version
  • release/ branch โ†’ develop-release-ci.yml โ†’ Creates GitHub release, strips beta suffix
  • GitHub Packages feed: https://nuget.pkg.github.com/KiarashMinoo/index.json

๐Ÿ“ Contributing

  1. Follow the existing code conventions (see .github/copilot-instructions.md)
  2. Add XML documentation for all public APIs
  3. Include unit tests for new features
  4. Update relevant documentation in /docs
  5. Ensure architecture tests pass

๐Ÿ“œ License

See LICENSE for details.

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.  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 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 (8)

Showing the top 5 NuGet packages that depend on ThunderPropagator.BuildingBlocks.Modules:

Package Downloads
ThunderPropagator

ThunderPropagator (Project ARC): High-performance data propagation; effortless, blazingly fast and cloud-native for maximum impact

ThunderPropagator.ARM64

ThunderPropagator (Project ARC): High-performance data propagation; effortless, blazingly fast and cloud-native for maximum impact

ThunderPropagator.Debug

ThunderPropagator (Project ARC): High-performance data propagation; effortless, blazingly fast and cloud-native for maximum impact

ThunderPropagator.Debug.ARM64

ThunderPropagator (Project ARC): High-performance data propagation; effortless, blazingly fast and cloud-native for maximum impact

ThunderPropagator.Debug.x64

ThunderPropagator (Project ARC): High-performance data propagation; effortless, blazingly fast and cloud-native for maximum impact

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.1-beta.26 306 5/12/2026
1.0.1-beta.25 28 5/12/2026
1.0.1-beta.24 30 5/12/2026
1.0.1-beta.19 49 4/13/2026
1.0.1-beta.18 42 4/13/2026
1.0.1-beta.17 47 4/13/2026
1.0.1-beta.16 47 4/13/2026
1.0.1-beta.15 81 2/8/2026
1.0.1-beta.14 73 12/28/2025
1.0.1-beta.13 59 12/28/2025
1.0.1-beta.12 57 12/28/2025
1.0.1-beta.11 64 12/28/2025
1.0.1-beta.10 60 12/28/2025
1.0.1-beta.8 60 12/28/2025
1.0.1-beta.7 61 12/28/2025
1.0.1-beta.6 62 12/28/2025
1.0.1-beta.5 60 12/28/2025

- Simplifies and standardizes editorconfig settings