<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="http://feeds.feedburner.com/~d/styles/rss2full.xsl" type="text/xsl" media="screen"?><?xml-stylesheet href="http://feeds.feedburner.com/~d/styles/itemcontent.css" type="text/css" media="screen"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><title>Laurent Kempé</title><link>http://weblogs.asp.net/lkempe/default.aspx</link><description>&lt;a href="http://www.techheadbrothers.com"&gt;One of the 
Tech Head Brothers...&lt;/a&gt;</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/lkempe" type="application/rss+xml" /><item><title>Visual Studio 2008 Service Pack 1 released</title><link>http://feeds.feedburner.com/~r/lkempe/~3/362103426/visual-studio-2008-service-pack-1-released.aspx</link><pubDate>Mon, 11 Aug 2008 16:48:41 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6505275</guid><dc:creator>lkempe</dc:creator><slash:comments>0</slash:comments><wfw:commentRss>http://weblogs.asp.net/lkempe/rsscomments.aspx?PostID=6505275</wfw:commentRss><comments>http://weblogs.asp.net/lkempe/archive/2008/08/11/visual-studio-2008-service-pack-1-released.aspx#comments</comments><description>&lt;p&gt;Before installing it better use the &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=A494B0E0-EB07-4FF1-A21C-A4663E456D9D&amp;amp;displaylang=en" target="_blank"&gt;Visual Studio 2008 Service Pack preparation Tool&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;img src="http://farm4.static.flickr.com/3268/2754042716_e31b9dfc8d_o.png" /&gt; &lt;/p&gt;  &lt;p&gt;And then you can install &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=FBEE1648-7106-44A7-9649-6D9F6D58056E&amp;amp;displaylang=en" target="_blank"&gt;Microsoft Visual Studio 2008 Service Pack 1 (exe)&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;img src="http://farm4.static.flickr.com/3146/2754053310_72d857b449_o.png" /&gt;&lt;/p&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6505275" width="1" height="1"&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/lkempe?a=VniqUk"&gt;&lt;img src="http://feeds.feedburner.com/~f/lkempe?i=VniqUk" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/lkempe?a=l1zMjk"&gt;&lt;img src="http://feeds.feedburner.com/~f/lkempe?i=l1zMjk" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/lkempe/~4/362103426" height="1" width="1"/&gt;</description><category domain="http://weblogs.asp.net/lkempe/archive/tags/Visual+Studio/default.aspx">Visual Studio</category><feedburner:origLink>http://weblogs.asp.net/lkempe/archive/2008/08/11/visual-studio-2008-service-pack-1-released.aspx</feedburner:origLink></item><item><title>Tech Head Brothers new authoring tool, step 8</title><link>http://feeds.feedburner.com/~r/lkempe/~3/359780148/tech-head-brothers-new-authoring-tool-step-8.aspx</link><pubDate>Fri, 08 Aug 2008 21:26:19 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6498127</guid><dc:creator>lkempe</dc:creator><slash:comments>0</slash:comments><wfw:commentRss>http://weblogs.asp.net/lkempe/rsscomments.aspx?PostID=6498127</wfw:commentRss><comments>http://weblogs.asp.net/lkempe/archive/2008/08/08/tech-head-brothers-new-authoring-tool-step-8.aspx#comments</comments><description>&lt;p&gt;&lt;/p&gt;  &lt;p&gt;For three night now I focused on one scenario for the Tech Head Brothers authoring tool:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;As an author I want to be able to copy source code from Visual Studio and insert it into the authored Word document&lt;/li&gt;    &lt;li&gt;As an author I want to preview a document with source code inserted in Internet Explorer&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;This might not look really difficult at first, but I had some difficulties to fulfill the requirements of those two user story.&lt;/p&gt;  &lt;p&gt;The first one was almost already implemented &lt;a href="http://weblogs.asp.net/lkempe/archive/2008/03/12/tech-head-brothers-new-authoring-tool-step-7.aspx"&gt;in step 7&lt;/a&gt;, using CustomXML capabilities of WordML.&lt;/p&gt;  &lt;p&gt;&lt;img style="margin: 0px 10px 0px 20px" src="http://farm4.static.flickr.com/3228/2745205622_92d3d8e762_o.png" align="right" /&gt;The biggest issue I had was to figure out why when I was inserting CustomXML, the WordML format of the hyperlink was changing. It took me the most time to realize that inserting CustomXML was not the issue. The issue was proofing. Somehow inserting CustomXML was activating the auto proofing and then I got some error like on the following picture. The red underlined Brothers which is a link was the issue. In fact this simple thing change the WordML representation of the hyperlink.&lt;/p&gt;  &lt;p&gt;As I had something working I had to find a way other than adding a second way to parse Hyperlinks. I came to the solution of disabling proofing then saving the document before making my projection to Tech Head Brothers XML. Then for sure re-enabling the proofing. Nice and easy!&lt;/p&gt;  &lt;p&gt;The next issue was to be able at the time of parsing the WordML to identify that source code was at at the current position in the WordML. I turned and turned the problem, than asked some clever WordML guys (Julien, Pierre) and some generally good advisor (Mitsu, Cyril). Nothing! I finally came to a solution tonight:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Getting the Id of the PlainTextContentControl from the WordML&lt;/li&gt;    &lt;li&gt;Searching for this Control in the Controls collection&lt;/li&gt;    &lt;li&gt;Finally using the plainTextContentControl.XMLMapping.CustomXMLPart.XML property I had access to my CustomXML&lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;I couldn’t find any way to do that parsing the WordML and honestly tonight I don’t know how it is possible to go from the WordML to the CustomXML.&lt;/p&gt;  &lt;p&gt;The result is here!&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Copying source code from Visual Studio&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;img src="http://farm4.static.flickr.com/3089/2744413383_26bf4a4025_o.png" /&gt; &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Inserting it in Word 2007&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;img src="http://farm4.static.flickr.com/3001/2744414779_d4d7af5829_o.png" /&gt; &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Final result in Internet Explorer&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;img src="http://farm4.static.flickr.com/3043/2744419063_c55860a60c_o.png" /&gt;&amp;#160; &lt;/p&gt;  &lt;p&gt;There is still a little bug with the spacing that will solved tomorrow or later!&lt;/p&gt;  &lt;p&gt;Now the next steps will be: &lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;&lt;strike&gt;Projection of hyperlink&lt;/strike&gt;&lt;/li&gt;    &lt;li&gt;&lt;strike&gt;Projection of picture&lt;/strike&gt;&lt;/li&gt;    &lt;li&gt;Projection of numbered list and &lt;strike&gt;bullet list&lt;/strike&gt;&lt;/li&gt;    &lt;li&gt;&lt;strike&gt;Fixing bugs found by Sébastien and Rédo&lt;/strike&gt; &lt;/li&gt;    &lt;li&gt;&lt;strike&gt;Picture caption&lt;/strike&gt;&lt;/li&gt;    &lt;li&gt;&lt;strike&gt;Giving the possibility to insert source code &lt;/strike&gt;&lt;/li&gt;    &lt;li&gt;&lt;strike&gt;Projection of the source code&lt;/strike&gt; &lt;/li&gt;    &lt;li&gt;Adding the possibility to the author to post the article directly from Word to &lt;a href="http://www.techheadbrothers.com/"&gt;Tech Head Brothers&lt;/a&gt; web site using secured web services made out of WCF &lt;/li&gt;    &lt;li&gt;Adding all validation of the content&lt;/li&gt; &lt;/ol&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6498127" width="1" height="1"&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/lkempe?a=zR5Wzk"&gt;&lt;img src="http://feeds.feedburner.com/~f/lkempe?i=zR5Wzk" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/lkempe?a=v96Enk"&gt;&lt;img src="http://feeds.feedburner.com/~f/lkempe?i=v96Enk" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/lkempe/~4/359780148" height="1" width="1"/&gt;</description><category domain="http://weblogs.asp.net/lkempe/archive/tags/Tech+Head+Brothers/default.aspx">Tech Head Brothers</category><category domain="http://weblogs.asp.net/lkempe/archive/tags/VSTO/default.aspx">VSTO</category><category domain="http://weblogs.asp.net/lkempe/archive/tags/WCF/default.aspx">WCF</category><category domain="http://weblogs.asp.net/lkempe/archive/tags/Office+2007/default.aspx">Office 2007</category><feedburner:origLink>http://weblogs.asp.net/lkempe/archive/2008/08/08/tech-head-brothers-new-authoring-tool-step-8.aspx</feedburner:origLink></item><item><title>Time for the Apéro!</title><link>http://feeds.feedburner.com/~r/lkempe/~3/351440693/time-for-the-ap-233-ro.aspx</link><pubDate>Thu, 31 Jul 2008 10:56:22 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6461958</guid><dc:creator>lkempe</dc:creator><slash:comments>0</slash:comments><wfw:commentRss>http://weblogs.asp.net/lkempe/rsscomments.aspx?PostID=6461958</wfw:commentRss><comments>http://weblogs.asp.net/lkempe/archive/2008/07/31/time-for-the-ap-233-ro.aspx#comments</comments><description>&lt;div style="text-align: left; padding: 3px;"&gt;
&lt;a href="http://www.flickr.com/photos/laurentkempe/2718754961/" title="photo sharing"&gt;&lt;img src="http://farm4.static.flickr.com/3221/2718754961_70f8d4fab7.jpg" style="border: solid 2px #000000;" alt="" /&gt;&lt;/a&gt;
&lt;br /&gt;
&lt;span style="font-size: 0.8em; margin-top: 0px;"&gt;&lt;a href="http://www.flickr.com/photos/laurentkempe/2718754961/"&gt;Time for the Apéro!&lt;/a&gt;, originally uploaded by &lt;a href="http://www.flickr.com/people/laurentkempe/"&gt;Laurent Kempé&lt;/a&gt;.&lt;/span&gt;
&lt;/div&gt;
&lt;p&gt;
Enjoying the nice weather at home.&lt;br /&gt;
&lt;br /&gt;
Some last days of vacation before going back to work !&lt;br /&gt;
&lt;br /&gt;
Cheers
&lt;/p&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6461958" width="1" height="1"&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/lkempe?a=619Cnj"&gt;&lt;img src="http://feeds.feedburner.com/~f/lkempe?i=619Cnj" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/lkempe?a=aves5j"&gt;&lt;img src="http://feeds.feedburner.com/~f/lkempe?i=aves5j" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/lkempe/~4/351440693" height="1" width="1"/&gt;</description><feedburner:origLink>http://weblogs.asp.net/lkempe/archive/2008/07/31/time-for-the-ap-233-ro.aspx</feedburner:origLink></item><item><title>Innoveo Solutions new corporate identity &amp; product name announced</title><link>http://feeds.feedburner.com/~r/lkempe/~3/324361750/innoveo-solutions-new-corporate-identity-amp-product-name-announced.aspx</link><pubDate>Tue, 01 Jul 2008 21:28:41 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6347024</guid><dc:creator>lkempe</dc:creator><slash:comments>0</slash:comments><wfw:commentRss>http://weblogs.asp.net/lkempe/rsscomments.aspx?PostID=6347024</wfw:commentRss><comments>http://weblogs.asp.net/lkempe/archive/2008/07/01/innoveo-solutions-new-corporate-identity-amp-product-name-announced.aspx#comments</comments><description>&lt;p&gt;&lt;font color="#0080ff"&gt;&lt;img src="http://farm4.static.flickr.com/3039/2629237282_b1bae653e6_o.jpg" align="right" /&gt;&lt;/font&gt;At &lt;a href="http://www.innoveo.com/" target="_blank"&gt;Innoveo Solutions&lt;/a&gt;, today we went live with our new corporate identity and announced our product name, &lt;a href="http://www.innoveo.com/Products.aspx" target="_blank"&gt;&lt;strong&gt;INNOVEO SKYE&lt;/strong&gt;&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;I was quite involved into the process with the development of the &lt;a href="http://www.innoveo.com/" target="_blank"&gt;web site&lt;/a&gt; and some minor other things.&lt;/p&gt;  &lt;p&gt;Why a change after only 9 months?    &lt;br /&gt;Simply to reflect our personality, culture, spirit and soul in a more appropriate way:&lt;/p&gt;  &lt;p&gt;&lt;font color="#0080ff"&gt;VALUES /&lt;/font&gt; &lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;INNOVATION &lt;/li&gt;    &lt;li&gt;QUALITY, PROFESSIONALISM AND TRANSPARENCY &lt;/li&gt;    &lt;li&gt;TRUST AND RESPECT &lt;/li&gt;    &lt;li&gt;DYNAMISM AND FUN &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;font color="#0080ff"&gt;MISSION /&lt;/font&gt;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;ENABLING BUSINESS INNOVATION &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;font color="#0080ff"&gt;VISION /&lt;/font&gt;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;BE RESPECTED LEADERS IN CONNECTING THE INSURANCE BUSINESS WITH TECHNOLOGY &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;We started with an internal launch (I hope to be able to post some videos about it soon) made by Nick and myself!&lt;/p&gt;  &lt;p&gt;&lt;img src="http://farm4.static.flickr.com/3001/2629324718_d3c943808c.jpg" /&gt; &lt;/p&gt;  &lt;p&gt;Then after the official launch we had a little party with some German specialities brought by our German guy, Oli! And some from Italy brought by Nick!&lt;/p&gt;  &lt;p&gt;&lt;img src="http://farm4.static.flickr.com/3147/2629269194_6b3a345fb4.jpg" /&gt; &lt;/p&gt;  &lt;p&gt;And we made a little tour of the building to look at the new logo everywhere!&lt;/p&gt;  &lt;p&gt;&lt;img src="http://farm4.static.flickr.com/3275/2629277982_9b22cd68cb.jpg" /&gt; &lt;img src="http://farm4.static.flickr.com/3131/2629297264_6b8fe0eb84_m.jpg" /&gt; &lt;img src="http://farm4.static.flickr.com/3151/2629304860_f1bf68dd7f_m.jpg" /&gt; &lt;/p&gt;  &lt;p&gt;Concerning the &lt;a href="http://www.innoveo.com/" target="_blank"&gt;web site&lt;/a&gt; here are some key points about it.&lt;/p&gt;  &lt;p&gt;Technologies used:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/bb308966.aspx" target="_blank"&gt;C# 3.0&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://msdn.microsoft.com/en-us/netframework/aa904594.aspx" target="_blank"&gt;LINQ&lt;/a&gt;&amp;#160; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.asp.net/" target="_blank"&gt;ASP.NET 3.5&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://euss.evaluant.com/" target="_blank"&gt;Euss&lt;/a&gt; &amp;amp; Linq to Euss (O/RM) &lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.xmlrpc.com/" target="_blank"&gt;XMLRPC&lt;/a&gt; for Meta Blog API &amp;amp; WordPress API &lt;/li&gt;    &lt;li&gt;&lt;a href="http://incubator.apache.org/lucene.net/" target="_blank"&gt;Lucene.Net&lt;/a&gt; and Snowball &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Tools used during the development:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://msdn.microsoft.com/en-us/vstudio/default.aspx" target="_blank"&gt;Visual Studio 2008&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://nunit.com/index.php" target="_blank"&gt;NUnit&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.ayende.com/projects/rhino-mocks.aspx" target="_blank"&gt;Rhino.Mocks&lt;/a&gt;&amp;#160; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.jetbrains.com/teamcity" target="_blank"&gt;Team City&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.jetbrains.com/resharper" target="_blank"&gt;ReSharper&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://subversion.tigris.org/" target="_blank"&gt;Subversion&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.atlassian.com/software/jira/" target="_blank"&gt;JIRA&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.danube.com/scrumworks/pro" target="_blank"&gt;Scrumworks Pro&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;The website was developed using &lt;a href="http://www.mountaingoatsoftware.com/scrum" target="_blank"&gt;Scrum&lt;/a&gt;, &lt;a href="http://www.testdriven.com/modules/news/" target="_blank"&gt;Test Driven Development&lt;/a&gt; and &lt;a href="http://www.infoq.com/articles/ddd-in-practice" target="_blank"&gt;Domain Driven Development&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;I would like to make a BIG THANK to all peoples that helped into that process!&lt;/p&gt;  &lt;p&gt;Internals:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://zonenick.blogspot.com/" target="_blank"&gt;Nick&lt;/a&gt; and &lt;a href="http://www.didierbeck.com/weblog.php" target="_blank"&gt;Didier&lt;/a&gt;, for their great support (finally we went through the bottleneck ;)&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Externals:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="https://www.xing.com/profile/Andreas_Koch2"&gt;Andreas Koch&lt;/a&gt;, absolutely great designer (hey Andreas I am searching a designer for the new version of my website &lt;a href="http://www.techheadbrothers.com/" target="_blank"&gt;Tech Head Brothers&lt;/a&gt; ;-)&lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.wygwam.com/" target="_blank"&gt;Wygwam&lt;/a&gt;, for their great help in the field of CSS, especially &lt;a href="http://blogs.codes-sources.com/guillaume/" target="_blank"&gt;Guillaume&lt;/a&gt; and &lt;a href="http://www.wygwam.com/Equipe/Matthieu_Hodin.aspx" target="_blank"&gt;Matthieu&lt;/a&gt; (and for sure my old friend &lt;a href="http://blogs.codes-sources.com/redo" target="_blank"&gt;Rédo&lt;/a&gt; and &lt;a href="http://www.wygwam.com/Equipe/Gregoire_Malvoisin.aspx" target="_blank"&gt;Grégoire&lt;/a&gt;)&lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.evaluant.com/web/en/DesktopDefault.aspx" target="_blank"&gt;Evaluant&lt;/a&gt;, for their great Euss O/RM tool (and for sure thanks to Nicolas for the lunch, to Sébastien, Nicolas and Fabien for the support)&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;Stay tuned more to come from &lt;a href="http://www.innoveo.com/" target="_blank"&gt;Innoveo Solutions&lt;/a&gt;&lt;/p&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6347024" width="1" height="1"&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/lkempe?a=ceexlj"&gt;&lt;img src="http://feeds.feedburner.com/~f/lkempe?i=ceexlj" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/lkempe?a=jQmKIj"&gt;&lt;img src="http://feeds.feedburner.com/~f/lkempe?i=jQmKIj" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/lkempe/~4/324361750" height="1" width="1"/&gt;</description><category domain="http://weblogs.asp.net/lkempe/archive/tags/innoveo+solutions/default.aspx">innoveo solutions</category><feedburner:origLink>http://weblogs.asp.net/lkempe/archive/2008/07/01/innoveo-solutions-new-corporate-identity-amp-product-name-announced.aspx</feedburner:origLink></item><item><title>ReSharper and Source Analysis Tools for C#</title><link>http://feeds.feedburner.com/~r/lkempe/~3/319178407/resharper-and-source-analysis-tools-for-c.aspx</link><pubDate>Tue, 24 Jun 2008 21:05:33 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6316122</guid><dc:creator>lkempe</dc:creator><slash:comments>0</slash:comments><wfw:commentRss>http://weblogs.asp.net/lkempe/rsscomments.aspx?PostID=6316122</wfw:commentRss><comments>http://weblogs.asp.net/lkempe/archive/2008/06/24/resharper-and-source-analysis-tools-for-c.aspx#comments</comments><description>&lt;p&gt;If you do have &lt;a href="http://blogs.msdn.com/sourceanalysis/archive/2008/05/23/announcing-the-release-of-microsoft-source-analysis.aspx" target="_blank"&gt;Microsoft Source Analysis Tools for C#&lt;/a&gt; and &lt;a href="http://www.jetbrains.com/resharper/" target="_blank"&gt;JetBrains ReSharper 4.0&lt;/a&gt; installed in you development environment than you might get issue when you run your unit tests through ReSharper &lt;a href="http://www.jetbrains.com/resharper/features/unit_testing.html#Unit_Test_Explorer" target="_blank"&gt;Unit Test Explorer&lt;/a&gt; and &lt;a href="http://www.jetbrains.com/resharper/features/unit_testing.html#Unit_Test_Sessions" target="_blank"&gt;Sessions&lt;/a&gt;. As you can &lt;a href="http://www.jetbrains.net/jira/browse/RSRP-73126" target="_blank"&gt;read on my bug report feedback&lt;/a&gt;:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;There is known problem in StyleCop, which prevents build system of VS to report any progress. Unit Testing waits for project to be built. You can switch building to &amp;quot;Never&amp;quot; on Session toolbar and build manually, or uninstall StyleCop&lt;/p&gt;&lt;/blockquote&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6316122" width="1" height="1"&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/lkempe?a=OxYy9i"&gt;&lt;img src="http://feeds.feedburner.com/~f/lkempe?i=OxYy9i" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/lkempe?a=bhvexi"&gt;&lt;img src="http://feeds.feedburner.com/~f/lkempe?i=bhvexi" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/lkempe/~4/319178407" height="1" width="1"/&gt;</description><category domain="http://weblogs.asp.net/lkempe/archive/tags/ReSharper/default.aspx">ReSharper</category><category domain="http://weblogs.asp.net/lkempe/archive/tags/unit+test/default.aspx">unit test</category><feedburner:origLink>http://weblogs.asp.net/lkempe/archive/2008/06/24/resharper-and-source-analysis-tools-for-c.aspx</feedburner:origLink></item><item><title>Upload Video to Silverlight Streaming using WebDav</title><link>http://feeds.feedburner.com/~r/lkempe/~3/316919725/upload-video-to-silverlight-streaming-using-webdav.aspx</link><pubDate>Sat, 21 Jun 2008 14:50:02 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6304214</guid><dc:creator>lkempe</dc:creator><slash:comments>0</slash:comments><wfw:commentRss>http://weblogs.asp.net/lkempe/rsscomments.aspx?PostID=6304214</wfw:commentRss><comments>http://weblogs.asp.net/lkempe/archive/2008/06/21/upload-video-to-silverlight-streaming-using-webdav.aspx#comments</comments><description>&lt;p&gt;Follow up on the post from &lt;a href="http://weblogs.asp.net/lduveau/" target="_blank"&gt;Laurent&lt;/a&gt; “&lt;a href="http://weblogs.asp.net/lduveau/archive/2008/06/20/expression-encoder-2-publish-to-silverlight-streaming-plugin.aspx" target="_blank"&gt;Expression Encoder 2 publish to Silverlight Streaming plugin&lt;/a&gt;”.&lt;/p&gt;  &lt;p&gt;My way to upload is to use &lt;a href="http://en.wikipedia.org/wiki/WebDav" target="_blank"&gt;WebDav&lt;/a&gt; by mapping a network drive using my Silverlight Streaming Account ID as the user name and my Account Key as the password. You will find those information on the Administration &lt;a href="http://silverlight.live.com/" target="_blank"&gt;Home page of Silverlight Streaming&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;Then you have a direct access to your folders on Silverlight Streaming. You can then create a folder and upload your video with the name: video.vmw. And they will appear on your &lt;a href="https://silverlight.live.com/Videos.aspx" target="_blank"&gt;Manage Videos&lt;/a&gt; page.&lt;/p&gt;  &lt;p&gt;&lt;u&gt;Important&lt;/u&gt;: It is a must that the video are encoded in a format recognized by silverlight and that the name is video.wmv.&lt;/p&gt;  &lt;p&gt;It rocks!&lt;/p&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6304214" width="1" height="1"&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/lkempe?a=nrwWgi"&gt;&lt;img src="http://feeds.feedburner.com/~f/lkempe?i=nrwWgi" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/lkempe?a=su4Zxi"&gt;&lt;img src="http://feeds.feedburner.com/~f/lkempe?i=su4Zxi" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/lkempe/~4/316919725" height="1" width="1"/&gt;</description><category domain="http://weblogs.asp.net/lkempe/archive/tags/Silverlight+Streaming/default.aspx">Silverlight Streaming</category><feedburner:origLink>http://weblogs.asp.net/lkempe/archive/2008/06/21/upload-video-to-silverlight-streaming-using-webdav.aspx</feedburner:origLink></item><item><title>Empowering your Attribute’s Names</title><link>http://feeds.feedburner.com/~r/lkempe/~3/314564554/empowering-your-attribute-s-names.aspx</link><pubDate>Wed, 18 Jun 2008 11:54:06 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6290387</guid><dc:creator>lkempe</dc:creator><slash:comments>0</slash:comments><wfw:commentRss>http://weblogs.asp.net/lkempe/rsscomments.aspx?PostID=6290387</wfw:commentRss><comments>http://weblogs.asp.net/lkempe/archive/2008/06/18/empowering-your-attribute-s-names.aspx#comments</comments><description>&lt;p&gt;Today I was facing the following issue. I have an indexing system (read more &lt;a href="http://weblogs.asp.net/lkempe/archive/2007/11/16/indexing-and-searching-business-entities-using-lucene-net-framework-part-1.aspx"&gt;here&lt;/a&gt;, &lt;a href="http://weblogs.asp.net/lkempe/archive/2008/03/07/indexing-and-searching-business-entities-using-lucene-net-framework-part-2.aspx"&gt;here&lt;/a&gt; and &lt;a href="http://weblogs.asp.net/lkempe/archive/2008/03/07/indexing-and-searching-business-entities-using-lucene-net-framework-part-3.aspx"&gt;here&lt;/a&gt;) using &lt;a href="http://incubator.apache.org/lucene.net/" target="_blank"&gt;Lucene.Net&lt;/a&gt; that is working quite good. The drawback of the current implementation was that I couldn’t filter any to be indexed property decorated with the attribute. For example if I had a string property of my domain holding HTML, I wasn’t able to remove the HTML out of the string before indexing it. &lt;/p&gt;  &lt;p&gt;I scratch my head some time, and finally came to a pragmatic solution. &lt;/p&gt;  &lt;p&gt;For this pragmatic solution I used meta information in the name of the attribute. So the attribute decorate my code with a meta information and the name of the attribute contains by itself also meta information. This means that I enforce some rules in the naming of the attribute.&lt;/p&gt;  &lt;p&gt;For example the first rule is the following, if the name of the attribute contains Html in whatever form, uppercase, lowercase, etc. the framework will realize that the property contains Html and that it needs to remove the Html tags out of the string on decode it.&lt;/p&gt;  &lt;p&gt;If none of the naming rules match then it will use the content of the property directly.&lt;/p&gt;  &lt;p&gt;So as a user of the indexing framework, I write one attribute named HTMLSearchableAttribute and decorate my properties and then the framework will clean automatically this string property before indexing the cleaned content with &lt;a href="http://incubator.apache.org/lucene.net/" target="_blank"&gt;Lucene.Net&lt;/a&gt;.&lt;/p&gt;&lt;div class="wlWriterHeaderFooter" style="text-align:left; margin:0px; padding:4px 0px 4px 0px;"&gt;&lt;script type="text/javascript"&gt;digg_url = "http://weblogs.asp.net/lkempe/archive/2008/06/18/empowering-your-attribute-s-names.aspx";digg_title = "Empowering your Attribute’s Names";digg_bgcolor = "#FFFFFF";digg_skin = "compact";&lt;/script&gt;&lt;script src="http://digg.com/tools/diggthis.js" type="text/javascript"&gt;&lt;/script&gt;&lt;script type="text/javascript"&gt;digg_url = undefined;digg_title = undefined;digg_bgcolor = undefined;digg_skin = undefined;&lt;/script&gt;&lt;/div&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6290387" width="1" height="1"&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/lkempe?a=BqkR1i"&gt;&lt;img src="http://feeds.feedburner.com/~f/lkempe?i=BqkR1i" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/lkempe?a=8b1cmi"&gt;&lt;img src="http://feeds.feedburner.com/~f/lkempe?i=8b1cmi" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/lkempe/~4/314564554" height="1" width="1"/&gt;</description><category domain="http://weblogs.asp.net/lkempe/archive/tags/Lucene.Net/default.aspx">Lucene.Net</category><feedburner:origLink>http://weblogs.asp.net/lkempe/archive/2008/06/18/empowering-your-attribute-s-names.aspx</feedburner:origLink></item><item><title>Silverlight Planning Poker Timer</title><link>http://feeds.feedburner.com/~r/lkempe/~3/312319613/silverlight-planning-poker-timer.aspx</link><pubDate>Sun, 15 Jun 2008 10:07:47 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6277971</guid><dc:creator>lkempe</dc:creator><slash:comments>0</slash:comments><wfw:commentRss>http://weblogs.asp.net/lkempe/rsscomments.aspx?PostID=6277971</wfw:commentRss><comments>http://weblogs.asp.net/lkempe/archive/2008/06/15/silverlight-planning-poker-timer.aspx#comments</comments><description>&lt;div class="wlWriterHeaderFooter" style="float:right; margin:0px; padding:0px 0px 4px 8px;"&gt;&lt;script type="text/javascript"&gt;digg_url = "http://weblogs.asp.net/lkempe/archive/2008/06/15/silverlight-planning-poker-timer.aspx";digg_title = "Silverlight Planning Poker Timer";digg_bgcolor = "#FFFFFF";digg_skin = "normal";&lt;/script&gt;&lt;script src="http://digg.com/tools/diggthis.js" type="text/javascript"&gt;&lt;/script&gt;&lt;script type="text/javascript"&gt;digg_url = undefined;digg_title = undefined;digg_bgcolor = undefined;digg_skin = undefined;&lt;/script&gt;&lt;/div&gt;&lt;p&gt;The other day I was searching for a small project to &lt;a href="http://weblogs.asp.net/lkempe/archive/2008/06/13/silverlight-2-beta-2-unable-to-start-debugging.aspx" target="_blank"&gt;get started with Silverlight 2 development&lt;/a&gt;. &lt;/p&gt;  &lt;p&gt;In my today’s works at &lt;a href="http://www.innoveo.com/" target="_blank"&gt;Innoveo Solutions&lt;/a&gt; I am spending quite some time evangelizing about &lt;a href="http://en.wikipedia.org/wiki/Scrum_(development)" target="_blank"&gt;Scrum&lt;/a&gt; framework. I found some time ago the &lt;a href="http://aslakhellesoy.com/planning_poker_timer/index.html" target="_blank"&gt;Planning Poker Timer&lt;/a&gt; by &lt;a href="http://blog.aslakhellesoy.com/"&gt;Aslak Hellesøy&lt;/a&gt;. That’s definitely looks like a great project to implement with Silverlight 2.&lt;/p&gt;  &lt;p&gt;So my goal is as the following:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;A full re-implementation of the Planning Poker Timer using Silverlight 2 and C#&lt;/li&gt;    &lt;ul&gt;     &lt;li&gt;You can set a &lt;a href="http://aslakhellesoy.com/?precision=10&amp;amp;time=180"&gt;different time and precision&lt;/a&gt; in the URL. Use a precision of 10 to avoid distracting people&lt;/li&gt;      &lt;li&gt;Rings a bell and turns the screen red (unless you specify other colours) when time is up&lt;/li&gt;      &lt;li&gt;Make the colours &lt;a href="http://aslakhellesoy.com/?precision=1&amp;amp;time=8&amp;amp;initialColour=0000ff&amp;amp;colours[4]=ff0000&amp;amp;colours[0]=000000"&gt;start at blue, go red at 4 seconds and black at 0 seconds&lt;/a&gt; or use your imagination to let people know time is running out&lt;/li&gt;      &lt;li&gt;You can make the timer &lt;a href="http://aslakhellesoy.com/?precision=1&amp;amp;time=5&amp;amp;restartAt=-2"&gt;restart automatically&lt;/a&gt; at a certain time. Hitting the spacebar will also restart the timer (and make all of this text go away)&lt;/li&gt;      &lt;li&gt;Use it to keep folks focussed on time in other situations - like &lt;a href="http://en.wikipedia.org/wiki/Lightning_Talk"&gt;lightning talks&lt;/a&gt;, where you can use &lt;a href="http://aslakhellesoy.com/?precision=10&amp;amp;time=600&amp;amp;restartAt=-120&amp;amp;colours[120]=ff0000&amp;amp;colours[0]=000000"&gt;these settings&lt;/a&gt;&lt;/li&gt;      &lt;li&gt;Make the text bigger to fill the whole screen. This is CMD+ or CTRL+ in most browsers - or via the menu if you're using IE&lt;/li&gt;   &lt;/ul&gt;    &lt;li&gt;Turn the Silverlight Planning Poker Timer to a Vista Gadget&lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;So I fired up &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=32a3e916-e681-4955-bc9f-cfba49273c7c" target="_blank"&gt;Microsoft Expression Blend 2.5 June 2008 Preview&lt;/a&gt; and created a first very simple project with two TextBlock and used it in Visual Studio 2008.&lt;/p&gt;  &lt;p&gt;After less than one hour I was able to:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Set a &lt;a href="http://aslakhellesoy.com/?precision=10&amp;amp;time=180"&gt;different time and precision&lt;/a&gt; in the URL. Use a precision of 10 to avoid distracting people&lt;/li&gt;    &lt;li&gt;Rings a bell and turns the screen red (unless you specify other colours) when time is up&lt;/li&gt;    &lt;li&gt;Go full screen&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;It is really impressive at which speed you can start to handle a project in Silverlight 2 with some .NET backgound. It was really clever from Microsoft to give the same development environment on the client that you have on the server side.&lt;/p&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6277971" width="1" height="1"&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/lkempe?a=IVNhGi"&gt;&lt;img src="http://feeds.feedburner.com/~f/lkempe?i=IVNhGi" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/lkempe?a=zjGaCi"&gt;&lt;img src="http://feeds.feedburner.com/~f/lkempe?i=zjGaCi" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/lkempe/~4/312319613" height="1" width="1"/&gt;</description><category domain="http://weblogs.asp.net/lkempe/archive/tags/Silverlight/default.aspx">Silverlight</category><category domain="http://weblogs.asp.net/lkempe/archive/tags/Scrum/default.aspx">Scrum</category><feedburner:origLink>http://weblogs.asp.net/lkempe/archive/2008/06/15/silverlight-planning-poker-timer.aspx</feedburner:origLink></item><item><title>Deep Earth - Nice usage of Virtual Earth and Silverlight Deep Zoom</title><link>http://feeds.feedburner.com/~r/lkempe/~3/312283028/deep-earth-nice-usage-of-virtual-earth-and-silverlight-deep-zoom.aspx</link><pubDate>Sun, 15 Jun 2008 08:56:01 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6277796</guid><dc:creator>lkempe</dc:creator><slash:comments>0</slash:comments><wfw:commentRss>http://weblogs.asp.net/lkempe/rsscomments.aspx?PostID=6277796</wfw:commentRss><comments>http://weblogs.asp.net/lkempe/archive/2008/06/15/deep-earth-nice-usage-of-virtual-earth-and-silverlight-deep-zoom.aspx#comments</comments><description>&lt;div class="wlWriterHeaderFooter" style="float:right; margin:0px; padding:0px 0px 4px 8px;"&gt;&lt;script type="text/javascript"&gt;digg_url = "http://weblogs.asp.net/lkempe/archive/2008/06/15/deep-earth-nice-usage-of-virtual-earth-and-silverlight-deep-zoom.aspx";digg_title = "Deep Earth - Nice usage of Virtual Earth and Silverlight Deep Zoom";digg_bgcolor = "#FFFFFF";digg_skin = "normal";&lt;/script&gt;&lt;script src="http://digg.com/tools/diggthis.js" type="text/javascript"&gt;&lt;/script&gt;&lt;script type="text/javascript"&gt;digg_url = undefined;digg_title = undefined;digg_bgcolor = undefined;digg_skin = undefined;&lt;/script&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;  &lt;p&gt;This nice project is &lt;a href="http://www.codeplex.com/deepearth" target="_blank"&gt;hosted on Codeplex&lt;/a&gt;&amp;#160; and you can have a &lt;a href="http://deepzoom.soulclients.com/VE/" target="_blank"&gt;demo on the following page&lt;/a&gt;. And for sure as all project on Codeplex you get full access to the source code.&lt;/p&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6277796" width="1" height="1"&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/lkempe?a=2v6tbi"&gt;&lt;img src="http://feeds.feedburner.com/~f/lkempe?i=2v6tbi" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/lkempe?a=lTe87i"&gt;&lt;img src="http://feeds.feedburner.com/~f/lkempe?i=lTe87i" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/lkempe/~4/312283028" height="1" width="1"/&gt;</description><category domain="http://weblogs.asp.net/lkempe/archive/tags/Silverlight/default.aspx">Silverlight</category><feedburner:origLink>http://weblogs.asp.net/lkempe/archive/2008/06/15/deep-earth-nice-usage-of-virtual-earth-and-silverlight-deep-zoom.aspx</feedburner:origLink></item><item><title>Silverlight 2 Beta 2 - Unable to start debugging!</title><link>http://feeds.feedburner.com/~r/lkempe/~3/311297744/silverlight-2-beta-2-unable-to-start-debugging.aspx</link><pubDate>Fri, 13 Jun 2008 17:25:29 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6272311</guid><dc:creator>lkempe</dc:creator><slash:comments>1</slash:comments><wfw:commentRss>http://weblogs.asp.net/lkempe/rsscomments.aspx?PostID=6272311</wfw:commentRss><comments>http://weblogs.asp.net/lkempe/archive/2008/06/13/silverlight-2-beta-2-unable-to-start-debugging.aspx#comments</comments><description>&lt;div class="wlWriterHeaderFooter" style="float:right; margin:0px; padding:0px 0px 4px 8px;"&gt;&lt;script type="text/javascript"&gt;digg_url = "http://weblogs.asp.net/lkempe/archive/2008/06/13/silverlight-2-beta-2-unable-to-start-debugging.aspx";digg_title = "Silverlight 2 Beta 2 - Unable to start debugging!";digg_bgcolor = "#FFFFFF";digg_skin = "normal";&lt;/script&gt;&lt;script src="http://digg.com/tools/diggthis.js" type="text/javascript"&gt;&lt;/script&gt;&lt;script type="text/javascript"&gt;digg_url = undefined;digg_title = undefined;digg_bgcolor = undefined;digg_skin = undefined;&lt;/script&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;  &lt;p&gt;Unable to start debugging! The silverlight managed debugging package isn't installed.&lt;/p&gt;  &lt;p&gt;If you are facing this issue when you try to debug your Silverlight 2 Beta 2 application from Visual Studio 2008 just extract the silverlight_chainer.exe into a folder and run Silverlight.2.0_Developer.exe from the folder. You even don’t have to quick Visual Studio 2008 during the installation.&lt;/p&gt;  &lt;p&gt;I was facing this issue in a little project I started to experience Silverlight 2. It is realted to my today’s great interest &lt;a href="http://en.wikipedia.org/wiki/Scrum_(development)" target="_blank"&gt;Scrum&lt;/a&gt;! Wait and see.&lt;/p&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6272311" width="1" height="1"&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/lkempe?a=xuQgXi"&gt;&lt;img src="http://feeds.feedburner.com/~f/lkempe?i=xuQgXi" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/lkempe?a=4jxyJi"&gt;&lt;img src="http://feeds.feedburner.com/~f/lkempe?i=4jxyJi" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/lkempe/~4/311297744" height="1" width="1"/&gt;</description><category domain="http://weblogs.asp.net/lkempe/archive/tags/Silverlight/default.aspx">Silverlight</category><category domain="http://weblogs.asp.net/lkempe/archive/tags/Scrum/default.aspx">Scrum</category><feedburner:origLink>http://weblogs.asp.net/lkempe/archive/2008/06/13/silverlight-2-beta-2-unable-to-start-debugging.aspx</feedburner:origLink></item><item><title>Windows Live Writer Dynamic Template Plugin</title><link>http://feeds.feedburner.com/~r/lkempe/~3/311265069/windows-live-writer-dynamic-template-plugin.aspx</link><pubDate>Fri, 13 Jun 2008 16:10:32 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6272222</guid><dc:creator>lkempe</dc:creator><slash:comments>0</slash:comments><wfw:commentRss>http://weblogs.asp.net/lkempe/rsscomments.aspx?PostID=6272222</wfw:commentRss><comments>http://weblogs.asp.net/lkempe/archive/2008/06/13/windows-live-writer-dynamic-template-plugin.aspx#comments</comments><description>&lt;div class="wlWriterHeaderFooter" style="float:right; margin:0px; padding:0px 0px 4px 8px;"&gt;&lt;script type="text/javascript"&gt;digg_url = "http://weblogs.asp.net/lkempe/archive/2008/06/13/windows-live-writer-dynamic-template-plugin.aspx";digg_title = "Windows Live Writer Dynamic Template Plugin";digg_bgcolor = "#FFFFFF";digg_skin = "normal";&lt;/script&gt;&lt;script src="http://digg.com/tools/diggthis.js" type="text/javascript"&gt;&lt;/script&gt;&lt;script type="text/javascript"&gt;digg_url = undefined;digg_title = undefined;digg_bgcolor = undefined;digg_skin = undefined;&lt;/script&gt;&lt;/div&gt;&lt;p&gt;Today working on the development of a website I had the following user story to develop “As an author I want to be able to add a lightbox/darkbox around my content in &lt;a href="http://windowslivewriter.spaces.live.com/" target="_blank"&gt;Live Writer&lt;/a&gt;”.&lt;/p&gt;  &lt;p&gt;First of all I updated my version of Windows Live Writer to the latest CTP version. You can download it from here: &lt;a href="http://windowslivewriter.spaces.live.com/blog/cns!D85741BB5E0BE8AA!1508.entry"&gt;Technical Preview: Now Available for Download&lt;/a&gt;! Nice work &lt;a href="http://jcheng.wordpress.com/2008/06/03/new-writer-plugins-for-tech-preview/" target="_blank"&gt;Joe&lt;/a&gt;, it is quite stable and look really nice.&lt;/p&gt;  &lt;p&gt;Then I needed to address this user story. To do so I thought to develop my own Live Writer plugin but with some research led me to a &lt;strong&gt;FANTASTIC&lt;/strong&gt; plugin called “&lt;a href="http://www.joecheng.com/code/DynamicTemplate/" target="_blank"&gt;Dynamic Template Plugin for Windows Live Writer&lt;/a&gt;” and by whom, you guessed, &lt;a href="http://www.joecheng.com/" target="_blank"&gt;Joe&lt;/a&gt;. Great work!&lt;/p&gt;  &lt;p&gt;With this plugin I was able to implement in a very user friendly way, the needed insertion of my light and dark boxes. No an author is two click away from having it boxes on the website. Nice, really nice.&lt;/p&gt;  &lt;p&gt;But wait this plugin can do much more than templating!&lt;/p&gt;  &lt;p&gt;Check all videos available! &lt;a href="http://www.joecheng.com/screencasts/level1.swf"&gt;Watch Example 1&lt;/a&gt;, &lt;a href="http://www.joecheng.com/screencasts/level2.swf"&gt;Watch Example 2&lt;/a&gt;, &lt;a href="http://www.joecheng.com/screencasts/level3.swf"&gt;Watch Example 3&lt;/a&gt;, &lt;a href="http://www.joecheng.com/screencasts/level3a.swf"&gt;Watch Example 4&lt;/a&gt;, &lt;a href="http://www.joecheng.com/screencasts/level4a.swf"&gt;Watch Example 5&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;Here is the result. On the left, what you see in live writer, on the right what you see on the website.&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;img src="http://farm4.static.flickr.com/3028/2575883688_d3bc3dd2de_o.png" /&gt; &lt;img src="http://farm4.static.flickr.com/3061/2575055209_e140ae3407_o.png" /&gt; &lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;I love Live Writer! When the pages editing will evolve it will be the must for CMS.&lt;/p&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6272222" width="1" height="1"&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/lkempe?a=IOQX9i"&gt;&lt;img src="http://feeds.feedburner.com/~f/lkempe?i=IOQX9i" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/lkempe?a=1uCXxi"&gt;&lt;img src="http://feeds.feedburner.com/~f/lkempe?i=1uCXxi" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/lkempe/~4/311265069" height="1" width="1"/&gt;</description><category domain="http://weblogs.asp.net/lkempe/archive/tags/innoveo+solutions/default.aspx">innoveo solutions</category><category domain="http://weblogs.asp.net/lkempe/archive/tags/Windows+Live+Writer/default.aspx">Windows Live Writer</category><feedburner:origLink>http://weblogs.asp.net/lkempe/archive/2008/06/13/windows-live-writer-dynamic-template-plugin.aspx</feedburner:origLink></item><item><title>ReSharper 4.0 with C# 3.0 support, JetBrains releases the ultimate Visual Studio plugin</title><link>http://feeds.feedburner.com/~r/lkempe/~3/311005476/resharper-4-0-with-c-3-0-support-jetbrains-releases-the-ultimate-visual-studio-plugin.aspx</link><pubDate>Fri, 13 Jun 2008 08:01:11 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6271753</guid><dc:creator>lkempe</dc:creator><slash:comments>0</slash:comments><wfw:commentRss>http://weblogs.asp.net/lkempe/rsscomments.aspx?PostID=6271753</wfw:commentRss><comments>http://weblogs.asp.net/lkempe/archive/2008/06/13/resharper-4-0-with-c-3-0-support-jetbrains-releases-the-ultimate-visual-studio-plugin.aspx#comments</comments><description>&lt;p&gt;&lt;a href="http://www.jetbrains.com/resharper/index.html" target="_blank"&gt;&lt;img src="http://farm4.static.flickr.com/3263/2575121850_a280df26f4_o.png" align="right" border="0" /&gt;&lt;/a&gt;&lt;a href="http://www.jetbrains.com/" target="_blank"&gt;JetBrains&lt;/a&gt; has released their ultimate Visual Studio plugin, &lt;a href="http://www.jetbrains.com/resharper/index.html" target="_blank"&gt;ReSharper 4.0&lt;/a&gt;. &lt;/p&gt;  &lt;p&gt;This much-anticipated productivity tool includes many new features and improvements.&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;It supports C# 3.0 and LINQ, plugs nicely into Visual Studio 2008 and 2005 and also support VB.NET.&lt;/p&gt;  &lt;p&gt;It includes:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;strong&gt;Full Support for C# 3.0 and LINQ&lt;/strong&gt;; Full Edition and C# Edition provide comprehensive support for C# 3.0, including LINQ, implicitly typed locals and arrays, extension methods, automatic properties, lambda expressions, object &amp;amp; collection initializers, anonymous types, expression trees, and partial methods &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Comprehensive Insight into .NET Framework &lt;/strong&gt;&lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Solution-Wide Analysis&lt;/strong&gt;, which looks for erroneous C# code in your whole solution on-the-fly, without compiling it first &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Code Cleanup&lt;/strong&gt;, flexible code compliance and formatting tool bringing together a dozen of ReSharper features. In addition to fine-tuning formatting style to use, you can opt to arrange 'this' qualifier, remove code redundancies, convert properties with backup fields to auto-properties, make fields read-only if possible, optimize using directives, shorten qualified references, update file header, replace explicit types with vars, and revamp your C# code with many more settings &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;New Refactorings&lt;/strong&gt;       &lt;ul&gt;       &lt;li&gt;Convert Static to Extension Method &lt;/li&gt;        &lt;li&gt;Convert Extension Method to Plain Static &lt;/li&gt;        &lt;li&gt;Convert Property to Auto-Property &lt;/li&gt;        &lt;li&gt;Convert Anonymous to Named Type &lt;/li&gt;        &lt;li&gt;Inline Method &lt;/li&gt;        &lt;li&gt;Convert Method to Indexer (to Default Property in VB.NET) &lt;/li&gt;        &lt;li&gt;Convert Indexer (Default Property in VB.NET) to Method &lt;/li&gt;     &lt;/ul&gt;   &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Multiple New Productivity Features &lt;/strong&gt;      &lt;ul&gt;       &lt;li&gt;&lt;em&gt;Complete statement&lt;/em&gt;; inserts necessary syntax elements (braces, semicolons etc.) and gets you to the position to start the next statement, saving you from excessive juggling with the caret. &lt;/li&gt;        &lt;li&gt;&lt;em&gt;CamelHumps in Code Completion&lt;/em&gt;, allowing you to complete any symbol by entering only its uppercase characters. &lt;/li&gt;        &lt;li&gt;&lt;em&gt;Live Templates Editor &amp;amp; Manager&lt;/em&gt;, rejuvenated set of user interface items for viewing, managing, and editing all three types of templates — Live Templates, Surround With Templates, and File Templates. &lt;/li&gt;        &lt;li&gt;&lt;em&gt;Recent Edits&lt;/em&gt;, drop-down list similar to existing Go To features that shows files and symbols that you recently modified. &lt;/li&gt;     &lt;/ul&gt;   &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Smoother Interaction with Visual Studio Ecosystem&lt;/strong&gt; &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;ASP.NET Speedup&lt;/strong&gt;; significantly speed-up the analysis of ASP.NET pages&lt;strong&gt;&amp;#160;&lt;/strong&gt; &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;You might read &lt;a href="http://www.jetbrains.com/resharper/features/newfeatures.html" target="_blank"&gt;more details about all new features&lt;/a&gt; or the &lt;a href="http://www.jetbrains.com/resharper/features/index.html" target="_blank"&gt;full list of features&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;I recommend printing the keyboards shortcuts available in &lt;a href="http://www.jetbrains.com/resharper/docs/ReSharper40DefaultKeymap2.pdf" target="_blank"&gt;ReSharper 2.x / IDEA scheme&lt;/a&gt; and &lt;a href="http://www.jetbrains.com/resharper/docs/ReSharper40DefaultKeymap.pdf" target="_blank"&gt;Visual Studio scheme&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;You might also be interested by all the ReSharper’s plugins available: &lt;a href="http://www.jetbrains.com/resharper/plugins/index.html#Gallio"&gt;Gallio&lt;/a&gt;, &lt;a href="http://www.jetbrains.com/resharper/plugins/index.html#RGreatEx"&gt;RGreatEx&lt;/a&gt;, &lt;a href="http://www.jetbrains.com/resharper/plugins/index.html#Agent_Smith_11.8"&gt;Agent Smith 1.1.8&lt;/a&gt;, &lt;a href="http://www.jetbrains.com/resharper/plugins/index.html#Agent_Johnson"&gt;Agent Johnson&lt;/a&gt;, &lt;a href="http://www.jetbrains.com/resharper/plugins/index.html#ARP_Another_ReSharper_Plugin"&gt;ARP Another ReSharper Plugin&lt;/a&gt;, &lt;a href="http://www.jetbrains.com/resharper/plugins/index.html#NHibernate_Plugin_10"&gt;NHibernate Plugin 1.0&lt;/a&gt;, &lt;a href="http://www.jetbrains.com/resharper/plugins/index.html#NSpecify"&gt;NSpecify&lt;/a&gt;, &lt;a href="http://www.jetbrains.com/resharper/plugins/index.html#Scout_plugin"&gt;Scout plugin&lt;/a&gt;, &lt;a href="http://www.jetbrains.com/resharper/plugins/index.html#xUnitnet_1.0"&gt;xUnit.net 1.0&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;Finally you can download a free &lt;a href="http://www.jetbrains.com/resharper/download/index.html" target="_blank"&gt;30-day trial version of ReSharper 4.0&lt;/a&gt;. Go download it, it is just a must (at least for me and some others ;)!&lt;/p&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6271753" width="1" height="1"&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/lkempe?a=WMADpi"&gt;&lt;img src="http://feeds.feedburner.com/~f/lkempe?i=WMADpi" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/lkempe?a=61tyTi"&gt;&lt;img src="http://feeds.feedburner.com/~f/lkempe?i=61tyTi" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/lkempe/~4/311005476" height="1" width="1"/&gt;</description><category domain="http://weblogs.asp.net/lkempe/archive/tags/Tools/default.aspx">Tools</category><category domain="http://weblogs.asp.net/lkempe/archive/tags/ReSharper/default.aspx">ReSharper</category><feedburner:origLink>http://weblogs.asp.net/lkempe/archive/2008/06/13/resharper-4-0-with-c-3-0-support-jetbrains-releases-the-ultimate-visual-studio-plugin.aspx</feedburner:origLink></item><item><title>MSBuild and Silverlight 2.0 Beta 2 SDK running in Team City</title><link>http://feeds.feedburner.com/~r/lkempe/~3/306803675/msbuild-and-silverlight-2-0-beta-2-sdk-running-in-team-city.aspx</link><pubDate>Sat, 07 Jun 2008 13:57:52 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6255632</guid><dc:creator>lkempe</dc:creator><slash:comments>1</slash:comments><wfw:commentRss>http://weblogs.asp.net/lkempe/rsscomments.aspx?PostID=6255632</wfw:commentRss><comments>http://weblogs.asp.net/lkempe/archive/2008/06/07/msbuild-and-silverlight-2-0-beta-2-sdk-running-in-team-city.aspx#comments</comments><description>&lt;p&gt;First you need to un-install the Silverlight 2.0 Beta 1 SDK from the build server! Then you can download the &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=50A9EC01-267B-4521-B7D7-C0DBA8866434&amp;amp;displaylang=en" target="_blank"&gt;Microsoft Silverlight Tools Beta 2 for Visual Studio 2008&lt;/a&gt; and extract it on the server, there you will find the file &lt;strong&gt;silverlight_sdk.msi&lt;/strong&gt;, that will allow you to install Silverlight 2.0 Beta 2 SDK.&lt;/p&gt;  &lt;p&gt;Now if you followed my post &lt;a href="http://weblogs.asp.net/lkempe/archive/2008/05/19/msbuild-and-silverlight-2-0-beta-1-running-in-team-city.aspx" target="_blank"&gt;MSBuild and Silverlight 2.0 Beta 1 running in Team City&lt;/a&gt;, then you know about the issue:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;b&gt;Using MSbuild to build a solution in a command line doesn’t copy the Silverlight project output to the linked web project&lt;/b&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;This issue is still there so &lt;a href="http://weblogs.asp.net/lkempe/archive/2008/05/19/msbuild-and-silverlight-2-0-beta-1-running-in-team-city.aspx" target="_blank"&gt;my fix is still in my MSBuild file&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6255632" width="1" height="1"&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/lkempe?a=gFafIi"&gt;&lt;img src="http://feeds.feedburner.com/~f/lkempe?i=gFafIi" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/lkempe?a=gWffTi"&gt;&lt;img src="http://feeds.feedburner.com/~f/lkempe?i=gWffTi" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/lkempe/~4/306803675" height="1" width="1"/&gt;</description><category domain="http://weblogs.asp.net/lkempe/archive/tags/Tech+Head+Brothers/default.aspx">Tech Head Brothers</category><category domain="http://weblogs.asp.net/lkempe/archive/tags/Silverlight/default.aspx">Silverlight</category><category domain="http://weblogs.asp.net/lkempe/archive/tags/continuous+integration/default.aspx">continuous integration</category><category domain="http://weblogs.asp.net/lkempe/archive/tags/Team+City/default.aspx">Team City</category><category domain="http://weblogs.asp.net/lkempe/archive/tags/MSBuild/default.aspx">MSBuild</category><feedburner:origLink>http://weblogs.asp.net/lkempe/archive/2008/06/07/msbuild-and-silverlight-2-0-beta-2-sdk-running-in-team-city.aspx</feedburner:origLink></item><item><title>Mocking .NET framework SmtpClient class</title><link>http://feeds.feedburner.com/~r/lkempe/~3/302067658/mocking-net-framework-smtpclient-class.aspx</link><pubDate>Sat, 31 May 2008 22:41:20 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6238583</guid><dc:creator>lkempe</dc:creator><slash:comments>2</slash:comments><wfw:commentRss>http://weblogs.asp.net/lkempe/rsscomments.aspx?PostID=6238583</wfw:commentRss><comments>http://weblogs.asp.net/lkempe/archive/2008/06/01/mocking-net-framework-smtpclient-class.aspx#comments</comments><description>&lt;p&gt;This Saturday like the last two I planned to work on my wooden terrace, but with the weather we have for this year's spring, it was almost impossible. So I replaced that with some development.&lt;/p&gt;  &lt;p&gt;I am using &lt;a href="http://www.ayende.com/projects/rhino-mocks.aspx" target="_blank"&gt;Rhino.Mocks&lt;/a&gt; as mock object framework and went to the following solution to mock &lt;a href="http://msdn.microsoft.com/en-us/library/system.net.mail.smtpclient.aspx" target="_blank"&gt;SmtpClient&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;Capabilities of Rhino.Mock are to mock interfaces, delegates and virtual methods of classes!&lt;/p&gt;  &lt;p&gt;My goal was to test my MailService class which use &lt;a href="http://msdn.microsoft.com/en-us/library/system.net.mail.smtpclient.aspx" target="_blank"&gt;SmtpClient&lt;/a&gt; and in particular the method &lt;a href="http://msdn.microsoft.com/en-us/library/x5x13z6h.aspx" target="_blank"&gt;SendAsync&lt;/a&gt;, which is not a virtual method. SmtpClient inherit from System.Object so no way to use an interface for the unit test. &lt;/p&gt;  &lt;p&gt;Next step was then to make an interface, ISmtpClient, out of the SmtpClient of the .NET Framework using &lt;a href="http://www.aisto.com/roeder/dotnet/" target="_blank"&gt;Reflector for .Net&lt;/a&gt;. Then I modified the dependency of my MailService class from SmtpClient of the .NET framework to my interface ISmtpClient.&lt;/p&gt;  &lt;div style="font-weight: bold; font-size: 10pt; background: black; color: white; font-family: consolas"&gt;   &lt;p style="margin: 0px"&gt;&lt;span style="color: #cc7832"&gt;using&lt;/span&gt; System.Net;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: #cc7832"&gt;using&lt;/span&gt; System.Net.Mail;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: #cc7832"&gt;using&lt;/span&gt; System.Security.Cryptography.X509Certificates;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: #cc7832"&gt;using&lt;/span&gt; System.Security.Permissions;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: #cc7832"&gt;namespace&lt;/span&gt; TechHeadBrothers.Portal.Services.Mail&lt;/p&gt;    &lt;p style="margin: 0px"&gt;{&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: #cc7832"&gt;public&lt;/span&gt; &lt;span style="color: #cc7832"&gt;interface&lt;/span&gt; &lt;span style="color: #6897bb"&gt;ISmtpClient&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160; {&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: gray"&gt;// Events&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: #cc7832"&gt;event&lt;/span&gt; &lt;span style="color: #6897bb"&gt;SendCompletedEventHandler&lt;/span&gt; SendCompleted;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: gray"&gt;// Properties&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: #ffc66d"&gt;X509CertificateCollection&lt;/span&gt; ClientCertificates { &lt;span style="color: #cc7832"&gt;get&lt;/span&gt;; }&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: #6897bb"&gt;ICredentialsByHost&lt;/span&gt; Credentials { &lt;span style="color: #cc7832"&gt;get&lt;/span&gt;; &lt;span style="color: #cc7832"&gt;set&lt;/span&gt;; }&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: #6897bb"&gt;SmtpDeliveryMethod&lt;/span&gt; DeliveryMethod { &lt;span style="color: #cc7832"&gt;get&lt;/span&gt;; &lt;span style="color: #cc7832"&gt;set&lt;/span&gt;; }&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: #cc7832"&gt;bool&lt;/span&gt; EnableSsl { &lt;span style="color: #cc7832"&gt;get&lt;/span&gt;; &lt;span style="color: #cc7832"&gt;set&lt;/span&gt;; }&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: #cc7832"&gt;string&lt;/span&gt; Host { &lt;span style="color: #cc7832"&gt;get&lt;/span&gt;; &lt;span style="color: #cc7832"&gt;set&lt;/span&gt;; }&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: #cc7832"&gt;string&lt;/span&gt; PickupDirectoryLocation { &lt;span style="color: #cc7832"&gt;get&lt;/span&gt;; &lt;span style="color: #cc7832"&gt;set&lt;/span&gt;; }&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: #cc7832"&gt;int&lt;/span&gt; Port { &lt;span style="color: #cc7832"&gt;get&lt;/span&gt;; &lt;span style="color: #cc7832"&gt;set&lt;/span&gt;; }&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: #ffc66d"&gt;ServicePoint&lt;/span&gt; ServicePoint { &lt;span style="color: #cc7832"&gt;get&lt;/span&gt;; }&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: #cc7832"&gt;int&lt;/span&gt; Timeout { &lt;span style="color: #cc7832"&gt;get&lt;/span&gt;; &lt;span style="color: #cc7832"&gt;set&lt;/span&gt;; }&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: #cc7832"&gt;bool&lt;/span&gt; UseDefaultCredentials { &lt;span style="color: #cc7832"&gt;get&lt;/span&gt;; &lt;span style="color: #cc7832"&gt;set&lt;/span&gt;; }&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: gray"&gt;// Methods&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: #cc7832"&gt;void&lt;/span&gt; Send(&lt;span style="color: #ffc66d"&gt;MailMessage&lt;/span&gt; message);&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: #cc7832"&gt;void&lt;/span&gt; Send(&lt;span style="color: #cc7832"&gt;string&lt;/span&gt; from, &lt;span style="color: #cc7832"&gt;string&lt;/span&gt; recipients, &lt;span style="color: #cc7832"&gt;string&lt;/span&gt; subject, &lt;span style="color: #cc7832"&gt;string&lt;/span&gt; body);&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; [&lt;span style="color: #ffc66d"&gt;HostProtection&lt;/span&gt;(&lt;span style="color: #6897bb"&gt;SecurityAction&lt;/span&gt;&lt;span style="font-weight: normal"&gt;.LinkDemand, ExternalThreading = &lt;/span&gt;&lt;span style="color: #cc7832"&gt;true&lt;/span&gt;)]&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: #cc7832"&gt;void&lt;/span&gt; SendAsync(&lt;span style="color: #ffc66d"&gt;MailMessage&lt;/span&gt; message, &lt;span style="color: #cc7832"&gt;object&lt;/span&gt; userToken);&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; [&lt;span style="color: #ffc66d"&gt;HostProtection&lt;/span&gt;(&lt;span style="color: #6897bb"&gt;SecurityAction&lt;/span&gt;&lt;span style="font-weight: normal"&gt;.LinkDemand, ExternalThreading = &lt;/span&gt;&lt;span style="color: #cc7832"&gt;true&lt;/span&gt;)]&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: #cc7832"&gt;void&lt;/span&gt; SendAsync(&lt;span style="color: #cc7832"&gt;string&lt;/span&gt; from, &lt;span style="color: #cc7832"&gt;string&lt;/span&gt; recipients, &lt;span style="color: #cc7832"&gt;string&lt;/span&gt; subject, &lt;span style="color: #cc7832"&gt;string&lt;/span&gt; body, &lt;span style="color: #cc7832"&gt;object&lt;/span&gt; userToken);&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: #cc7832"&gt;void&lt;/span&gt; SendAsyncCancel();&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160; }&lt;/p&gt;    &lt;p style="margin: 0px"&gt;}&lt;/p&gt; &lt;/div&gt;  &lt;p&gt;Then I wrote the class SmtpClientProxy. It is based on the &lt;a href="http://en.wikipedia.org/wiki/Proxy_pattern" target="_blank"&gt;design pattern Proxy&lt;/a&gt;. So it basically maintains a reference, and controls access, to the real SmtpClient so it can be used in place of the real SmtpClient.&lt;/p&gt;  &lt;div style="font-weight: bold; font-size: 10pt; background: black; color: white; font-family: consolas"&gt;   &lt;p style="margin: 0px"&gt;&lt;span style="color: #cc7832"&gt;namespace&lt;/span&gt; TechHeadBrothers.Portal.Services.Mail&lt;/p&gt;    &lt;p style="margin: 0px"&gt;{&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: #cc7832"&gt;public&lt;/span&gt; &lt;span style="color: #cc7832"&gt;class&lt;/span&gt; &lt;span style="color: #ffc66d"&gt;SmtpClientProxy&lt;/span&gt; : &lt;span style="color: #6897bb"&gt;ISmtpClient&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160; {&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: #cc7832"&gt;private&lt;/span&gt; &lt;span style="color: #cc7832"&gt;readonly&lt;/span&gt; &lt;span style="color: #ffc66d"&gt;SmtpClient&lt;/span&gt; smtpClient;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: #cc7832"&gt;public&lt;/span&gt; SmtpClientProxy()&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; smtpClient = &lt;span style="color: #cc7832"&gt;new&lt;/span&gt; &lt;span style="color: #ffc66d"&gt;SmtpClient&lt;/span&gt;();&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; smtpClient.SendCompleted += smtpClient_SendCompleted;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: #da4832"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; #region&lt;/span&gt; ISmtpClient Members&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: #cc7832"&gt;public&lt;/span&gt; &lt;span style="color: #cc7832"&gt;event&lt;/span&gt; &lt;span style="color: #6897bb"&gt;SendCompletedEventHandler&lt;/span&gt; SendCompleted;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: #cc7832"&gt;public&lt;/span&gt; &lt;span style="color: #ffc66d"&gt;X509CertificateCollection&lt;/span&gt; ClientCertificates&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: #cc7832"&gt;get&lt;/span&gt; { &lt;span style="color: #cc7832"&gt;return&lt;/span&gt; smtpClient.ClientCertificates; }&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: #cc7832"&gt;public&lt;/span&gt; &lt;span style="color: #6897bb"&gt;ICredentialsByHost&lt;/span&gt; Credentials&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: #cc7832"&gt;get&lt;/span&gt; { &lt;span style="color: #cc7832"&gt;return&lt;/span&gt; smtpClient.Credentials; }&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: #cc7832"&gt;set&lt;/span&gt; { smtpClient.Credentials = &lt;span style="color: #cc7832"&gt;value&lt;/span&gt;; }&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }&lt;/p&gt; &lt;/div&gt;  &lt;p&gt;Finally my MailService class with the dependency injection of ISmtpClient interface and a default constructor using my SmtpClientProxy :&lt;/p&gt;  &lt;div style="font-weight: bold; font-size: 10pt; background: black; color: white; font-family: consolas"&gt;   &lt;p style="margin: 0px"&gt;&lt;span style="color: #cc7832"&gt;namespace&lt;/span&gt; TechHeadBrothers.Portal.Services.Mail&lt;/p&gt;    &lt;p style="margin: 0px"&gt;{&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: gray"&gt;///&lt;/span&gt;&lt;span style="color: green"&gt; &lt;/span&gt;&lt;span style="color: gray"&gt;&amp;lt;summary&amp;gt;&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: gray"&gt;///&lt;/span&gt;&lt;span style="color: green"&gt; Service to deliver Emails&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: gray"&gt;///&lt;/span&gt;&lt;span style="color: green"&gt; &lt;/span&gt;&lt;span style="color: gray"&gt;&amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: #cc7832"&gt;public&lt;/span&gt; &lt;span style="color: #cc7832"&gt;class&lt;/span&gt; &lt;span style="color: #ffc66d"&gt;MailService&lt;/span&gt; : &lt;span style="color: #6897bb"&gt;IMailService&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160; {&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: #cc7832"&gt;private&lt;/span&gt; &lt;span style="color: #cc7832"&gt;readonly&lt;/span&gt; &lt;span style="color: #6897bb"&gt;ISmtpClient&lt;/span&gt; smtpClient;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: #cc7832"&gt;public&lt;/span&gt; MailService() : &lt;span style="color: #cc7832"&gt;this&lt;/span&gt;(&lt;span style="color: #cc7832"&gt;new&lt;/span&gt; &lt;span style="color: #ffc66d"&gt;SmtpClientProxy&lt;/span&gt;())&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: #cc7832"&gt;public&lt;/span&gt; MailService(&lt;span style="color: #6897bb"&gt;ISmtpClient&lt;/span&gt; smtpClient)&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: #cc7832"&gt;this&lt;/span&gt;&lt;span style="font-weight: normal"&gt;.smtpClient = smtpClient;&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }&lt;/p&gt; &lt;/div&gt;  &lt;p&gt;In my unit test I will use the constructor in which I can specify the mock of ISmtpClient, otherwise I will use the default constructor.&lt;/p&gt;  &lt;p&gt;So that was for the first issue; having the possibility to mock SmtpClient. Now you certainly have realized the second issue that popped up. In my ISmtpClient I have one event:&lt;/p&gt;  &lt;div style="font-weight: bold; font-size: 10pt; background: black; color: white; font-family: consolas"&gt;   &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: #cc7832"&gt;public&lt;/span&gt; &lt;span style="color: #cc7832"&gt;interface&lt;/span&gt; &lt;span style="color: #6897bb"&gt;ISmtpClient&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160; {&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: gray"&gt;// Events&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: #cc7832"&gt;event&lt;/span&gt; &lt;span style="color: #6897bb"&gt;SendCompletedEventHandler&lt;/span&gt; SendCompleted;&lt;/p&gt; &lt;/div&gt;  &lt;p&gt;This event is for sure also in my proxy class, SmtpClientProxy as it inherit form ISmtpClient. In the constructor of SmtpClientProxy I add an event handler on the SendCompleted event of the SmtpClient. This event handler just fires the event exposed by the proxy class, so that I can have an event handler in MailService class to handle the SendComplete event.&lt;/p&gt;  &lt;div style="font-weight: bold; font-size: 10pt; background: black; color: white; font-family: consolas"&gt;   &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: #cc7832"&gt;private&lt;/span&gt; &lt;span style="color: #cc7832"&gt;void&lt;/span&gt; smtpClient_SendCompleted(&lt;span style="color: #cc7832"&gt;object&lt;/span&gt; sender, &lt;span style="color: #ffc66d"&gt;AsyncCompletedEventArgs&lt;/span&gt; e)&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: #cc7832"&gt;if&lt;/span&gt; (SendCompleted != &lt;span style="color: #cc7832"&gt;null&lt;/span&gt;)&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; SendCompleted(sender, e);&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }&lt;/p&gt; &lt;/div&gt;  &lt;p&gt;Nothing really special. But now the question rise! I need to mock ISmtpClient in my unit test. But my MailService SendMailMessage method call the SmtpClient.SendAsync method and also add an event handler to SmtpClient.SendCompleted event.&lt;/p&gt;  &lt;div style="font-weight: bold; font-size: 10pt; background: black; color: white; font-family: consolas"&gt;   &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: gray"&gt;///&lt;/span&gt;&lt;span style="color: green"&gt; &lt;/span&gt;&lt;span style="color: gray"&gt;&amp;lt;summary&amp;gt;&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: gray"&gt;///&lt;/span&gt;&lt;span style="color: green"&gt; Sends a MailMessage object using the SMTP settings.&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: gray"&gt;///&lt;/span&gt;&lt;span style="color: green"&gt; &lt;/span&gt;&lt;span style="color: gray"&gt;&amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: gray"&gt;///&lt;/span&gt;&lt;span style="color: green"&gt; &lt;/span&gt;&lt;span style="color: gray"&gt;&amp;lt;param name=&amp;quot;mailMessage&amp;quot;&amp;gt;&lt;/span&gt;&lt;span style="color: green"&gt;Email message to be sent&lt;/span&gt;&lt;span style="color: gray"&gt;&amp;lt;/param&amp;gt;&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: #cc7832"&gt;public&lt;/span&gt; &lt;span style="color: #cc7832"&gt;void&lt;/span&gt; SendMailMessage(&lt;span style="color: #ffc66d"&gt;MailMessage&lt;/span&gt; mailMessage)&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: #cc7832"&gt;try&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; mailMessage.IsBodyHtml = &lt;span style="color: #cc7832"&gt;true&lt;/span&gt;;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; mailMessage.BodyEncoding = &lt;span style="color: #ffc66d"&gt;Encoding&lt;/span&gt;&lt;span style="font-weight: normal"&gt;.UTF8;&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: #cc7832"&gt;this&lt;/span&gt;&lt;span style="font-weight: normal"&gt;.message = mailMessage;&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; smtpClient.SendCompleted += smtpClient_SendCompleted;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; smtpClient.SendAsync(mailMessage, &lt;span style="color: #cc7832"&gt;null&lt;/span&gt;);&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: #cc7832"&gt;catch&lt;/span&gt; (&lt;span style="color: #ffc66d"&gt;SmtpException&lt;/span&gt;)&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: #cc7832"&gt;this&lt;/span&gt;&lt;span style="font-weight: normal"&gt;.OnEmailFailed(mailMessage);&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: #cc7832"&gt;private&lt;/span&gt; &lt;span style="color: #cc7832"&gt;void&lt;/span&gt; smtpClient_SendCompleted(&lt;span style="color: #cc7832"&gt;object&lt;/span&gt; sender, &lt;span style="color: #ffc66d"&gt;AsyncCompletedEventArgs&lt;/span&gt; e)&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: #cc7832"&gt;this&lt;/span&gt;&lt;span style="font-weight: normal"&gt;.OnEmailSent(message);&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }&lt;/p&gt; &lt;/div&gt;  &lt;p&gt;In my mock then I need to have the same thing happening, even if I mock the interface ISmtpClient.&lt;/p&gt;  &lt;p&gt;Here is the solution I came to:&lt;/p&gt;  &lt;div style="font-weight: bold; font-size: 10pt; background: black; color: white; font-family: consolas"&gt;   &lt;p style="margin: 0px"&gt;&lt;span style="color: #cc7832"&gt;namespace&lt;/span&gt; TechHeadBrothers.Portal.Services.Tests.Mail&lt;/p&gt;    &lt;p style="margin: 0px"&gt;{&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160; [&lt;span style="color: #ffc66d"&gt;TestFixture&lt;/span&gt;]&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: #cc7832"&gt;public&lt;/span&gt; &lt;span style="color: #cc7832"&gt;class&lt;/span&gt; &lt;span style="color: #ffc66d"&gt;MailServiceTest&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160; {&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: #da4832"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; #region&lt;/span&gt; Setup/Teardown&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; [&lt;span style="color: #ffc66d"&gt;SetUp&lt;/span&gt;]&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: #cc7832"&gt;public&lt;/span&gt; &lt;span style="color: #cc7832"&gt;void&lt;/span&gt; SetUp()&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; mocks = &lt;span style="color: #cc7832"&gt;new&lt;/span&gt; &lt;span style="color: #ffc66d"&gt;MockRepository&lt;/span&gt;();&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&lt;span style="color: #da4832"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; #endregion&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: #cc7832"&gt;private&lt;/span&gt; &lt;span style="color: #ffc66d"&gt;MockRepository&lt;/span&gt; mocks;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; [&lt;span style="color: #ffc66d"&gt;Test&lt;/span&gt;]&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: #cc7832"&gt;public&lt;/span&gt; &lt;span style="color: #cc7832"&gt;void&lt;/span&gt; SendMailMessageRaiseEmailSentEvent()&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: #cc7832"&gt;bool&lt;/span&gt; emailSentRaised = &lt;span style="color: #cc7832"&gt;false&lt;/span&gt;;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: #cc7832"&gt;var&lt;/span&gt; message = &lt;span style="color: #cc7832"&gt;new&lt;/span&gt; &lt;span style="color: #ffc66d"&gt;MailMessage&lt;/span&gt;(&lt;span style="color: #a5c25c"&gt;&amp;quot;lk@test.com&amp;quot;&lt;/span&gt;, &lt;span style="color: #a5c25c"&gt;&amp;quot;mk@test.com&amp;quot;&lt;/span&gt;);&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: #cc7832"&gt;var&lt;/span&gt; smtpClient = mocks.Stub&amp;lt;&lt;span style="color: #6897bb"&gt;ISmtpClient&lt;/span&gt;&lt;span style="font-weight: normal"&gt;&amp;gt;();&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: #cc7832"&gt;var&lt;/span&gt; mailService = &lt;span style="color: #cc7832"&gt;new&lt;/span&gt; &lt;span style="color: #ffc66d"&gt;MailService&lt;/span&gt;(smtpClient);&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; mailService.EmailSent += ((sender, e) =&amp;gt; { emailSentRaised = &lt;span style="color: #cc7832"&gt;true&lt;/span&gt;; });&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: #cc7832"&gt;using&lt;/span&gt; (mocks.Record())&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: #cc7832"&gt;var&lt;/span&gt; raiser = &lt;span style="color: #ffc66d"&gt;Expect&lt;/span&gt;&lt;span style="font-weight: normal"&gt;.Call(() =&amp;gt; smtpClient.SendCompleted += &lt;/span&gt;&lt;span style="color: #cc7832"&gt;null&lt;/span&gt;)&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; .IgnoreArguments().GetEventRaiser();&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: #ffc66d"&gt;Expect&lt;/span&gt;&lt;span style="font-weight: normal"&gt;.Call(() =&amp;gt; smtpClient.SendAsync(message, &lt;/span&gt;&lt;span style="color: #cc7832"&gt;null&lt;/span&gt;))&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; .Do((&lt;span style="color: #6897bb"&gt;Action&lt;/span&gt;&lt;span style="font-weight: normal"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #ffc66d"&gt;MailMessage&lt;/span&gt;, &lt;span style="color: #cc7832"&gt;object&lt;/span&gt;&lt;span style="font-weight: normal"&gt;&amp;gt;) ((arg1, arg2) =&amp;gt; raiser.Raise(message, &lt;/span&gt;&lt;span style="color: #cc7832"&gt;null&lt;/span&gt;)));&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: #cc7832"&gt;using&lt;/span&gt; (mocks.Playback())&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; mailService.SendMailMessage(message);&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: #ffc66d"&gt;Assert&lt;/span&gt;&lt;span style="font-weight: normal"&gt;.That(emailSentRaised, &lt;/span&gt;&lt;span style="color: #ffc66d"&gt;Is&lt;/span&gt;&lt;span style="font-weight: normal"&gt;.EqualTo(&lt;/span&gt;&lt;span style="color: #cc7832"&gt;true&lt;/span&gt;));&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }&lt;/p&gt;    &lt;p style="margin: 0px"&gt;&amp;#160;&amp;#160;&amp;#160; }&lt;/p&gt;    &lt;p style="margin: 0px"&gt;}&lt;/p&gt; &lt;/div&gt;  &lt;p&gt;I create a mock of the interface ISmtpClient. Then I inject this mock into my MailService class. I create a event handler for my MailService.EmailSent event using a lambda. This lambda, if called, will change the boolean value emailSentRaised from false to true. This exactly what I want to test in that unit test; that the EmailSent event is raised.&lt;/p&gt;  &lt;p&gt;Then I get raiser object, a Rhino Mock &lt;a href="http://www.ayende.com/wiki/Rhino+Mocks+IEventRaiser.ashx" target="_blank"&gt;IEventRaiser&lt;/a&gt;, from smtpClient.SendCompleted event.&lt;/p&gt;  &lt;p&gt;Finally I set an expectation on smtpClient.SendAsync method adding a &lt;a href="http://www.ayende.com/wiki/Rhino+Mocks+The+Do()+Handler.ashx" target="_blank"&gt;Do() handler&lt;/a&gt; that will raise the SendCompleted event.&lt;/p&gt;  &lt;p&gt;Last point is using the mailService object, calling the SendMailMessage method and asserting that my boolean emailSentRaised went from false to true.&lt;/p&gt;  &lt;p&gt;And here is the result in &lt;a href="http://www.jetbrains.com/resharper" target="_blank"&gt;ReSharper&lt;/a&gt; Unit Test Session window. Green!&lt;/p&gt;  &lt;p&gt;&lt;img src="http://farm4.static.flickr.com/3251/2540010420_6643d7e119_o.png" /&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;u&gt;&lt;strong&gt;Update&lt;/strong&gt;&lt;/u&gt;: By the way, I forgot to add a link to a post from &lt;a href="http://haacked.com/articles/AboutHaacked.aspx" target="_blank"&gt;Phil Haack&lt;/a&gt; &amp;quot;&lt;a href="http://haacked.com/archive/2006/06/23/usingrhinomockstounittesteventsoninterfaces.aspx"&gt;Using Rhino Mocks To Unit Test Events on Interfaces&lt;/a&gt;&amp;quot; and another link to a post from &lt;a href="http://codebetter.com/blogs/jean-paul_boodhoo/default.aspx"&gt;Jean-Paul S. Boodhoo&lt;/a&gt; &amp;quot;&lt;a href="http://codebetter.com/blogs/jean-paul_boodhoo/archive/2007/05/07/raising-events-from-a-mock-using-rhino-mocks.aspx" target="_blank"&gt;Raising events (from a mock) using Rhino Mocks&lt;/a&gt;&amp;quot;. To great post to read!&lt;/p&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6238583" width="1" height="1"&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/lkempe?a=c7X8Mh"&gt;&lt;img src="http://feeds.feedburner.com/~f/lkempe?i=c7X8Mh" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/lkempe?a=WS2ORh"&gt;&lt;img src="http://feeds.feedburner.com/~f/lkempe?i=WS2ORh" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/lkempe/~4/302067658" height="1" width="1"/&gt;</description><category domain="http://weblogs.asp.net/lkempe/archive/tags/unit+test/default.aspx">unit test</category><category domain="http://weblogs.asp.net/lkempe/archive/tags/mock/default.aspx">mock</category><feedburner:origLink>http://weblogs.asp.net/lkempe/archive/2008/06/01/mocking-net-framework-smtpclient-class.aspx</feedburner:origLink></item><item><title>Two Great news from Silverlight Streaming!</title><link>http://feeds.feedburner.com/~r/lkempe/~3/301738226/two-great-news-from-silverlight-streaming.aspx</link><pubDate>Sat, 31 May 2008 07:39:42 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6236270</guid><dc:creator>lkempe</dc:creator><slash:comments>0</slash:comments><wfw:commentRss>http://weblogs.asp.net/lkempe/rsscomments.aspx?PostID=6236270</wfw:commentRss><comments>http://weblogs.asp.net/lkempe/archive/2008/05/31/two-great-news-from-silverlight-streaming.aspx#comments</comments><description>&lt;p&gt;First if you are using &lt;strong&gt;Silverlight 2 Beta 1&lt;/strong&gt;, you will be &lt;a href="http://dev.live.com/blogs/sls/archive/2008/05/30/317.aspx" target="_blank"&gt;able to upload your video with pause and resume&lt;/a&gt;. Second they finally deliver a &lt;a href="http://dev.live.com/blogs/sls/archive/2008/05/30/316.aspx" target="_blank"&gt;HTTP endpoint for videos hosted in Silverlight Streaming&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;We will make with Mathieu a great use of those two features soon :-)&lt;/p&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6236270" width="1" height="1"&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/lkempe?a=dXsdmh"&gt;&lt;img src="http://feeds.feedburner.com/~f/lkempe?i=dXsdmh" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/lkempe?a=EUa2Hh"&gt;&lt;img src="http://feeds.feedburner.com/~f/lkempe?i=EUa2Hh" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/lkempe/~4/301738226" height="1" width="1"/&gt;</description><category domain="http://weblogs.asp.net/lkempe/archive/tags/Silverlight/default.aspx">Silverlight</category><category domain="http://weblogs.asp.net/lkempe/archive/tags/Silverlight+Streaming/default.aspx">Silverlight Streaming</category><feedburner:origLink>http://weblogs.asp.net/lkempe/archive/2008/05/31/two-great-news-from-silverlight-streaming.aspx</feedburner:origLink></item></channel></rss>
