mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-29 05:16:34 +02:00
schema updates
This commit is contained in:
@@ -7,6 +7,8 @@ namespace NzbDrone.Common.Reflection
|
||||
{
|
||||
public static class ReflectionExtensions
|
||||
{
|
||||
public static readonly Assembly CoreAssembly = Assembly.Load("NzbDrone.Core");
|
||||
|
||||
public static List<PropertyInfo> GetSimpleProperties(this Type type)
|
||||
{
|
||||
var properties = type.GetProperties();
|
||||
@@ -58,6 +60,11 @@ namespace NzbDrone.Common.Reflection
|
||||
return (T)attribute;
|
||||
}
|
||||
|
||||
public static Type FindTypeByName(this Assembly assembly, string name)
|
||||
{
|
||||
return assembly.GetTypes().Single(c => c.Name.Equals(name, StringComparison.InvariantCultureIgnoreCase));
|
||||
}
|
||||
|
||||
public static bool HasAttribute<TAttribute>(this Type type)
|
||||
{
|
||||
return type.GetCustomAttributes(typeof(TAttribute), true).Any();
|
||||
|
Reference in New Issue
Block a user