DropBear.Codex.Core 2025.10.83-gf875cf067d

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

DropBear.Codex.Core

NuGet Downloads License: MIT

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
  • 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


Made with ❤️ by Terrence Kuchel

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.

NuGet packages (10)

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
2025.10.83-gf875cf067d 181 11/8/2025
2025.2.80 282 3/2/2025
2025.0.14 244 1/7/2025
2024.11.5 271 11/12/2024
2024.9.44 295 9/20/2024
2024.9.43 267 9/16/2024
2024.9.42 272 9/16/2024
2024.9.32 265 9/13/2024
2024.9.25 285 9/11/2024
2024.9.1 271 9/8/2024
2024.8.54 278 9/6/2024
2024.8.36 260 9/2/2024
2024.7.1 246 7/24/2024
2024.6.2 260 6/19/2024
2024.5.9 274 5/19/2024
2024.5.8 154 5/19/2024
2024.5.6 414 5/4/2024
2024.5.5 148 5/4/2024
2024.5.4 209 5/4/2024
2024.5.3 119 5/3/2024
2024.5.2 130 5/3/2024
2024.5.1 138 5/3/2024
2024.4.8 576 4/30/2024
2024.4.5 910 4/17/2024
2024.4.4 174 4/16/2024
2024.4.3 164 4/16/2024
2024.4.1 275 4/13/2024
2024.3.13 581 3/28/2024
2024.3.12 257 3/21/2024
2024.3.11 284 3/16/2024
2024.3.10 178 3/16/2024
2024.3.9 171 3/15/2024
2024.3.6 176 3/15/2024
2024.3.5 172 3/13/2024
2024.3.4 232 3/11/2024
2024.3.1 189 3/2/2024
2024.2.34 199 2/26/2024
2024.2.31 181 2/26/2024
2024.2.30 240 2/22/2024
2024.2.25 232 2/21/2024