ThunderPropagator.BuildingBlocks
1.0.1-beta.14
dotnet add package ThunderPropagator.BuildingBlocks --version 1.0.1-beta.14
NuGet\Install-Package ThunderPropagator.BuildingBlocks -Version 1.0.1-beta.14
<PackageReference Include="ThunderPropagator.BuildingBlocks" Version="1.0.1-beta.14" />
<PackageVersion Include="ThunderPropagator.BuildingBlocks" Version="1.0.1-beta.14" />
<PackageReference Include="ThunderPropagator.BuildingBlocks" />
paket add ThunderPropagator.BuildingBlocks --version 1.0.1-beta.14
#r "nuget: ThunderPropagator.BuildingBlocks, 1.0.1-beta.14"
#:package ThunderPropagator.BuildingBlocks@1.0.1-beta.14
#addin nuget:?package=ThunderPropagator.BuildingBlocks&version=1.0.1-beta.14&prerelease
#tool nuget:?package=ThunderPropagator.BuildingBlocks&version=1.0.1-beta.14&prerelease
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:
Application Layer (
ThunderPropagator.BuildingBlocks.Application)- Core building blocks with NO infrastructure dependencies
- Helpers, serialization, collections, base classes
- Verified by
Tests/ArchTests/ArchitectureTests.cs
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.csSizeBenchmark.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
- Follow the existing code conventions (see
.github/copilot-instructions.md) - Add XML documentation for all public APIs
- Include unit tests for new features
- Update relevant documentation in
/docs - Ensure architecture tests pass
๐ License
See LICENSE for details.
| Product | Versions 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. |
-
net10.0
- Ardalis.GuardClauses (>= 5.0.0)
- CaseConverter (>= 2.0.1)
- JetBrains.Annotations (>= 2025.2.4)
- MessagePack (>= 3.1.4)
- MessagePackAnalyzer (>= 3.1.4)
- NetJSON (>= 1.4.5)
- Newtonsoft.Json (>= 13.0.4)
- protobuf-net (>= 3.2.56)
- SharpZipLib (>= 1.4.2)
- System.IdentityModel.Tokens.Jwt (>= 8.15.0)
- ToonNet (>= 1.0.4)
- YamlDotNet (>= 16.3.0)
-
net8.0
- Ardalis.GuardClauses (>= 5.0.0)
- CaseConverter (>= 2.0.1)
- JetBrains.Annotations (>= 2025.2.4)
- MessagePack (>= 3.1.4)
- MessagePackAnalyzer (>= 3.1.4)
- NetJSON (>= 1.4.5)
- Newtonsoft.Json (>= 13.0.4)
- protobuf-net (>= 3.2.56)
- SharpZipLib (>= 1.4.2)
- System.IdentityModel.Tokens.Jwt (>= 8.15.0)
- ToonNet (>= 1.0.4)
- YamlDotNet (>= 16.3.0)
-
net9.0
- Ardalis.GuardClauses (>= 5.0.0)
- CaseConverter (>= 2.0.1)
- JetBrains.Annotations (>= 2025.2.4)
- MessagePack (>= 3.1.4)
- MessagePackAnalyzer (>= 3.1.4)
- NetJSON (>= 1.4.5)
- Newtonsoft.Json (>= 13.0.4)
- protobuf-net (>= 3.2.56)
- SharpZipLib (>= 1.4.2)
- System.IdentityModel.Tokens.Jwt (>= 8.15.0)
- ToonNet (>= 1.0.4)
- YamlDotNet (>= 16.3.0)
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 |
|---|---|---|
| 1.0.1-beta.14 | 45 | 12/28/2025 |
| 1.0.1-beta.13 | 39 | 12/28/2025 |
| 1.0.1-beta.12 | 40 | 12/28/2025 |
| 1.0.1-beta.11 | 39 | 12/28/2025 |
| 1.0.1-beta.10 | 34 | 12/28/2025 |
| 1.0.1-beta.8 | 34 | 12/28/2025 |
| 1.0.1-beta.7 | 33 | 12/28/2025 |
| 1.0.1-beta.6 | 37 | 12/28/2025 |
| 1.0.1-beta.5 | 37 | 12/28/2025 |
- fix: update GitHub token references to use GH_TOKEN for consistency