<?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"
	>
<channel>
	<title>Comments on: Generalizing the algorithm</title>
	<atom:link href="http://blogs.jetbrains.com/dotnet/2006/08/generalizing-the-algoritm/feed/" rel="self" type="application/rss+xml" />
	<link>http://blogs.jetbrains.com/dotnet/2006/08/generalizing-the-algoritm/</link>
	<description>ReSharper for productivity, dotTrace for performance</description>
	<pubDate>Sat, 20 Mar 2010 10:53:31 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.5</generator>
		<item>
		<title>By: dsl</title>
		<link>http://blogs.jetbrains.com/dotnet/2006/08/generalizing-the-algoritm/#comment-138</link>
		<dc:creator>dsl</dc:creator>
		<pubDate>Wed, 16 Aug 2006 08:43:41 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.jetbrains.com/dotnet/2006/07/generalizing-the-algoritm/#comment-138</guid>
		<description>Brien,
You can do that in two steps:
1. Invoke Make Method Static on GetBonusForOrder
 You will get:
 int GetBonusForOrder(Customer c, Order o)

2. Invoke Make Method Non-Static and select parameter 'o' as future this. You will get  (in Order class)
 int GetBonusForOrder(Customer c)

You can get rid of parameter 'c' if it is not needed via Change Method Signature refactoring.

Bear in mind though, that in case of virtual methods this trick obviuosly won't work. 

I think we can post a separate article on this refactoring combination.</description>
		<content:encoded><![CDATA[<p>Brien,<br />
You can do that in two steps:<br />
1. Invoke Make Method Static on GetBonusForOrder<br />
 You will get:<br />
 int GetBonusForOrder(Customer c, Order o)</p>
<p>2. Invoke Make Method Non-Static and select parameter &#8216;o&#8217; as future this. You will get  (in Order class)<br />
 int GetBonusForOrder(Customer c)</p>
<p>You can get rid of parameter &#8216;c&#8217; if it is not needed via Change Method Signature refactoring.</p>
<p>Bear in mind though, that in case of virtual methods this trick obviuosly won&#8217;t work. </p>
<p>I think we can post a separate article on this refactoring combination.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brien</title>
		<link>http://blogs.jetbrains.com/dotnet/2006/08/generalizing-the-algoritm/#comment-137</link>
		<dc:creator>Brien</dc:creator>
		<pubDate>Tue, 15 Aug 2006 16:10:14 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.jetbrains.com/dotnet/2006/07/generalizing-the-algoritm/#comment-137</guid>
		<description>How would you refactor if you wanted the Bonus calculation to be a method on the order?  I always wind up doing this mostly by hand.</description>
		<content:encoded><![CDATA[<p>How would you refactor if you wanted the Bonus calculation to be a method on the order?  I always wind up doing this mostly by hand.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
