< Summary

Information
Class: Renci.SshNet.Abstractions.ReflectionAbstraction
Assembly: Renci.SshNet
File(s): \home\appveyor\projects\ssh-net\src\Renci.SshNet\Abstractions\ReflectionAbstraction.cs
Line coverage
100%
Covered lines: 4
Uncovered lines: 0
Coverable lines: 4
Total lines: 16
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 Cyclomatic complexity Line coverage
GetCustomAttributes(...)100%1100%

File(s)

\home\appveyor\projects\ssh-net\src\Renci.SshNet\Abstractions\ReflectionAbstraction.cs

#LineLine coverage
 1using System;
 2using System.Collections.Generic;
 3using System.Linq;
 4
 5namespace Renci.SshNet.Abstractions
 6{
 7    internal static class ReflectionAbstraction
 8    {
 9        public static IEnumerable<T> GetCustomAttributes<T>(this Type type, bool inherit)
 10            where T : Attribute
 16331811        {
 16331812            var attributes = type.GetCustomAttributes(typeof(T), inherit);
 16331813            return attributes.Cast<T>();
 16331814        }
 15    }
 16}