<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Andrey Shchekin &#187; Generics</title>
	<atom:link href="http://blog.ashmind.com/index.php/category/net/generics/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.ashmind.com</link>
	<description></description>
	<lastBuildDate>Mon, 15 Mar 2010 18:00:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Typed Repeater — ASP.Net Hack</title>
		<link>http://blog.ashmind.com/2007/03/17/typed-repeater-aspnet-hack/</link>
		<comments>http://blog.ashmind.com/2007/03/17/typed-repeater-aspnet-hack/#comments</comments>
		<pubDate>Sat, 17 Mar 2007 00:42:56 +0000</pubDate>
		<dc:creator>Andrey Shchekin</dc:creator>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[ASP.Net]]></category>
		<category><![CDATA[Generics]]></category>
		<category><![CDATA[Hacks]]></category>

		<guid isPermaLink="false">http://blog.ashmind.com/index.php/2007/03/17/typed-repeater-%e2%80%94-aspnet-hack/</guid>
		<description><![CDATA[I wrote an article on Code Project about the way to implement generics in ITemplate. I thought about including the whole article as a blog entry, but I am still fighting with code highlighting in blog. Interesting fact about the Repeater solution is that you can use it to build any kind of generic asp.net [...]]]></description>
			<content:encoded><![CDATA[<p>I wrote <a href="http://www.codeproject.com/aspnet/TypedRepeater.asp">an article</a> on Code Project about the way to implement generics in ITemplate.<br />
I thought about including the whole article as a blog entry, but I am still fighting with code highlighting in blog.</p>
<p>Interesting fact about the Repeater solution is that you can use it to build any kind of generic asp.net control that will be perfectly specifiable in mark-up.<br />
I am writing a GenericeControlBuilder that will not be specific to the single control type, but I didn&#8217;t have enough time to finish it yet.</p>
<p>The interesting question is how to implement fully generic TemplateContainerAttribute. Dynamic creation of the attribute is not a problem at all — solved in the article.<br />
But the question is how to know right  TemplateContainer type in a GenericControlBuilder that has no hardcoded information about the control it creates.<br />
I consider adding another attribute that will specify how control type arguments map to the TemplateContainer type arguments.</p>
<pre style="font-family: Courier New">
public class Repeater<T> {
    …

    [GenericTemplateContainer(typeof(RepeaterItem<>), UseParentTypeArguments=true)]
    public ITemplate ItemTemplate

    …
}
</pre>
<p>This is just to show the basic idea — this syntax is way too limiting.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ashmind.com/2007/03/17/typed-repeater-aspnet-hack/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
