KeyValuePairs.cs 978 B

12345678910111213141516171819202122232425262728293031323334
  1. // Licensed to the .NET Foundation under one or more agreements.
  2. // The .NET Foundation licenses this file to you under the MIT license.
  3. // See the LICENSE file in the project root for more information.
  4. /*============================================================
  5. **
  6. ** Class: KeyValuePairs
  7. **
  8. ** Purpose: Defines key/value pairs for displaying items
  9. ** in a collection class under the debugger.
  10. **
  11. ===========================================================*/
  12. #nullable enable
  13. using System.Diagnostics;
  14. namespace System.Collections
  15. {
  16. [DebuggerDisplay("{_value}", Name = "[{_key}]")]
  17. internal class KeyValuePairs
  18. {
  19. [DebuggerBrowsable(DebuggerBrowsableState.Never)]
  20. private readonly object _key;
  21. [DebuggerBrowsable(DebuggerBrowsableState.Never)]
  22. private readonly object? _value;
  23. public KeyValuePairs(object key, object? value)
  24. {
  25. _value = value;
  26. _key = key;
  27. }
  28. }
  29. }