I'm trying to write my first ReSharper extension and I'm stuck at the following problem:
How do you get a resolved Type from an IType descriptor of it?
For background, I'm trying to write an analyzer that uses a tool to test the compatibility of two type arguments.
So far, I've got this
[ElementProblemAnalyzer(new[] { typeof(IInvocationExpression) })]
public class MyAnalyzer : IElementProblemAnalyzer`
{
public void Run(ITreeNode element, ElementProblemAnalyzerData analyzerData, IHighlightingConsumer consumer)
{
...
var typeArgs = meaningfulChildren.FirstOrDefault(o => o is ITypeArgumentList) as ITypeArgumentList;
IType psiType = typeArgs.TypeArguments[0];
Type actualType = psiType.ResolvedType; // No such property
}
}