• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

loresoft / EntityChange / 10792597827

10 Sep 2024 12:38PM UTC coverage: 39.608%. Remained the same
10792597827

push

github

web-flow
Merge pull request #103 from loresoft/dependabot/nuget/MinVer-6.0.0

Bump MinVer from 5.0.0 to 6.0.0

237 of 731 branches covered (32.42%)

Branch coverage included in aggregate %.

571 of 1309 relevant lines covered (43.62%)

60.49 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/EntityChange/DictionaryWrapper.cs
1
using System.Collections;
2

3
namespace EntityChange;
4

5
/// <summary>
6
/// Generic dictionary wrapper to allow comparison by object type
7
/// </summary>
8
/// <typeparam name="TKey">The type of the key.</typeparam>
9
/// <typeparam name="TValue">The type of the value.</typeparam>
10
internal class DictionaryWrapper<TKey, TValue> : IDictionaryWrapper
11
{
12
    private readonly IDictionary<TKey, TValue> _dictionary;
13

14
    /// <summary>
15
    /// Initializes a new instance of the <see cref="DictionaryWrapper{TKey, TValue}"/> class.
16
    /// </summary>
17
    /// <param name="dictionary">The dictionary.</param>
18
    public DictionaryWrapper(IDictionary<TKey, TValue> dictionary)
×
19
    {
20
        _dictionary = dictionary;
×
21
    }
×
22

23

24
    /// <summary>
25
    /// Gets the underling dictionary keys.
26
    /// </summary>
27
    /// <returns>An <see cref="IEnumerable"/> of keys</returns>
28
    public IEnumerable GetKeys()
29
    {
30
        return _dictionary.Keys;
×
31
    }
32

33

34
    /// <summary>
35
    /// Gets the value for the specified <paramref name="key"/>.
36
    /// </summary>
37
    /// <param name="key">The dictionary key.</param>
38
    /// <returns>The value for the specified <paramref name="key"/></returns>
39
    public object GetValue(object key)
40
    {
41
        _dictionary.TryGetValue((TKey)key, out var value);
×
42

43
        return value;
×
44
    }
45
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc