<PackageReference Include="Polly" Version="2.2.2" />

ReadOnlyDictionaryDebugView<TKey, TValue>

sealed class ReadOnlyDictionaryDebugView<TKey, TValue>
using System; using System.Collections.Generic; using System.Diagnostics; namespace Polly.Utilities { internal sealed class ReadOnlyDictionaryDebugView<TKey, TValue> { private IDictionary<TKey, TValue> dict; [DebuggerBrowsable(DebuggerBrowsableState.RootHidden)] public KeyValuePair<TKey, TValue>[] Items { get { KeyValuePair<TKey, TValue>[] array = new KeyValuePair<TKey, TValue>[dict.Count]; dict.CopyTo(array, 0); return array; } } public ReadOnlyDictionaryDebugView(ReadOnlyDictionary<TKey, TValue> dictionary) { if (dictionary == null) throw new ArgumentNullException("dictionary"); dict = dictionary; } } }