23 references to AddRedaction
Microsoft.Extensions.Compliance.Redaction (1)
RedactionServiceCollectionExtensions.cs (1)
23
=> Throw.IfNull(services).
AddRedaction
(_ => { });
Microsoft.Extensions.Compliance.Redaction.Tests (9)
HmacRedactorExtensionsTests.cs (2)
17
.
AddRedaction
(redaction => redaction.SetHmacRedactor(o => o.Key = HmacRedactorTest.HmacExamples[0].Key, FakeTaxonomy.PrivateData))
30
.
AddRedaction
(redaction =>
HmacRedactorTest.cs (2)
96
.
AddRedaction
(redaction =>
124
.
AddRedaction
(redaction =>
RedactionAcceptanceTests.cs (4)
22
.
AddRedaction
(redaction => redaction
45
.
AddRedaction
(x => x.SetRedactor<FakePlaintextRedactor>(dc))
56
Assert.Throws<ArgumentNullException>(() => ((IServiceCollection)null!).
AddRedaction
(_ => { }));
57
Assert.Throws<ArgumentNullException>(() => new ServiceCollection().
AddRedaction
(null!));
RedactorProviderTests.cs (1)
79
.
AddRedaction
(redaction =>
Microsoft.Extensions.Compliance.Testing.Tests (11)
RedactionFakesAcceptanceTests.cs (11)
22
.
AddRedaction
(x => x.SetFakeRedactor(dc))
41
.
AddRedaction
(x => x.SetFakeRedactor(dc))
61
.
AddRedaction
(x => x.SetFakeRedactor(Setup.GetFakesConfiguration(), dc))
80
.
AddRedaction
(x => x.SetFakeRedactor(Setup.GetFakesConfiguration(), dc))
100
.
AddRedaction
(x => x.SetFakeRedactor(x => { x.RedactionFormat = "xxx{0}xxx"; }, dc))
120
.
AddRedaction
(builder => builder.SetFakeRedactor(options => { options.RedactionFormat = "xxx{0}xxx"; }, dc))
140
.
AddRedaction
(builder => builder.SetFakeRedactor(options => { options.RedactionFormat = "xxx{0}xxx"; }, dc))
159
.
AddRedaction
(builder => builder.SetFakeRedactor(options => { options.RedactionFormat = "xxx{0}xxx"; }, dc))
179
.
AddRedaction
(builder => builder.SetFakeRedactor(options => { options.RedactionFormat = "xxx{0}xxx"; }, dc))
234
Assert.Throws<ArgumentNullException>(() => new ServiceCollection().
AddRedaction
(x => x.SetFakeRedactor((Action<FakeRedactorOptions>)null!, dc)));
236
Assert.Throws<ArgumentNullException>(() => ((IServiceCollection)null!).
AddRedaction
(x => x.SetFakeRedactor((Action<FakeRedactorOptions>)null!, dc)));
Microsoft.Extensions.Telemetry.PerformanceTests (1)
ExtendedLoggerBench.cs (1)
73
serviceCollection.
AddRedaction
(builder => builder.SetFallbackRedactor<ErasingRedactor>());
Microsoft.Gen.Logging.Generated.Tests (1)
Utils.cs (1)
82
serviceCollection.
AddRedaction
(builder =>