<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Operator overloading your domain model with interfaces and base classes</title>
	<atom:link href="http://www.sidesofmarch.com/index.php/archive/2008/02/20/operator-overloading-your-domain-model-with-interfaces-and-base-classes/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.sidesofmarch.com/index.php/archive/2008/02/20/operator-overloading-your-domain-model-with-interfaces-and-base-classes/</link>
	<description>Thoughts on life, liberty, and information technology</description>
	<lastBuildDate>Tue, 24 Jan 2012 10:43:34 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: brian</title>
		<link>http://www.sidesofmarch.com/index.php/archive/2008/02/20/operator-overloading-your-domain-model-with-interfaces-and-base-classes/#comment-93903</link>
		<dc:creator>brian</dc:creator>
		<pubDate>Thu, 21 Feb 2008 14:15:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.sidesofmarch.com/index.php/archive/2008/02/20/operator-overloading-your-domain-model-with-interfaces-and-base-classes/#comment-93903</guid>
		<description>Hey, I like comment spam when it&#039;s not spam. :)

The generic of EntityBase&lt;T&gt; requires T to be the entity type, which is why I made FieldingStats&lt;T&gt; generic in the first place -- so it can pass the type to the underlying EntityBase&lt;T&gt;.

So it looks like this:

public class GameFieldingStats : FieldingStats&lt;GameFieldingStats&gt; { }
public class FieldingStats&lt;T&gt; : EntityBase&lt;T&gt;, IFieldingStats where T : FieldingStats&lt;T&gt;, new()
public class EntityBase&lt;T&gt; : ActiveRecordBase&lt;T&gt;, IEquatable&lt;T&gt; where T : ActiveRecordBase&lt;T&gt;

whew!</description>
		<content:encoded><![CDATA[<p>Hey, I like comment spam when it&#8217;s not spam. <img src='http://www.sidesofmarch.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>The generic of EntityBase&lt;T&gt; requires T to be the entity type, which is why I made FieldingStats&lt;T&gt; generic in the first place &#8212; so it can pass the type to the underlying EntityBase&lt;T&gt;.</p>
<p>So it looks like this:</p>
<p>public class GameFieldingStats : FieldingStats&lt;GameFieldingStats&gt; { }<br />
public class FieldingStats&lt;T&gt; : EntityBase&lt;T&gt;, IFieldingStats where T : FieldingStats&lt;T&gt;, new()<br />
public class EntityBase&lt;T&gt; : ActiveRecordBase&lt;T&gt;, IEquatable&lt;T&gt; where T : ActiveRecordBase&lt;T&gt;</p>
<p>whew!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lucas</title>
		<link>http://www.sidesofmarch.com/index.php/archive/2008/02/20/operator-overloading-your-domain-model-with-interfaces-and-base-classes/#comment-93530</link>
		<dc:creator>Lucas</dc:creator>
		<pubDate>Thu, 21 Feb 2008 03:37:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.sidesofmarch.com/index.php/archive/2008/02/20/operator-overloading-your-domain-model-with-interfaces-and-base-classes/#comment-93530</guid>
		<description>*sigh*
public class Person : EntityBase { }
is
public class Person : EntityBase&lt;Address&gt; { }

i hope you just edit the original and delete all this spam :)</description>
		<content:encoded><![CDATA[<p>*sigh*<br />
public class Person : EntityBase { }<br />
is<br />
public class Person : EntityBase&lt;Address&gt; { }</p>
<p>i hope you just edit the original and delete all this spam <img src='http://www.sidesofmarch.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lucas</title>
		<link>http://www.sidesofmarch.com/index.php/archive/2008/02/20/operator-overloading-your-domain-model-with-interfaces-and-base-classes/#comment-93528</link>
		<dc:creator>Lucas</dc:creator>
		<pubDate>Thu, 21 Feb 2008 03:35:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.sidesofmarch.com/index.php/archive/2008/02/20/operator-overloading-your-domain-model-with-interfaces-and-base-classes/#comment-93528</guid>
		<description>ugh! the generic parameters got chopped
replace EntityBase with EntityBase&lt;T&gt;</description>
		<content:encoded><![CDATA[<p>ugh! the generic parameters got chopped<br />
replace EntityBase with EntityBase&lt;T&gt;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lucas</title>
		<link>http://www.sidesofmarch.com/index.php/archive/2008/02/20/operator-overloading-your-domain-model-with-interfaces-and-base-classes/#comment-93523</link>
		<dc:creator>Lucas</dc:creator>
		<pubDate>Thu, 21 Feb 2008 03:33:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.sidesofmarch.com/index.php/archive/2008/02/20/operator-overloading-your-domain-model-with-interfaces-and-base-classes/#comment-93523</guid>
		<description>hi brian! i&#039;m writing this from my rooftop watching the lunar eclipse...
don&#039;t forget to use this restriction

public abstract class EntityBase
    where T : EntityBase {}

this makes sure that T can only be a class which inherits EntityBase so you can&#039;t do something wierd like:

public class Person : EntityBase { } // WTF?

(disclaimer: not looking at code right now, might have syntax errors)</description>
		<content:encoded><![CDATA[<p>hi brian! i&#8217;m writing this from my rooftop watching the lunar eclipse&#8230;<br />
don&#8217;t forget to use this restriction</p>
<p>public abstract class EntityBase<br />
    where T : EntityBase {}</p>
<p>this makes sure that T can only be a class which inherits EntityBase so you can&#8217;t do something wierd like:</p>
<p>public class Person : EntityBase { } // WTF?</p>
<p>(disclaimer: not looking at code right now, might have syntax errors)</p>
]]></content:encoded>
	</item>
</channel>
</rss>

