1
Vote

Add Debug-View attributes for ReadOnlyDictionary

description

A couple of improvements to help when debugging:
 
Add Attribute: [System.Diagnostics.DebuggerDisplay("Count = {Count}")]
 
Add Attribute: [System.Diagnostics.DebuggerTypeProxy(typeof(DebugView<,>))]
 
Add inner class: private class DebugView<TKey2, TValue2>{ private ReadOnlyDictionary<TKey2, TValue2> _d; public DebugView(ReadOnlyDictionary<TKey2, TValue2> d) { _d = d; } [System.Diagnostics.DebuggerBrowsable(System.Diagnostics.DebuggerBrowsableState.RootHidden)] public KeyValuePair<TKey2, TValue2>[] Items { get { return _d.ToArray(); } }}

comments