<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.3.3" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>
<channel>
	<title>Comments on: Understanding T4: &#60;#@ include #&#62; directive</title>
	<link>http://www.olegsych.com/2008/02/t4-include-directive/</link>
	<description>this.Write(code);</description>
	<pubDate>Wed, 07 Jan 2009 14:05:09 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.3</generator>
		<item>
		<title>By: Oleg Sych</title>
		<link>http://www.olegsych.com/2008/02/t4-include-directive/#comment-819</link>
		<dc:creator>Oleg Sych</dc:creator>
		<pubDate>Sun, 23 Nov 2008 14:19:09 +0000</pubDate>
		<guid>http://www.olegsych.com/2008/02/t4-include-directive/#comment-819</guid>
		<description>Mike, I don't think it's possible for a directive processor generate code in the TransformText method. Take a look at virtual methods of the &lt;a href="http://msdn.microsoft.com/en-us/library/microsoft.visualstudio.texttemplating.directiveprocessor.aspx" rel="nofollow"&gt;DirectoveProcessor&lt;/a&gt; class. If I understand correclty, a directive processor can provide class-level code and code for the &lt;a href="http://msdn.microsoft.com/en-us/library/microsoft.visualstudio.texttemplating.texttransformation.initialize.aspx" rel="nofollow"&gt;Initialize&lt;/a&gt; method of GeneratedTextTransformation.</description>
		<content:encoded><![CDATA[<p>Mike, I don&#8217;t think it&#8217;s possible for a directive processor generate code in the TransformText method. Take a look at virtual methods of the <a href="http://msdn.microsoft.com/en-us/library/microsoft.visualstudio.texttemplating.directiveprocessor.aspx" rel="nofollow">DirectoveProcessor</a> class. If I understand correclty, a directive processor can provide class-level code and code for the <a href="http://msdn.microsoft.com/en-us/library/microsoft.visualstudio.texttemplating.texttransformation.initialize.aspx" rel="nofollow">Initialize</a> method of GeneratedTextTransformation.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike Pagel</title>
		<link>http://www.olegsych.com/2008/02/t4-include-directive/#comment-808</link>
		<dc:creator>Mike Pagel</dc:creator>
		<pubDate>Thu, 20 Nov 2008 17:09:07 +0000</pubDate>
		<guid>http://www.olegsych.com/2008/02/t4-include-directive/#comment-808</guid>
		<description>Just notice that in comment #2 your CM system removed the T4 statements. They looked like this


and


That should work.

Sorry about that,
Mike</description>
		<content:encoded><![CDATA[<p>Just notice that in comment #2 your CM system removed the T4 statements. They looked like this</p>
<p>and</p>
<p>That should work.</p>
<p>Sorry about that,<br />
Mike</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike Pagel</title>
		<link>http://www.olegsych.com/2008/02/t4-include-directive/#comment-807</link>
		<dc:creator>Mike Pagel</dc:creator>
		<pubDate>Thu, 20 Nov 2008 17:06:40 +0000</pubDate>
		<guid>http://www.olegsych.com/2008/02/t4-include-directive/#comment-807</guid>
		<description>Hi Oleg,

do you know of a way to implement a custom processor, that injects code into the template class' TransformText() method at exactly the position where the directive is given, sort of like a macro looking nice to the template author but expanding to something big and ugly.

E.g. I want to allow writing something like (omitted processor attributes):

...

...


where the "For" directive does some ugly XPATH stuff and "EndFor" adds a bunch of closing brackets completing the statement.

Because of the bracket stuff I cannot just create class methods.

Currently I am even considering doing a preprocessing step to replace the macro like statements... but that does feel wrong.

Thanks,
Mike</description>
		<content:encoded><![CDATA[<p>Hi Oleg,</p>
<p>do you know of a way to implement a custom processor, that injects code into the template class&#8217; TransformText() method at exactly the position where the directive is given, sort of like a macro looking nice to the template author but expanding to something big and ugly.</p>
<p>E.g. I want to allow writing something like (omitted processor attributes):</p>
<p>&#8230;</p>
<p>&#8230;</p>
<p>where the &#8220;For&#8221; directive does some ugly XPATH stuff and &#8220;EndFor&#8221; adds a bunch of closing brackets completing the statement.</p>
<p>Because of the bracket stuff I cannot just create class methods.</p>
<p>Currently I am even considering doing a preprocessing step to replace the macro like statements&#8230; but that does feel wrong.</p>
<p>Thanks,<br />
Mike</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Oleg Sych</title>
		<link>http://www.olegsych.com/2008/02/t4-include-directive/#comment-112</link>
		<dc:creator>Oleg Sych</dc:creator>
		<pubDate>Sun, 06 Apr 2008 22:34:39 +0000</pubDate>
		<guid>http://www.olegsych.com/2008/02/t4-include-directive/#comment-112</guid>
		<description>Added a link to new article for people reading cover to cover - &lt;a href="http://www.olegsych.com/2008/04/t4-property-directive/" rel="nofollow"&gt;&#60;#@ property #&#62; directive&lt;/a&gt;</description>
		<content:encoded><![CDATA[<p>Added a link to new article for people reading cover to cover - <a href="http://www.olegsych.com/2008/04/t4-property-directive/" rel="nofollow">&lt;#@ property #&gt; directive</a></p>
]]></content:encoded>
	</item>
</channel>
</rss>
