mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2026-04-21 22:25:03 -04:00
Reformat and apply Stylecop rules
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user