public static bool IsDerivedFrom(this TypeNode typeNodeToTest, string fullTypeName) { if (typeNodeToTest.GetFullUnmangledNameWithoutTypeParameters() == fullTypeName) { return(true); } else if (typeNodeToTest.Interfaces.Any(i => i.GetFullUnmangledNameWithoutTypeParameters() == fullTypeName)) { return(true); } else if (typeNodeToTest.BaseType == null) { return(false); } else { return(typeNodeToTest.BaseType.IsDerivedFrom(fullTypeName)); } }