using System.Collections.Generic; using System.Collections.Immutable; using System.Diagnostics.CodeAnalysis; using Microsoft.CodeAnalysis.Diagnostics; namespace MapTo.Tests.Infrastructure { internal sealed class TestAnalyzerConfigOptions : AnalyzerConfigOptions { private readonly ImmutableDictionary _backing; public TestAnalyzerConfigOptions(IDictionary? properties) { _backing = properties?.ToImmutableDictionary(KeyComparer) ?? ImmutableDictionary.Create(KeyComparer); } public override bool TryGetValue(string key, out string? value) => _backing.TryGetValue(key, out value); } }