/// <summary>
        /// Finds types or namespaces described by a qualified name.
        /// </summary>
        /// <param name="qualifiedName">Sequence of simple plain names.</param>
        /// <returns>
        /// A set of namespace or type symbols with given qualified name (might comprise of types with multiple generic arities),
        /// or an empty set if the member can't be found (the qualified name is ambiguous or the symbol doesn't exist).
        /// </returns>
        /// <remarks>
        /// "C.D" matches C.D, C{T}.D, C{S,T}.D{U}, etc.
        /// </remarks>
        internal IEnumerable <NamespaceOrTypeSymbol> GetNamespaceOrTypeByQualifiedName(IEnumerable <string> qualifiedName)
        {
            NamespaceOrTypeSymbol namespaceOrType       = this;
            IEnumerable <NamespaceOrTypeSymbol> symbols = null;

            foreach (string name in qualifiedName)
            {
                if (symbols != null)
                {
                    // there might be multiple types of different arity, prefer a non-generic type:
                    namespaceOrType = symbols.OfMinimalArity();
                    if ((object)namespaceOrType == null)
                    {
                        return(SpecializedCollections.EmptyEnumerable <NamespaceOrTypeSymbol>());
                    }
                }

                symbols = namespaceOrType.GetMembers(name).OfType <NamespaceOrTypeSymbol>();
            }

            return(symbols);
        }