Home

Option to show types in query

I'm a Systems analyst. Linqpad brilliantly helps when one needs to make mapping or DTO description. Is there a possibility to put this feature to Preferences and show type names like in
https://stackoverflow.com/questions/2579734/get-the-type-name
?
Now i'm doing it with JavaScript injection, which not always works directy in result window.

void Main()
{
CultureInfo.CurrentCulture.DateTimeFormat.Dump();

var literal = new LINQPad.Controls.Literal("script",
@"
   function show_types() { 
                var x = document.getElementsByTagName('th');
                var i;
                for (i = 0; i < x.length; i++){

                   var tit = x[i].getAttribute('title');
                   tit = tit.replace('System.', '') ;
                   tit = tit.replace('UserQuery+', '') ;
                   x[i].innerHTML =
                       '<span style=\'color:#39FF14\'>■&nbsp;</span>' +
                       '<span style=\'color:#2d89ef\'>' + x[i].innerHTML + '</span>' +
                       '<span style=\'color:#7e3878\'>&nbsp;:&nbsp;'  + tit + '</span>' ; 
                }
}
   show_types();
   ").Dump(); 

}

Comments

Sign In or Register to comment.