Files
agent-framework/dotnet/src/Shared/Redaction/README.md
T
westey 2c000b032d .NET: Update AIContextProviders to use Microsoft.Extensions.Compliance.Redaction (#4854)
* Update providers to use Microsoft.Extensions.Compliance.Redaction

* Fix formatting.

* Fix readme
2026-03-24 18:12:55 +00:00

853 B

Redaction

Log data redaction utilities built on Microsoft.Extensions.Compliance.Redaction.Redactor.

Provides ReplacingRedactor, an internal Redactor implementation that replaces any input with a fixed replacement string (e.g. "<redacted>").

To use this in your project, add the following to your .csproj file:

<PropertyGroup>
  <InjectSharedRedaction>true</InjectSharedRedaction>
</PropertyGroup>

You will also need to add a package reference to Microsoft.Extensions.Compliance.Abstractions:

<ItemGroup>
  <PackageReference Include="Microsoft.Extensions.Compliance.Abstractions" />
</ItemGroup>

And finally, this also depends on the shared Throw class, so when using redaction, InjectSharedThrow should also be enabled:

<PropertyGroup>
  <InjectSharedThrow>true</InjectSharedThrow>
</PropertyGroup>