ProfanityFilter.Client
9.0.7-alpha.0.10
dotnet add package ProfanityFilter.Client --version 9.0.7-alpha.0.10
NuGet\Install-Package ProfanityFilter.Client -Version 9.0.7-alpha.0.10
<PackageReference Include="ProfanityFilter.Client" Version="9.0.7-alpha.0.10" />
<PackageVersion Include="ProfanityFilter.Client" Version="9.0.7-alpha.0.10" />
<PackageReference Include="ProfanityFilter.Client" />
paket add ProfanityFilter.Client --version 9.0.7-alpha.0.10
#r "nuget: ProfanityFilter.Client, 9.0.7-alpha.0.10"
#:package ProfanityFilter.Client@9.0.7-alpha.0.10
#addin nuget:?package=ProfanityFilter.Client&version=9.0.7-alpha.0.10&prerelease
#tool nuget:?package=ProfanityFilter.Client&version=9.0.7-alpha.0.10&prerelease
Profanity Filter: Client
This is a .NET library intended to be used as a client for the Profanity Filter API. It provides a pair of clients for both REST and realtime communication with the API. The library is built on top of the 📦 Microsoft.Extensions.Http and 📦 Microsoft.AspNetCore.SignalR.Client packages.
The Profanity Filter API is a service that filters profane language from text. This client maps to the:
ghcr.io/ievangelist/profanity-filter-api:latestcontainer image.
Get started
To install the 📦 ProfanityFilter.Client NuGet package:
dotnet add package ProfanityFilter.Client
To register the client in your application, call AddProfanityFilterClient on an IHostApplicationBuilder instance:
var builder = WebApplication.CreateBuilder(args);
builder.AddProfanityFilterClient("profanity-filter");
var app = builder.Build();
app.MapPost(
pattern: "/filter",
handler: static async (
[FromBody] ProfanityFilterRequest request,
[FromServices] IRestClient client) =>
await client.ApplyFilterAsync(request))
.WithName("Filter");
app.Run();
The connection name parameter registers the client in the application's services collection. The client can be injected into any service that requires it. The following types are available via DI:
IRestClient: Interface for the REST client.IRealtimeClient: Interface for the realtime client.ProfanityFilterClient: Concrete type exposing the pair of REST and realtime clients.
Configuration
The client can be configured using the ProfanityFilterOptions class (in the ProfanityFilter configuration key). The following options are available:
ApiBaseAddress: The base address of the Profanity Filter API.
{
"ProfanityFilter": {
"ApiBaseAddress": "https://profanity-filter-api.azurewebsites.net"
}
}
| Product | Versions 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. |
-
net10.0
- Microsoft.AspNetCore.SignalR.Client (>= 10.0.1)
- Microsoft.Extensions.Configuration.Binder (>= 10.0.1)
- Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions (>= 10.0.1)
- Microsoft.Extensions.Hosting.Abstractions (>= 10.0.1)
- Microsoft.Extensions.Http (>= 10.0.1)
- Microsoft.Extensions.Options (>= 10.0.1)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 10.0.1)
- ProfanityFilter.Common (>= 1.0.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 |
|---|---|---|
| 9.0.7-alpha.0.10 | 221 | 12/15/2025 |
| 9.0.7-alpha.0.9 | 219 | 12/15/2025 |
| 9.0.7-alpha.0.8 | 219 | 12/15/2025 |
| 9.0.7-alpha.0.7 | 366 | 12/11/2025 |
| 9.0.7-alpha.0.2 | 221 | 3/6/2025 |
| 0.0.0-alpha.0.273 | 216 | 12/15/2025 |