public static IsGenericType ( IEntity entity ) : bool | ||
entity | IEntity | |
return | bool |
public static bool IsGenericType(IEntity entity)
{
IType type = entity as IType;
return (type != null && type.GenericInfo != null);
}
/// <summary> /// Checks if a specified entity is not a generic definition. /// </summary> public bool NotGenericDefinition(IEntity entity) { if (!(GenericsServices.IsGenericType(entity) || GenericsServices.IsGenericMethod(entity))) { Errors.Add(CompilerErrorFactory.NotAGenericDefinition(ConstructionNode, entity.FullName)); return(true); } return(false); }