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

CheckGenericConstruction() public method

Checks whether a given set of arguments can be used to construct a generic type or method from a specified definition.
public CheckGenericConstruction ( Node node, IEntity definition, IType typeArguments, bool reportErrors ) : bool
node Node
definition IEntity
typeArguments IType
reportErrors bool
return bool
        public bool CheckGenericConstruction(Node node, IEntity definition, IType[] typeArguments, bool reportErrors)
        {
            var checker = new GenericConstructionChecker(typeArguments, node);
            foreach (Predicate<IEntity> check in checker.Checks)
            {
                if (check(definition)) continue;

                if (reportErrors) checker.ReportErrors(Errors);
                return false;
            }

            return true;
        }

Same methods

GenericsServices::CheckGenericConstruction ( IEntity definition, IType typeArguments ) : bool