Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
432 changes: 432 additions & 0 deletions Tests/GenericCollections/DictionaryTests.cs

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions Tests/GenericCollections/GenericCollections.nfproj
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
<Import Project="$(NanoFrameworkProjectSystemPath)NFProjectSystem.props" Condition="Exists('$(NanoFrameworkProjectSystemPath)NFProjectSystem.props')" />
<ItemGroup>
<Compile Include="CollectionTestBase.cs" />
<Compile Include="DictionaryTests.cs" />
<Compile Include="ListTests.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

using System.Diagnostics;

namespace System.Collections.Generic
{
/// <summary>
/// Defines a key/value pair for displaying an item of a dictionary by a debugger.
/// </summary>
[DebuggerDisplay("{Value}", Name = "[{Key}]")]
internal readonly struct DebugViewDictionaryItem<TKey, TValue>
{
public DebugViewDictionaryItem(TKey key, TValue value)
{
Key = key;
Value = value;
}

public DebugViewDictionaryItem(KeyValuePair<TKey, TValue> keyValue)
{
Key = keyValue.Key;
Value = keyValue.Value;
}

[DebuggerBrowsable(DebuggerBrowsableState.Collapsed)]
public TKey Key { get; }

[DebuggerBrowsable(DebuggerBrowsableState.Collapsed)]
public TValue Value { get; }
}
}
Loading
Loading