Resolved and unresolved statements

Hi!

I trying to analyze some statements and for example when I try to analyze IThrowStatement and then its property Exception (which is ICSharpExpression), I can't figure out how to check if the ICSharpExpression was resolved or not? I don't want to process it until it is resolved. When debugging I've found that there is a private ManagedReference which has a property saying whether it is resolved or not but I can't gain access to it. I've also looked into *.Util namespaces but I wasn't able to find anything useful. Can anybody help me with this?

Regards,
Bartek.

3 comments

Ok. I've managed to resolve this.
The solution is to get ExpressionType from ICSharpStatement via GetExpressionType method. Then the returned implementation of IExpressionType has a property IsResolved.

Is that the right solution?

Regards,
Bartek.

0

This is the easiest solution, but I'm not sure if it suits your needs.

The key problem is that the type of the expression is known, but some parts
of the expression are not resolved.
For example: invocation expression "Foo(....some unresolved args....)"

Though the arguments have problems, the method "Foo" is resolved (because
there is only one method "Foo", for example) and it's return type is known.


--
Eugene Pasynkov
ReSharper Technical Lead
JetBrains, Inc.
http://www.jetbrains.com
"Develop with pleasure!"
<no_reply@jetbrains.com> wrote in message
news:16322406.14401221829985287.JavaMail.jive@app4.labs.intellij.net...

Ok. I've managed to resolve this.
The solution is to get ExpressionType from ICSharpStatement via
GetExpressionType method. Then the returned implementation of
IExpressionType has a property IsResolved.

>

Is that the right solution?

>

Regards,
Bartek.



0

Please sign in to leave a comment.