<?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;#@ parameter #&#62; directive</title>
	<link>http://www.olegsych.com/2010/05/t4-parameter-directive/</link>
	<description>Interfaces are like alcohol - they are a lot of fun when used in moderation.</description>
	<pubDate>Sat, 04 Feb 2012 05:17:57 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.3</generator>
		<item>
		<title>By: Code Generation and T4 Text Templates &#124; werkstetter.com</title>
		<link>http://www.olegsych.com/2010/05/t4-parameter-directive/#comment-3421</link>
		<dc:creator>Code Generation and T4 Text Templates &#124; werkstetter.com</dc:creator>
		<pubDate>Wed, 25 May 2011 07:00:46 +0000</pubDate>
		<guid>http://www.olegsych.com/2010/05/t4-parameter-directive/#comment-3421</guid>
		<description>[...] http://www.olegsych.com/2010/05/t4-parameter-directive/ http://www.olegsych.com/2008/03/code-generation-with-visual-studio-templates/ [...]</description>
		<content:encoded><![CDATA[<p>[&#8230;] <a href="http://www.olegsych.com/2010/05/t4-parameter-directive/" rel="nofollow">http://www.olegsych.com/2010/05/t4-parameter-directive/</a> <a href="http://www.olegsych.com/2008/03/code-generation-with-visual-studio-templates/" rel="nofollow">http://www.olegsych.com/2008/03/code-generation-with-visual-studio-templates/</a> [&#8230;]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Aarti</title>
		<link>http://www.olegsych.com/2010/05/t4-parameter-directive/#comment-3411</link>
		<dc:creator>Aarti</dc:creator>
		<pubDate>Thu, 12 May 2011 05:41:05 +0000</pubDate>
		<guid>http://www.olegsych.com/2010/05/t4-parameter-directive/#comment-3411</guid>
		<description>Hello,
Very first time I am developing a utility using T4 to generate .aspx, .aspx.cs files as well as stored procedures. For that I need to pass some parameters like tablename, pagename etc. from windows form to the T4 template. And I have written templates and also a customHost as given http://msdn.microsoft.com/en-us/library/bb126579.aspx to call from windows form. Now I can call T4 template from windows form, but I don't know how to pass parameters to T4 template. I have tried to create property in template and call template from Win form but it gives me error on this line "var sessionHost = (ITextTemplatingSessionHost) this.Host;" because I use CustomHost. Please help me out.

Thanks.</description>
		<content:encoded><![CDATA[<p>Hello,<br />
Very first time I am developing a utility using T4 to generate .aspx, .aspx.cs files as well as stored procedures. For that I need to pass some parameters like tablename, pagename etc. from windows form to the T4 template. And I have written templates and also a customHost as given <a href="http://msdn.microsoft.com/en-us/library/bb126579.aspx" rel="nofollow">http://msdn.microsoft.com/en-us/library/bb126579.aspx</a> to call from windows form. Now I can call T4 template from windows form, but I don&#8217;t know how to pass parameters to T4 template. I have tried to create property in template and call template from Win form but it gives me error on this line &#8220;var sessionHost = (ITextTemplatingSessionHost) this.Host;&#8221; because I use CustomHost. Please help me out.</p>
<p>Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: krzysztof</title>
		<link>http://www.olegsych.com/2010/05/t4-parameter-directive/#comment-3246</link>
		<dc:creator>krzysztof</dc:creator>
		<pubDate>Fri, 24 Sep 2010 07:46:10 +0000</pubDate>
		<guid>http://www.olegsych.com/2010/05/t4-parameter-directive/#comment-3246</guid>
		<description>Hello,
I'm using T4 to auto create models from database and my question is how I can move my generated file to designated place without need to use of T4Toolbox.</description>
		<content:encoded><![CDATA[<p>Hello,<br />
I&#8217;m using T4 to auto create models from database and my question is how I can move my generated file to designated place without need to use of T4Toolbox.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Oleg Sych</title>
		<link>http://www.olegsych.com/2010/05/t4-parameter-directive/#comment-3160</link>
		<dc:creator>Oleg Sych</dc:creator>
		<pubDate>Sun, 13 Jun 2010 16:15:53 +0000</pubDate>
		<guid>http://www.olegsych.com/2010/05/t4-parameter-directive/#comment-3160</guid>
		<description>li,

For pre-processed templates, you need to call the Initialize method explicitly. This is where the parameter values are extracted from the session dictionary, but this method is only invoked automatically during end-to-end template transformation.

Oleg</description>
		<content:encoded><![CDATA[<p>li,</p>
<p>For pre-processed templates, you need to call the Initialize method explicitly. This is where the parameter values are extracted from the session dictionary, but this method is only invoked automatically during end-to-end template transformation.</p>
<p>Oleg</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: li</title>
		<link>http://www.olegsych.com/2010/05/t4-parameter-directive/#comment-3092</link>
		<dc:creator>li</dc:creator>
		<pubDate>Wed, 19 May 2010 17:47:00 +0000</pubDate>
		<guid>http://www.olegsych.com/2010/05/t4-parameter-directive/#comment-3092</guid>
		<description>How to use parameter directive with a preprocessed template?
I tried to build a  dictionary and assign it to the Session property of the MyPreprocessedTemplate instance, but it doesn't work. When debugging, it seems fine, but at one point Visual decides to parse the template and pretends that Param is null:

MyPreprocessedTemplate template = new MyPreprocessedTemplate();
IDictionary session = new Dictionary();
session["Param"] = new MyObject();
template.Session = session;
Console.Write(template.TransformText());</description>
		<content:encoded><![CDATA[<p>How to use parameter directive with a preprocessed template?<br />
I tried to build a  dictionary and assign it to the Session property of the MyPreprocessedTemplate instance, but it doesn&#8217;t work. When debugging, it seems fine, but at one point Visual decides to parse the template and pretends that Param is null:</p>
<p>MyPreprocessedTemplate template = new MyPreprocessedTemplate();<br />
IDictionary session = new Dictionary();<br />
session[&#8221;Param&#8221;] = new MyObject();<br />
template.Session = session;<br />
Console.Write(template.TransformText());</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: The Morning Brew - Chris Alcock &#187; The Morning Brew #597</title>
		<link>http://www.olegsych.com/2010/05/t4-parameter-directive/#comment-3062</link>
		<dc:creator>The Morning Brew - Chris Alcock &#187; The Morning Brew #597</dc:creator>
		<pubDate>Tue, 11 May 2010 09:47:36 +0000</pubDate>
		<guid>http://www.olegsych.com/2010/05/t4-parameter-directive/#comment-3062</guid>
		<description>[...] Understanding T4: &#60;#@ parameter #&#62; directive - Oleg Sych takes a look at the new Parameter directive introduced to the T4 template language in VS2010 which makes it much easier to pass parameter into your templates for use within the template [...]</description>
		<content:encoded><![CDATA[<p>[&#8230;] Understanding T4: &lt;#@ parameter #&gt; directive - Oleg Sych takes a look at the new Parameter directive introduced to the T4 template language in VS2010 which makes it much easier to pass parameter into your templates for use within the template [&#8230;]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dew Drop &#8211; May 10, 2010 &#124; Alvin Ashcraft&#39;s Morning Dew</title>
		<link>http://www.olegsych.com/2010/05/t4-parameter-directive/#comment-3058</link>
		<dc:creator>Dew Drop &#8211; May 10, 2010 &#124; Alvin Ashcraft&#39;s Morning Dew</dc:creator>
		<pubDate>Mon, 10 May 2010 12:46:35 +0000</pubDate>
		<guid>http://www.olegsych.com/2010/05/t4-parameter-directive/#comment-3058</guid>
		<description>[...] Understanding T4: &#60;#@ parameter #&#62; directive (Oleg Sych) [...]</description>
		<content:encoded><![CDATA[<p>[&#8230;] Understanding T4: &lt;#@ parameter #&gt; directive (Oleg Sych) [&#8230;]</p>
]]></content:encoded>
	</item>
</channel>
</rss>

