Class ProtoRedactionOptions

Namespace
ProtoTest.Core
Assembly
ProtoTest.Core.dll

Names a suite redacts on top of the defaults: every additional name is treated like the entries of SensitivePropertyNames wherever the run redacts state values and finding metadata, while attachment and diagnostic JSON keeps each protocol's SensitiveJsonProperties list. The section ProtoTest:Redaction binds over code values when the host is built.

public sealed class ProtoRedactionOptions : IProtoConfigurableOptions
Inheritance
ProtoRedactionOptions
Implements
Inherited Members
Extension Methods

Fields

ConfigurationSectionName

The configuration section these options bind from.

public const string ConfigurationSectionName = "ProtoTest:Redaction"

Field Value

string

Properties

AdditionalSensitiveNames

Property names redacted in addition to the defaults, matched case-insensitively. Code and configuration compose: callbacks add here and the section binds over them.

public IList<string> AdditionalSensitiveNames { get; }

Property Value

IList<string>

Methods

AddSensitiveName(string)

Adds one property name to redact, returning the options so calls chain.

public ProtoRedactionOptions AddSensitiveName(string name)

Parameters

name string

Returns

ProtoRedactionOptions

Validate()

Validates the resolved options once, after code callbacks and configuration have been applied. A bad value is a configuration error and must throw here rather than fail the first test that happens to use it. The default does nothing.

public void Validate()