This happens when there's an empty `base_url:` in YAML. It comes in as a blank string.pull/231/head
parent
258949c0aa
commit
1fc041253e
@ -0,0 +1,16 @@
|
||||
namespace Recyclarr.Common.Extensions;
|
||||
|
||||
public static class TypeExtensions
|
||||
{
|
||||
public static bool IsGenericTypeOf(this Type type, Type genericType)
|
||||
{
|
||||
return type is {IsGenericType: true} && type.GetGenericTypeDefinition() == genericType;
|
||||
}
|
||||
|
||||
public static bool IsImplementationOf(this Type type, Type collectionType)
|
||||
{
|
||||
return
|
||||
type is {IsInterface: true} && type.IsGenericTypeOf(collectionType) ||
|
||||
type.GetInterfaces().Any(i => i.IsGenericTypeOf(typeof(ICollection<>)));
|
||||
}
|
||||
}
|
Loading…
Reference in new issue