<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Roslyn Code Quoter tool – generating syntax API calls to generate any C# program</title><link>http://blogs.msdn.com/b/kirillosenkov/archive/2012/07/22/roslyn-code-quoter-tool-generating-syntax-tree-api-calls-for-any-c-program.aspx</link><description>Whether you’ve played with the Roslyn CTP or are planning to do so in the future, chances are that sooner or later you’ll run into a need to generate code. One approach is to just use a StringBuilder, concatenate the source together, and then just call</description><dc:language>en-US</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>re: Roslyn Code Quoter tool – generating syntax API calls to generate any C# program</title><link>http://blogs.msdn.com/b/kirillosenkov/archive/2012/07/22/roslyn-code-quoter-tool-generating-syntax-tree-api-calls-for-any-c-program.aspx#10394672</link><pubDate>Sun, 17 Feb 2013 19:56:38 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10394672</guid><dc:creator>Kirill Osenkov - MSFT</dc:creator><description>&lt;p&gt;One way to do it would be to change the Quoter source code to also accept rewriting rules or transformations. And then you could add a rule such as &amp;quot;Replace all identifier nodes named &amp;quot;SDFIJWE&amp;quot; with this code&amp;quot;, and after the Quoter parses the source code into a tree, apply a visitor to the tree that would rewrite it based on the rules. You can have custom rules as SyntaxRewriter and pass them to Quoter to transform the tree after parsing it.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10394672" width="1" height="1"&gt;</description></item><item><title>re: Roslyn Code Quoter tool – generating syntax API calls to generate any C# program</title><link>http://blogs.msdn.com/b/kirillosenkov/archive/2012/07/22/roslyn-code-quoter-tool-generating-syntax-tree-api-calls-for-any-c-program.aspx#10394666</link><pubDate>Sun, 17 Feb 2013 19:20:42 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10394666</guid><dc:creator>AttilaH</dc:creator><description>&lt;p&gt;What is the best Roslyn way to add parameter support for the quoted code?&lt;/p&gt;
&lt;p&gt;Like your example &amp;quot;class C { }&amp;quot;. After I quoting that code &amp;quot;C&amp;quot; will be a constant.&lt;/p&gt;
&lt;p&gt;How can I make &amp;quot;C&amp;quot; to be a parameter for the quoted code? and I mean automagically. The &amp;quot;problem&amp;quot; is that I can not have something like this:&lt;/p&gt;
&lt;p&gt;&amp;quot;class [|className|] { }&amp;quot;, since then the quoter will not recognize my placeholder so I will not be able to write a rewriter which replaces the placeholders with some parameter.&lt;/p&gt;
&lt;p&gt;So what should be the best way to achieve this? In my head I can think of using some kind of valid C# construct as placeholders, and have a rewriter which then rewrites that somehow to something.&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Attila&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10394666" width="1" height="1"&gt;</description></item><item><title>re: Roslyn Code Quoter tool – generating syntax API calls to generate any C# program</title><link>http://blogs.msdn.com/b/kirillosenkov/archive/2012/07/22/roslyn-code-quoter-tool-generating-syntax-tree-api-calls-for-any-c-program.aspx#10365500</link><pubDate>Sat, 03 Nov 2012 10:21:46 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10365500</guid><dc:creator>lesezeichen</dc:creator><description>&lt;p&gt;Great stuff. I hope it will be updated when necessary to keep it in sync with roslyn progress.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10365500" width="1" height="1"&gt;</description></item></channel></rss>