Boo.Lang.Compiler.TypeSystem.TypeSystemServices.ContainsMethodsOnly C# (CSharp) Method

ContainsMethodsOnly() public static method

public static ContainsMethodsOnly ( ICollection members ) : bool
members ICollection
return bool
        public static bool ContainsMethodsOnly(ICollection<IEntity> members)
        {
            return members.All(member => EntityType.Method == member.EntityType);
        }

Usage Example

Example #1
0
        public virtual bool Resolve(List targetList, string name, EntityType flags)
        {
            bool found = false;

            foreach (IEntity member in GetMembers())
            {
                if (!NameResolutionService.IsFlagSet(flags, member.EntityType))
                {
                    continue;
                }

                if (member.Name == name)
                {
                    targetList.AddUnique(member);
                    found = true;
                }
            }

            if (IsInterface)
            {
                if (_typeSystemServices.ObjectType.Resolve(targetList, name, flags))
                {
                    found = true;
                }

                foreach (IType baseInterface in GetInterfaces())
                {
                    found |= baseInterface.Resolve(targetList, name, flags);
                }
            }
            else
            {
                if (!found || TypeSystemServices.ContainsMethodsOnly(targetList))
                {
                    IType baseType = BaseType;
                    if (null != baseType)
                    {
                        found |= baseType.Resolve(targetList, name, flags);
                    }
                }
            }
            return(found);
        }
TypeSystemServices