Exemple #1
0
        private void ProcessNamespace(INamespace element, ISymbolScope scope,
                                      ICollection <HandlerCompletionItem> handlers)
        {
            var nestedNamespaces = element.GetNestedNamespaces(scope);

            foreach (var @namespace in nestedNamespaces)
            {
                ProcessNamespace(@namespace, scope, handlers);
            }

            var classes = element.GetNestedElements(scope).OfType <IClass>();

            foreach (var @class in classes)
            {
                ProcessClass(@class, handlers);
            }
        }
Exemple #2
0
        private static IEnumerable <ITypeElement> FindTypeElements(INamespace ns,
                                                                   ISymbolScope symbolScope)
        {
            foreach (var te in ns.GetNestedTypeElements(symbolScope))
            {
                yield return(te);

                foreach (var nte in te.NestedTypes)
                {
                    yield return(nte);
                }
            }

            foreach (var nsNested in ns.GetNestedNamespaces(symbolScope))
            {
                foreach (var te in FindTypeElements(nsNested, symbolScope))
                {
                    yield return(te);
                }
            }
        }