NotGenericDefinition() public method

Checks if a specified entity is not a generic definition.
public NotGenericDefinition ( IEntity entity ) : bool
entity IEntity
return bool
Ejemplo n.º 1
0
        /// <summary>
        /// Checks whether a given set of arguments can be used to construct a generic type or method from a specified definition.
        /// </summary>
        public bool CheckGenericConstruction(IEntity definition, Node node, TypeReferenceCollection arguments, CompilerErrorCollection errors)
        {
            GenericConstructionChecker checker = new GenericConstructionChecker(
                TypeSystemServices, node, arguments, Errors);

            return(!(
                       checker.NotGenericDefinition(definition) ||
                       checker.IncorrectGenerity(definition) ||
                       checker.ViolatesParameterConstraints(definition)));
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Checks whether a given set of arguments can be used to construct a generic type or method from a specified definition.
        /// </summary>
        public bool CheckGenericConstruction(Node node, IEntity definition, IType[] argumentTypes, CompilerErrorCollection errors)
        {
            GenericConstructionChecker checker = new GenericConstructionChecker(
                TypeSystemServices, node, argumentTypes, Errors);

            return !(
                checker.NotGenericDefinition(definition) ||
                checker.IncorrectGenerity(definition) ||
                checker.ViolatesParameterConstraints(definition));
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Checks whether a given set of arguments can be used to construct a generic type or method from a specified definition.
        /// </summary>
        public bool CheckGenericConstruction(IEntity definition, Node node, TypeReferenceCollection arguments, CompilerErrorCollection errors)
        {
            // Ensure definition is a valid entity
            if (definition == null || TypeSystemServices.IsError(definition))
            {
                return false;
            }

            // Ensure definition really is a generic definition
            GenericConstructionChecker checker = new GenericConstructionChecker(
                TypeSystemServices, node, arguments, Errors);

            return !(
                checker.NotGenericDefinition(definition) ||
                checker.IncorrectGenerity(definition) ||
                checker.ViolatesParameterConstraints(definition));
        }