Esempio n. 1
0
        protected override void ExploreImpl(IReflectionPolicy reflectionPolicy, ICodeElementInfo codeElement)
        {
            InitializeExplorerIfNeeded(reflectionPolicy);

            IAssemblyInfo assembly = ReflectionUtils.GetAssembly(codeElement);

            if (assembly != null)
            {
                bool skipChildren = !(codeElement is IAssemblyInfo);
                if (BuildAssemblyTest(assembly, skipChildren))
                {
                    foreach (IPatternScope scope in evaluator.GetScopes(assembly))
                    {
                        scope.PopulateDeferredComponents(null);
                    }

                    assemblies[assembly] = true;
                }
                else
                {
                    ITypeInfo type = ReflectionUtils.GetType(codeElement);
                    if (type != null)
                    {
                        foreach (IPatternScope scope in evaluator.GetScopes(assembly))
                        {
                            scope.PopulateDeferredComponents(type);
                        }
                    }
                }
            }
        }