Core.TypeExtensions - add methods

This commit is contained in:
Stephan
2013-10-24 20:53:01 +02:00
parent c4f3dae317
commit 4487e686d7

View File

@@ -278,6 +278,11 @@ namespace Umbraco.Core
return typeof (TBase).IsAssignableFrom(type);
}
public static bool Inherits(this Type type, Type tbase)
{
return tbase.IsAssignableFrom(type);
}
public static bool Implements<TInterface>(this Type type)
{
return typeof (TInterface).IsAssignableFrom(type);