2,928 questions
7
votes
3
answers
2k
views
Can roslyn generate enums?
So, I feel like it's possible, but i don't have the chops to put it together. I have lookup tables (with ID and Name fields). I have enums that I keep in sync with the lookups. What I'd like is to ...
10
votes
2
answers
4k
views
Loading a Roslyn compiled assembly into a sandbox AppDomain
I've got a code-snippet that compiles a script with the script engine and I retreiv the assembly as a byte array.
Now I want to load this Assembly in a Sandbox, this is what I've got:
Assembly ...
14
votes
2
answers
3k
views
Get TypeSyntax from ITypeSymbol
I'm experimenting a bit with the Roslyn-CTP.
Currently I'm trying to replace var with the concrete type.
var i=1;
should become:
int i=1;
Figuring out the inferred type is easy. But since this part ...
5
votes
2
answers
897
views
Is there a way to change fonts and colors for the C# Interactive window in the Roslyn CTP?
It seems to have partially inherited fonts and colors from my current settings, which has made it pretty ugly right now. I looked in fonts and colors but there is no settings for C# Interactive.
4
votes
3
answers
574
views
What is the most interesting and promising approach to implement a compiler in C#?
I am just in the beginning of my graduation project that is supposed to last for 6 months.
The goal of the project is to implement a .Net-compiler for one scripting language. I had the Compiler ...
5
votes
3
answers
892
views
How stable is the Roslyn CTP as a replacement for dummy console apps?
I frequently find myself making a dummy console app to test something simple out. (For example how does DateTime.Parse like a YYYY-MM-DD-HH-MM-SS formatted string?)
I know that Roslyn has the C# ...
50
votes
3
answers
14k
views
Getting debugger context in C# interactive
C# Interactive seems a lot more powerful than the Immediate Window (at least it handles lambda expressions that are often used in LINQ - see Visual Studio debugging "quick watch" tool and ...
3
votes
3
answers
837
views
Does Roslyn contain compiler source code?
It seems that Roslyn provides new APIs to expose many compiler internal data structure for code analysis, etc. And the C# and VB compiler has been rewritten for such purpose. So can I access the ...
5
votes
3
answers
2k
views
Use Roslyn to compile Controllers dynamically
With the Roslyn CTP out in the open, we can try to think of cool things we can do with it other than writing c# scripts.
Since asp.net mvc allows you to write custom controller factories, could we ...
16
votes
2
answers
5k
views
Can I use Roslyn for compile time code rewriting?
For example I have
class Foo: INotifyPropertyChanged {
public event PropertyChangedEventHandler PropertyChanged;
public int Bar {get;set;}
}
Can I get the Foo class AST and rewrite Bar, in ...
9
votes
3
answers
675
views
Compiler as a service: How to build Refactoring tools?
Lisa Feigenbaum from Microsoft talks here about "Compiler as a service". I have read this would make it easier to build refactoring tools. How? Mono's CAAS is great but if Microsoft version is similar ...
27
votes
5
answers
3k
views
What would you do with Compiler as a Service
Seeing that we'll probably get this feature in the next release what are some of the things you either think you'll be able to do or things you would like to use this feature to do?
Personally, ...
30
votes
3
answers
5k
views
Show <returns> xml tag into visual studio intellisense
I added the <returns> xml tag to some of my methods but I can't see its content in IntelliSense.
Here is my code:
/// <summary>
/// we all live in a yellow summary
/// </summary>
//...
42
votes
5
answers
10k
views
Was C# compiler written in C++?
Was C# compiler written in C++?