Upstream Changes to DownloadClients and Indexers

This commit is contained in:
Qstick
2017-10-26 23:21:06 -04:00
parent f6d1b77b45
commit 13bfb73ee9
80 changed files with 1521 additions and 654 deletions
@@ -60,6 +60,11 @@ namespace NzbDrone.Common.Reflection
return (T)attribute;
}
public static T[] GetAttributes<T>(this MemberInfo member) where T : Attribute
{
return member.GetCustomAttributes(typeof(T), false).OfType<T>().ToArray();
}
public static Type FindTypeByName(this Assembly assembly, string name)
{
return assembly.GetTypes().SingleOrDefault(c => c.Name.Equals(name, StringComparison.InvariantCultureIgnoreCase));