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)); } }
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())); } }