PowerCSharp.Feature.Sanitization 1.0.1

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

PowerCSharp.Feature.Sanitization

PowerCSharp Banner

Sanitization feature module, options, and DI/ASP.NET Core wiring for the PowerCSharp Sanitization feature.

Pair this package with PowerCSharp.Feature.Sanitization.Abstractions (engine + contracts + NoOp). Unlike the Cache feature family, Sanitization has no swappable-backend provider package — this module registers the concrete implementation directly.

Contents

  • SanitizationFeatureOptions — options bound from PowerFeatures:Sanitization, mirroring the full SanitizationSettings surface.
  • SanitizationFeatureModule — auto-discoverable module; registers the real service when enabled, NoOpSanitizationService when disabled.
  • SanitizationService — the DI-facing ISanitizationService implementation, delegating to the engine.
  • SanitizationSettingsProvider — bridges bound options into SanitizationSettings for the engine.
  • SanitizationFeatureExtensions.AddSanitizationFeature — explicit registration extension; registers the real service directly (no NoOp floor, since there is no separate provider package to defer to).
  • SanitizationEngineServiceProviderExtensions.ConfigureSanitizationEngine — wires the DI-resolved settings provider into the static SanitizationEngine, so extension-method call sites (input.SanitizeForLog()) also reflect host configuration.

Namespaces

  • PowerCSharp.Feature.Sanitization — options, module, service, and extension methods.

The engine, contracts, and NoOp implementation live in PowerCSharp.Feature.Sanitization.Abstractions.

Usage

Auto-discovery (ASP.NET Core)

using PowerCSharp.Feature.Sanitization;

builder.Services.AddPowerFeatures(builder.Configuration, o =>
    o.ScanAssemblies(typeof(SanitizationFeatureModule).Assembly));

var app = builder.Build();
app.UsePowerFeatures(); // also wires the static engine via ConfigurePipeline

Explicit registration

using PowerCSharp.Feature.Sanitization;

builder.Services.AddSanitizationFeature(builder.Configuration);

var app = builder.Build();
app.Services.ConfigureSanitizationEngine(); // wire the static engine explicitly
{
  "PowerFeatures": {
    "Sanitization": {
      "Enabled": true,
      "EnableLogSanitization": true,
      "EnableFilePathSanitization": true,
      "EnableSensitiveDataDetection": true,
      "EnableRegexSanitization": true
    }
  }
}

Then resolve ISanitizationService from DI, or call the extension methods in PowerCSharp.Feature.Sanitization.Abstractions directly — both reflect the same configuration once ConfigureSanitizationEngine has run.

Details

  • Package ID: PowerCSharp.Feature.Sanitization
  • Depends on: PowerCSharp.Features.Abstractions + PowerCSharp.Feature.Sanitization.Abstractions
  • Target framework: net8.0 (requires ASP.NET Core host)
  • See: docs/PowerCSharp.Features.Authoring-Guide.md, docs/PowerCSharp.Feature.Sanitization.md
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 was computed.  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

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 103 7/23/2026
1.0.0 100 7/23/2026