/
githubmirror
/
aspnetcore
Обзор
Документация
Войти
/
githubmirror
/
aspnetcore
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/Shared/Debugger/DictionaryItemDebugView.cs
32 строки
903 B
James Newton-King
Improve debug views of dictionaries (#52867)
19 дек 2023, 11:56
Не верифицирован
19 дек 2023, 11:56
154177c
Код
Авторство
О чём код?
// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. using System.Collections.Generic; using System.Diagnostics; namespace Microsoft.AspNetCore.Shared; /// <summary> /// Defines a key/value pair for displaying an item of a dictionary by a debugger. /// </summary> [DebuggerDisplay("{Value}", Name = "[{Key}]")] internal readonly struct DictionaryItemDebugView<TKey, TValue> { public DictionaryItemDebugView(TKey key, TValue value) { Key = key; Value = value; } public DictionaryItemDebugView(KeyValuePair<TKey, TValue> keyValue) { Key = keyValue.Key; Value = keyValue.Value; } [DebuggerBrowsable(DebuggerBrowsableState.Collapsed)] public TKey Key { get; } [DebuggerBrowsable(DebuggerBrowsableState.Collapsed)] public TValue Value { get; } }