Raycynix.Extensions.Configuration.AspNetCore 2.2.0

dotnet add package Raycynix.Extensions.Configuration.AspNetCore --version 2.2.0
                    
NuGet\Install-Package Raycynix.Extensions.Configuration.AspNetCore -Version 2.2.0
                    
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="Raycynix.Extensions.Configuration.AspNetCore" Version="2.2.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Raycynix.Extensions.Configuration.AspNetCore" Version="2.2.0" />
                    
Directory.Packages.props
<PackageReference Include="Raycynix.Extensions.Configuration.AspNetCore" />
                    
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 Raycynix.Extensions.Configuration.AspNetCore --version 2.2.0
                    
#r "nuget: Raycynix.Extensions.Configuration.AspNetCore, 2.2.0"
                    
#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 Raycynix.Extensions.Configuration.AspNetCore@2.2.0
                    
#: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=Raycynix.Extensions.Configuration.AspNetCore&version=2.2.0
                    
Install as a Cake Addin
#tool nuget:?package=Raycynix.Extensions.Configuration.AspNetCore&version=2.2.0
                    
Install as a Cake Tool

Raycynix.Extensions.Configuration.AspNetCore

Raycynix.Extensions.Configuration.AspNetCore adds ASP.NET Core-specific integrations for Raycynix configuration and feature flags.

What it contains

  • AddRaycynixAspNetCoreConfiguration(...)
  • AddRaycynixFeatureGateOptions(...)
  • UseRaycynixAspNetCoreConfiguration(...)
  • [FeatureGate(...)]
  • RequireFeature(...)
  • RequireAnyFeature(...)
  • optional Microsoft.Extensions.Logging diagnostics for feature gate middleware

Usage

var builder = WebApplication.CreateBuilder(args);

builder.AddRaycynixAspNetCoreConfiguration();
builder.Services.AddRaycynixFeatureGateOptions(options =>
{
    options.DisabledStatusCode = StatusCodes.Status404NotFound;
    options.MissingFeatureFlagAccessorStatusCode = StatusCodes.Status503ServiceUnavailable;
});

builder.Services.AddRaycynixFeatureFlags(builder.Configuration);

var app = builder.Build();

app.UseRaycynixAspNetCoreConfiguration();

app.MapGet("/dashboard", () => Results.Ok("enabled"))
    .RequireFeature("NewDashboard");

app.Run();

appsettings.json

{
  "FeatureFlags": {
    "Flags": {
      "NewDashboard": true,
      "BetaApi": false
    }
  }
}

Use the attribute for MVC or endpoint metadata scenarios:

[FeatureGate("NewDashboard")]
public sealed class DashboardController : ControllerBase
{
}

When a required feature flag is disabled, the request returns 404 Not Found by default. When a gated endpoint is reached without a registered IFeatureFlagAccessor, the middleware also returns 404 Not Found by default. Both status codes can be changed through AddRaycynixFeatureGateOptions(...).

Logging

The feature gate middleware logs through the standard Microsoft.Extensions.Logging.ILogger<T> abstraction when a logger is available. Logger injection is optional, so the middleware can run without registering a logging provider. It works with any Microsoft-compatible logging provider and does not require Raycynix.Extensions.Logging.

The middleware writes detailed gate evaluation flow at Debug, missing feature flag accessor diagnostics at Warning, and blocked feature-gated endpoints at Information.

Enable Debug logs when troubleshooting feature-gated endpoints:

{
  "Logging": {
    "LogLevel": {
      "Raycynix.Extensions.Configuration.AspNetCore": "Debug"
    }
  }
}
Product Compatible and additional computed target framework versions.
.NET 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

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
2.2.0 128 6/23/2026
2.0.0 105 6/1/2026
1.0.1 136 4/20/2026 1.0.1 is deprecated because it is no longer maintained.
1.0.0 132 4/8/2026 1.0.0 is deprecated because it is no longer maintained.
0.1.1 138 4/8/2026 0.1.1 is deprecated because it is no longer maintained.

v2.2.0 starts unified versioning for Raycynix packages and adds optional Microsoft.Extensions.Logging diagnostics for feature gate middleware.