< Summary

Information
Class: MyNet.Primitives.ComparerExtensions
Assembly: MyNet.Primitives
File(s): https://raw.githubusercontent.com/sandre58/MyNet/85372080fe102cd9ee155ceab49ae000e7f66103/src/MyNet.Primitives/Comparers/Extensions/ComparerExtensions.cs
Tag: 323_28699572109
Line coverage
100%
Covered lines: 1
Uncovered lines: 0
Coverable lines: 1
Total lines: 25
Line coverage: 100%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
Reverse(...)100%11100%

File(s)

https://raw.githubusercontent.com/sandre58/MyNet/85372080fe102cd9ee155ceab49ae000e7f66103/src/MyNet.Primitives/Comparers/Extensions/ComparerExtensions.cs

#LineLine coverage
 1// -----------------------------------------------------------------------
 2// <copyright file="ComparerExtensions.cs" company="Stéphane ANDRE">
 3// Copyright (c) Stéphane ANDRE. All rights reserved.
 4// </copyright>
 5// -----------------------------------------------------------------------
 6
 7using System.Collections.Generic;
 8using MyNet.Primitives.Comparers;
 9
 10#pragma warning disable IDE0130 // Namespace does not match folder structure
 11namespace MyNet.Primitives;
 12#pragma warning restore IDE0130 // Namespace does not match folder structure
 13
 14public static class ComparerExtensions
 15{
 16    extension<T>(IComparer<T> comparer)
 17    {
 18        /// <summary>
 19        /// Returns a comparer that reverses the order of the current comparer.
 20        /// </summary>
 21        /// <returns>The reverse comparer.</returns>
 922        public IComparer<T> Reverse() => new ReverseComparer<T>(comparer);
 23    }
 24}
 25