Exemplo n.º 1
0
 public static bool IsGenericInterface(this ITypeElement typeElement)
 {
     return(typeElement is IInterface &&
            typeElement.HasTypeParameters());
 }
        private static string GetDisplayName(ITypeElement element)
        {
            IClrTypeName clrName = element.GetClrName();

            string fullName = string.Format("{0}.{1}", clrName.GetNamespaceName(), clrName.ShortName);

            if (element.HasTypeParameters())
            {
                fullName = string.Format("{0}<>", fullName);
            }

            return fullName;
        }
Exemplo n.º 3
0
 public static bool IsGenericTypeDefinition(this ITypeElement element)
 {
     // todo check if this is enough
     return(element.HasTypeParameters());
 }