1
0
mirror of https://github.com/Radarr/Radarr.git synced 2026-04-21 22:05:43 -04:00

Reformat and apply Stylecop rules

This commit is contained in:
ta264
2019-12-22 22:08:53 +00:00
committed by Qstick
parent d4fa9b7345
commit f02fa629cc
1186 changed files with 7105 additions and 5616 deletions
@@ -29,7 +29,6 @@ namespace NzbDrone.Common.Reflection
type = type.GetGenericArguments()[0];
}
return type.IsPrimitive
|| type.IsEnum
|| type == typeof(string)
@@ -48,7 +47,8 @@ namespace NzbDrone.Common.Reflection
return propertyInfo.CanWrite && propertyInfo.GetSetMethod(false) != null;
}
public static T GetAttribute<T>(this MemberInfo member, bool isRequired = true) where T : Attribute
public static T GetAttribute<T>(this MemberInfo member, bool isRequired = true)
where T : Attribute
{
var attribute = member.GetCustomAttributes(typeof(T), false).SingleOrDefault();
@@ -60,7 +60,8 @@ namespace NzbDrone.Common.Reflection
return (T)attribute;
}
public static T[] GetAttributes<T>(this MemberInfo member) where T : Attribute
public static T[] GetAttributes<T>(this MemberInfo member)
where T : Attribute
{
return member.GetCustomAttributes(typeof(T), false).OfType<T>().ToArray();
}