3 instantiations of HmacRedactorOptions
Microsoft.Extensions.Compliance.Redaction.Tests (3)
HmacRedactorTest.cs (3)
33
var redactor = new HmacRedactor(Microsoft.Extensions.Options.Options.Create(new
HmacRedactorOptions
55
var redactor = new HmacRedactor(Microsoft.Extensions.Options.Options.Create(new
HmacRedactorOptions
70
var redactor = new HmacRedactor(Microsoft.Extensions.Options.Options.Create(new
HmacRedactorOptions
12 references to HmacRedactorOptions
Microsoft.Extensions.Compliance.Redaction (7)
HmacRedactor.cs (2)
43
public HmacRedactor(IOptions<
HmacRedactorOptions
> options)
45
var
value = Throw.IfMemberNull(options, options?.Value);
HmacRedactorOptionsValidator.cs (1)
9
internal sealed partial class HmacRedactorOptionsValidator : IValidateOptions<
HmacRedactorOptions
>
RedactionExtensions.cs (4)
25
public static IRedactionBuilder SetHmacRedactor(this IRedactionBuilder builder, Action<
HmacRedactorOptions
> configure, params DataClassificationSet[] classifications)
33
.AddOptionsWithValidateOnStart<
HmacRedactorOptions
, HmacRedactorOptionsValidator>()
54
.Services.AddOptionsWithValidateOnStart<
HmacRedactorOptions
, HmacRedactorOptionsValidator>()
55
.Services.Configure<
HmacRedactorOptions
>(section);
Microsoft.Extensions.Compliance.Redaction.Tests (5)
HmacRedactorTest.cs (5)
18
HmacRedactorOptions
redactorOptions;
23
{ $"{nameof(
HmacRedactorOptions
)}:{nameof(redactorOptions.KeyId)}", keyId.ToString(CultureInfo.InvariantCulture) },
24
{ $"{nameof(
HmacRedactorOptions
)}:{nameof(redactorOptions.Key)}", key },
27
.GetSection(nameof(
HmacRedactorOptions
));
87
Assert.Throws<ArgumentException>(() => new HmacRedactor(Microsoft.Extensions.Options.Options.Create<
HmacRedactorOptions
>(null!)));