public override IDeclaredElement GetDeclaredElement()
        {
            PsiManager         manager           = PsiManager.GetInstance(GetSolution());
            IDeclarationsCache declarationsCache = manager.GetDeclarationsCache(DeclarationsScopeFactory.ModuleScope(PsiModuleManager.GetInstance(GetSolution()).GetPrimaryPsiModule(GetProject()), false), true);

            return(declarationsCache.GetTypeElementByCLRName(GetTypeClrName()));
        }
Example #2
0
        public override IDeclaredElement GetDeclaredElement()
        {
            var solution                         = GetSolution();
            var module                           = PsiModuleManager.GetInstance(solution).GetPsiModule(GetProject().ProjectFile);
            IDeclarationsScope scope             = DeclarationsScopeFactory.ModuleScope(module, false);
            IDeclarationsCache declarationsCache = PsiManager.GetInstance(solution).GetDeclarationsCache(scope, true);

            return(declarationsCache.GetTypeElementByCLRName(GetTypeClrName()));
        }
Example #3
0
        protected ITypeElement GetDeclaredType()
        {
            ISolution solution = GetSolution();

            if (solution == null)
            {
                return(null);
            }

            using (ReadLockCookie.Create())
            {
                IDeclarationsScope scope = DeclarationsScopeFactory.SolutionScope(solution, false);
                IDeclarationsCache cache = PsiManager.GetInstance(solution).GetDeclarationsCache(scope, true);
                return(cache.GetTypeElementByCLRName(_declaringTypeName));
            }
        }
Example #4
0
        public override IDeclaredElement GetDeclaredElement()
        {
            ISolution solution = GetSolution();

            if (solution == null)
            {
                return(null);
            }

            using (ReadLockCookie.Create())
            {
                IDeclarationsScope scope = DeclarationsScopeFactory.SolutionScope(solution, false);
                IDeclarationsCache cache = PsiManager.GetInstance(solution).GetDeclarationsCache(scope, true);
                return(cache.GetTypeElementByCLRName(GetTypeClrName()));
            }
        }
        protected ITypeElement GetDeclaredType()
        {
            IProject project = GetProject();

            if (project == null)
            {
                return(null);
            }
            PsiManager manager = PsiManager.GetInstance(project.GetSolution());

            using (ReadLockCookie.Create())
            {
                IDeclarationsCache declarationsCache = manager.GetDeclarationsCache(DeclarationsScopeFactory.ModuleScope(PsiModuleManager.GetInstance(project.GetSolution()).GetPrimaryPsiModule(project), true), true);
                return(declarationsCache.GetTypeElementByCLRName(myTypeName));
            }
        }
Example #6
0
        protected ITypeElement GetDeclaredType()
        {
            IProject project = GetProject();

            if (project == null)
            {
                return(null);
            }

            using (ReadLockCookie.Create())
            {
                var solution                         = GetSolution();
                var module                           = PsiModuleManager.GetInstance(solution).GetPsiModule(GetProject().ProjectFile);
                IDeclarationsScope scope             = DeclarationsScopeFactory.ModuleScope(module, true);
                IDeclarationsCache declarationsCache = PsiManager.GetInstance(solution).GetDeclarationsCache(scope, true);

                return(declarationsCache.GetTypeElementByCLRName(myTypeName));
            }
        }