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)) 56Assert.Throws<ArgumentNullException>(() => ((IServiceCollection)null!).AddRedaction(_ => { })); 57Assert.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)) 234Assert.Throws<ArgumentNullException>(() => new ServiceCollection().AddRedaction(x => x.SetFakeRedactor((Action<FakeRedactorOptions>)null!, dc))); 236Assert.Throws<ArgumentNullException>(() => ((IServiceCollection)null!).AddRedaction(x => x.SetFakeRedactor((Action<FakeRedactorOptions>)null!, dc)));
Microsoft.Extensions.Telemetry.PerformanceTests (1)
ExtendedLoggerBench.cs (1)
73serviceCollection.AddRedaction(builder => builder.SetFallbackRedactor<ErasingRedactor>());
Microsoft.Gen.Logging.Generated.Tests (1)
Utils.cs (1)
82serviceCollection.AddRedaction(builder =>