Boo.Lang.Compiler.TypeSystem.GenericsServices.IsGenericType C# (CSharp) Method

IsGenericType() public static method

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);
        }

Usage Example

Example #1
0
 /// <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);
 }
All Usage Examples Of Boo.Lang.Compiler.TypeSystem.GenericsServices::IsGenericType