<?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>SirMike&#039;s Techblog</title>
	<atom:link href="http://sirmike.org/feed/" rel="self" type="application/rss+xml" />
	<link>http://sirmike.org</link>
	<description>C++, C#, ASP.NET, OpenGL, DirectX, Game developing</description>
	<lastBuildDate>Sun, 03 Jan 2010 15:36:20 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>dubscore.pl &#8211; my new project</title>
		<link>http://sirmike.org/2010/01/03/dubscorepl-my-new-project/</link>
		<comments>http://sirmike.org/2010/01/03/dubscorepl-my-new-project/#comments</comments>
		<pubDate>Sun, 03 Jan 2010 15:36:20 +0000</pubDate>
		<dc:creator>SirMike</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.sirmike.org/2010/01/03/dubscorepl-my-new-project/</guid>
		<description><![CDATA[I would like to present you my new project &#8211; http://dubscore.pl It is a database of polish dubbing in computer games. Reviews, comparisons and samples &#8211; all you have got there. Enjoy!
]]></description>
			<content:encoded><![CDATA[<p>I would like to present you my new project &#8211; <a href="http://dubscore.pl">http://dubscore.pl</a> It is a database of polish dubbing in computer games. Reviews, comparisons and samples &#8211; all you have got there. Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://sirmike.org/2010/01/03/dubscorepl-my-new-project/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Testing code snippets for Visual Studio</title>
		<link>http://sirmike.org/2009/10/30/testing-code-snippets-for-visual-studio/</link>
		<comments>http://sirmike.org/2009/10/30/testing-code-snippets-for-visual-studio/#comments</comments>
		<pubDate>Fri, 30 Oct 2009 16:58:21 +0000</pubDate>
		<dc:creator>SirMike</dc:creator>
				<category><![CDATA[.NET Framework]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[TDD]]></category>

		<guid isPermaLink="false">http://www.sirmike.org/?p=260</guid>
		<description><![CDATA[If you create many test classes and test methods you probably repeat some code many times.
Here are some code snippets that I use every day at work, feel free to modify them if you want.

Test class
PLAIN TEXT
XML:




&#60;?xml version="1.0"?&#62;


&#60;CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet"&#62;


&#160; &#60;CodeSnippet Format="1.0.0"&#62;


&#160; &#160; &#60;Header&#62;


&#160; &#160; &#160; &#60;Title&#62;Create a test class&#60;/Title&#62;


&#160; &#160; &#160; &#60;Description&#62;This snippet adds code [...]]]></description>
			<content:encoded><![CDATA[<p>If you create many test classes and test methods you probably repeat some code many times.<br />
Here are some code snippets that I use every day at work, feel free to modify them if you want.</p>
<p><span id="more-260"></span></p>
<p><strong>Test class</strong></p>
<div class="igBar"><span id="lxml-5"><a href="#" onclick="javascript:showPlainTxt('xml-5'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">XML:</span>
<div id="xml-5">
<div class="xml">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;</span>?xml <span style="color: #000066;">version</span>=<span style="color: #ff0000;">"1.0"</span>?<span style="font-weight: bold; color: black;">&gt;</span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;CodeSnippets</span> <span style="color: #000066;">xmlns</span>=<span style="color: #ff0000;">"http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet"</span><span style="font-weight: bold; color: black;">&gt;</span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;CodeSnippet</span> <span style="color: #000066;">Format</span>=<span style="color: #ff0000;">"1.0.0"</span><span style="font-weight: bold; color: black;">&gt;</span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;Header<span style="font-weight: bold; color: black;">&gt;</span></span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;Title<span style="font-weight: bold; color: black;">&gt;</span></span></span>Create a test class<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/Title<span style="font-weight: bold; color: black;">&gt;</span></span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;Description<span style="font-weight: bold; color: black;">&gt;</span></span></span>This snippet adds code to create test class template.<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/Description<span style="font-weight: bold; color: black;">&gt;</span></span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;Shortcut<span style="font-weight: bold; color: black;">&gt;</span></span></span>testclass<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/Shortcut<span style="font-weight: bold; color: black;">&gt;</span></span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/Header<span style="font-weight: bold; color: black;">&gt;</span></span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;Snippet<span style="font-weight: bold; color: black;">&gt;</span></span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;Declarations<span style="font-weight: bold; color: black;">&gt;</span></span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;Object<span style="font-weight: bold; color: black;">&gt;</span></span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;ID<span style="font-weight: bold; color: black;">&gt;</span></span></span>Name<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/ID<span style="font-weight: bold; color: black;">&gt;</span></span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;ToolTip<span style="font-weight: bold; color: black;">&gt;</span></span></span>Name of a test class<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/ToolTip<span style="font-weight: bold; color: black;">&gt;</span></span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;Default<span style="font-weight: bold; color: black;">&gt;</span></span></span>Name<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/Default<span style="font-weight: bold; color: black;">&gt;</span></span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/Object<span style="font-weight: bold; color: black;">&gt;</span></span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/Declarations<span style="font-weight: bold; color: black;">&gt;</span></span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;Code</span> <span style="color: #000066;">Language</span>=<span style="color: #ff0000;">"csharp"</span><span style="font-weight: bold; color: black;">&gt;</span></span><span style="color: #339933;">&lt;![CDATA[[TestClass]</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; public class $Name$</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; {</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; $end$</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; }]]&gt;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/Code<span style="font-weight: bold; color: black;">&gt;</span></span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/Snippet<span style="font-weight: bold; color: black;">&gt;</span></span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/CodeSnippet<span style="font-weight: bold; color: black;">&gt;</span></span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/CodeSnippets<span style="font-weight: bold; color: black;">&gt;</span></span></span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p><strong>Test method</strong></p>
<div class="igBar"><span id="lxml-6"><a href="#" onclick="javascript:showPlainTxt('xml-6'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">XML:</span>
<div id="xml-6">
<div class="xml">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;</span>?xml <span style="color: #000066;">version</span>=<span style="color: #ff0000;">"1.0"</span>?<span style="font-weight: bold; color: black;">&gt;</span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;CodeSnippets</span> <span style="color: #000066;">xmlns</span>=<span style="color: #ff0000;">"http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet"</span><span style="font-weight: bold; color: black;">&gt;</span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;CodeSnippet</span> <span style="color: #000066;">Format</span>=<span style="color: #ff0000;">"1.0.0"</span><span style="font-weight: bold; color: black;">&gt;</span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;Header<span style="font-weight: bold; color: black;">&gt;</span></span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;Title<span style="font-weight: bold; color: black;">&gt;</span></span></span>Create a test method<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/Title<span style="font-weight: bold; color: black;">&gt;</span></span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;Description<span style="font-weight: bold; color: black;">&gt;</span></span></span>This snippet adds code to create test method template.<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/Description<span style="font-weight: bold; color: black;">&gt;</span></span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;Shortcut<span style="font-weight: bold; color: black;">&gt;</span></span></span>testmethod<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/Shortcut<span style="font-weight: bold; color: black;">&gt;</span></span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/Header<span style="font-weight: bold; color: black;">&gt;</span></span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;Snippet<span style="font-weight: bold; color: black;">&gt;</span></span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;Declarations<span style="font-weight: bold; color: black;">&gt;</span></span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;Object<span style="font-weight: bold; color: black;">&gt;</span></span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;ID<span style="font-weight: bold; color: black;">&gt;</span></span></span>Name<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/ID<span style="font-weight: bold; color: black;">&gt;</span></span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;ToolTip<span style="font-weight: bold; color: black;">&gt;</span></span></span>Name of a method which is being tested<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/ToolTip<span style="font-weight: bold; color: black;">&gt;</span></span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;Default<span style="font-weight: bold; color: black;">&gt;</span></span></span>Name<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/Default<span style="font-weight: bold; color: black;">&gt;</span></span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/Object<span style="font-weight: bold; color: black;">&gt;</span></span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;Object<span style="font-weight: bold; color: black;">&gt;</span></span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;ID<span style="font-weight: bold; color: black;">&gt;</span></span></span>State<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/ID<span style="font-weight: bold; color: black;">&gt;</span></span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;ToolTip<span style="font-weight: bold; color: black;">&gt;</span></span></span>State of input data<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/ToolTip<span style="font-weight: bold; color: black;">&gt;</span></span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;Default<span style="font-weight: bold; color: black;">&gt;</span></span></span>State<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/Default<span style="font-weight: bold; color: black;">&gt;</span></span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/Object<span style="font-weight: bold; color: black;">&gt;</span></span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;Object<span style="font-weight: bold; color: black;">&gt;</span></span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;ID<span style="font-weight: bold; color: black;">&gt;</span></span></span>Result<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/ID<span style="font-weight: bold; color: black;">&gt;</span></span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;ToolTip<span style="font-weight: bold; color: black;">&gt;</span></span></span>Result of an assertion<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/ToolTip<span style="font-weight: bold; color: black;">&gt;</span></span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;Default<span style="font-weight: bold; color: black;">&gt;</span></span></span>Result<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/Default<span style="font-weight: bold; color: black;">&gt;</span></span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/Object<span style="font-weight: bold; color: black;">&gt;</span></span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/Declarations<span style="font-weight: bold; color: black;">&gt;</span></span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;Code</span> <span style="color: #000066;">Language</span>=<span style="color: #ff0000;">"csharp"</span><span style="font-weight: bold; color: black;">&gt;</span></span><span style="color: #339933;">&lt;![CDATA[[TestMethod]</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; public void $Name$_$State$_$Result$()</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; {</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; $end$</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; }]]&gt;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/Code<span style="font-weight: bold; color: black;">&gt;</span></span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/Snippet<span style="font-weight: bold; color: black;">&gt;</span></span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/CodeSnippet<span style="font-weight: bold; color: black;">&gt;</span></span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/CodeSnippets<span style="font-weight: bold; color: black;">&gt;</span></span></span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p><strong>Rhino mocks record / playback routine</strong></p>
<div class="igBar"><span id="lxml-7"><a href="#" onclick="javascript:showPlainTxt('xml-7'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">XML:</span>
<div id="xml-7">
<div class="xml">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;</span>?xml <span style="color: #000066;">version</span>=<span style="color: #ff0000;">"1.0"</span>?<span style="font-weight: bold; color: black;">&gt;</span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;CodeSnippets</span> <span style="color: #000066;">xmlns</span>=<span style="color: #ff0000;">"http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet"</span><span style="font-weight: bold; color: black;">&gt;</span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;CodeSnippet</span> <span style="color: #000066;">Format</span>=<span style="color: #ff0000;">"1.0.0"</span><span style="font-weight: bold; color: black;">&gt;</span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;Header<span style="font-weight: bold; color: black;">&gt;</span></span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;Title<span style="font-weight: bold; color: black;">&gt;</span></span></span>Create a record / playback routine for rhino mocks<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/Title<span style="font-weight: bold; color: black;">&gt;</span></span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;Description<span style="font-weight: bold; color: black;">&gt;</span></span></span>This snippet adds code to create record / playback routine for unit testing.<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/Description<span style="font-weight: bold; color: black;">&gt;</span></span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;Shortcut<span style="font-weight: bold; color: black;">&gt;</span></span></span>recordplayback<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/Shortcut<span style="font-weight: bold; color: black;">&gt;</span></span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/Header<span style="font-weight: bold; color: black;">&gt;</span></span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;Snippet<span style="font-weight: bold; color: black;">&gt;</span></span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;Declarations<span style="font-weight: bold; color: black;">&gt;</span></span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;Object<span style="font-weight: bold; color: black;">&gt;</span></span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;ID<span style="font-weight: bold; color: black;">&gt;</span></span></span>mocks<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/ID<span style="font-weight: bold; color: black;">&gt;</span></span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;ToolTip<span style="font-weight: bold; color: black;">&gt;</span></span></span>Mock repository object name<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/ToolTip<span style="font-weight: bold; color: black;">&gt;</span></span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;Default<span style="font-weight: bold; color: black;">&gt;</span></span></span>mocks<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/Default<span style="font-weight: bold; color: black;">&gt;</span></span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/Object<span style="font-weight: bold; color: black;">&gt;</span></span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/Declarations<span style="font-weight: bold; color: black;">&gt;</span></span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;Code</span> <span style="color: #000066;">Language</span>=<span style="color: #ff0000;">"csharp"</span><span style="font-weight: bold; color: black;">&gt;</span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #339933;">&lt;![CDATA[using(mocks.Record())</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $end$</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; using(mocks.Playback())</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">]]&gt;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/Code<span style="font-weight: bold; color: black;">&gt;</span></span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/Snippet<span style="font-weight: bold; color: black;">&gt;</span></span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/CodeSnippet<span style="font-weight: bold; color: black;">&gt;</span></span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/CodeSnippets<span style="font-weight: bold; color: black;">&gt;</span></span></span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p><strong>Throw ArgumentNullException when a method's argument cannot be null</strong></p>
<div class="igBar"><span id="lxml-8"><a href="#" onclick="javascript:showPlainTxt('xml-8'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">XML:</span>
<div id="xml-8">
<div class="xml">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;</span>?xml <span style="color: #000066;">version</span>=<span style="color: #ff0000;">"1.0"</span>?<span style="font-weight: bold; color: black;">&gt;</span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;CodeSnippets</span> <span style="color: #000066;">xmlns</span>=<span style="color: #ff0000;">"http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet"</span><span style="font-weight: bold; color: black;">&gt;</span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;CodeSnippet</span> <span style="color: #000066;">Format</span>=<span style="color: #ff0000;">"1.0.0"</span><span style="font-weight: bold; color: black;">&gt;</span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;Header<span style="font-weight: bold; color: black;">&gt;</span></span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;Title<span style="font-weight: bold; color: black;">&gt;</span></span></span>Create argument null checking routine<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/Title<span style="font-weight: bold; color: black;">&gt;</span></span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;Description<span style="font-weight: bold; color: black;">&gt;</span></span></span>This snippet adds code to create a code to check whether param was null ane throw an exception when applicable.<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/Description<span style="font-weight: bold; color: black;">&gt;</span></span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;Shortcut<span style="font-weight: bold; color: black;">&gt;</span></span></span>checkparam<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/Shortcut<span style="font-weight: bold; color: black;">&gt;</span></span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/Header<span style="font-weight: bold; color: black;">&gt;</span></span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;Snippet<span style="font-weight: bold; color: black;">&gt;</span></span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;Declarations<span style="font-weight: bold; color: black;">&gt;</span></span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;Object<span style="font-weight: bold; color: black;">&gt;</span></span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;ID<span style="font-weight: bold; color: black;">&gt;</span></span></span>parameter<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/ID<span style="font-weight: bold; color: black;">&gt;</span></span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;ToolTip<span style="font-weight: bold; color: black;">&gt;</span></span></span>parameter<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/ToolTip<span style="font-weight: bold; color: black;">&gt;</span></span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;Default<span style="font-weight: bold; color: black;">&gt;</span></span></span>parameter<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/Default<span style="font-weight: bold; color: black;">&gt;</span></span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/Object<span style="font-weight: bold; color: black;">&gt;</span></span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/Declarations<span style="font-weight: bold; color: black;">&gt;</span></span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;Code</span> <span style="color: #000066;">Language</span>=<span style="color: #ff0000;">"csharp"</span><span style="font-weight: bold; color: black;">&gt;</span></span><span style="color: #339933;">&lt;![CDATA[if ($parameter$ == null)</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">{</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; throw new ArgumentNullException(&quot;$parameter$&quot;);</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">}</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; ]]&gt;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/Code<span style="font-weight: bold; color: black;">&gt;</span></span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/Snippet<span style="font-weight: bold; color: black;">&gt;</span></span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/CodeSnippet<span style="font-weight: bold; color: black;">&gt;</span></span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/CodeSnippets<span style="font-weight: bold; color: black;">&gt;</span></span></span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
]]></content:encoded>
			<wfw:commentRss>http://sirmike.org/2009/10/30/testing-code-snippets-for-visual-studio/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Podcast</title>
		<link>http://sirmike.org/2009/08/23/podcast/</link>
		<comments>http://sirmike.org/2009/08/23/podcast/#comments</comments>
		<pubDate>Sun, 23 Aug 2009 13:46:37 +0000</pubDate>
		<dc:creator>SirMike</dc:creator>
				<category><![CDATA[Podcast]]></category>
		<category><![CDATA[forumogadka]]></category>

		<guid isPermaLink="false">http://www.sirmike.org/2009/08/23/podcast/</guid>
		<description><![CDATA[I have been busy for the last few weeks so no interesting posts had appeared. Sorry for that   But there there is something for my polish readers - two podcasts (polish only) which I have recorded with my friends recently. Podcasts are about games of course and are strongly related to Polygamia forum [...]]]></description>
			<content:encoded><![CDATA[<p>I have been busy for the last few weeks so no interesting posts had appeared. Sorry for that <img src='http://sirmike.org/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' />  But there there is something for my polish readers - two podcasts (polish only) which I have recorded with my friends recently. Podcasts are about games of course and are strongly related to <a href="http://forum.polygamia.pl">Polygamia forum</a> users <img src='http://sirmike.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p> Here's the official forum topic:
<ul>
<li><a href="http://forum.polygamia.pl/index.php/topic,2591.0.html">http://forum.polygamia.pl/index.php/topic,2591.0.html</a></li>
</ul>
<p>And official news at polygamia.pl:</p>
<ul>
<li><a href="http://polygamia.pl/Polygamia/1,94534,6930136,forumogadka__1.html">http://polygamia.pl/Polygamia/1,94534,6930136,forumogadka__1.html</a></li>
<li><a href="http://polygamia.pl/Polygamia/1,94534,6953630,Forumogadka__2.html">http://polygamia.pl/Polygamia/1,94534,6953630,Forumogadka__2.html</a></li>
</ul>
<p>Podcasts are ready to download at: <a href="http://www.sirmike.org/files/forumogadka/">http://www.sirmike.org/files/forumogadka/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://sirmike.org/2009/08/23/podcast/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>log4net &#8211; Exception renderer</title>
		<link>http://sirmike.org/2009/06/12/log4net-exception-renderer/</link>
		<comments>http://sirmike.org/2009/06/12/log4net-exception-renderer/#comments</comments>
		<pubDate>Fri, 12 Jun 2009 20:25:57 +0000</pubDate>
		<dc:creator>SirMike</dc:creator>
				<category><![CDATA[C#]]></category>

		<guid isPermaLink="false">http://www.sirmike.org/?p=251</guid>
		<description><![CDATA[If you use log4net you have probably noticed that this logger does not write information from exception's &#34;Data&#34; property. Here is the renderer which does:
PLAIN TEXT
C#:




using System;


using System.Collections.Generic;


using System.IO;


using System.Text;


using log4net.ObjectRenderer;


&#160;


namespace SomeNamespace


&#123;


&#160; &#160; public class ExceptionRenderer : IObjectRenderer


&#160; &#160; &#123;


&#160; &#160; &#160; &#160; #region IObjectRenderer Members


&#160;


&#160; &#160; &#160; &#160; public void RenderObject&#40;RendererMap rendererMap, object obj, [...]]]></description>
			<content:encoded><![CDATA[<p>If you use log4net you have probably noticed that this logger does not write information from exception's &quot;Data&quot; property. Here is the renderer which does:</p>
<div class="igBar"><span id="lcsharp-11"><a href="#" onclick="javascript:showPlainTxt('csharp-11'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">C#:</span>
<div id="csharp-11">
<div class="csharp">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0600FF;">using</span> <span style="color: #000000;">System</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0600FF;">using</span> <span style="color: #000000;">System</span>.<span style="color: #0000FF;">Collections</span>.<span style="color: #0000FF;">Generic</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0600FF;">using</span> <span style="color: #000000;">System</span>.<span style="color: #0000FF;">IO</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0600FF;">using</span> <span style="color: #000000;">System</span>.<span style="color: #0000FF;">Text</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0600FF;">using</span> log4net.<span style="color: #0000FF;">ObjectRenderer</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0600FF;">namespace</span> SomeNamespace</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #0600FF;">public</span> <span style="color: #FF0000;">class</span> ExceptionRenderer : IObjectRenderer</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008080;">#region IObjectRenderer Members</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">public</span> <span style="color: #0600FF;">void</span> RenderObject<span style="color: #000000;">&#40;</span>RendererMap rendererMap, <span style="color: #FF0000;">object</span> obj, TextWriter writer<span style="color: #000000;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">if</span> <span style="color: #000000;">&#40;</span>rendererMap == <span style="color: #0600FF;">null</span><span style="color: #000000;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">throw</span> <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> ArgumentNullException<span style="color: #000000;">&#40;</span><span style="color: #808080;">"rendererMap"</span><span style="color: #000000;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">if</span> <span style="color: #000000;">&#40;</span>obj == <span style="color: #0600FF;">null</span><span style="color: #000000;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">throw</span> <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> ArgumentNullException<span style="color: #000000;">&#40;</span><span style="color: #808080;">"obj"</span><span style="color: #000000;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">if</span> <span style="color: #000000;">&#40;</span>writer == <span style="color: #0600FF;">null</span><span style="color: #000000;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">throw</span> <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> ArgumentNullException<span style="color: #000000;">&#40;</span><span style="color: #808080;">"writer"</span><span style="color: #000000;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">if</span> <span style="color: #000000;">&#40;</span>obj <a href="http://www.google.com/search?q=is+msdn.microsoft.com"><span style="color: #008000;">is</span></a> Exception<span style="color: #000000;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Exception ex = <span style="color: #000000;">&#40;</span>Exception<span style="color: #000000;">&#41;</span>obj;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; writer.<span style="color: #0000FF;">WriteLine</span><span style="color: #000000;">&#40;</span>ex.<span style="color: #0000FF;">ToString</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">if</span> <span style="color: #000000;">&#40;</span>ex.<span style="color: #0000FF;">Data</span>.<span style="color: #0000FF;">Count</span>&gt; <span style="color: #FF0000;color:#800000;">0</span><span style="color: #000000;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; writer.<span style="color: #0000FF;">WriteLine</span><span style="color: #000000;">&#40;</span><span style="color: #808080;">"Exception Data:"</span><span style="color: #000000;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">foreach</span> <span style="color: #000000;">&#40;</span><span style="color: #FF0000;">string</span> key <span style="color: #0600FF;">in</span> ex.<span style="color: #0000FF;">Data</span>.<span style="color: #0000FF;">Keys</span><span style="color: #000000;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; writer.<span style="color: #0000FF;">WriteLine</span><span style="color: #000000;">&#40;</span><span style="color: #808080;">"<span style="color: #008080; font-weight: bold;">\t</span> {0} = {1}"</span>, key, rendererMap.<span style="color: #0000FF;">FindAndRender</span><span style="color: #000000;">&#40;</span>ex.<span style="color: #0000FF;">Data</span><span style="color: #000000;">&#91;</span>key<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">else</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">throw</span> <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> InvalidOperationException<span style="color: #000000;">&#40;</span><span style="color: #FF0000;">string</span>.<span style="color: #0000FF;">Format</span><span style="color: #000000;">&#40;</span><span style="color: #808080;">"Object of type {0} cannot be rendered with ExceptionRenderer"</span>, obj.<span style="color: #0000FF;">GetType</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008080;">#endregion</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>and the configuration needed for this to work is:</p>
<div class="igBar"><span id="lxml-12"><a href="#" onclick="javascript:showPlainTxt('xml-12'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">XML:</span>
<div id="xml-12">
<div class="xml">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;log4net<span style="font-weight: bold; color: black;">&gt;</span></span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">...</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;renderer</span> <span style="color: #000066;">renderingClass</span>=<span style="color: #ff0000;">"SomeNamespace.ExceptionRenderer"</span> <span style="color: #000066;">renderedClass</span>=<span style="color: #ff0000;">"System.Exception"</span> <span style="font-weight: bold; color: black;">/&gt;</span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">...</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/log4net<span style="font-weight: bold; color: black;">&gt;</span></span></span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Sample output for NullReferenceException with Data["configPath"] = "myconfig.config":</p>
<pre>
2009-06-12 22:22:04,038 INFO  [LoggerTest.Program] - Exception during init
System.NullReferenceException: Something was null
   at LoggerTest.Program.Main(String[] args) in G:\C#\Temp\LoggerTest\Program.cs:line 26
Exception Data:
         configPath = myconfig.config
</pre>
<p>Feel free to use and modify it.</p>
]]></content:encoded>
			<wfw:commentRss>http://sirmike.org/2009/06/12/log4net-exception-renderer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Playing with physics</title>
		<link>http://sirmike.org/2009/05/11/playing-with-physics/</link>
		<comments>http://sirmike.org/2009/05/11/playing-with-physics/#comments</comments>
		<pubDate>Sun, 10 May 2009 23:30:55 +0000</pubDate>
		<dc:creator>SirMike</dc:creator>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[DirectX]]></category>
		<category><![CDATA[PhysX]]></category>

		<guid isPermaLink="false">http://www.sirmike.org/2009/05/11/playing-with-physics/</guid>
		<description><![CDATA[Several hours of playing with nVidia PhysX engine ended with this small video. Rendered in real time of course (DirectX, GeForce 8600GT)

]]></description>
			<content:encoded><![CDATA[<p>Several hours of playing with nVidia PhysX engine ended with this small video. Rendered in real time of course (DirectX, GeForce 8600GT)</p>
<p><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/5wyTaEm_PPM&amp;hl=en&amp;fs=1&amp;rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/5wyTaEm_PPM&amp;hl=en&amp;fs=1&amp;rel=0" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://sirmike.org/2009/05/11/playing-with-physics/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Creating enum which sucks</title>
		<link>http://sirmike.org/2009/04/22/creating-enum-which-sucks/</link>
		<comments>http://sirmike.org/2009/04/22/creating-enum-which-sucks/#comments</comments>
		<pubDate>Wed, 22 Apr 2009 20:53:33 +0000</pubDate>
		<dc:creator>SirMike</dc:creator>
				<category><![CDATA[.NET Framework]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.sirmike.org/2009/04/22/creating-enum-which-sucks/</guid>
		<description><![CDATA[We create many enumerations in our programs. But sometimes we can make a mistake that drives somebody else mad.
Let's suppose that the first programmer created an enum like this:

PLAIN TEXT
C#:




enum Mood 


&#123; 


&#160; &#160; Unknown = -1, 


&#160; &#160; Awesome, 


&#160; &#160; Cool, 


&#160; &#160; Bad, 


&#160; &#160; Awful 


&#125; 






It does not look bad [...]]]></description>
			<content:encoded><![CDATA[<p>We create many enumerations in our programs. But sometimes we can make a mistake that drives somebody else mad.</p>
<p>Let's suppose that the first programmer created an enum like this:</p>
<p>
<div class="igBar"><span id="lcsharp-16"><a href="#" onclick="javascript:showPlainTxt('csharp-16'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">C#:</span>
<div id="csharp-16">
<div class="csharp">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #FF0000;">enum</span> Mood </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000;">&#123;</span> </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; Unknown = -<span style="color: #FF0000;color:#800000;">1</span>, </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; Awesome, </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; Cool, </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; Bad, </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; Awful </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>It does not look bad at the first look, yet another enum.</p>
<p>Another programmer created a list:</p>
<p>
<div class="igBar"><span id="lcsharp-17"><a href="#" onclick="javascript:showPlainTxt('csharp-17'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">C#:</span>
<div id="csharp-17">
<div class="csharp">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">List&lt;mood&gt; availableMoods = <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> List&lt;mood&gt;<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">availableMoods.<span style="color: #0000FF;">Add</span><span style="color: #000000;">&#40;</span>Mood.<span style="color: #0000FF;">Awful</span><span style="color: #000000;">&#41;</span>; </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">availableMoods.<span style="color: #0000FF;">Add</span><span style="color: #000000;">&#40;</span>Mood.<span style="color: #0000FF;">Bad</span><span style="color: #000000;">&#41;</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p> </p>
<p>Then he would like to find there a first mood type which is a part of &quot;good mood&quot; group and pass the result to another layer of an application. He wrote the code:</p>
<p>
<div class="igBar"><span id="lcsharp-18"><a href="#" onclick="javascript:showPlainTxt('csharp-18'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">C#:</span>
<div id="csharp-18">
<div class="csharp">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">Mood found = availableMoods.<span style="color: #0000FF;">Find</span><span style="color: #000000;">&#40;</span> </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #FF0000;">delegate</span><span style="color: #000000;">&#40;</span>Mood f<span style="color: #000000;">&#41;</span> </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000;">&#123;</span> </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">return</span> f == Mood.<span style="color: #0000FF;">Awesome</span> || f == Mood.<span style="color: #0000FF;">Cool</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000;">&#125;</span> </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000;">&#41;</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Now he realized that it cannot work because Find method of a List(T) class returns default(T) when a list does not contain desired item. In this case he would get Mood.Awesome because it is the default value of the enum. I do not need to add that the Mood.Awesome is not even the part of the list.</p>
<p>We can solve this problem by several different approaches.</p>
<ol>
<li>Create different enum where the default element will be &quot;Unknown = 0&quot; </li>
<li>Use FindIndex method of List(T) class so we will be able to handle the situation of not found element </li>
<li>I believe that other approaches could work as well </li>
</ol>
<p>The question to discuss - which programmer made a mistake? The first one who created &quot;unfortunate&quot; enum or the second one who used wrong structure / wrong searching method?</p>
]]></content:encoded>
			<wfw:commentRss>http://sirmike.org/2009/04/22/creating-enum-which-sucks/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Unit testing and objects equality</title>
		<link>http://sirmike.org/2009/02/16/unit-testing-and-objects-equality/</link>
		<comments>http://sirmike.org/2009/02/16/unit-testing-and-objects-equality/#comments</comments>
		<pubDate>Mon, 16 Feb 2009 12:40:56 +0000</pubDate>
		<dc:creator>SirMike</dc:creator>
				<category><![CDATA[.NET Framework]]></category>
		<category><![CDATA[TDD]]></category>

		<guid isPermaLink="false">http://www.sirmike.org/?p=232</guid>
		<description><![CDATA[Let's assume that we have a class like below:
PLAIN TEXT
C#:




public class Foo : IEquatable&#60;Foo&#62;


&#160; &#160; &#123;


&#160; &#160; &#160; &#160; private int variable;


&#160;


&#160; &#160; &#160; &#160; public int Variable


&#160; &#160; &#160; &#160; &#123;


&#160; &#160; &#160; &#160; &#160; &#160; get &#123; return variable; &#125;


&#160; &#160; &#160; &#160; &#160; &#160; set &#123; variable = value; &#125;


&#160; &#160; &#160; [...]]]></description>
			<content:encoded><![CDATA[<p>Let's assume that we have a class like below:</p>
<div class="igBar"><span id="lcsharp-21"><a href="#" onclick="javascript:showPlainTxt('csharp-21'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">C#:</span>
<div id="csharp-21">
<div class="csharp">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0600FF;">public</span> <span style="color: #FF0000;">class</span> Foo : IEquatable&lt;Foo&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">private</span> <span style="color: #FF0000;">int</span> variable;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">public</span> <span style="color: #FF0000;">int</span> Variable</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; get <span style="color: #000000;">&#123;</span> <span style="color: #0600FF;">return</span> variable; <span style="color: #000000;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; set <span style="color: #000000;">&#123;</span> variable = value; <span style="color: #000000;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008080;">#region IEquatable&lt;Foo&gt; Members</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">public</span> <span style="color: #FF0000;">bool</span> Equals<span style="color: #000000;">&#40;</span>Foo other<span style="color: #000000;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">return</span> <span style="color: #0600FF;">this</span>.<span style="color: #0000FF;">variable</span> == other.<span style="color: #0000FF;">Variable</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008080;">#endregion</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>and a unit test for that:</p>
<div class="igBar"><span id="lcsharp-22"><a href="#" onclick="javascript:showPlainTxt('csharp-22'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">C#:</span>
<div id="csharp-22">
<div class="csharp">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000;">&#91;</span>TestClass<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#93;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #0600FF;">public</span> <span style="color: #FF0000;">class</span> FooTest</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#91;</span>TestMethod<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#93;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">public</span> <span style="color: #0600FF;">void</span> EqualsTest<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Foo one = <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> Foo<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; one.<span style="color: #0000FF;">Variable</span> = <span style="color: #FF0000;color:#800000;">5</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Foo two = <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> Foo<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; two.<span style="color: #0000FF;">Variable</span> = <span style="color: #FF0000;color:#800000;">5</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Assert.<span style="color: #0000FF;">AreEqual</span>&lt;Foo&gt;<span style="color: #000000;">&#40;</span>one, two, <span style="color: #808080;">"AreEqual&lt;Foo&gt; failed"</span><span style="color: #000000;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Assert.<span style="color: #0000FF;">AreEqual</span><span style="color: #000000;">&#40;</span>one, two, <span style="color: #808080;">"AreEqual failed"</span><span style="color: #000000;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Assert.<span style="color: #0000FF;">AreSame</span><span style="color: #000000;">&#40;</span>one, two, <span style="color: #808080;">"AreSame failed"</span><span style="color: #000000;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>and a question is - which Assert fails? All of them o_O<br />
I could not find an explanation why implemented Equals method is not called. Framework always calls default Equals(object)</p>
]]></content:encoded>
			<wfw:commentRss>http://sirmike.org/2009/02/16/unit-testing-and-objects-equality/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Ballet of PES</title>
		<link>http://sirmike.org/2009/02/08/ballet-of-pes/</link>
		<comments>http://sirmike.org/2009/02/08/ballet-of-pes/#comments</comments>
		<pubDate>Sun, 08 Feb 2009 20:06:28 +0000</pubDate>
		<dc:creator>SirMike</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.sirmike.org/2009/02/08/ballet-of-pes/</guid>
		<description><![CDATA[My PES replays - Enjoy  



]]></description>
			<content:encoded><![CDATA[<p>My PES replays - Enjoy <img src='http://sirmike.org/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<div class="wlWriterEditableSmartContent" id="scid:5737277B-5D6D-4f48-ABFC-DD9C333F4C5D:ac745ec3-fdf1-4c24-b6b4-272e18a31210" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px">
<div><object width="425" height="355"><param name="movie" value="http://www.youtube.com/v/fgoYs8Tz3vY&amp;hl=en"></param><embed src="http://www.youtube.com/v/fgoYs8Tz3vY&amp;hl=en" type="application/x-shockwave-flash" width="425" height="355"></embed></object></div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://sirmike.org/2009/02/08/ballet-of-pes/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Programmers dialog</title>
		<link>http://sirmike.org/2009/01/08/programmers-dialog/</link>
		<comments>http://sirmike.org/2009/01/08/programmers-dialog/#comments</comments>
		<pubDate>Thu, 08 Jan 2009 16:25:57 +0000</pubDate>
		<dc:creator>SirMike</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.sirmike.org/2009/01/08/programmers-dialog/</guid>
		<description><![CDATA[Perfect dialog which I heard today at work (translated from Polish but the meaning is the same): 
D - database programmer, P - C# programmer 
D: OK, it should probably work    P: It seems that it probably works 
I'm afraid that result of their work will be moved to a production environment [...]]]></description>
			<content:encoded><![CDATA[<p>Perfect dialog which I heard today at work (translated from Polish but the meaning is the same): </p>
<p>D - database programmer, P - C# programmer </p>
<p>D: OK, it should probably work    <br />P: It seems that it probably works </p>
<p>I'm afraid that result of their work will be moved to a production environment in a next few days <img src='http://sirmike.org/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://sirmike.org/2009/01/08/programmers-dialog/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Shadow Mapping</title>
		<link>http://sirmike.org/2008/12/14/shadow-mapping/</link>
		<comments>http://sirmike.org/2008/12/14/shadow-mapping/#comments</comments>
		<pubDate>Sun, 14 Dec 2008 20:39:03 +0000</pubDate>
		<dc:creator>SirMike</dc:creator>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[DirectX]]></category>

		<guid isPermaLink="false">http://www.sirmike.org/?p=222</guid>
		<description><![CDATA[I added new effect to my effects library - Shadow Mapping. Simple version without any additional techniques for soft edges.
Go to the Shadow Mapping page
]]></description>
			<content:encoded><![CDATA[<p>I added new effect to my effects library - Shadow Mapping. Simple version without any additional techniques for soft edges.</p>
<p><a href="3d-effects/shadow-mapping">Go to the Shadow Mapping page</a></p>
]]></content:encoded>
			<wfw:commentRss>http://sirmike.org/2008/12/14/shadow-mapping/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
