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

<channel>
	<title>Mark Harris &#187; .net</title>
	<atom:link href="http://www.markharris.net.au/blog/category/net/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.markharris.net.au/blog</link>
	<description>musings on Software Development</description>
	<lastBuildDate>Wed, 19 May 2010 12:58:25 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Service Broker &#8211; Some thoughts post hoc</title>
		<link>http://www.markharris.net.au/blog/2009/12/01/service-broker-some-thoughts-post-hoc/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=service-broker-some-thoughts-post-hoc</link>
		<comments>http://www.markharris.net.au/blog/2009/12/01/service-broker-some-thoughts-post-hoc/#comments</comments>
		<pubDate>Mon, 30 Nov 2009 15:22:24 +0000</pubDate>
		<dc:creator>Mark Harris</dc:creator>
				<category><![CDATA[.net]]></category>
		<category><![CDATA[Architecture]]></category>
		<category><![CDATA[NServiceBus]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[servicebroker]]></category>

		<guid isPermaLink="false">http://www.markharris.net.au/blog/?p=181</guid>
		<description><![CDATA[This post has been sitting in my drafts for a while. After my day today i felt that it was best that i put my thoughts about service broker down. In a project that i worked on about 2 years ago Service Broker was used as part of the system to perform data validation.&#160; If [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.markharris.net.au/blog/wp-content/uploads/2009/12/servicebroker.gif"><img style="border-bottom: 0px; border-left: 0px; display: inline; margin-left: 0px; border-top: 0px; margin-right: 0px; border-right: 0px" title="service broker" border="0" alt="sql service broker" align="left" src="http://www.markharris.net.au/blog/wp-content/uploads/2009/12/servicebroker_thumb.gif" width="178" height="167" /></a> </p>
<p>This post has been sitting in my drafts for a while. After my day today i felt that it was best that i put my thoughts about service broker down.    <br />In a project that i worked on about 2 years ago Service Broker was used as part of the system to perform data validation.&#160; If success was measured by the amount of time that a system has been in production without major issues then i can say that it was successful. </p>
<p>But if a system was to be judged by how much of a pain it is to maintain then l must say that its was not a <strike>glowing</strike> success. Below is a list of things that i found as good or bad about it. </p>
<p><strong>&#160;</strong></p>
<p><strong>Bad things</strong></p>
<ol>
<li>Limited information on the internet </li>
<li>Testing is extremely hard (compromises everywhere) </li>
<li>Troubleshooting is a pain </li>
<li>It could stop working and you may never know, (if using a fire and forget mechanism) </li>
<li>Poison messages disable queues (would have been nicer if it moved the message to a error queue) </li>
</ol>
<p><strong>Good things</strong></p>
<ol>
<li>Its Asynchronous </li>
<li>Its Asynchronous </li>
<li>Its Asynchronous </li>
</ol>
<p>Yes this list is one sided but true. The question that is important though is</p>
<p><strong>Would i use Service Broker again?</strong></p>
<p>The answer to that question is strangely YES. Only in very specific circumstances where system is ok with not having some data loss because of queue being disabled</p>
<p><strong>What would I use instead?</strong></p>
<p><strong><a href="http://www.nservicebus.com/" rel="tag">NServiceBus</a> </strong>of course. It provides an answer to all the negatives of service broker and is still asynchronous. </p>
<p><a href="http://www.addtoany.com/add_to/delicious?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2009%2F12%2F01%2Fservice-broker-some-thoughts-post-hoc%2F&amp;linkname=Service%20Broker%20%26%238211%3B%20Some%20thoughts%20post%20hoc" title="Delicious" rel="nofollow" target="_blank"><img src="http://www.markharris.net.au/blog/wp-content/plugins/add-to-any/icons/delicious.png" width="16" height="16" alt="Delicious"/></a> <a href="http://www.addtoany.com/add_to/google_reader?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2009%2F12%2F01%2Fservice-broker-some-thoughts-post-hoc%2F&amp;linkname=Service%20Broker%20%26%238211%3B%20Some%20thoughts%20post%20hoc" title="Google Reader" rel="nofollow" target="_blank"><img src="http://www.markharris.net.au/blog/wp-content/plugins/add-to-any/icons/reader.png" width="16" height="16" alt="Google Reader"/></a> <a href="http://www.addtoany.com/add_to/twitter?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2009%2F12%2F01%2Fservice-broker-some-thoughts-post-hoc%2F&amp;linkname=Service%20Broker%20%26%238211%3B%20Some%20thoughts%20post%20hoc" title="Twitter" rel="nofollow" target="_blank"><img src="http://www.markharris.net.au/blog/wp-content/plugins/add-to-any/icons/twitter.png" width="16" height="16" alt="Twitter"/></a> <a href="http://www.addtoany.com/add_to/facebook?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2009%2F12%2F01%2Fservice-broker-some-thoughts-post-hoc%2F&amp;linkname=Service%20Broker%20%26%238211%3B%20Some%20thoughts%20post%20hoc" title="Facebook" rel="nofollow" target="_blank"><img src="http://www.markharris.net.au/blog/wp-content/plugins/add-to-any/icons/facebook.png" width="16" height="16" alt="Facebook"/></a> <a href="http://www.addtoany.com/add_to/friendfeed?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2009%2F12%2F01%2Fservice-broker-some-thoughts-post-hoc%2F&amp;linkname=Service%20Broker%20%26%238211%3B%20Some%20thoughts%20post%20hoc" title="FriendFeed" rel="nofollow" target="_blank"><img src="http://www.markharris.net.au/blog/wp-content/plugins/add-to-any/icons/friendfeed.png" width="16" height="16" alt="FriendFeed"/></a> <a href="http://www.addtoany.com/add_to/linkedin?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2009%2F12%2F01%2Fservice-broker-some-thoughts-post-hoc%2F&amp;linkname=Service%20Broker%20%26%238211%3B%20Some%20thoughts%20post%20hoc" title="LinkedIn" rel="nofollow" target="_blank"><img src="http://www.markharris.net.au/blog/wp-content/plugins/add-to-any/icons/linkedin.png" width="16" height="16" alt="LinkedIn"/></a> <a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2009%2F12%2F01%2Fservice-broker-some-thoughts-post-hoc%2F&amp;linkname=Service%20Broker%20%26%238211%3B%20Some%20thoughts%20post%20hoc">Share/Save</a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.markharris.net.au/blog/2009/12/01/service-broker-some-thoughts-post-hoc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Testing Message Handlers with NServiceBus</title>
		<link>http://www.markharris.net.au/blog/2009/09/27/testing-message-handlers-with-nservicebus/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=testing-message-handlers-with-nservicebus</link>
		<comments>http://www.markharris.net.au/blog/2009/09/27/testing-message-handlers-with-nservicebus/#comments</comments>
		<pubDate>Sun, 27 Sep 2009 10:12:00 +0000</pubDate>
		<dc:creator>Mark Harris</dc:creator>
				<category><![CDATA[.net]]></category>
		<category><![CDATA[NServiceBus]]></category>
		<category><![CDATA[Unit Testing]]></category>
		<category><![CDATA[Rhino Mocks]]></category>

		<guid isPermaLink="false">http://www.markharris.net.au/blog/?p=110</guid>
		<description><![CDATA[One of the great things that NServiceBus ships with is a dll called “NServiceBus.Testing” which provides us with the ability to easily test your sagas. This enables us to move forward with greater confidence in knowing that the code that we have written will function as expected when we move the code into integration testing [...]]]></description>
			<content:encoded><![CDATA[<p>One of the great things that <a href="http://www.nservicebus.com/" rel="tag">NServiceBus</a> ships with is a dll called “NServiceBus.Testing” which provides us with the ability to easily test your <a href="http://www.udidahan.com/2009/04/20/saga-persistence-and-event-driven-architectures/" target="_blank">sagas</a>. This enables us to move forward with greater confidence in knowing that the code that we have written will function as expected when we move the code into integration testing and then production.&#160; Most of what i talk about here is in direct reference the <a href="http://www.udidahan.com/2009/02/07/nservicebus-19/" target="_blank">1.9 release of NServiceBus</a>. If you have not seen how Saga’s are unit tested in NServiceBus have a read of <a href="http://tech.groups.yahoo.com/group/nservicebus/message/208" target="_blank">Udi’s post on the forum</a>. This post however is about how to test a Plain old Message Handler.</p>
<p>Let us being with looking at a sample handler.</p>
<div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &quot;Courier New&quot;, courier, monospace; direction: ltr; height: 234px; max-height: 250px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper">
<div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &quot;Courier New&quot;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet">
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &quot;Courier New&quot;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum1">   1:</span> <span style="color: #0000ff">public</span> <span style="color: #0000ff">class</span> FileProcessMessageHandler:IMessageHandler&lt;ProcessFileMessage&gt;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &quot;Courier New&quot;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum2">   2:</span> {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &quot;Courier New&quot;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum3">   3:</span>     <span style="color: #0000ff">public</span> IBus Bus { get; set; }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &quot;Courier New&quot;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum4">   4:</span>     <span style="color: #0000ff">public</span> IFileProcessor FileProcessor {get;set;}</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &quot;Courier New&quot;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum5">   5:</span>     <span style="color: #0000ff">public</span> <span style="color: #0000ff">void</span> Handle(ProcessFileMessage message)</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &quot;Courier New&quot;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum6">   6:</span>     {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &quot;Courier New&quot;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum7">   7:</span>         <span style="color: #0000ff">if</span> (FileProcessor.Run(message.FileIdentfier,message.FileSystemLocation))</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &quot;Courier New&quot;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum8">   8:</span>         {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &quot;Courier New&quot;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum9">   9:</span>             var msg = Bus.CreateInstance&lt;FileProcessedMessage&gt;(m =&gt; {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &quot;Courier New&quot;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum10">  10:</span>                                  m.FileIdentifier = message.FileIdentfier; });</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &quot;Courier New&quot;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum11">  11:</span>             Bus.Publish(msg);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &quot;Courier New&quot;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum12">  12:</span>         }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &quot;Courier New&quot;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum13">  13:</span>         <span style="color: #0000ff">else</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &quot;Courier New&quot;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum14">  14:</span>         {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &quot;Courier New&quot;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum15">  15:</span>             Bus.Publish&lt;UnknownFileTypeMessage&gt;(m =&gt; { </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &quot;Courier New&quot;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum16">  16:</span>                                 m.FileIdentifer = message.FileIdentfier; });</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &quot;Courier New&quot;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum17">  17:</span>         }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &quot;Courier New&quot;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum18">  18:</span>     }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &quot;Courier New&quot;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum19">  19:</span> }</pre>
<p><!--CRLF--></div>
</div>
<p>This code in and of itself is highly testable. We have two interfaces that are injected into the class, excellent candidates for a mock. However when i first started down this path my first inclination was to use a manual mock, before moving on to trying to use Moq, however after spending time the fluent saga testing API in NServiceBus I realized that it was what was needed in this situation a MockBus.</p>
<p>MockBus is essentially the same as what is in the NServiceBus.Testing library. However because that version is geared towards testing sagas, it required changing the way the Saga class was created, and to allow for creating a version that would work with message handler. The new structure looks like the class diagram below.</p>
<p>&#160;</p>
<p><a href="http://www.markharris.net.au/blog/wp-content/uploads/2009/09/NServiceBusTestingClassDiagram.png" target="_blank"><img style="border-bottom: 0px; border-left: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px" title="NServiceBus Testing Class Diagram" border="0" alt="NServiceBus Testing Class Diagram" src="http://www.markharris.net.au/blog/wp-content/uploads/2009/09/NServiceBusTestingClassDiagram_thumb.png" width="463" height="398" /></a></p>
<p>&#160;</p>
<p>What Changed</p>
<ol>
<li>The Saga class has become the MockBus class and no longer has the static method called Test() which created the Saga instance.</li>
<li>The MockBusForSaga has the method CreateInstance&lt;T&gt; which replaces the Test() method in the old Saga class.</li>
<li>Introduced a MockBusForMessageHandler which has a CreateInstance&lt;T,TK&gt;() method that creates the message handler.</li>
</ol>
<p>Having this structure now enables us to write our tests for our message handlers very simply in a fashion that does not require to understand Rhino Mocks, though having a understanding of the errors you get from the mock bus is important as all the messages that are bubbled out are Rhino Mock Messages.</p>
<div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &quot;Courier New&quot;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper">
<div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &quot;Courier New&quot;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet">
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &quot;Courier New&quot;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum1">   1:</span> [Test]</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &quot;Courier New&quot;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum2">   2:</span> <span style="color: #0000ff">public</span> <span style="color: #0000ff">void</span> when_file_processor_succeds_message_handler_will_publish_a_file_processed_message()</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &quot;Courier New&quot;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum3">   3:</span> {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &quot;Courier New&quot;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum4">   4:</span>     FileProcessMessageHandler msgHandler;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &quot;Courier New&quot;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum5">   5:</span>     var mock_bus = MockBusForMessageHandler.CreateInstance</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &quot;Courier New&quot;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum6">   6:</span>                             &lt;FileProcessMessageHandler,ProcessFileMessage&gt;(<span style="color: #0000ff">out</span> msgHandler);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &quot;Courier New&quot;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum7">   7:</span>     var fileID = Guid.NewGuid();</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &quot;Courier New&quot;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum8">   8:</span>     msgHandler.FileProcessor = SetupAndReturnFileProcessor(<span style="color: #0000ff">true</span>);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &quot;Courier New&quot;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum9">   9:</span>     mock_bus.ExpectPublish&lt;FileProcessedMessage&gt;(d =&gt; d.FileIdentifier == fileID)</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &quot;Courier New&quot;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum10">  10:</span>         .When(() =&gt; msgHandler.Handle(CreateProcessFileRequest(fileID)));</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &quot;Courier New&quot;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum11">  11:</span> }</pre>
<p><!--CRLF--></div>
</div>
<p>&#160;</p>
<p>Lets have a look&#160; when make a call to CreateInstance&lt;FileProcessMessageHandler,ProcessFileMessage&gt;(out msgHandler)</p>
<div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &quot;Courier New&quot;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper">
<div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &quot;Courier New&quot;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet">
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &quot;Courier New&quot;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum1">   1:</span> <span style="color: #0000ff">public</span> <span style="color: #0000ff">static</span> MockBusForMessageHandler CreateInstance&lt;T, TK&gt;(<span style="color: #0000ff">out</span> T handler)</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &quot;Courier New&quot;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum2">   2:</span> <span style="color: #0000ff">where</span> TK : IMessage</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &quot;Courier New&quot;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum3">   3:</span> <span style="color: #0000ff">where</span> T : IMessageHandler&lt;TK&gt;, <span style="color: #0000ff">new</span>()</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &quot;Courier New&quot;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum4">   4:</span> {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &quot;Courier New&quot;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum5">   5:</span>     handler = (T) Activator.CreateInstance(<span style="color: #0000ff">typeof</span> (T));</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &quot;Courier New&quot;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum6">   6:</span>     var mocks = <span style="color: #0000ff">new</span> MockRepository();</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &quot;Courier New&quot;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum7">   7:</span>     var bus = mocks.DynamicMock&lt;IBus&gt;();</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &quot;Courier New&quot;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum8">   8:</span>     <span style="color: #0000ff">try</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &quot;Courier New&quot;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum9">   9:</span>     {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &quot;Courier New&quot;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum10">  10:</span>         <span style="color: #0000ff">typeof</span> (T).GetProperty(“Bus”, BindingFlags.Instance | BindingFlags.Public)</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &quot;Courier New&quot;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum11">  11:</span>             .SetValue(handler, bus, <span style="color: #0000ff">null</span>);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &quot;Courier New&quot;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum12">  12:</span>     }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &quot;Courier New&quot;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum13">  13:</span>     <span style="color: #0000ff">catch</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &quot;Courier New&quot;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum14">  14:</span>     {<span style="color: #008000">/**swallow if they dont have a Bus defined in the class**/</span>}</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &quot;Courier New&quot;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum15">  15:</span>     List&lt;Type&gt; typesToMap;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &quot;Courier New&quot;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum16">  16:</span>     MessageMapper mapper = GetMapperAndInitialize(<span style="color: #0000ff">out</span> typesToMap);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &quot;Courier New&quot;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum17">  17:</span>     <span style="color: #0000ff">return</span> <span style="color: #0000ff">new</span> MockBusForMessageHandler(mocks, bus, mapper, typesToMap);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &quot;Courier New&quot;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum18">  18:</span> }</pre>
<p><!--CRLF--></div>
</div>
<p>The beauty in this code is all hidden away in the MockBus (aka NServiceBus.Testing.Saga) thank you <a href="http://www.udidahan.com">Udi</a> for this,</p>
<p>The bus is instantiated when the object is created however no expectations are recorded until the When() method is called in the test just before the delegate is run. Once the delegate is run you will get the callbacks to the ExpectPublish where you can assert that not only did you get the correct type of message but the contents as well.</p>
<p>The code for this is available on the <a href="http://www.markharris.net.au/blog/downloads/" rel="tag" target="_blank">downloads page</a> or go to it <a href="http://www.markharris.net.au/blog/downloads/?did=1" target="_blank">NServiceBus.Extensions.Testing download here</a></p>
<p><a href="http://www.addtoany.com/add_to/delicious?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2009%2F09%2F27%2Ftesting-message-handlers-with-nservicebus%2F&amp;linkname=Testing%20Message%20Handlers%20with%20NServiceBus" title="Delicious" rel="nofollow" target="_blank"><img src="http://www.markharris.net.au/blog/wp-content/plugins/add-to-any/icons/delicious.png" width="16" height="16" alt="Delicious"/></a> <a href="http://www.addtoany.com/add_to/google_reader?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2009%2F09%2F27%2Ftesting-message-handlers-with-nservicebus%2F&amp;linkname=Testing%20Message%20Handlers%20with%20NServiceBus" title="Google Reader" rel="nofollow" target="_blank"><img src="http://www.markharris.net.au/blog/wp-content/plugins/add-to-any/icons/reader.png" width="16" height="16" alt="Google Reader"/></a> <a href="http://www.addtoany.com/add_to/twitter?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2009%2F09%2F27%2Ftesting-message-handlers-with-nservicebus%2F&amp;linkname=Testing%20Message%20Handlers%20with%20NServiceBus" title="Twitter" rel="nofollow" target="_blank"><img src="http://www.markharris.net.au/blog/wp-content/plugins/add-to-any/icons/twitter.png" width="16" height="16" alt="Twitter"/></a> <a href="http://www.addtoany.com/add_to/facebook?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2009%2F09%2F27%2Ftesting-message-handlers-with-nservicebus%2F&amp;linkname=Testing%20Message%20Handlers%20with%20NServiceBus" title="Facebook" rel="nofollow" target="_blank"><img src="http://www.markharris.net.au/blog/wp-content/plugins/add-to-any/icons/facebook.png" width="16" height="16" alt="Facebook"/></a> <a href="http://www.addtoany.com/add_to/friendfeed?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2009%2F09%2F27%2Ftesting-message-handlers-with-nservicebus%2F&amp;linkname=Testing%20Message%20Handlers%20with%20NServiceBus" title="FriendFeed" rel="nofollow" target="_blank"><img src="http://www.markharris.net.au/blog/wp-content/plugins/add-to-any/icons/friendfeed.png" width="16" height="16" alt="FriendFeed"/></a> <a href="http://www.addtoany.com/add_to/linkedin?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2009%2F09%2F27%2Ftesting-message-handlers-with-nservicebus%2F&amp;linkname=Testing%20Message%20Handlers%20with%20NServiceBus" title="LinkedIn" rel="nofollow" target="_blank"><img src="http://www.markharris.net.au/blog/wp-content/plugins/add-to-any/icons/linkedin.png" width="16" height="16" alt="LinkedIn"/></a> <a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2009%2F09%2F27%2Ftesting-message-handlers-with-nservicebus%2F&amp;linkname=Testing%20Message%20Handlers%20with%20NServiceBus">Share/Save</a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.markharris.net.au/blog/2009/09/27/testing-message-handlers-with-nservicebus/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Introducing Fluent WCF</title>
		<link>http://www.markharris.net.au/blog/2009/03/31/introducing-fluent-wcf/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=introducing-fluent-wcf</link>
		<comments>http://www.markharris.net.au/blog/2009/03/31/introducing-fluent-wcf/#comments</comments>
		<pubDate>Tue, 31 Mar 2009 01:20:14 +0000</pubDate>
		<dc:creator>Mark Harris</dc:creator>
				<category><![CDATA[.net]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[WCF]]></category>
		<category><![CDATA[Fluent WCF]]></category>

		<guid isPermaLink="false">http://www.markharris.net.au/blog/2009/03/31/introducing-fluent-wcf/</guid>
		<description><![CDATA[About 2 weeks ago Simon and I started to work on building a fluent interface to configure WCF. Our main aim in doing so is to cover the the scenarios of configuring Services and Clients 80% (or 20%) of the time. Our goals at this stage are Services over Basic HTTP or TCP Either No [...]]]></description>
			<content:encoded><![CDATA[<p>About 2 weeks ago Simon and I started to work on building a <a href="http://www.simonsegal.net/blog/2009/03/15/if-i-had-a-fluent-interface-for-wcf-configuration-i-would/">fluent interface to configure WCF</a>. Our main aim in doing so is to cover the the scenarios of configuring Services and Clients 80% (or 20%) of the time.</p>
<p>Our goals at this stage are</p>
<ol>
<li>Services over Basic HTTP or TCP</li>
<li>Either No Security and Windows Transport Security</li>
<li>No message level Security</li>
<li>Include Service Meta Data</li>
</ol>
<p>What this should enable us to do on the Service Host end would look like</p>
<div id="scid:57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:c2bd230d-a20b-4300-a108-f882edaf933b" class="wlWriterEditableSmartContent" style="padding: 0px; width: 322px; display: block; float: none; margin-left: auto; margin-right: auto;">
<pre style="background-color:#FFFFFF;overflow: auto;"><span style="color: #000000;">var host </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #0000FF;">new</span><span style="color: #000000;"> WCFHost()
        .AtAddress(</span><span style="color: #800000;">"</span><span style="color: #800000;">http://localhost:8080/</span><span style="color: #800000;">"</span><span style="color: #000000;">)
        .UsingContract(</span><span style="color: #0000FF;">typeof</span><span style="color: #000000;"> (IHelloService))
        .WithBinding(</span><span style="color: #0000FF;">new</span><span style="color: #000000;"> BasicHttpBinding())
        .EnableMex()
        .Start();</span></pre>
<p><!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --></p>
</div>
<p>I expect more on this shortly.</p>
<div id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:68ce99d8-44be-4af8-8d01-4594be41444c" class="wlWriterEditableSmartContent" style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px">del.icio.us Tags: <a rel="tag" href="http://del.icio.us/popular/Fluent+WCF">Fluent WCF</a>,<a rel="tag" href="http://del.icio.us/popular/.net">.net</a></div>
<p><a href="http://www.addtoany.com/add_to/delicious?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2009%2F03%2F31%2Fintroducing-fluent-wcf%2F&amp;linkname=Introducing%20Fluent%20WCF" title="Delicious" rel="nofollow" target="_blank"><img src="http://www.markharris.net.au/blog/wp-content/plugins/add-to-any/icons/delicious.png" width="16" height="16" alt="Delicious"/></a> <a href="http://www.addtoany.com/add_to/google_reader?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2009%2F03%2F31%2Fintroducing-fluent-wcf%2F&amp;linkname=Introducing%20Fluent%20WCF" title="Google Reader" rel="nofollow" target="_blank"><img src="http://www.markharris.net.au/blog/wp-content/plugins/add-to-any/icons/reader.png" width="16" height="16" alt="Google Reader"/></a> <a href="http://www.addtoany.com/add_to/twitter?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2009%2F03%2F31%2Fintroducing-fluent-wcf%2F&amp;linkname=Introducing%20Fluent%20WCF" title="Twitter" rel="nofollow" target="_blank"><img src="http://www.markharris.net.au/blog/wp-content/plugins/add-to-any/icons/twitter.png" width="16" height="16" alt="Twitter"/></a> <a href="http://www.addtoany.com/add_to/facebook?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2009%2F03%2F31%2Fintroducing-fluent-wcf%2F&amp;linkname=Introducing%20Fluent%20WCF" title="Facebook" rel="nofollow" target="_blank"><img src="http://www.markharris.net.au/blog/wp-content/plugins/add-to-any/icons/facebook.png" width="16" height="16" alt="Facebook"/></a> <a href="http://www.addtoany.com/add_to/friendfeed?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2009%2F03%2F31%2Fintroducing-fluent-wcf%2F&amp;linkname=Introducing%20Fluent%20WCF" title="FriendFeed" rel="nofollow" target="_blank"><img src="http://www.markharris.net.au/blog/wp-content/plugins/add-to-any/icons/friendfeed.png" width="16" height="16" alt="FriendFeed"/></a> <a href="http://www.addtoany.com/add_to/linkedin?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2009%2F03%2F31%2Fintroducing-fluent-wcf%2F&amp;linkname=Introducing%20Fluent%20WCF" title="LinkedIn" rel="nofollow" target="_blank"><img src="http://www.markharris.net.au/blog/wp-content/plugins/add-to-any/icons/linkedin.png" width="16" height="16" alt="LinkedIn"/></a> <a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2009%2F03%2F31%2Fintroducing-fluent-wcf%2F&amp;linkname=Introducing%20Fluent%20WCF">Share/Save</a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.markharris.net.au/blog/2009/03/31/introducing-fluent-wcf/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>LINQ To SQL &#8211; Needs our support.</title>
		<link>http://www.markharris.net.au/blog/2008/10/31/linq-to-sql-needs-our-support/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=linq-to-sql-needs-our-support</link>
		<comments>http://www.markharris.net.au/blog/2008/10/31/linq-to-sql-needs-our-support/#comments</comments>
		<pubDate>Fri, 31 Oct 2008 07:36:29 +0000</pubDate>
		<dc:creator>Mark Harris</dc:creator>
				<category><![CDATA[.net]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[enity framework]]></category>
		<category><![CDATA[entity framework]]></category>
		<category><![CDATA[Linq To Sql]]></category>

		<guid isPermaLink="false">http://www.markharris.net.au/blog/2008/10/31/linq-to-sql-needs-our-support/</guid>
		<description><![CDATA[A While back Ian Cooper blogged about the need for active development of LINQ To SQL, he had this to say As a community, as people begin to realize the suprising power of LINQ to SQL, I would like to see us dispel many of the myths that seem to have grown up around that [...]]]></description>
			<content:encoded><![CDATA[<p>A While back <a href="http://codebetter.com/blogs/ian_cooper/archive/2008/07/02/showing-some-support-for-linq-to-sql.aspx">Ian Cooper blogged about the need for active development of LINQ To SQL</a>, he had this to say</p>
<blockquote><p>As a community, as people begin to realize the suprising power of LINQ to SQL, I would like to see us dispel many of the myths that seem to have grown up around that product. I would like to see us put pressure on the Data Platform team to provide the support for LINQ to SQL that we want going forward. Community reaction is everything and if the LINQ to SQL community remains silent in the face of the more vocal, but probably less numerous, EF community, we won&#8217;t get the product we deserve</p>
</blockquote>
<p><a href="http://codebetter.com/blogs/david.hayden/archive/2008/10/30/linq-to-sql-gets-kicked-to-the-curb-needs-a-good-home.aspx">David Hayden has made a call to Microsoft to Open Source the development of LINQ to SQL</a> in response to the <a href="http://blogs.msdn.com/adonet/archive/2008/10/29/update-on-linq-to-sql-and-linq-to-entities-roadmap.aspx">ADO.NET Teams announcement on the future of the Entity Framework and its <img style="display: inline; margin-left: 0px; margin-right: 0px" align="right" src="http://www.simonsegal.net/blog/wp-content/uploads/2008/07/linq-2-sql-hand-small.gif" width="162" height="162" />forgotten other LINQ To SQL</a>. </p>
<p>The ADO.net team says that they will improve LINQ to SQL based on community feedback then there is please head what David Hayden and Ian Cooper are saying.</p>
<p>Simon Segal has previously made a <a href="http://www.simonsegal.net/blog/2008/07/30/how-to-show-support-for-linq-to-sql/">Save LINQ to SQL badge</a> which apart from bring really cool is apt.</p>
<p>So if you want to keep POCO objects free of the <a href="http://msdn.microsoft.com/en-us/library/bb738453.aspx">IPOCO interface</a> (at least in V1 of EF), I would ask the Data Dudes to set LINQ To SQL Free as per David Hayden’s Suggestion.</p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:c99f3d33-77e8-4517-a655-7cead5fcf7db" class="wlWriterEditableSmartContent">Technorati Tags: <a href="http://technorati.com/tags/Linq+To+Sql" rel="tag">Linq To Sql</a>,<a href="http://technorati.com/tags/.net" rel="tag">.net</a>,<a href="http://technorati.com/tags/Entity+framework" rel="tag">Entity framework</a></div>
<p><a href="http://www.addtoany.com/add_to/delicious?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2008%2F10%2F31%2Flinq-to-sql-needs-our-support%2F&amp;linkname=LINQ%20To%20SQL%20%26ndash%3B%20Needs%20our%20support." title="Delicious" rel="nofollow" target="_blank"><img src="http://www.markharris.net.au/blog/wp-content/plugins/add-to-any/icons/delicious.png" width="16" height="16" alt="Delicious"/></a> <a href="http://www.addtoany.com/add_to/google_reader?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2008%2F10%2F31%2Flinq-to-sql-needs-our-support%2F&amp;linkname=LINQ%20To%20SQL%20%26ndash%3B%20Needs%20our%20support." title="Google Reader" rel="nofollow" target="_blank"><img src="http://www.markharris.net.au/blog/wp-content/plugins/add-to-any/icons/reader.png" width="16" height="16" alt="Google Reader"/></a> <a href="http://www.addtoany.com/add_to/twitter?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2008%2F10%2F31%2Flinq-to-sql-needs-our-support%2F&amp;linkname=LINQ%20To%20SQL%20%26ndash%3B%20Needs%20our%20support." title="Twitter" rel="nofollow" target="_blank"><img src="http://www.markharris.net.au/blog/wp-content/plugins/add-to-any/icons/twitter.png" width="16" height="16" alt="Twitter"/></a> <a href="http://www.addtoany.com/add_to/facebook?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2008%2F10%2F31%2Flinq-to-sql-needs-our-support%2F&amp;linkname=LINQ%20To%20SQL%20%26ndash%3B%20Needs%20our%20support." title="Facebook" rel="nofollow" target="_blank"><img src="http://www.markharris.net.au/blog/wp-content/plugins/add-to-any/icons/facebook.png" width="16" height="16" alt="Facebook"/></a> <a href="http://www.addtoany.com/add_to/friendfeed?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2008%2F10%2F31%2Flinq-to-sql-needs-our-support%2F&amp;linkname=LINQ%20To%20SQL%20%26ndash%3B%20Needs%20our%20support." title="FriendFeed" rel="nofollow" target="_blank"><img src="http://www.markharris.net.au/blog/wp-content/plugins/add-to-any/icons/friendfeed.png" width="16" height="16" alt="FriendFeed"/></a> <a href="http://www.addtoany.com/add_to/linkedin?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2008%2F10%2F31%2Flinq-to-sql-needs-our-support%2F&amp;linkname=LINQ%20To%20SQL%20%26ndash%3B%20Needs%20our%20support." title="LinkedIn" rel="nofollow" target="_blank"><img src="http://www.markharris.net.au/blog/wp-content/plugins/add-to-any/icons/linkedin.png" width="16" height="16" alt="LinkedIn"/></a> <a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2008%2F10%2F31%2Flinq-to-sql-needs-our-support%2F&amp;linkname=LINQ%20To%20SQL%20%26ndash%3B%20Needs%20our%20support.">Share/Save</a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.markharris.net.au/blog/2008/10/31/linq-to-sql-needs-our-support/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PDC 08 &#8211; Day 2</title>
		<link>http://www.markharris.net.au/blog/2008/10/30/pdc-08-day-2/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=pdc-08-day-2</link>
		<comments>http://www.markharris.net.au/blog/2008/10/30/pdc-08-day-2/#comments</comments>
		<pubDate>Thu, 30 Oct 2008 05:20:54 +0000</pubDate>
		<dc:creator>Mark Harris</dc:creator>
				<category><![CDATA[.net]]></category>
		<category><![CDATA[PDC]]></category>
		<category><![CDATA[PDC08]]></category>

		<guid isPermaLink="false">http://www.markharris.net.au/blog/2008/10/30/pdc-08-day-2/</guid>
		<description><![CDATA[So like me your one of the many that are not at PDC this year, but you still want to know what&#8217;s going check out http://notatpdc.com/ Also check out Jim O&#8217;Neil&#8217;s PDC Day 2 Wrap Up post.&#160; I have been reading been doing my fair share of reading about all the Oslo, Windows 7 , [...]]]></description>
			<content:encoded><![CDATA[<p><img style="display: inline; margin-left: 0px; margin-right: 0px" align="left" src="http://notes2self.net/mob_img/PDC2008websiteregistrationisnowlive_8529/PDC08_Brain.gif" width="104" height="141" />So like me your one of the many that are not at PDC this year, but you still want to know what&#8217;s going check out <a title="http://notatpdc.com/" href="http://notatpdc.com/">http://notatpdc.com/</a></p>
<p>Also check out <a href="http://blogs.msdn.com/jimoneil/archive/2008/10/28/hello-windows-7-pdc-day-2-keynote-recap.aspx">Jim O&#8217;Neil&#8217;s PDC Day 2 Wrap Up post.</a>&#160; I have been reading been doing my fair share of reading about all the Oslo, Windows 7 , Azure posts, not forgetting the <a href="http://channel9.msdn.com/tags/PDC08/">PDC08 video’s on Chanel 9</a>.&#160; My favourite video so far has been <a href="http://channel9.msdn.com/pdc2008/TL16/">The Future of C# by Anders Hejlsberg</a>&#160;</p>
<p>BTW if you cant find the videos for the session <a href="http://blogs.eweek.com/devlife/content/net_general/not_at_pdc_live_meetings_just_for_you_and_recorded_pdc_content.html">Julia Lerman has taken the effort to describe how to best find the PDC 08 sessions videos.</a></p>
<p>&#160;</p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:11d9d349-8839-45e6-9d65-5886f9ab79e2" class="wlWriterEditableSmartContent">Technorati Tags: <a href="http://technorati.com/tags/PDC" rel="tag">PDC</a>,<a href="http://technorati.com/tags/PDC08" rel="tag">PDC08</a></div>
<p><a href="http://www.addtoany.com/add_to/delicious?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2008%2F10%2F30%2Fpdc-08-day-2%2F&amp;linkname=PDC%2008%20%26ndash%3B%20Day%202" title="Delicious" rel="nofollow" target="_blank"><img src="http://www.markharris.net.au/blog/wp-content/plugins/add-to-any/icons/delicious.png" width="16" height="16" alt="Delicious"/></a> <a href="http://www.addtoany.com/add_to/google_reader?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2008%2F10%2F30%2Fpdc-08-day-2%2F&amp;linkname=PDC%2008%20%26ndash%3B%20Day%202" title="Google Reader" rel="nofollow" target="_blank"><img src="http://www.markharris.net.au/blog/wp-content/plugins/add-to-any/icons/reader.png" width="16" height="16" alt="Google Reader"/></a> <a href="http://www.addtoany.com/add_to/twitter?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2008%2F10%2F30%2Fpdc-08-day-2%2F&amp;linkname=PDC%2008%20%26ndash%3B%20Day%202" title="Twitter" rel="nofollow" target="_blank"><img src="http://www.markharris.net.au/blog/wp-content/plugins/add-to-any/icons/twitter.png" width="16" height="16" alt="Twitter"/></a> <a href="http://www.addtoany.com/add_to/facebook?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2008%2F10%2F30%2Fpdc-08-day-2%2F&amp;linkname=PDC%2008%20%26ndash%3B%20Day%202" title="Facebook" rel="nofollow" target="_blank"><img src="http://www.markharris.net.au/blog/wp-content/plugins/add-to-any/icons/facebook.png" width="16" height="16" alt="Facebook"/></a> <a href="http://www.addtoany.com/add_to/friendfeed?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2008%2F10%2F30%2Fpdc-08-day-2%2F&amp;linkname=PDC%2008%20%26ndash%3B%20Day%202" title="FriendFeed" rel="nofollow" target="_blank"><img src="http://www.markharris.net.au/blog/wp-content/plugins/add-to-any/icons/friendfeed.png" width="16" height="16" alt="FriendFeed"/></a> <a href="http://www.addtoany.com/add_to/linkedin?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2008%2F10%2F30%2Fpdc-08-day-2%2F&amp;linkname=PDC%2008%20%26ndash%3B%20Day%202" title="LinkedIn" rel="nofollow" target="_blank"><img src="http://www.markharris.net.au/blog/wp-content/plugins/add-to-any/icons/linkedin.png" width="16" height="16" alt="LinkedIn"/></a> <a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2008%2F10%2F30%2Fpdc-08-day-2%2F&amp;linkname=PDC%2008%20%26ndash%3B%20Day%202">Share/Save</a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.markharris.net.au/blog/2008/10/30/pdc-08-day-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Silverlight Flickr Image Browser</title>
		<link>http://www.markharris.net.au/blog/2008/10/27/silverlight-flickr-image-browser/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=silverlight-flickr-image-browser</link>
		<comments>http://www.markharris.net.au/blog/2008/10/27/silverlight-flickr-image-browser/#comments</comments>
		<pubDate>Mon, 27 Oct 2008 05:53:28 +0000</pubDate>
		<dc:creator>Mark Harris</dc:creator>
				<category><![CDATA[silverlight]]></category>
		<category><![CDATA[flickr]]></category>
		<category><![CDATA[flickrlight]]></category>

		<guid isPermaLink="false">http://www.markharris.net.au/blog/2008/10/27/silverlight-flickr-image-browser/</guid>
		<description><![CDATA[In my last post about Flickrlight I mentioned creating a simple Flickr Image Browser in Silverlight. Feedback is required please. Technorati Tags: silverlight,flickr,flickrlight]]></description>
			<content:encoded><![CDATA[<p>In my last post about <a href="http://www.markharris.net.au/blog/2008/10/26/flickrlight-silverlight-2-compatible-flickr-api/" rel="tag">Flickrlight</a> I mentioned creating a simple <a href="http://markharris.net.au/Silverlight/FlickrBrowser/Index.html">Flickr Image Browser in Silverlight</a>. Feedback is required please.</p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:57896baa-28c9-4bf2-ba1d-b98448dbcda4" class="wlWriterEditableSmartContent">Technorati Tags: <a href="http://technorati.com/tags/silverlight" rel="tag">silverlight</a>,<a href="http://technorati.com/tags/flickr" rel="tag">flickr</a>,<a href="http://technorati.com/tags/flickrlight" rel="tag">flickrlight</a></div>
<p><a href="http://www.addtoany.com/add_to/delicious?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2008%2F10%2F27%2Fsilverlight-flickr-image-browser%2F&amp;linkname=Silverlight%20Flickr%20Image%20Browser" title="Delicious" rel="nofollow" target="_blank"><img src="http://www.markharris.net.au/blog/wp-content/plugins/add-to-any/icons/delicious.png" width="16" height="16" alt="Delicious"/></a> <a href="http://www.addtoany.com/add_to/google_reader?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2008%2F10%2F27%2Fsilverlight-flickr-image-browser%2F&amp;linkname=Silverlight%20Flickr%20Image%20Browser" title="Google Reader" rel="nofollow" target="_blank"><img src="http://www.markharris.net.au/blog/wp-content/plugins/add-to-any/icons/reader.png" width="16" height="16" alt="Google Reader"/></a> <a href="http://www.addtoany.com/add_to/twitter?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2008%2F10%2F27%2Fsilverlight-flickr-image-browser%2F&amp;linkname=Silverlight%20Flickr%20Image%20Browser" title="Twitter" rel="nofollow" target="_blank"><img src="http://www.markharris.net.au/blog/wp-content/plugins/add-to-any/icons/twitter.png" width="16" height="16" alt="Twitter"/></a> <a href="http://www.addtoany.com/add_to/facebook?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2008%2F10%2F27%2Fsilverlight-flickr-image-browser%2F&amp;linkname=Silverlight%20Flickr%20Image%20Browser" title="Facebook" rel="nofollow" target="_blank"><img src="http://www.markharris.net.au/blog/wp-content/plugins/add-to-any/icons/facebook.png" width="16" height="16" alt="Facebook"/></a> <a href="http://www.addtoany.com/add_to/friendfeed?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2008%2F10%2F27%2Fsilverlight-flickr-image-browser%2F&amp;linkname=Silverlight%20Flickr%20Image%20Browser" title="FriendFeed" rel="nofollow" target="_blank"><img src="http://www.markharris.net.au/blog/wp-content/plugins/add-to-any/icons/friendfeed.png" width="16" height="16" alt="FriendFeed"/></a> <a href="http://www.addtoany.com/add_to/linkedin?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2008%2F10%2F27%2Fsilverlight-flickr-image-browser%2F&amp;linkname=Silverlight%20Flickr%20Image%20Browser" title="LinkedIn" rel="nofollow" target="_blank"><img src="http://www.markharris.net.au/blog/wp-content/plugins/add-to-any/icons/linkedin.png" width="16" height="16" alt="LinkedIn"/></a> <a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2008%2F10%2F27%2Fsilverlight-flickr-image-browser%2F&amp;linkname=Silverlight%20Flickr%20Image%20Browser">Share/Save</a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.markharris.net.au/blog/2008/10/27/silverlight-flickr-image-browser/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flickrlight &#8211; Silverlight 2 compatible Flickr API</title>
		<link>http://www.markharris.net.au/blog/2008/10/26/flickrlight-silverlight-2-compatible-flickr-api/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=flickrlight-silverlight-2-compatible-flickr-api</link>
		<comments>http://www.markharris.net.au/blog/2008/10/26/flickrlight-silverlight-2-compatible-flickr-api/#comments</comments>
		<pubDate>Sun, 26 Oct 2008 13:39:31 +0000</pubDate>
		<dc:creator>Mark Harris</dc:creator>
				<category><![CDATA[.net]]></category>
		<category><![CDATA[silverlight]]></category>
		<category><![CDATA[flickr]]></category>
		<category><![CDATA[flickrlight]]></category>

		<guid isPermaLink="false">http://www.markharris.net.au/blog/2008/10/26/flickrlight-silverlight-2-compatible-flickr-api/</guid>
		<description><![CDATA[In learning Silverlight 2 I needed some self imposed tasks, one such task was to build a simple Flickr image browser, among other things. In doing so as most people would I found a .net Flicker API called FlickrNet. However when you try to add a reference to FlickrNet from my Silverlight 2 project I [...]]]></description>
			<content:encoded><![CDATA[<p>In learning Silverlight 2 I needed some self imposed tasks, one such task was to build a simple Flickr image browser, among other things. In doing so as most people would I found a .net <a href="http://www.codeplex.com/FlickrNet">Flicker API called FlickrNet</a>. However when you try to add a reference to FlickrNet from my Silverlight 2 project I encountered a few issues with projects not loading. However after some research and hacking I was able to <a href="http://www.markharris.net.au/blog/2008/10/23/how-to-convert-a-normal-class-library-project-to-a-silverlight-20-class-library-project/" rel="tag">convert the FlickrNet project to Silverlight</a>. Converting the project was the easy part but it was going to be just too hard to get the entire library working because of its reliance on a lot of calls to methods that are not available in the <a href="http://msdn.microsoft.com/en-us/library/bb404713(VS.95).aspx">Silverlight Core CLR.</a> </p>
<p>Therefore I have had to strip the existing FlickrNet functionality down, I have decided to christen it <strong><em>Flickrlight</em></strong> and now have a simple working demo of the Flickr Browser Application. </p>
<p><a href="http://www.markharris.net.au/blog/wp-content/uploads/2008/10/image.png"><img style="border-bottom: 0px; border-left: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px" title="Flickrlight Demo" border="0" alt="Flickrlight Demo" src="http://www.markharris.net.au/blog/wp-content/uploads/2008/10/image-thumb.png" width="434" height="484" /></a></p>
<p>&#160; The code is fairly similar to what FlickrNet, for those of you who are familiar with the existing API.</p>
<div style="border-bottom: gray 1px solid; border-left: gray 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; max-height: 200px; font-size: 8pt; overflow: auto; border-top: gray 1px solid; cursor: text; border-right: gray 1px solid; padding-top: 4px">
<div style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">   1:</span> <span style="color: #0000ff">private</span> <span style="color: #0000ff">void</span> btnGetPhoto_Click(<span style="color: #0000ff">object</span> sender, RoutedEventArgs e)</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">   2:</span> {</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">   3:</span>     PhotoSearchOptions pso = <span style="color: #0000ff">new</span> PhotoSearchOptions();</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">   4:</span>     pso.Tags = feedURL.Text;</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">   5:</span>     Photo p = <span style="color: #0000ff">new</span> Photo();</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">   6:</span>     p.ApiKey = ApiKey;</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">   7:</span>     p.Secret = SharedSecret;</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">   8:</span>     p.OnResponseCompleted += p_OnResponseCompleted;</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">   9:</span>     p.BeginPhotosSearch(pso);</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">  10:</span> }</pre>
</p></div>
</div>
<p>One of the few changes is that the calls being made are Asynchronous and hence require the subscription to the Completed Event.</p>
<div style="border-bottom: gray 1px solid; border-left: gray 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; max-height: 200px; font-size: 8pt; overflow: auto; border-top: gray 1px solid; cursor: text; border-right: gray 1px solid; padding-top: 4px">
<div style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">   1:</span> <span style="color: #0000ff">private</span> <span style="color: #0000ff">void</span> p_OnResponseCompleted(FlickrResponseRecievedCompleteEventArgs&lt;FlickrBase&gt; e)</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">   2:</span> {</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">   3:</span>     Action bindToList = () =&gt; imageList.ItemsSource = ((Photos)e.ResultValue).PhotoCollection;</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">   4:</span>     <span style="color: #0000ff">this</span>.Dispatcher.BeginInvoke(bindToList);</pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">   5:</span> }</pre>
</p></div>
</div>
<p>&#160;</p>
<p>At this stage all I have done was to begin to move the Search for Photos functionality, however over the next few weeks I will move some more of this functionality across. I will also make <a href="http://www.codeplex.com/">Flickrlight available on Codeplex</a> (unless someone tells me otherwise). Seeing as this will be my first foray into the world of open source if anyone has any experience with what I should be doing here, your help will be greatly appreciated.</p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:7029b558-00b1-4bb1-b7bc-fdfa14a9a4bc" class="wlWriterEditableSmartContent">Technorati Tags: <a href="http://technorati.com/tags/flickrlight" rel="tag">flickrlight</a>,<a href="http://technorati.com/tags/flickr" rel="tag">flickr</a>,<a href="http://technorati.com/tags/.net" rel="tag">.net</a>,<a href="http://technorati.com/tags/silverlight" rel="tag">silverlight</a></div>
<p><a href="http://www.addtoany.com/add_to/delicious?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2008%2F10%2F26%2Fflickrlight-silverlight-2-compatible-flickr-api%2F&amp;linkname=Flickrlight%20%26%238211%3B%20Silverlight%202%20compatible%20Flickr%20API" title="Delicious" rel="nofollow" target="_blank"><img src="http://www.markharris.net.au/blog/wp-content/plugins/add-to-any/icons/delicious.png" width="16" height="16" alt="Delicious"/></a> <a href="http://www.addtoany.com/add_to/google_reader?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2008%2F10%2F26%2Fflickrlight-silverlight-2-compatible-flickr-api%2F&amp;linkname=Flickrlight%20%26%238211%3B%20Silverlight%202%20compatible%20Flickr%20API" title="Google Reader" rel="nofollow" target="_blank"><img src="http://www.markharris.net.au/blog/wp-content/plugins/add-to-any/icons/reader.png" width="16" height="16" alt="Google Reader"/></a> <a href="http://www.addtoany.com/add_to/twitter?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2008%2F10%2F26%2Fflickrlight-silverlight-2-compatible-flickr-api%2F&amp;linkname=Flickrlight%20%26%238211%3B%20Silverlight%202%20compatible%20Flickr%20API" title="Twitter" rel="nofollow" target="_blank"><img src="http://www.markharris.net.au/blog/wp-content/plugins/add-to-any/icons/twitter.png" width="16" height="16" alt="Twitter"/></a> <a href="http://www.addtoany.com/add_to/facebook?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2008%2F10%2F26%2Fflickrlight-silverlight-2-compatible-flickr-api%2F&amp;linkname=Flickrlight%20%26%238211%3B%20Silverlight%202%20compatible%20Flickr%20API" title="Facebook" rel="nofollow" target="_blank"><img src="http://www.markharris.net.au/blog/wp-content/plugins/add-to-any/icons/facebook.png" width="16" height="16" alt="Facebook"/></a> <a href="http://www.addtoany.com/add_to/friendfeed?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2008%2F10%2F26%2Fflickrlight-silverlight-2-compatible-flickr-api%2F&amp;linkname=Flickrlight%20%26%238211%3B%20Silverlight%202%20compatible%20Flickr%20API" title="FriendFeed" rel="nofollow" target="_blank"><img src="http://www.markharris.net.au/blog/wp-content/plugins/add-to-any/icons/friendfeed.png" width="16" height="16" alt="FriendFeed"/></a> <a href="http://www.addtoany.com/add_to/linkedin?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2008%2F10%2F26%2Fflickrlight-silverlight-2-compatible-flickr-api%2F&amp;linkname=Flickrlight%20%26%238211%3B%20Silverlight%202%20compatible%20Flickr%20API" title="LinkedIn" rel="nofollow" target="_blank"><img src="http://www.markharris.net.au/blog/wp-content/plugins/add-to-any/icons/linkedin.png" width="16" height="16" alt="LinkedIn"/></a> <a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2008%2F10%2F26%2Fflickrlight-silverlight-2-compatible-flickr-api%2F&amp;linkname=Flickrlight%20%26%238211%3B%20Silverlight%202%20compatible%20Flickr%20API">Share/Save</a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.markharris.net.au/blog/2008/10/26/flickrlight-silverlight-2-compatible-flickr-api/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>The Devils work, in SILVERLIGHT</title>
		<link>http://www.markharris.net.au/blog/2008/10/25/the-devils-work-in-silverlight/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=the-devils-work-in-silverlight</link>
		<comments>http://www.markharris.net.au/blog/2008/10/25/the-devils-work-in-silverlight/#comments</comments>
		<pubDate>Fri, 24 Oct 2008 22:24:40 +0000</pubDate>
		<dc:creator>Mark Harris</dc:creator>
				<category><![CDATA[.net]]></category>
		<category><![CDATA[silverlight]]></category>
		<category><![CDATA[quakelight]]></category>

		<guid isPermaLink="false">http://www.markharris.net.au/blog/2008/10/25/the-devils-work-in-silverlight/</guid>
		<description><![CDATA[Hopefully that got your attention. But its not really the devils work. Simon has this theory about why video games and how its the devils work an opinion I do not fully share. Everything in moderation I say including moderation. Anyway I digress , The ninemsn crew has posted a fantastic video of the game [...]]]></description>
			<content:encoded><![CDATA[<p>Hopefully that got your attention. But its not really the devils work. Simon has this theory about why video games and how its the devils work an opinion I do not fully share. Everything in moderation I say including moderation. Anyway I digress , The ninemsn crew has posted a fantastic video of the game QUAKE being ported to SILVERLIGHT yes SILVERLIGHT.</p>
<p style="text-align: center;">
<a href="http://channel9.msdn.com/shows/Continuum/QuakeLightPreview/">QuakeLight Preview Video</a></p>
<p><a href="http://adamkinney.com/blog/374/default.aspx">Adam Kinney has a interview</a> with the developer <a title="Julien Frelat" href="http://www.innoveware.com/projects.html">Julien Frelat</a> about the process. I hope we get to see more in the near future.</p>
<div id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:504f0dad-8758-4726-a0a1-22ab87d70d30" class="wlWriterEditableSmartContent" style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px">Technorati Tags: <a rel="tag" href="http://technorati.com/tags/.net">.net</a>,<a rel="tag" href="http://technorati.com/tags/silverlight">silverlight</a>,<a rel="tag" href="http://technorati.com/tags/quakelight">quakelight</a></div>
<p><a href="http://www.addtoany.com/add_to/delicious?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2008%2F10%2F25%2Fthe-devils-work-in-silverlight%2F&amp;linkname=The%20Devils%20work%2C%20in%20SILVERLIGHT" title="Delicious" rel="nofollow" target="_blank"><img src="http://www.markharris.net.au/blog/wp-content/plugins/add-to-any/icons/delicious.png" width="16" height="16" alt="Delicious"/></a> <a href="http://www.addtoany.com/add_to/google_reader?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2008%2F10%2F25%2Fthe-devils-work-in-silverlight%2F&amp;linkname=The%20Devils%20work%2C%20in%20SILVERLIGHT" title="Google Reader" rel="nofollow" target="_blank"><img src="http://www.markharris.net.au/blog/wp-content/plugins/add-to-any/icons/reader.png" width="16" height="16" alt="Google Reader"/></a> <a href="http://www.addtoany.com/add_to/twitter?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2008%2F10%2F25%2Fthe-devils-work-in-silverlight%2F&amp;linkname=The%20Devils%20work%2C%20in%20SILVERLIGHT" title="Twitter" rel="nofollow" target="_blank"><img src="http://www.markharris.net.au/blog/wp-content/plugins/add-to-any/icons/twitter.png" width="16" height="16" alt="Twitter"/></a> <a href="http://www.addtoany.com/add_to/facebook?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2008%2F10%2F25%2Fthe-devils-work-in-silverlight%2F&amp;linkname=The%20Devils%20work%2C%20in%20SILVERLIGHT" title="Facebook" rel="nofollow" target="_blank"><img src="http://www.markharris.net.au/blog/wp-content/plugins/add-to-any/icons/facebook.png" width="16" height="16" alt="Facebook"/></a> <a href="http://www.addtoany.com/add_to/friendfeed?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2008%2F10%2F25%2Fthe-devils-work-in-silverlight%2F&amp;linkname=The%20Devils%20work%2C%20in%20SILVERLIGHT" title="FriendFeed" rel="nofollow" target="_blank"><img src="http://www.markharris.net.au/blog/wp-content/plugins/add-to-any/icons/friendfeed.png" width="16" height="16" alt="FriendFeed"/></a> <a href="http://www.addtoany.com/add_to/linkedin?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2008%2F10%2F25%2Fthe-devils-work-in-silverlight%2F&amp;linkname=The%20Devils%20work%2C%20in%20SILVERLIGHT" title="LinkedIn" rel="nofollow" target="_blank"><img src="http://www.markharris.net.au/blog/wp-content/plugins/add-to-any/icons/linkedin.png" width="16" height="16" alt="LinkedIn"/></a> <a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2008%2F10%2F25%2Fthe-devils-work-in-silverlight%2F&amp;linkname=The%20Devils%20work%2C%20in%20SILVERLIGHT">Share/Save</a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.markharris.net.au/blog/2008/10/25/the-devils-work-in-silverlight/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MD5CryptoServiceProvider for Silverlight</title>
		<link>http://www.markharris.net.au/blog/2008/10/23/md5cryptoserviceprovider-for-silverlight/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=md5cryptoserviceprovider-for-silverlight</link>
		<comments>http://www.markharris.net.au/blog/2008/10/23/md5cryptoserviceprovider-for-silverlight/#comments</comments>
		<pubDate>Wed, 22 Oct 2008 23:00:25 +0000</pubDate>
		<dc:creator>Mark Harris</dc:creator>
				<category><![CDATA[.net]]></category>
		<category><![CDATA[silverlight]]></category>
		<category><![CDATA[md5]]></category>
		<category><![CDATA[MD5CryptoServiceProvider]]></category>

		<guid isPermaLink="false">http://www.markharris.net.au/blog/2008/10/23/md5cryptoserviceprovider-for-silverlight/</guid>
		<description><![CDATA[The Silverlight clr does not have a MD5&#160; implementation so your on your own when it comes to “signing” calls to REST based web services, like Flickr. A quick google found a clean implementation written in managed code, targeting the compact framework. The managed MD5CryptoServiceProvider was created by GL Conseil/Flow Group SAS. It is available [...]]]></description>
			<content:encoded><![CDATA[<p>The Silverlight clr does not have a MD5&#160; implementation so your on your own when it comes to “signing” calls to REST based web services, like Flickr. A quick google found a clean implementation written in managed code, targeting the compact framework. The managed MD5CryptoServiceProvider was created by <a title="Flow Group SAS" href="http://www.flowgroup.fr/en/kb/technical/md5.aspx">GL Conseil/Flow Group SAS</a>. It is available for download from their website, I have also made <a href="http://www.markharris.net.au/blog/wp-content/uploads/2008/10/CustomMD5Impl.cs">MD5CryptoServiceProvider Source file available for here for download</a>.</p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:74310303-770d-41db-9474-073b6a3ad942" class="wlWriterEditableSmartContent">Technorati Tags: <a href="http://technorati.com/tags/md5" rel="tag">md5</a>,<a href="http://technorati.com/tags/MD5CryptoServiceProvider" rel="tag">MD5CryptoServiceProvider</a>,<a href="http://technorati.com/tags/silverlight+2.0" rel="tag">silverlight 2.0</a></div>
<p><a href="http://www.addtoany.com/add_to/delicious?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2008%2F10%2F23%2Fmd5cryptoserviceprovider-for-silverlight%2F&amp;linkname=MD5CryptoServiceProvider%20for%20Silverlight" title="Delicious" rel="nofollow" target="_blank"><img src="http://www.markharris.net.au/blog/wp-content/plugins/add-to-any/icons/delicious.png" width="16" height="16" alt="Delicious"/></a> <a href="http://www.addtoany.com/add_to/google_reader?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2008%2F10%2F23%2Fmd5cryptoserviceprovider-for-silverlight%2F&amp;linkname=MD5CryptoServiceProvider%20for%20Silverlight" title="Google Reader" rel="nofollow" target="_blank"><img src="http://www.markharris.net.au/blog/wp-content/plugins/add-to-any/icons/reader.png" width="16" height="16" alt="Google Reader"/></a> <a href="http://www.addtoany.com/add_to/twitter?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2008%2F10%2F23%2Fmd5cryptoserviceprovider-for-silverlight%2F&amp;linkname=MD5CryptoServiceProvider%20for%20Silverlight" title="Twitter" rel="nofollow" target="_blank"><img src="http://www.markharris.net.au/blog/wp-content/plugins/add-to-any/icons/twitter.png" width="16" height="16" alt="Twitter"/></a> <a href="http://www.addtoany.com/add_to/facebook?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2008%2F10%2F23%2Fmd5cryptoserviceprovider-for-silverlight%2F&amp;linkname=MD5CryptoServiceProvider%20for%20Silverlight" title="Facebook" rel="nofollow" target="_blank"><img src="http://www.markharris.net.au/blog/wp-content/plugins/add-to-any/icons/facebook.png" width="16" height="16" alt="Facebook"/></a> <a href="http://www.addtoany.com/add_to/friendfeed?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2008%2F10%2F23%2Fmd5cryptoserviceprovider-for-silverlight%2F&amp;linkname=MD5CryptoServiceProvider%20for%20Silverlight" title="FriendFeed" rel="nofollow" target="_blank"><img src="http://www.markharris.net.au/blog/wp-content/plugins/add-to-any/icons/friendfeed.png" width="16" height="16" alt="FriendFeed"/></a> <a href="http://www.addtoany.com/add_to/linkedin?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2008%2F10%2F23%2Fmd5cryptoserviceprovider-for-silverlight%2F&amp;linkname=MD5CryptoServiceProvider%20for%20Silverlight" title="LinkedIn" rel="nofollow" target="_blank"><img src="http://www.markharris.net.au/blog/wp-content/plugins/add-to-any/icons/linkedin.png" width="16" height="16" alt="LinkedIn"/></a> <a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2008%2F10%2F23%2Fmd5cryptoserviceprovider-for-silverlight%2F&amp;linkname=MD5CryptoServiceProvider%20for%20Silverlight">Share/Save</a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.markharris.net.au/blog/2008/10/23/md5cryptoserviceprovider-for-silverlight/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How To: Convert a normal Class Library Project to a Silverlight 2.0 Class Library Project</title>
		<link>http://www.markharris.net.au/blog/2008/10/23/how-to-convert-a-normal-class-library-project-to-a-silverlight-20-class-library-project/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=how-to-convert-a-normal-class-library-project-to-a-silverlight-20-class-library-project</link>
		<comments>http://www.markharris.net.au/blog/2008/10/23/how-to-convert-a-normal-class-library-project-to-a-silverlight-20-class-library-project/#comments</comments>
		<pubDate>Wed, 22 Oct 2008 14:42:37 +0000</pubDate>
		<dc:creator>Mark Harris</dc:creator>
				<category><![CDATA[.net]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[silverlight]]></category>

		<guid isPermaLink="false">http://www.markharris.net.au/blog/2008/10/23/how-to-convert-a-normal-class-library-project-to-a-silverlight-20-class-library-project/</guid>
		<description><![CDATA[So you want to add a Normal Class Library Project to a Silverlight application, you think to your self how hard could this be despite the Visual Studio Warnings. Well for the most part its fairly simple, however there are a number of problems that I faced when doing exactly that. Thanks to Neil Mosafi’s [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.silverlight.net/"><img style="margin: 0px; display: inline" align="left" src="http://tbn0.google.com/images?q=tbn:2H3WXZoqXRzIFM:http://www.outsource-dotnet.com/images/silverlight.png" width="190" height="140" /></a>So you want to add a Normal Class Library Project to a Silverlight application, you think to your self how hard could this be despite the Visual Studio Warnings. Well for the most part its fairly simple, however there are a number of problems that I faced when doing exactly that.</p>
<p>Thanks to <a target="_blank" href="http://neilmosafi.blogspot.com/2008/03/silverlight-projects-vs-normal-projects.html">Neil Mosafi’s post on converting class library project for Silverlight consumption</a>, I found 2 methods of doing the conversion.</p>
<p>1.) Create a NEW Silverlight&#160; Class Library Project and then ADD your EXISTING code files to the project</p>
<p>2.) Hack the csproj file to change its signature (<a target="_blank" href="http://neilmosafi.blogspot.com/2008/03/silverlight-projects-vs-normal-projects.html">details are courtesy of Neil Mosafi’s post</a>) VS.NET 2008 believes that its a Silverlight Project (don&#8217;t forget the changes needs to be made to both the DEBUG as well as RELEASE sections)</p>
<p>Initially I went about making these changes using method 2 however I kept finding a number of issues relating to duplicate references , especially with the HttpWebRequest object and a few other things. </p>
<p>I also needed to change all non generic collections to use their generic equivalents as all <a target="_blank" href="http://blogs.msdn.com/bclteam/archive/2007/06/26/non-generic-collections-to-be-removed-from-silverlight-inbar-gazit.aspx">non generic collections are not included&#160; in Silverlight 2.0</a></p>
<p>The Serializable attribute is not part of the coreclr, therefore it has to go, XML Serialization is your friend. <a target="_blank" href="http://www.lhotka.net/weblog/SilverlightSerializer.aspx">Rockford Lhotka has started work on an alternative to the Serializable attribute</a> however its extremely limited at this stage, The Silverlight Serializer may suit your needs so do check it out.</p>
<p>The project I was playing with also used a little bit of XPath Navigation and some other System.XML namespace classes that are not part of the cut down version, so I have to change the code to use Linq to XML</p>
<p>There were a whole bunch of other things that I fixed up and was good to go when I realized that the project changes were not referencing the correct mscorlib and system.xml libraries, however the compiler did not seem to mind to much which baffled me. At this point I decided that the safer way was to go down option 1, simply because I thought it would give a much better jumping off point, lo and behold it has. I am pretty close to having it compile correctly for the Silverlight application which I intend to share.</p>
<p>At the end of this all my advice in converting is to go with method 1, as its just much more fool proof.</p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:18fe6348-2d22-41b0-8730-917d8758f325" class="wlWriterEditableSmartContent">Technorati Tags: <a href="http://technorati.com/tags/Silverlight+2.0" rel="tag">Silverlight 2.0</a>,<a href="http://technorati.com/tags/.net" rel="tag">.net</a>,<a href="http://technorati.com/tags/development" rel="tag">development</a></div>
<p><a href="http://www.addtoany.com/add_to/delicious?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2008%2F10%2F23%2Fhow-to-convert-a-normal-class-library-project-to-a-silverlight-20-class-library-project%2F&amp;linkname=How%20To%3A%20Convert%20a%20normal%20Class%20Library%20Project%20to%20a%20Silverlight%202.0%20Class%20Library%20Project" title="Delicious" rel="nofollow" target="_blank"><img src="http://www.markharris.net.au/blog/wp-content/plugins/add-to-any/icons/delicious.png" width="16" height="16" alt="Delicious"/></a> <a href="http://www.addtoany.com/add_to/google_reader?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2008%2F10%2F23%2Fhow-to-convert-a-normal-class-library-project-to-a-silverlight-20-class-library-project%2F&amp;linkname=How%20To%3A%20Convert%20a%20normal%20Class%20Library%20Project%20to%20a%20Silverlight%202.0%20Class%20Library%20Project" title="Google Reader" rel="nofollow" target="_blank"><img src="http://www.markharris.net.au/blog/wp-content/plugins/add-to-any/icons/reader.png" width="16" height="16" alt="Google Reader"/></a> <a href="http://www.addtoany.com/add_to/twitter?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2008%2F10%2F23%2Fhow-to-convert-a-normal-class-library-project-to-a-silverlight-20-class-library-project%2F&amp;linkname=How%20To%3A%20Convert%20a%20normal%20Class%20Library%20Project%20to%20a%20Silverlight%202.0%20Class%20Library%20Project" title="Twitter" rel="nofollow" target="_blank"><img src="http://www.markharris.net.au/blog/wp-content/plugins/add-to-any/icons/twitter.png" width="16" height="16" alt="Twitter"/></a> <a href="http://www.addtoany.com/add_to/facebook?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2008%2F10%2F23%2Fhow-to-convert-a-normal-class-library-project-to-a-silverlight-20-class-library-project%2F&amp;linkname=How%20To%3A%20Convert%20a%20normal%20Class%20Library%20Project%20to%20a%20Silverlight%202.0%20Class%20Library%20Project" title="Facebook" rel="nofollow" target="_blank"><img src="http://www.markharris.net.au/blog/wp-content/plugins/add-to-any/icons/facebook.png" width="16" height="16" alt="Facebook"/></a> <a href="http://www.addtoany.com/add_to/friendfeed?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2008%2F10%2F23%2Fhow-to-convert-a-normal-class-library-project-to-a-silverlight-20-class-library-project%2F&amp;linkname=How%20To%3A%20Convert%20a%20normal%20Class%20Library%20Project%20to%20a%20Silverlight%202.0%20Class%20Library%20Project" title="FriendFeed" rel="nofollow" target="_blank"><img src="http://www.markharris.net.au/blog/wp-content/plugins/add-to-any/icons/friendfeed.png" width="16" height="16" alt="FriendFeed"/></a> <a href="http://www.addtoany.com/add_to/linkedin?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2008%2F10%2F23%2Fhow-to-convert-a-normal-class-library-project-to-a-silverlight-20-class-library-project%2F&amp;linkname=How%20To%3A%20Convert%20a%20normal%20Class%20Library%20Project%20to%20a%20Silverlight%202.0%20Class%20Library%20Project" title="LinkedIn" rel="nofollow" target="_blank"><img src="http://www.markharris.net.au/blog/wp-content/plugins/add-to-any/icons/linkedin.png" width="16" height="16" alt="LinkedIn"/></a> <a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.markharris.net.au%2Fblog%2F2008%2F10%2F23%2Fhow-to-convert-a-normal-class-library-project-to-a-silverlight-20-class-library-project%2F&amp;linkname=How%20To%3A%20Convert%20a%20normal%20Class%20Library%20Project%20to%20a%20Silverlight%202.0%20Class%20Library%20Project">Share/Save</a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.markharris.net.au/blog/2008/10/23/how-to-convert-a-normal-class-library-project-to-a-silverlight-20-class-library-project/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
