File: SimpleRedactorProvider.cs
Web Access
Project: src\test\Generators\Microsoft.Gen.Logging\Generated\Microsoft.Gen.Logging.Generated.Tests.csproj (Microsoft.Gen.Logging.Generated.Tests)
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
 
using Microsoft.Extensions.Compliance.Classification;
using Microsoft.Extensions.Compliance.Redaction;
 
namespace TestClasses
{
    internal class SimpleRedactorProvider : IRedactorProvider
    {
        private readonly char _replacement;
 
        public SimpleRedactorProvider()
            : this('*')
        {
        }
 
        public SimpleRedactorProvider(char replacement)
        {
            _replacement = replacement;
        }
 
        public Redactor GetRedactor(DataClassificationSet classifications) => new SimpleRedactor(_replacement);
    }
}