Esempio n. 1
0
 public static bool InheritsGenericDefinition(Type type, Type genericClassDefinition, out Type implementingType)
 {
     ValidationUtils.ArgumentNotNull((object)type, "type");
     ValidationUtils.ArgumentNotNull((object)genericClassDefinition, "genericClassDefinition");
     if (!TypeExtensions.IsClass(genericClassDefinition) || !TypeExtensions.IsGenericTypeDefinition(genericClassDefinition))
     {
         throw new ArgumentNullException(StringUtils.FormatWith("'{0}' is not a generic class definition.", (IFormatProvider)CultureInfo.InvariantCulture, (object)genericClassDefinition));
     }
     else
     {
         return(ReflectionUtils.InheritsGenericDefinitionInternal(type, genericClassDefinition, out implementingType));
     }
 }