DropBear.Codex.Core
2026.1.15
dotnet add package DropBear.Codex.Core --version 2026.1.15
NuGet\Install-Package DropBear.Codex.Core -Version 2026.1.15
<PackageReference Include="DropBear.Codex.Core" Version="2026.1.15" />
<PackageVersion Include="DropBear.Codex.Core" Version="2026.1.15" />
<PackageReference Include="DropBear.Codex.Core" />
paket add DropBear.Codex.Core --version 2026.1.15
#r "nuget: DropBear.Codex.Core, 2026.1.15"
#:package DropBear.Codex.Core@2026.1.15
#addin nuget:?package=DropBear.Codex.Core&version=2026.1.15
#tool nuget:?package=DropBear.Codex.Core&version=2026.1.15
DropBear.Codex.Core
Core library providing Result pattern, functional extensions, and telemetry infrastructure for .NET 9+ applications.
🚀 Quick Start
Installation
dotnet add package DropBear.Codex.Core
Basic Usage
using DropBear.Codex.Core.Results;
using DropBear.Codex.Core.Results.Errors;
// Create a result-returning method
public Result<int, ValidationError> Divide(int numerator, int denominator)
{
if (denominator == 0)
{
return Result<int, ValidationError>.Failure(
new ValidationError("Cannot divide by zero"));
}
return Result<int, ValidationError>.Success(numerator / denominator);
}
// Use pattern matching
var result = Divide(10, 2);
var message = result.Match(
success: value => $"Result: {value}",
failure: error => $"Error: {error.Message}"
);
// Chain operations
var doubled = result.Map(x => x * 2);
var combined = result.Bind(x => Divide(x, 3));
✨ Features
Result Pattern
Type-safe error handling without exceptions:
Result<User, ValidationError> GetUser(int id)
{
if (id <= 0)
return Result<User, ValidationError>.Failure(
new ValidationError("Invalid ID"));
var user = _repository.Find(id);
return user != null
? Result<User, ValidationError>.Success(user)
: Result<User, ValidationError>.Failure(
new ValidationError("User not found"));
}
Functional Extensions
Map, Bind, Match and more:
var result = await GetUserAsync(userId)
.MapAsync(user => user.Email)
.BindAsync(email => SendEmailAsync(email))
.TapAsync(async () => await LogSuccessAsync())
.OnFailureAsync(async error => await LogErrorAsync(error));
Telemetry Integration
Built-in OpenTelemetry support:
// Configure telemetry at startup
TelemetryProvider.Configure(options =>
{
options.Mode = TelemetryMode.BackgroundChannel;
options.ChannelCapacity = 10000;
});
// Automatic telemetry tracking
var result = Result<int, ValidationError>.Success(42);
// Telemetry automatically recorded!
Async/Await Support
First-class async operations:
public async Task<Result<Data, ErrorType>> ProcessAsync(
CancellationToken cancellationToken = default)
{
return await GetDataAsync(cancellationToken)
.MapAsync(async (data, ct) => await TransformAsync(data, ct), cancellationToken)
.BindAsync(async (data, ct) => await ValidateAsync(data, ct), cancellationToken);
}
Envelope Pattern
Message wrapping with metadata:
var envelope = new EnvelopeBuilder<MyData>()
.WithPayload(myData)
.AddHeader("version", "1.0")
.AddHeader("source", "api")
.Build();
// Serialize and deserialize
var json = await envelopeSerializer.SerializeAsync(envelope);
var restored = await envelopeSerializer.DeserializeAsync(json);
📖 Documentation
🎯 Key Benefits
- ✅ Type-Safe - Compile-time error handling
- ✅ Railway Oriented - Clean error propagation
- ✅ High Performance - .NET 9 optimized with minimal allocations
- ✅ Observable - OpenTelemetry integration out of the box
- ✅ Testable - Pure functions, easy to mock
- ✅ Well-Documented - Comprehensive XML docs
🔧 Requirements
- .NET 9.0 or later
- C# 12 or later
📦 Related Packages
- DropBear.Codex.Blazor - Blazor components and utilities
- DropBear.Codex.Hashing - Cryptographic hashing utilities
- DropBear.Codex.Serialization - Advanced serialization
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
🤝 Contributing
Contributions are welcome! Please read our Contributing Guidelines first.
💬 Support
- 📧 Email: [your-email@example.com]
- 🐛 Issues: GitHub Issues
- 💡 Discussions: GitHub Discussions
Made with ❤️ by Terrence Kuchel
| Product | Versions 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 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
- MessagePack (>= 3.1.4)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.0)
- Microsoft.Extensions.ObjectPool (>= 10.0.0)
- Serilog (>= 4.3.0)
- Serilog.Enrichers.Environment (>= 3.0.1)
- Serilog.Enrichers.Process (>= 3.0.0)
- Serilog.Enrichers.Thread (>= 4.0.0)
- Serilog.Formatting.Compact (>= 3.0.0)
- Serilog.Sinks.Console (>= 6.0.0)
- Serilog.Sinks.File (>= 7.0.0)
-
net9.0
- MessagePack (>= 3.1.4)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.10)
- Microsoft.Extensions.ObjectPool (>= 9.0.10)
- Serilog (>= 4.3.0)
- Serilog.Enrichers.Environment (>= 3.0.1)
- Serilog.Enrichers.Process (>= 3.0.0)
- Serilog.Enrichers.Thread (>= 4.0.0)
- Serilog.Formatting.Compact (>= 3.0.0)
- Serilog.Sinks.Console (>= 6.0.0)
- Serilog.Sinks.File (>= 7.0.0)
NuGet packages (11)
Showing the top 5 NuGet packages that depend on DropBear.Codex.Core:
| Package | Downloads |
|---|---|
|
DropBear.Codex.Utilities
Provides utility classes and helpers for the DropBear.Codex ecosystem |
|
|
DropBear.Codex.StateManagement
Simplified state management and snapshot system for the DropBear Codex framework. |
|
|
DropBear.Codex.Serialization
Provides serialization and deserialization utilities for the DropBear.Codex ecosystem |
|
|
DropBear.Codex.Files
Provides file management and storage capabilities for the DropBear.Codex ecosystem |
|
|
DropBear.Codex.Hashing
Provides various hashing implementations and utilities for the DropBear.Codex ecosystem |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 2026.1.15 | 247 | 1/13/2026 |
| 2025.10.83-gf875cf067d | 235 | 11/8/2025 |
| 2025.2.80 | 305 | 3/2/2025 |
| 2025.0.14 | 272 | 1/7/2025 |
| 2024.11.5 | 298 | 11/12/2024 |
| 2024.9.44 | 323 | 9/20/2024 |
| 2024.9.43 | 285 | 9/16/2024 |
| 2024.9.42 | 306 | 9/16/2024 |
| 2024.9.32 | 288 | 9/13/2024 |
| 2024.9.25 | 309 | 9/11/2024 |
| 2024.9.1 | 293 | 9/8/2024 |
| 2024.8.54 | 304 | 9/6/2024 |
| 2024.8.36 | 289 | 9/2/2024 |
| 2024.7.1 | 271 | 7/24/2024 |
| 2024.6.2 | 291 | 6/19/2024 |
| 2024.5.9 | 292 | 5/19/2024 |
| 2024.5.8 | 179 | 5/19/2024 |
| 2024.5.6 | 440 | 5/4/2024 |
| 2024.5.5 | 171 | 5/4/2024 |
| 2024.5.4 | 235 | 5/4/2024 |