อ่านในภาษาอังกฤษ

แชร์ผ่าน


RedactionServiceCollectionExtensions.AddRedaction Method

Definition

Overloads

AddRedaction(IServiceCollection)

Registers an implementation of IRedactorProvider in the IServiceCollection.

AddRedaction(IServiceCollection, Action<IRedactionBuilder>)

Registers an implementation of IRedactorProvider in the IServiceCollection and configures available redactors.

AddRedaction(IServiceCollection)

Source:
RedactionServiceCollectionExtensions.cs

Registers an implementation of IRedactorProvider in the IServiceCollection.

C#
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddRedaction(this Microsoft.Extensions.DependencyInjection.IServiceCollection services);

Parameters

services
IServiceCollection

Instance of IServiceCollection used to configure redaction.

Returns

The value of services.

Exceptions

services is null.

Applies to

.NET 10 (package-provided) และรุ่นอื่นๆ
ผลิตภัณฑ์ เวอร์ชัน
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)

AddRedaction(IServiceCollection, Action<IRedactionBuilder>)

Source:
RedactionServiceCollectionExtensions.cs

Registers an implementation of IRedactorProvider in the IServiceCollection and configures available redactors.

C#
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddRedaction(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Action<Microsoft.Extensions.Compliance.Redaction.IRedactionBuilder> configure);

Parameters

services
IServiceCollection

Instance of IServiceCollection used to configure redaction.

configure
Action<IRedactionBuilder>

Configuration function for IRedactionBuilder.

Returns

The value of services.

Exceptions

configure is null.

Applies to

.NET 10 (package-provided) และรุ่นอื่นๆ
ผลิตภัณฑ์ เวอร์ชัน
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)