jrusbatch / compilify

A web-based compiler for C# and VB.NET, powered by the Roslyn Project.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Predefine a class that acts like Console

khalidabuhakmeh opened this issue · comments

It would be nice to be able to use Console in the execute window.

Console.WriteLine("debugging")

For what purpose?

For debugging mainly. It feels a little more natural than having to create a Result class in the "Define" section.

On Apr 17, 2012, at 4:03 PM, Justin Rusbatch wrote:

For what purpose?


Reply to this email directly or view it on GitHub:
#34 (comment)

I think this technique would accomplish the goal: use an implementation of Roslyn's SyntaxRewriter class to replace the appropriate calls to methods in the Console class with calls to a custom class that evaluates the input and stores the result in a list. The contents of that list could be dumped to the result panel.

Actually, I think the technique @ermau demonstrates on his blog might be a better solution. I need to investigate whether or not it would work the current architecture, though.