string typeName = "System.ISerializable";
IDeclarationsCache cache = PsiManager.GetInstance(solution).
GetDeclarationsCache(DeclarationsCacheScope.SolutionScope(solution, true), true);
ITypeElement typeElement = cache.GetTypeElementByCLRName(typeName);
IDeclaredType declaredType = TypeFactory.CreateType(typeElement);
Saturday, September 20, 2008
Tip
Here is how to create an IDeclaredType instance from a string:
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment