TypeSyntax from TypeInfo?

Topics: APIs
Apr 20, 2014 at 8:14 AM
Hello, I have already asked at forums over week ago, but I could have more luck here.

How can I get TypeSyntax from TypeInfo? Looks like Roslyn does that using ITypeSymbolExtensions.GenerateTypeSyntax(ITypeSymbol) which is internal. Any public way?

Apr 21, 2014 at 11:27 PM
Currently, there is not exposed method to convert a type symbol into a reference expression.
Marked as answer by JanKucera on 4/22/2014 at 1:44 AM
Apr 22, 2014 at 8:44 AM
Oh I see, thanks for reply! So it wasn't a good aim for first attempt after all. Or is there other way using Roslyn to expand var declarations?

Anyway, it might make sense to make this ability public, especially if it turned out to be needed inside Roslyn too.
Apr 22, 2014 at 8:24 PM
Yes, it should be public.