< Summary - pva.SuperV

Information
Class: pva.Helpers.Extensions.IDictionaryExtensions
Assembly: pva.Helpers
File(s): /home/runner/work/pva.SuperV/pva.SuperV/pva.Helpers/Extensions/IDictionaryExtensions.cs
Tag: dotnet-ubuntu_18869653307
Line coverage
100%
Covered lines: 6
Uncovered lines: 0
Coverable lines: 6
Total lines: 19
Line coverage: 100%
Branch coverage
100%
Covered branches: 2
Total branches: 2
Branch coverage: 100%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
ForEach(...)100%22100%

File(s)

/home/runner/work/pva.SuperV/pva.SuperV/pva.Helpers/Extensions/IDictionaryExtensions.cs

#LineLine coverage
 1namespace pva.Helpers.Extensions
 2{
 3    /// <summary>Extension methods on dictionnaries.</summary>
 4    public static class IDictionaryExtensions
 5    {
 6        /// <summary>Allows to use foreach at the end of a LINQ expression on a dictionnary</summary>
 7        /// <typeparam name="TKey">The type of the key.</typeparam>
 8        /// <typeparam name="TValue">The type of the value.</typeparam>
 9        /// <param name="iDictionary">The dictionary to be iterated on.</param>
 10        /// <param name="action">The action to be invoked for each item in dictionnary. It receives the key and the valu
 11        public static void ForEach<TKey, TValue>(this IDictionary<TKey, TValue> iDictionary, Action<TKey, TValue> action
 88512        {
 1059513            foreach (KeyValuePair<TKey, TValue> pair in iDictionary)
 397014            {
 397015                action(pair.Key, pair.Value);
 397016            }
 88517        }
 18    }
 19}