FakeRedactionServiceProviderExtensions.GetFakeRedactionCollector Method

Definition

Gets the fake redactor collector instance from the dependency injection container.

C#
public static Microsoft.Extensions.Compliance.Testing.FakeRedactionCollector GetFakeRedactionCollector(this IServiceProvider serviceProvider);

Parameters

serviceProvider
IServiceProvider

The container used to obtain the collector instance.

Returns

The obtained collector.

Exceptions

The collector is not in the container.

serviceProvider is null.

Remarks

FakeRedactionCollector should be registered and used only with fake redaction implementation.

Applies to

Produkt Verzie
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)