<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:copyright="http://blogs.law.harvard.edu/tech/rss" xmlns:image="http://purl.org/rss/1.0/modules/image/">
    <channel>
        <title>Elton Stoneman</title>
        <link>http://geekswithblogs.net/EltonStoneman/Default.aspx</link>
        <description> </description>
        <language>en-GB</language>
        <copyright>EltonStoneman</copyright>
        <managingEditor>elton.stoneman@gmail.com</managingEditor>
        <generator>Subtext Version 0.0.0.0</generator>
        <image>
            <title>Elton Stoneman</title>
            <url>http://geekswithblogs.net/images/RSS2Image.gif</url>
            <link>http://geekswithblogs.net/EltonStoneman/Default.aspx</link>
            <width>77</width>
            <height>60</height>
        </image>
        <item>
            <title>Processing Excel uploads with BizTalk and nServiceBus</title>
            <category>BizTalk 2006 R2</category>
            <category>MSDN Code Gallery</category>
            <category>nServiceBus</category>
            <link>http://geekswithblogs.net/EltonStoneman/archive/2009/11/21/processing-excel-uploads-with-biztalk-and-nservicebus.aspx</link>
            <description>&lt;p&gt; &lt;/p&gt;
&lt;p class="MsoNormal" align="center" style="margin: 0cm 0cm 10pt; text-align: center"&gt;&lt;font face="Calibri"&gt;&lt;span lang="EN-GB" style="font-size: 10pt"&gt;[Source: &lt;/span&gt;&lt;span lang="EN-GB"&gt;&lt;a href="http://geekswithblogs.net/EltonStoneman"&gt;&lt;span style="font-size: 10pt"&gt;&lt;font color="#800080"&gt;http://geekswithblogs.net/EltonStoneman&lt;/font&gt;&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;span lang="EN-GB" style="font-size: 10pt"&gt;]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0cm 0cm 10pt"&gt;&lt;span lang="EN-GB"&gt;&lt;font face="Calibri"&gt;Following on from the sample for &lt;/font&gt;&lt;a href="http://geekswithblogs.net/EltonStoneman/archive/2009/11/18/processing-an-excel-upload-with-nservicebus.aspx"&gt;&lt;font face="Calibri"&gt;processing Excel uploads with nServiceBus&lt;/font&gt;&lt;/a&gt;&lt;font face="Calibri"&gt;, I have a comparable version using BizTalk on MSDN Code Gallery here: &lt;/font&gt;&lt;a href="http://code.msdn.microsoft.com/BTSAndNSBExcelUpload"&gt;&lt;font face="Calibri" color="#800080"&gt;BizTalk and nServiceBus Excel Upload&lt;/font&gt;&lt;/a&gt;&lt;font face="Calibri"&gt;. The BizTalk (2006 R2) sample uses a FILE receive port with a simple pipeline component to disassemble the Excel file into separate messages. A SQL send port subscribes to the messages, and with an outbound map calls the AdventureWorks stored procedure to insert each product.&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0cm 0cm 10pt"&gt;&lt;span lang="EN-GB"&gt;&lt;font face="Calibri"&gt;Processing Excel in BizTalk is nothing new, but I wanted to do a comparison against the nServiceBus example, and also see how BizTalk and nServiceBus could be integrated. My original thinking was that the trigger in the nServiceBus solution relies on a FileSystemWatcher, which is less reliable and less flexible than BizTalk’s FILE adapter. A hybrid solution could use the FILE adapter to receive and parse the upload, then send each row as an AddProduct message to MSMQ, which the nServiceBus handler subscribes to.&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0cm 0cm 10pt"&gt;&lt;span lang="EN-GB"&gt;&lt;font face="Calibri"&gt;Running this on the same environment (a Windows Server 2003 VM running under VirtualBox in Ubuntu 9.04), the BizTalk solution processes the 3,500 row Excel file in 3 mins 10 seconds (compared to 4m 15s for the distributed NSB running with 5 threads), and the 12,000 row file in 11m 14s (compared to 14m 0s). I was surprised to find the BizTalk solution running more quickly, as the original NSB was using non-recoverable messaging, so all messages were in memory, while BizTalk had the latency of writing to the message box. &lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0cm 0cm 10pt"&gt;&lt;i style="mso-bidi-font-style: normal"&gt;&lt;span lang="EN-GB"&gt;&lt;font face="Calibri"&gt;Performance Comparison&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/span&gt;&lt;/i&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0cm 0cm 10pt"&gt;&lt;span lang="EN-GB"&gt;&lt;font face="Calibri"&gt;This is not an intended to be a thorough benchmark of NSB and BizTalk – both sample projects are basic, untuned implementations, and the tests are on a single box rather than two or three. But for comparison, I ran the 3,500 row upload repeatedly under different configurations:&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoListParagraphCxSpFirst" style="margin: 0cm 0cm 0pt 36pt; text-indent: -18pt; mso-list: l2 level1 lfo1"&gt;&lt;span lang="EN-GB" style="mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"&gt;&lt;span style="mso-list: Ignore"&gt;&lt;font face="Calibri"&gt;1.&lt;/font&gt;&lt;span style="font: 7pt 'Times New Roman'"&gt;       &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span lang="EN-GB"&gt;&lt;font face="Calibri"&gt;NSB with distributor – host and distributor using 20 threads&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoListParagraphCxSpMiddle" style="margin: 0cm 0cm 0pt 36pt; text-indent: -18pt; mso-list: l2 level1 lfo1"&gt;&lt;span lang="EN-GB" style="mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"&gt;&lt;span style="mso-list: Ignore"&gt;&lt;font face="Calibri"&gt;2.&lt;/font&gt;&lt;span style="font: 7pt 'Times New Roman'"&gt;       &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span lang="EN-GB"&gt;&lt;font face="Calibri"&gt;NSB with distributor – host and distributor using 20 threads, recoverable messaging&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoListParagraphCxSpMiddle" style="margin: 0cm 0cm 0pt 36pt; text-indent: -18pt; mso-list: l2 level1 lfo1"&gt;&lt;span lang="EN-GB" style="mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"&gt;&lt;span style="mso-list: Ignore"&gt;&lt;font face="Calibri"&gt;3.&lt;/font&gt;&lt;span style="font: 7pt 'Times New Roman'"&gt;       &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span lang="EN-GB"&gt;&lt;font face="Calibri"&gt;NSB without distributor – host using 20 threads&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoListParagraphCxSpMiddle" style="margin: 0cm 0cm 0pt 36pt; text-indent: -18pt; mso-list: l2 level1 lfo1"&gt;&lt;span lang="EN-GB" style="mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"&gt;&lt;span style="mso-list: Ignore"&gt;&lt;font face="Calibri"&gt;4.&lt;/font&gt;&lt;span style="font: 7pt 'Times New Roman'"&gt;       &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span lang="EN-GB"&gt;&lt;font face="Calibri"&gt;NSB without distributor – host using 20 threads, recoverable messaging&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoListParagraphCxSpMiddle" style="margin: 0cm 0cm 0pt 36pt; text-indent: -18pt; mso-list: l2 level1 lfo1"&gt;&lt;span lang="EN-GB" style="mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"&gt;&lt;span style="mso-list: Ignore"&gt;&lt;font face="Calibri"&gt;5.&lt;/font&gt;&lt;span style="font: 7pt 'Times New Roman'"&gt;       &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span lang="EN-GB"&gt;&lt;font face="Calibri"&gt;BizTalk FILE receive and SQL send&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoListParagraphCxSpMiddle" style="margin: 0cm 0cm 0pt 36pt; text-indent: -18pt; mso-list: l2 level1 lfo1"&gt;&lt;span lang="EN-GB" style="mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"&gt;&lt;span style="mso-list: Ignore"&gt;&lt;font face="Calibri"&gt;6.&lt;/font&gt;&lt;span style="font: 7pt 'Times New Roman'"&gt;       &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span lang="EN-GB"&gt;&lt;font face="Calibri"&gt;NSB parsing Excel file, BizTalk subscribing to AddProduct messages – MSMQ receive using batches of 100&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoListParagraphCxSpLast" style="margin: 0cm 0cm 10pt 36pt; text-indent: -18pt; mso-list: l2 level1 lfo1"&gt;&lt;span lang="EN-GB" style="mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"&gt;&lt;span style="mso-list: Ignore"&gt;&lt;font face="Calibri"&gt;7.&lt;/font&gt;&lt;span style="font: 7pt 'Times New Roman'"&gt;       &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span lang="EN-GB"&gt;&lt;font face="Calibri"&gt;BizTalk parsing Excel file, NSB without distributor subscribing to AddProduct messages – host using 20 threads&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0cm 0cm 10pt"&gt;&lt;span lang="EN-GB"&gt;&lt;font face="Calibri"&gt;Which gave these averaged results:&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0cm 0cm 10pt"&gt;&lt;span style="mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-no-proof: yes"&gt;&lt;v:shapetype id="_x0000_t75" stroked="f" filled="f" path="m@4@5l@4@11@9@11@9@5xe" o:preferrelative="t" o:spt="75" coordsize="21600,21600"&gt;&lt;v:stroke joinstyle="miter"&gt;&lt;/v:stroke&gt;&lt;v:formulas&gt;&lt;v:f eqn="if lineDrawn pixelLineWidth 0"&gt;&lt;/v:f&gt;&lt;v:f eqn="sum @0 1 0"&gt;&lt;/v:f&gt;&lt;v:f eqn="sum 0 0 @1"&gt;&lt;/v:f&gt;&lt;v:f eqn="prod @2 1 2"&gt;&lt;/v:f&gt;&lt;v:f eqn="prod @3 21600 pixelWidth"&gt;&lt;/v:f&gt;&lt;v:f eqn="prod @3 21600 pixelHeight"&gt;&lt;/v:f&gt;&lt;v:f eqn="sum @0 0 1"&gt;&lt;/v:f&gt;&lt;v:f eqn="prod @6 1 2"&gt;&lt;/v:f&gt;&lt;v:f eqn="prod @7 21600 pixelWidth"&gt;&lt;/v:f&gt;&lt;v:f eqn="sum @8 21600 0"&gt;&lt;/v:f&gt;&lt;v:f eqn="prod @7 21600 pixelHeight"&gt;&lt;/v:f&gt;&lt;v:f eqn="sum @10 21600 0"&gt;&lt;/v:f&gt;&lt;/v:formulas&gt;&lt;v:path o:connecttype="rect" gradientshapeok="t" o:extrusionok="f"&gt;&lt;/v:path&gt;&lt;o:lock aspectratio="t" v:ext="edit"&gt;&lt;/o:lock&gt;&lt;/v:shapetype&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0cm 0cm 10pt"&gt;&lt;span lang="EN-GB"&gt;&lt;font face="Calibri"&gt;&lt;img height="282" width="456" alt="" src="/images/geekswithblogs_net/EltonStoneman/NSBBTSChart.PNG" /&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0cm 0cm 10pt"&gt;&lt;span lang="EN-GB"&gt;&lt;font face="Calibri"&gt;Boosting the number of threads dramatically improved the NSB performance, and removing the distributor halved the duration. I would expect that running the distributor on a separate node would yield similarly good results on each processing node. The hybrid BizTalk/NSB configurations were the slowest – to be expected, as you have the latency of the message box and the latency of MSMQ saving to disk. NSB configurations without recoverable messaging were only marginally slower than the recoverable version, which seems incorrect based on &lt;/font&gt;&lt;a href="http://www.udidahan.com/2008/05/21/nservicebus-performance/"&gt;&lt;font face="Calibri" color="#800080"&gt;Udi Dahan’s performance benchmark&lt;/font&gt;&lt;/a&gt;&lt;font face="Calibri"&gt;, so I’ll need to look into that further.&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0cm 0cm 10pt"&gt;&lt;span lang="EN-GB"&gt;&lt;font face="Calibri"&gt;There’s plenty of scope for improving performance in both solutions. BizTalk can be endlessly tuned (the &lt;/font&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/aa475435(BTS.10).aspx"&gt;&lt;font face="Calibri"&gt;2004 guidelines&lt;/font&gt;&lt;/a&gt;&lt;font face="Calibri"&gt; still apply as a good starting point). By modifying the NSB solution to send the AddProduct messages in one opration and using 80 threads for the handler, duration fell to 25 seconds – 140 messages per second.&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0cm 0cm 10pt"&gt;&lt;i style="mso-bidi-font-style: normal"&gt;&lt;span lang="EN-GB"&gt;&lt;font face="Calibri"&gt;Integrating BizTalk and nServiceBus&lt;/font&gt;&lt;/span&gt;&lt;/i&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0cm 0cm 10pt"&gt;&lt;span lang="EN-GB"&gt;&lt;font face="Calibri"&gt;Despite having the worst performance, integrating BizTalk and nServiceBus is a viable option which may be very useful in some cases. It would allow you to leverage BizTalk’s adapter suite and mapping functionality to join LOB systems into an nServiceBus estate. Integration is actually very straightforward. By default NSB uses MSMQ, so to publish messages from BizTalk to an NSB subscriber just means configuring an MSMQ send port with the expected queue, and mapping your message to NSB format – which is an envelope containing one or messages:&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-size: 9pt; color: blue; font-family: 'Courier New'; mso-ansi-language: EN-US; mso-no-proof: yes"&gt;&amp;lt;?&lt;/span&gt;&lt;span style="font-size: 9pt; color: #a31515; font-family: 'Courier New'; mso-ansi-language: EN-US; mso-no-proof: yes"&gt;xml&lt;/span&gt;&lt;span style="font-size: 9pt; color: blue; font-family: 'Courier New'; mso-ansi-language: EN-US; mso-no-proof: yes"&gt; &lt;/span&gt;&lt;span style="font-size: 9pt; color: red; font-family: 'Courier New'; mso-ansi-language: EN-US; mso-no-proof: yes"&gt;version&lt;/span&gt;&lt;span style="font-size: 9pt; color: blue; font-family: 'Courier New'; mso-ansi-language: EN-US; mso-no-proof: yes"&gt;=&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: 'Courier New'; mso-ansi-language: EN-US; mso-no-proof: yes"&gt;"&lt;span style="color: blue"&gt;1.0&lt;/span&gt;"&lt;span style="color: blue"&gt; ?&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-size: 9pt; color: blue; font-family: 'Courier New'; mso-ansi-language: EN-US; mso-no-proof: yes"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size: 9pt; color: #a31515; font-family: 'Courier New'; mso-ansi-language: EN-US; mso-no-proof: yes"&gt;Messages&lt;/span&gt;&lt;span style="font-size: 9pt; color: blue; font-family: 'Courier New'; mso-ansi-language: EN-US; mso-no-proof: yes"&gt; &lt;/span&gt;&lt;span style="font-size: 9pt; color: red; font-family: 'Courier New'; mso-ansi-language: EN-US; mso-no-proof: yes"&gt;xmlns:xsi&lt;/span&gt;&lt;span style="font-size: 9pt; color: blue; font-family: 'Courier New'; mso-ansi-language: EN-US; mso-no-proof: yes"&gt;=&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: 'Courier New'; mso-ansi-language: EN-US; mso-no-proof: yes"&gt;"&lt;span style="color: blue"&gt;http://www.w3.org/2001/XMLSchema-instance&lt;/span&gt;"&lt;span style="color: blue"&gt; &lt;/span&gt;&lt;span style="color: red"&gt;xmlns:xsd&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;http://www.w3.org/2001/XMLSchema&lt;/span&gt;"&lt;span style="color: blue"&gt; &lt;/span&gt;&lt;span style="color: red"&gt;xmlns&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;"&lt;span style="color: blue"&gt;http://tempuri.net/ExcelUpload.Messages&lt;/span&gt;"&lt;span style="color: blue"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-size: 9pt; color: blue; font-family: 'Courier New'; mso-ansi-language: EN-US; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;  &lt;/span&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size: 9pt; color: #a31515; font-family: 'Courier New'; mso-ansi-language: EN-US; mso-no-proof: yes"&gt;AddProduct&lt;/span&gt;&lt;span style="font-size: 9pt; color: blue; font-family: 'Courier New'; mso-ansi-language: EN-US; mso-no-proof: yes"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-size: 9pt; color: blue; font-family: 'Courier New'; mso-ansi-language: EN-US; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;    &lt;/span&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size: 9pt; color: #a31515; font-family: 'Courier New'; mso-ansi-language: EN-US; mso-no-proof: yes"&gt;BatchId&lt;/span&gt;&lt;span style="font-size: 9pt; color: blue; font-family: 'Courier New'; mso-ansi-language: EN-US; mso-no-proof: yes"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: 'Courier New'; mso-ansi-language: EN-US; mso-no-proof: yes"&gt;7a80fed4-9d30-44fe-95b0-08218c5f328e&lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;BatchId&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-size: 9pt; color: blue; font-family: 'Courier New'; mso-ansi-language: EN-US; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;    &lt;/span&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size: 9pt; color: #a31515; font-family: 'Courier New'; mso-ansi-language: EN-US; mso-no-proof: yes"&gt;RegistrationIndex&lt;/span&gt;&lt;span style="font-size: 9pt; color: blue; font-family: 'Courier New'; mso-ansi-language: EN-US; mso-no-proof: yes"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: 'Courier New'; mso-ansi-language: EN-US; mso-no-proof: yes"&gt;58&lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;RegistrationIndex&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-size: 9pt; color: blue; font-family: 'Courier New'; mso-ansi-language: EN-US; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;    &lt;/span&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size: 9pt; color: #a31515; font-family: 'Courier New'; mso-ansi-language: EN-US; mso-no-proof: yes"&gt;RegistrationsInBatch&lt;/span&gt;&lt;span style="font-size: 9pt; color: blue; font-family: 'Courier New'; mso-ansi-language: EN-US; mso-no-proof: yes"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: 'Courier New'; mso-ansi-language: EN-US; mso-no-proof: yes"&gt;254&lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;RegistrationsInBatch&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-size: 9pt; color: blue; font-family: 'Courier New'; mso-ansi-language: EN-US; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;    &lt;/span&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size: 9pt; color: #a31515; font-family: 'Courier New'; mso-ansi-language: EN-US; mso-no-proof: yes"&gt;BatchSourcePath&lt;/span&gt;&lt;span style="font-size: 9pt; color: blue; font-family: 'Courier New'; mso-ansi-language: EN-US; mso-no-proof: yes"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: 'Courier New'; mso-ansi-language: EN-US; mso-no-proof: yes"&gt;E:\ExcelUpload\1.0.0.0\Binaries\Drops\ProductUpload.xls&lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;BatchSourcePath&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-size: 9pt; color: blue; font-family: 'Courier New'; mso-ansi-language: EN-US; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;    &lt;/span&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size: 9pt; color: #a31515; font-family: 'Courier New'; mso-ansi-language: EN-US; mso-no-proof: yes"&gt;OriginatorDestination&lt;/span&gt;&lt;span style="font-size: 9pt; color: blue; font-family: 'Courier New'; mso-ansi-language: EN-US; mso-no-proof: yes"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: 'Courier New'; mso-ansi-language: EN-US; mso-no-proof: yes"&gt;ExcelUpload.Client.InputQueue@WIN2003R2-VM&lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;OriginatorDestination&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-size: 9pt; color: blue; font-family: 'Courier New'; mso-ansi-language: EN-US; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;    &lt;/span&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size: 9pt; color: #a31515; font-family: 'Courier New'; mso-ansi-language: EN-US; mso-no-proof: yes"&gt;Name&lt;/span&gt;&lt;span style="font-size: 9pt; color: blue; font-family: 'Courier New'; mso-ansi-language: EN-US; mso-no-proof: yes"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: 'Courier New'; mso-ansi-language: EN-US; mso-no-proof: yes"&gt;new product 58&lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;Name&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-size: 9pt; color: blue; font-family: 'Courier New'; mso-ansi-language: EN-US; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;    &lt;/span&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size: 9pt; color: #a31515; font-family: 'Courier New'; mso-ansi-language: EN-US; mso-no-proof: yes"&gt;ProductNumber&lt;/span&gt;&lt;span style="font-size: 9pt; color: blue; font-family: 'Courier New'; mso-ansi-language: EN-US; mso-no-proof: yes"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: 'Courier New'; mso-ansi-language: EN-US; mso-no-proof: yes"&gt;xlu-np-58&lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;ProductNumber&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-size: 9pt; color: blue; font-family: 'Courier New'; mso-ansi-language: EN-US; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;    &lt;/span&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size: 9pt; color: #a31515; font-family: 'Courier New'; mso-ansi-language: EN-US; mso-no-proof: yes"&gt;SafetyStockLevel&lt;/span&gt;&lt;span style="font-size: 9pt; color: blue; font-family: 'Courier New'; mso-ansi-language: EN-US; mso-no-proof: yes"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: 'Courier New'; mso-ansi-language: EN-US; mso-no-proof: yes"&gt;100&lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;SafetyStockLevel&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-size: 9pt; color: blue; font-family: 'Courier New'; mso-ansi-language: EN-US; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;    &lt;/span&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size: 9pt; color: #a31515; font-family: 'Courier New'; mso-ansi-language: EN-US; mso-no-proof: yes"&gt;ReorderPoint&lt;/span&gt;&lt;span style="font-size: 9pt; color: blue; font-family: 'Courier New'; mso-ansi-language: EN-US; mso-no-proof: yes"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: 'Courier New'; mso-ansi-language: EN-US; mso-no-proof: yes"&gt;20&lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;ReorderPoint&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-size: 9pt; color: blue; font-family: 'Courier New'; mso-ansi-language: EN-US; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;    &lt;/span&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size: 9pt; color: #a31515; font-family: 'Courier New'; mso-ansi-language: EN-US; mso-no-proof: yes"&gt;StandardCost&lt;/span&gt;&lt;span style="font-size: 9pt; color: blue; font-family: 'Courier New'; mso-ansi-language: EN-US; mso-no-proof: yes"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: 'Courier New'; mso-ansi-language: EN-US; mso-no-proof: yes"&gt;10&lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;StandardCost&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-size: 9pt; color: blue; font-family: 'Courier New'; mso-ansi-language: EN-US; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;    &lt;/span&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size: 9pt; color: #a31515; font-family: 'Courier New'; mso-ansi-language: EN-US; mso-no-proof: yes"&gt;ListPrice&lt;/span&gt;&lt;span style="font-size: 9pt; color: blue; font-family: 'Courier New'; mso-ansi-language: EN-US; mso-no-proof: yes"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: 'Courier New'; mso-ansi-language: EN-US; mso-no-proof: yes"&gt;15.5&lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;ListPrice&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-size: 9pt; color: blue; font-family: 'Courier New'; mso-ansi-language: EN-US; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;    &lt;/span&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size: 9pt; color: #a31515; font-family: 'Courier New'; mso-ansi-language: EN-US; mso-no-proof: yes"&gt;DaysToManufacture&lt;/span&gt;&lt;span style="font-size: 9pt; color: blue; font-family: 'Courier New'; mso-ansi-language: EN-US; mso-no-proof: yes"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: 'Courier New'; mso-ansi-language: EN-US; mso-no-proof: yes"&gt;60&lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;DaysToManufacture&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-size: 9pt; color: blue; font-family: 'Courier New'; mso-ansi-language: EN-US; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;    &lt;/span&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size: 9pt; color: #a31515; font-family: 'Courier New'; mso-ansi-language: EN-US; mso-no-proof: yes"&gt;SellStartDate&lt;/span&gt;&lt;span style="font-size: 9pt; color: blue; font-family: 'Courier New'; mso-ansi-language: EN-US; mso-no-proof: yes"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: 'Courier New'; mso-ansi-language: EN-US; mso-no-proof: yes"&gt;2005-02-27T00:00:00.0000000&lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;SellStartDate&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-size: 9pt; color: blue; font-family: 'Courier New'; mso-ansi-language: EN-US; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;  &lt;/span&gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-size: 9pt; color: #a31515; font-family: 'Courier New'; mso-ansi-language: EN-US; mso-no-proof: yes"&gt;AddProduct&lt;/span&gt;&lt;span style="font-size: 9pt; color: blue; font-family: 'Courier New'; mso-ansi-language: EN-US; mso-no-proof: yes"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0cm 0cm 10pt"&gt;&lt;span style="font-size: 9pt; color: blue; font-family: 'Courier New'; mso-ansi-language: EN-US; mso-no-proof: yes"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-size: 9pt; color: #a31515; font-family: 'Courier New'; mso-ansi-language: EN-US; mso-no-proof: yes"&gt;Messages&lt;/span&gt;&lt;span style="font-size: 9pt; color: blue; font-family: 'Courier New'; mso-ansi-language: EN-US; mso-no-proof: yes"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0cm 0cm 10pt"&gt;&lt;span lang="EN-GB"&gt;&lt;font face="Calibri"&gt;The MSMQ adapter lets you specify Recoverable and Transactional flags, so your BizTalk-generated messages have the same durability options. When an NSB handler is listening at the queue, it processes the BizTalk messages in the same way as NSB messages.&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0cm 0cm 10pt"&gt;&lt;span lang="EN-GB"&gt;&lt;font face="Calibri"&gt;Publishing NSB messages to BizTalk is trickier, as the Send and Publish methods from NSB check to see if there are any subscribers before they write to the queue (compare this to the &lt;/font&gt;&lt;a href="http://ayende.com/Blog/archive/2008/12/17/rhino-service-bus.aspx"&gt;&lt;font face="Calibri"&gt;Notify method in RhinoServiceBus&lt;/font&gt;&lt;/a&gt;&lt;font face="Calibri"&gt;). If a BizTalk MSMQ receive port is the only handler, no subscribers will be registered with NSB and the message won’t be published. So you need to either call Send with a named queue (&lt;/font&gt;&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: 'Courier New'; mso-ansi-language: EN-US; mso-no-proof: yes"&gt;Bus.Send&amp;lt;&lt;span style="color: #2b91af"&gt;AddProduct&lt;/span&gt;&amp;gt;(&lt;span style="color: #a31515"&gt;"ExcelUpload.AddProductService.1.InputQueue"&lt;/span&gt;, m =&amp;gt;...)&lt;/span&gt;&lt;span lang="EN-GB"&gt;&lt;font face="Calibri"&gt;, or send a subscription message from BizTalk to register a subscriber. In the the second option you’d need to specify the message type in the subscription:&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-size: 9pt; color: blue; font-family: 'Courier New'; mso-ansi-language: EN-US"&gt;&amp;lt;?xml version="1.0" ?&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;span style="font-size: 9pt; color: blue; font-family: 'Courier New'; mso-ansi-language: EN-US"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size: 9pt; color: firebrick; font-family: 'Courier New'; mso-ansi-language: EN-US"&gt;string&lt;/span&gt;&lt;span style="font-size: 9pt; color: blue; font-family: 'Courier New'; mso-ansi-language: EN-US"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-size: 9pt; color: black; font-family: 'Courier New'; mso-ansi-language: EN-US; mso-bidi-font-weight: bold"&gt;ExcelUpload&lt;b&gt;.&lt;/b&gt;Messages.StartBatchUpload, ExcelUpload.Messages, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null&lt;/span&gt;&lt;span style="font-size: 9pt; color: blue; font-family: 'Courier New'; mso-ansi-language: EN-US"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-size: 9pt; color: firebrick; font-family: 'Courier New'; mso-ansi-language: EN-US"&gt;string&lt;/span&gt;&lt;span style="font-size: 9pt; color: blue; font-family: 'Courier New'; mso-ansi-language: EN-US"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0cm 0cm 0pt"&gt;&lt;i style="mso-bidi-font-style: normal"&gt;&lt;span lang="EN-GB"&gt;&lt;o:p&gt;&lt;font face="Calibri"&gt; &lt;/font&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/i&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0cm 0cm 10pt"&gt;&lt;i style="mso-bidi-font-style: normal"&gt;&lt;span lang="EN-GB"&gt;&lt;font face="Calibri"&gt;Running the Sample&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/span&gt;&lt;/i&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0cm 0cm 10pt"&gt;&lt;span lang="EN-GB"&gt;&lt;font face="Calibri"&gt;(If you haven’t seen &lt;/font&gt;&lt;a href="http://geekswithblogs.net/EltonStoneman/archive/2009/11/18/processing-an-excel-upload-with-nservicebus.aspx"&gt;&lt;font face="Calibri"&gt;the original NSB sample&lt;/font&gt;&lt;/a&gt;&lt;font face="Calibri"&gt;, have a read as it details the pre-requisites).&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0cm 0cm 10pt"&gt;&lt;span lang="EN-GB"&gt;&lt;font face="Calibri"&gt;To run the BizTalk solution, download ExcelUpload.BizTalk.Binaries.zip, unzip it and:&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoListParagraphCxSpFirst" style="margin: 0cm 0cm 0pt 36pt; text-indent: -18pt; mso-list: l0 level1 lfo2"&gt;&lt;span lang="EN-GB" style="font-family: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol"&gt;&lt;span style="mso-list: Ignore"&gt;·&lt;span style="font: 7pt 'Times New Roman'"&gt;         &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span lang="EN-GB"&gt;&lt;font face="Calibri"&gt;Copy &lt;i style="mso-bidi-font-style: normal"&gt;ExcelUpload.PipelineComponents.dll&lt;/i&gt; to your pipeline components directory – e.g. &lt;i style="mso-bidi-font-style: normal"&gt;C:\Program Files\Microsoft BizTalk Server 2006\Pipeline Components&lt;/i&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoListParagraphCxSpMiddle" style="margin: 0cm 0cm 0pt 36pt; text-indent: -18pt; mso-list: l0 level1 lfo2"&gt;&lt;span lang="EN-GB" style="font-family: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol"&gt;&lt;span style="mso-list: Ignore"&gt;·&lt;span style="font: 7pt 'Times New Roman'"&gt;         &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span lang="EN-GB"&gt;&lt;font face="Calibri"&gt;If you haven’t done so from the previous sample, run &lt;i style="mso-bidi-font-style: normal"&gt;uspInsertProduct.CREATE.sql&lt;/i&gt; &lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoListParagraphCxSpMiddle" style="margin: 0cm 0cm 0pt 36pt; text-indent: -18pt; mso-list: l0 level1 lfo2"&gt;&lt;span lang="EN-GB" style="font-family: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol"&gt;&lt;span style="mso-list: Ignore"&gt;·&lt;span style="font: 7pt 'Times New Roman'"&gt;         &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span lang="EN-GB"&gt;&lt;font face="Calibri"&gt;Run &lt;i style="mso-bidi-font-style: normal"&gt;uspInsertProduct.CREATESYNONYM.sql&lt;/i&gt; &lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoListParagraphCxSpMiddle" style="margin: 0cm 0cm 0pt 36pt; text-indent: -18pt; mso-list: l0 level1 lfo2"&gt;&lt;span lang="EN-GB" style="font-family: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol"&gt;&lt;span style="mso-list: Ignore"&gt;·&lt;span style="font: 7pt 'Times New Roman'"&gt;         &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span lang="EN-GB"&gt;&lt;font face="Calibri"&gt;Import the MSI into BizTalk&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoListParagraphCxSpMiddle" style="margin: 0cm 0cm 0pt 36pt; text-indent: -18pt; mso-list: l0 level1 lfo2"&gt;&lt;span lang="EN-GB" style="font-family: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol"&gt;&lt;span style="mso-list: Ignore"&gt;·&lt;span style="font: 7pt 'Times New Roman'"&gt;         &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span lang="EN-GB"&gt;&lt;font face="Calibri"&gt;Run the MSI&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoListParagraphCxSpMiddle" style="margin: 0cm 0cm 0pt 36pt; text-indent: -18pt; mso-list: l0 level1 lfo2"&gt;&lt;span lang="EN-GB" style="font-family: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol"&gt;&lt;span style="mso-list: Ignore"&gt;·&lt;span style="font: 7pt 'Times New Roman'"&gt;         &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span lang="EN-GB"&gt;&lt;font face="Calibri"&gt;Start send port SendInsertProduct.SQL (you’ll need to change the connection details)&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoListParagraphCxSpMiddle" style="margin: 0cm 0cm 0pt 36pt; text-indent: -18pt; mso-list: l0 level1 lfo2"&gt;&lt;span lang="EN-GB" style="font-family: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol"&gt;&lt;span style="mso-list: Ignore"&gt;·&lt;span style="font: 7pt 'Times New Roman'"&gt;         &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span lang="EN-GB"&gt;&lt;font face="Calibri"&gt;Enable receive location ReceiveStartUpload.FILE.XLS (monitors c:\drops\ExcelUpload)&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoListParagraphCxSpLast" style="margin: 0cm 0cm 10pt 36pt; text-indent: -18pt; mso-list: l0 level1 lfo2"&gt;&lt;span lang="EN-GB" style="font-family: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol"&gt;&lt;span style="mso-list: Ignore"&gt;·&lt;span style="font: 7pt 'Times New Roman'"&gt;         &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span lang="EN-GB"&gt;&lt;font face="Calibri"&gt;Drop an Excel file&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0cm 0cm 10pt"&gt;&lt;span lang="EN-GB"&gt;&lt;font face="Calibri"&gt;As before, you’ll need to clear down the database between runs if you drop the same file repeatedly.&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0cm 0cm 10pt"&gt;&lt;span lang="EN-GB"&gt;&lt;font face="Calibri"&gt;If you want to run the hybrid solutions, you should use the binaries in the new download rather than the original, as these run without a distributor. Run &lt;i style="mso-bidi-font-style: normal"&gt;start.cmd&lt;/i&gt; and there are three windows – Client (the file watcher), Host (the StartBatchUpload handler) and AddProductService (this is the AddProduct handler). &lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0cm 0cm 10pt"&gt;&lt;span lang="EN-GB"&gt;&lt;font face="Calibri"&gt;To run configuration 6 – NSB parsing the file and BizTalk handling the AddProduct messages:&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoListParagraphCxSpFirst" style="margin: 0cm 0cm 0pt 38.25pt; text-indent: -18pt; mso-add-space: auto; mso-list: l1 level1 lfo3"&gt;&lt;span lang="EN-GB" style="font-family: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol"&gt;&lt;span style="mso-list: Ignore"&gt;·&lt;span style="font: 7pt 'Times New Roman'"&gt;         &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span lang="EN-GB"&gt;&lt;font face="Calibri"&gt;Run start.cmd&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoListParagraphCxSpMiddle" style="margin: 0cm 0cm 0pt 38.25pt; text-indent: -18pt; mso-add-space: auto; mso-list: l1 level1 lfo3"&gt;&lt;span lang="EN-GB" style="font-family: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol"&gt;&lt;span style="mso-list: Ignore"&gt;·&lt;span style="font: 7pt 'Times New Roman'"&gt;         &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span lang="EN-GB"&gt;&lt;font face="Calibri"&gt;Kill the AddProductService console&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoListParagraphCxSpMiddle" style="margin: 0cm 0cm 0pt 38.25pt; text-indent: -18pt; mso-add-space: auto; mso-list: l1 level1 lfo3"&gt;&lt;span lang="EN-GB" style="font-family: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol"&gt;&lt;span style="mso-list: Ignore"&gt;·&lt;span style="font: 7pt 'Times New Roman'"&gt;         &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span lang="EN-GB"&gt;&lt;font face="Calibri"&gt;Disable receive location ReceiveStartUpload.FILE.XLS&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoListParagraphCxSpMiddle" style="margin: 0cm 0cm 0pt 38.25pt; text-indent: -18pt; mso-add-space: auto; mso-list: l1 level1 lfo3"&gt;&lt;span lang="EN-GB" style="font-family: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol"&gt;&lt;span style="mso-list: Ignore"&gt;·&lt;span style="font: 7pt 'Times New Roman'"&gt;         &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span lang="EN-GB"&gt;&lt;font face="Calibri"&gt;Enable receive location ReceiveAddProduct.MSMQ&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoListParagraphCxSpMiddle" style="margin: 0cm 0cm 0pt 38.25pt; text-indent: -18pt; mso-add-space: auto; mso-list: l1 level1 lfo3"&gt;&lt;span lang="EN-GB" style="font-family: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol"&gt;&lt;span style="mso-list: Ignore"&gt;·&lt;span style="font: 7pt 'Times New Roman'"&gt;         &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span lang="EN-GB"&gt;&lt;font face="Calibri"&gt;Unenlist send port SendAddProduct.MSMQ&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoListParagraphCxSpMiddle" style="margin: 0cm 0cm 0pt 38.25pt; text-indent: -18pt; mso-add-space: auto; mso-list: l1 level1 lfo3"&gt;&lt;span lang="EN-GB" style="font-family: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol"&gt;&lt;span style="mso-list: Ignore"&gt;·&lt;span style="font: 7pt 'Times New Roman'"&gt;         &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span lang="EN-GB"&gt;&lt;font face="Calibri"&gt;Start send port SendInsertProduct.SQL&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoListParagraphCxSpLast" style="margin: 0cm 0cm 10pt 38.25pt; text-indent: -18pt; mso-add-space: auto; mso-list: l1 level1 lfo3"&gt;&lt;span lang="EN-GB" style="font-family: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol"&gt;&lt;span style="mso-list: Ignore"&gt;·&lt;span style="font: 7pt 'Times New Roman'"&gt;         &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span lang="EN-GB"&gt;&lt;font face="Calibri"&gt;Drop an Excel file&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0cm 0cm 10pt"&gt;&lt;span lang="EN-GB"&gt;&lt;font face="Calibri"&gt;To run configuration 7 – BizTalk parsing the file and NSB handling the AddProduct messages:&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoListParagraphCxSpFirst" style="margin: 0cm 0cm 0pt 38.25pt; text-indent: -18pt; mso-add-space: auto; mso-list: l1 level1 lfo3"&gt;&lt;span lang="EN-GB" style="font-family: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol"&gt;&lt;span style="mso-list: Ignore"&gt;·&lt;span style="font: 7pt 'Times New Roman'"&gt;         &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span lang="EN-GB"&gt;&lt;font face="Calibri"&gt;Run start.cmd&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoListParagraphCxSpMiddle" style="margin: 0cm 0cm 0pt 38.25pt; text-indent: -18pt; mso-add-space: auto; mso-list: l1 level1 lfo3"&gt;&lt;span lang="EN-GB" style="font-family: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol"&gt;&lt;span style="mso-list: Ignore"&gt;·&lt;span style="font: 7pt 'Times New Roman'"&gt;         &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span lang="EN-GB"&gt;&lt;font face="Calibri"&gt;Kill the Host and Client consoles&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoListParagraphCxSpMiddle" style="margin: 0cm 0cm 0pt 38.25pt; text-indent: -18pt; mso-add-space: auto; mso-list: l1 level1 lfo3"&gt;&lt;span lang="EN-GB" style="font-family: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol"&gt;&lt;span style="mso-list: Ignore"&gt;·&lt;span style="font: 7pt 'Times New Roman'"&gt;         &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span lang="EN-GB"&gt;&lt;font face="Calibri"&gt;Enable receive location ReceiveStartUpload.FILE.XLS&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoListParagraphCxSpMiddle" style="margin: 0cm 0cm 0pt 38.25pt; text-indent: -18pt; mso-add-space: auto; mso-list: l1 level1 lfo3"&gt;&lt;span lang="EN-GB" style="font-family: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol"&gt;&lt;span style="mso-list: Ignore"&gt;·&lt;span style="font: 7pt 'Times New Roman'"&gt;         &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span lang="EN-GB"&gt;&lt;font face="Calibri"&gt;Disable receive location ReceiveAddProduct.MSMQ&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoListParagraphCxSpMiddle" style="margin: 0cm 0cm 0pt 38.25pt; text-indent: -18pt; mso-add-space: auto; mso-list: l1 level1 lfo3"&gt;&lt;span lang="EN-GB" style="font-family: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol"&gt;&lt;span style="mso-list: Ignore"&gt;·&lt;span style="font: 7pt 'Times New Roman'"&gt;         &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span lang="EN-GB"&gt;&lt;font face="Calibri"&gt;Start send port SendAddProduct.MSMQ&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoListParagraphCxSpMiddle" style="margin: 0cm 0cm 0pt 38.25pt; text-indent: -18pt; mso-add-space: auto; mso-list: l1 level1 lfo3"&gt;&lt;span lang="EN-GB" style="font-family: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol"&gt;&lt;span style="mso-list: Ignore"&gt;·&lt;span style="font: 7pt 'Times New Roman'"&gt;         &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span lang="EN-GB"&gt;&lt;font face="Calibri"&gt;Unenlist send port SendInsertProduct.SQL&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoListParagraphCxSpLast" style="margin: 0cm 0cm 10pt 38.25pt; text-indent: -18pt; mso-add-space: auto; mso-list: l1 level1 lfo3"&gt;&lt;span lang="EN-GB" style="font-family: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol"&gt;&lt;span style="mso-list: Ignore"&gt;·&lt;span style="font: 7pt 'Times New Roman'"&gt;         &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span lang="EN-GB"&gt;&lt;font face="Calibri"&gt;Drop an Excel file&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0cm 0cm 10pt"&gt;&lt;i style="mso-bidi-font-style: normal"&gt;&lt;span lang="EN-GB"&gt;&lt;font face="Calibri"&gt;Source Code&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/span&gt;&lt;/i&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0cm 0cm 10pt"&gt;&lt;span lang="EN-GB"&gt;&lt;font face="Calibri"&gt;The source and referenced assemblies are in &lt;i style="mso-bidi-font-style: normal"&gt;ExcelUpload.BizTalk.Source.zip&lt;/i&gt;. There is a VS 2008 solution for the nServiceBus components, and a VS 2005 solution for the BizTalk components.&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=136449"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=136449" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/EltonStoneman/aggbug/136449.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>EltonStoneman</dc:creator>
            <guid>http://geekswithblogs.net/EltonStoneman/archive/2009/11/21/processing-excel-uploads-with-biztalk-and-nservicebus.aspx</guid>
            <pubDate>Sat, 21 Nov 2009 07:57:56 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/EltonStoneman/comments/136449.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/EltonStoneman/archive/2009/11/21/processing-excel-uploads-with-biztalk-and-nservicebus.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/EltonStoneman/comments/commentRss/136449.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Processing an Excel upload with nServiceBus</title>
            <category>MSDN Code Gallery</category>
            <category>nServiceBus</category>
            <link>http://geekswithblogs.net/EltonStoneman/archive/2009/11/18/processing-an-excel-upload-with-nservicebus.aspx</link>
            <description>&lt;p&gt; &lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;&lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt;
&lt;meta name="ProgId" content="Word.Document" /&gt;
&lt;meta name="Generator" content="Microsoft Word 12" /&gt;
&lt;meta name="Originator" content="Microsoft Word 12" /&gt;
&lt;link rel="File-List" href="file:///C:\DOCUME~1\ELTON~1.STO\LOCALS~1\Temp\msohtmlclip1\01\clip_filelist.xml" /&gt;
&lt;link rel="Edit-Time-Data" href="file:///C:\DOCUME~1\ELTON~1.STO\LOCALS~1\Temp\msohtmlclip1\01\clip_editdata.mso" /&gt;&lt;!--[if !mso]&gt;
&lt;style&gt;
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
&lt;/style&gt;
&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
&lt;o:OfficeDocumentSettings&gt;
&lt;o:RelyOnVML /&gt;
&lt;o:AllowPNG /&gt;
&lt;/o:OfficeDocumentSettings&gt;
&lt;/xml&gt;&lt;![endif]--&gt;
&lt;link rel="themeData" href="file:///C:\DOCUME~1\ELTON~1.STO\LOCALS~1\Temp\msohtmlclip1\01\clip_themedata.thmx" /&gt;
&lt;link rel="colorSchemeMapping" href="file:///C:\DOCUME~1\ELTON~1.STO\LOCALS~1\Temp\msohtmlclip1\01\clip_colorschememapping.xml" /&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
&lt;w:WordDocument&gt;
&lt;w:View&gt;Normal&lt;/w:View&gt;
&lt;w:Zoom&gt;0&lt;/w:Zoom&gt;
&lt;w:TrackMoves&gt;false&lt;/w:TrackMoves&gt;
&lt;w:TrackFormatting /&gt;
&lt;w:DoNotShowRevisions /&gt;
&lt;w:DoNotPrintRevisions /&gt;
&lt;w:DoNotShowComments /&gt;
&lt;w:DoNotShowInsertionsAndDeletions /&gt;
&lt;w:DoNotShowPropertyChanges /&gt;
&lt;w:PunctuationKerning /&gt;
&lt;w:ValidateAgainstSchemas /&gt;
&lt;w:SaveIfXMLInvalid&gt;false&lt;/w:SaveIfXMLInvalid&gt;
&lt;w:IgnoreMixedContent&gt;false&lt;/w:IgnoreMixedContent&gt;
&lt;w:AlwaysShowPlaceholderText&gt;false&lt;/w:AlwaysShowPlaceholderText&gt;
&lt;w:DoNotPromoteQF /&gt;
&lt;w:LidThemeOther&gt;EN-GB&lt;/w:LidThemeOther&gt;
&lt;w:LidThemeAsian&gt;X-NONE&lt;/w:LidThemeAsian&gt;
&lt;w:LidThemeComplexScript&gt;X-NONE&lt;/w:LidThemeComplexScript&gt;
&lt;w:Compatibility&gt;
&lt;w:BreakWrappedTables /&gt;
&lt;w:SnapToGridInCell /&gt;
&lt;w:WrapTextWithPunct /&gt;
&lt;w:UseAsianBreakRules /&gt;
&lt;w:DontGrowAutofit /&gt;
&lt;w:SplitPgBreakAndParaMark /&gt;
&lt;w:DontVertAlignCellWithSp /&gt;
&lt;w:DontBreakConstrainedForcedTables /&gt;
&lt;w:DontVertAlignInTxbx /&gt;
&lt;w:Word11KerningPairs /&gt;
&lt;w:CachedColBalance /&gt;
&lt;w:UseFELayout /&gt;
&lt;/w:Compatibility&gt;
&lt;w:DoNotOptimizeForBrowser /&gt;
&lt;m:mathPr&gt;
&lt;m:mathFont m:val="Cambria Math" /&gt;
&lt;m:brkBin m:val="before" /&gt;
&lt;m:brkBinSub m:val="&amp;#45;-" /&gt;
&lt;m:smallFrac m:val="off" /&gt;
&lt;m:dispDef /&gt;
&lt;m:lMargin m:val="0" /&gt;
&lt;m:rMargin m:val="0" /&gt;
&lt;m:defJc m:val="centerGroup" /&gt;
&lt;m:wrapIndent m:val="1440" /&gt;
&lt;m:intLim m:val="subSup" /&gt;
&lt;m:naryLim m:val="undOvr" /&gt;
&lt;/m:mathPr&gt;&lt;/w:WordDocument&gt;
&lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
&lt;w:LatentStyles DefLockedState="false" DefUnhideWhenUsed="true"
DefSemiHidden="true" DefQFormat="false" DefPriority="99"
LatentStyleCount="267"&gt;
&lt;w:LsdException Locked="false" Priority="1" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Normal" /&gt;
&lt;w:LsdException Locked="false" Priority="9" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="heading 1" /&gt;
&lt;w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 2" /&gt;
&lt;w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 3" /&gt;
&lt;w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 4" /&gt;
&lt;w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 5" /&gt;
&lt;w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 6" /&gt;
&lt;w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 7" /&gt;
&lt;w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 8" /&gt;
&lt;w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 9" /&gt;
&lt;w:LsdException Locked="false" Priority="39" Name="toc 1" /&gt;
&lt;w:LsdException Locked="false" Priority="39" Name="toc 2" /&gt;
&lt;w:LsdException Locked="false" Priority="39" Name="toc 3" /&gt;
&lt;w:LsdException Locked="false" Priority="39" Name="toc 4" /&gt;
&lt;w:LsdException Locked="false" Priority="39" Name="toc 5" /&gt;
&lt;w:LsdException Locked="false" Priority="39" Name="toc 6" /&gt;
&lt;w:LsdException Locked="false" Priority="39" Name="toc 7" /&gt;
&lt;w:LsdException Locked="false" Priority="39" Name="toc 8" /&gt;
&lt;w:LsdException Locked="false" Priority="39" Name="toc 9" /&gt;
&lt;w:LsdException Locked="false" Priority="35" QFormat="true" Name="caption" /&gt;
&lt;w:LsdException Locked="false" Priority="10" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Title" /&gt;
&lt;w:LsdException Locked="false" Priority="1" Name="Default Paragraph Font" /&gt;
&lt;w:LsdException Locked="false" Priority="11" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtitle" /&gt;
&lt;w:LsdException Locked="false" Priority="22" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Strong" /&gt;
&lt;w:LsdException Locked="false" Priority="20" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Emphasis" /&gt;
&lt;w:LsdException Locked="false" Priority="59" SemiHidden="false"
UnhideWhenUsed="false" Name="Table Grid" /&gt;
&lt;w:LsdException Locked="false" UnhideWhenUsed="false" Name="Placeholder Text" /&gt;
&lt;w:LsdException Locked="false" Priority="1" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="No Spacing" /&gt;
&lt;w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading" /&gt;
&lt;w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List" /&gt;
&lt;w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid" /&gt;
&lt;w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1" /&gt;
&lt;w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2" /&gt;
&lt;w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1" /&gt;
&lt;w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2" /&gt;
&lt;w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1" /&gt;
&lt;w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2" /&gt;
&lt;w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3" /&gt;
&lt;w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List" /&gt;
&lt;w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading" /&gt;
&lt;w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List" /&gt;
&lt;w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid" /&gt;
&lt;w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 1" /&gt;
&lt;w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 1" /&gt;
&lt;w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 1" /&gt;
&lt;w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 1" /&gt;
&lt;w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 1" /&gt;
&lt;w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 1" /&gt;
&lt;w:LsdException Locked="false" UnhideWhenUsed="false" Name="Revision" /&gt;
&lt;w:LsdException Locked="false" Priority="34" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="List Paragraph" /&gt;
&lt;w:LsdException Locked="false" Priority="29" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Quote" /&gt;
&lt;w:LsdException Locked="false" Priority="30" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Quote" /&gt;
&lt;w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 1" /&gt;
&lt;w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 1" /&gt;
&lt;w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 1" /&gt;
&lt;w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 1" /&gt;
&lt;w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 1" /&gt;
&lt;w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 1" /&gt;
&lt;w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 1" /&gt;
&lt;w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 1" /&gt;
&lt;w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 2" /&gt;
&lt;w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 2" /&gt;
&lt;w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 2" /&gt;
&lt;w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 2" /&gt;
&lt;w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 2" /&gt;
&lt;w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 2" /&gt;
&lt;w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 2" /&gt;
&lt;w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 2" /&gt;
&lt;w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 2" /&gt;
&lt;w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 2" /&gt;
&lt;w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 2" /&gt;
&lt;w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 2" /&gt;
&lt;w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 2" /&gt;
&lt;w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 2" /&gt;
&lt;w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 3" /&gt;
&lt;w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 3" /&gt;
&lt;w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 3" /&gt;
&lt;w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 3" /&gt;
&lt;w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 3" /&gt;
&lt;w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 3" /&gt;
&lt;w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 3" /&gt;
&lt;w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 3" /&gt;
&lt;w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 3" /&gt;
&lt;w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 3" /&gt;
&lt;w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 3" /&gt;
&lt;w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 3" /&gt;
&lt;w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 3" /&gt;
&lt;w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 3" /&gt;
&lt;w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 4" /&gt;
&lt;w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 4" /&gt;
&lt;w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 4" /&gt;
&lt;w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 4" /&gt;
&lt;w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 4" /&gt;
&lt;w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 4" /&gt;
&lt;w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 4" /&gt;
&lt;w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 4" /&gt;
&lt;w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 4" /&gt;
&lt;w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 4" /&gt;
&lt;w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 4" /&gt;
&lt;w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 4" /&gt;
&lt;w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 4" /&gt;
&lt;w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 4" /&gt;
&lt;w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 5" /&gt;
&lt;w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 5" /&gt;
&lt;w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 5" /&gt;
&lt;w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 5" /&gt;
&lt;w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 5" /&gt;
&lt;w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 5" /&gt;
&lt;w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 5" /&gt;
&lt;w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 5" /&gt;
&lt;w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 5" /&gt;
&lt;w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 5" /&gt;
&lt;w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 5" /&gt;
&lt;w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 5" /&gt;
&lt;w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 5" /&gt;
&lt;w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 5" /&gt;
&lt;w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 6" /&gt;
&lt;w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 6" /&gt;
&lt;w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 6" /&gt;
&lt;w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 6" /&gt;
&lt;w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 6" /&gt;
&lt;w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 6" /&gt;
&lt;w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 6" /&gt;
&lt;w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 6" /&gt;
&lt;w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 6" /&gt;
&lt;w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 6" /&gt;
&lt;w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 6" /&gt;
&lt;w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 6" /&gt;
&lt;w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 6" /&gt;
&lt;w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 6" /&gt;
&lt;w:LsdException Locked="false" Priority="19" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtle Emphasis" /&gt;
&lt;w:LsdException Locked="false" Priority="21" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Emphasis" /&gt;
&lt;w:LsdException Locked="false" Priority="31" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtle Reference" /&gt;
&lt;w:LsdException Locked="false" Priority="32" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Reference" /&gt;
&lt;w:LsdException Locked="false" Priority="33" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Book Title" /&gt;
&lt;w:LsdException Locked="false" Priority="37" Name="Bibliography" /&gt;
&lt;w:LsdException Locked="false" Priority="39" QFormat="true" Name="TOC Heading" /&gt;
&lt;/w:LatentStyles&gt;
&lt;/xml&gt;&lt;![endif]--&gt;&lt;style type="text/css"&gt;&lt;!--
 /* Font Definitions */
 @font-face
	{font-family:Wingdings;
	panose-1:5 0 0 0 0 0 0 0 0 0;
	mso-font-charset:2;
	mso-generic-font-family:auto;
	mso-font-pitch:variable;
	mso-font-signature:0 268435456 0 0 -2147483648 0;}
@font-face
	{font-family:"Cambria Math";
	panose-1:2 4 5 3 5 4 6 3 2 4;
	mso-font-charset:0;
	mso-generic-font-family:roman;
	mso-font-pitch:variable;
	mso-font-signature:-1610611985 1107304683 0 0 159 0;}
@font-face
	{font-family:Calibri;
	panose-1:2 15 5 2 2 2 4 3 2 4;
	mso-font-charset:0;
	mso-generic-font-family:swiss;
	mso-font-pitch:variable;
	mso-font-signature:-1610611985 1073750139 0 0 159 0;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
	{mso-style-priority:1;
	mso-style-unhide:no;
	mso-style-qformat:yes;
	mso-style-parent:"";
	margin-top:0cm;
	margin-right:0cm;
	margin-bottom:10.0pt;
	margin-left:0cm;
	mso-pagination:widow-orphan;
	font-size:11.0pt;
	mso-bidi-font-size:10.0pt;
	font-family:"Calibri","sans-serif";
	mso-ascii-font-family:Calibri;
	mso-ascii-theme-font:minor-latin;
	mso-fareast-font-family:"Times New Roman";
	mso-fareast-theme-font:minor-fareast;
	mso-hansi-font-family:Calibri;
	mso-hansi-theme-font:minor-latin;
	mso-bidi-font-family:"Times New Roman";
	mso-bidi-theme-font:minor-bidi;}
a:link, span.MsoHyperlink
	{mso-style-noshow:yes;
	mso-style-priority:99;
	mso-style-unhide:no;
	color:blue;
	mso-themecolor:hyperlink;
	text-decoration:underline;
	text-underline:single;}
a:visited, span.MsoHyperlinkFollowed
	{mso-style-noshow:yes;
	mso-style-priority:99;
	color:purple;
	mso-themecolor:followedhyperlink;
	text-decoration:underline;
	text-underline:single;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
	{mso-style-priority:34;
	mso-style-unhide:no;
	mso-style-qformat:yes;
	margin-top:0cm;
	margin-right:0cm;
	margin-bottom:10.0pt;
	margin-left:36.0pt;
	mso-add-space:auto;
	mso-pagination:widow-orphan;
	font-size:11.0pt;
	mso-bidi-font-size:10.0pt;
	font-family:"Calibri","sans-serif";
	mso-ascii-font-family:Calibri;
	mso-ascii-theme-font:minor-latin;
	mso-fareast-font-family:"Times New Roman";
	mso-fareast-theme-font:minor-fareast;
	mso-hansi-font-family:Calibri;
	mso-hansi-theme-font:minor-latin;
	mso-bidi-font-family:"Times New Roman";
	mso-bidi-theme-font:minor-bidi;}
p.MsoListParagraphCxSpFirst, li.MsoListParagraphCxSpFirst, div.MsoListParagraphCxSpFirst
	{mso-style-priority:34;
	mso-style-unhide:no;
	mso-style-qformat:yes;
	mso-style-type:export-only;
	margin-top:0cm;
	margin-right:0cm;
	margin-bottom:0cm;
	margin-left:36.0pt;
	margin-bottom:.0001pt;
	mso-add-space:auto;
	mso-pagination:widow-orphan;
	font-size:11.0pt;
	mso-bidi-font-size:10.0pt;
	font-family:"Calibri","sans-serif";
	mso-ascii-font-family:Calibri;
	mso-ascii-theme-font:minor-latin;
	mso-fareast-font-family:"Times New Roman";
	mso-fareast-theme-font:minor-fareast;
	mso-hansi-font-family:Calibri;
	mso-hansi-theme-font:minor-latin;
	mso-bidi-font-family:"Times New Roman";
	mso-bidi-theme-font:minor-bidi;}
p.MsoListParagraphCxSpMiddle, li.MsoListParagraphCxSpMiddle, div.MsoListParagraphCxSpMiddle
	{mso-style-priority:34;
	mso-style-unhide:no;
	mso-style-qformat:yes;
	mso-style-type:export-only;
	margin-top:0cm;
	margin-right:0cm;
	margin-bottom:0cm;
	margin-left:36.0pt;
	margin-bottom:.0001pt;
	mso-add-space:auto;
	mso-pagination:widow-orphan;
	font-size:11.0pt;
	mso-bidi-font-size:10.0pt;
	font-family:"Calibri","sans-serif";
	mso-ascii-font-family:Calibri;
	mso-ascii-theme-font:minor-latin;
	mso-fareast-font-family:"Times New Roman";
	mso-fareast-theme-font:minor-fareast;
	mso-hansi-font-family:Calibri;
	mso-hansi-theme-font:minor-latin;
	mso-bidi-font-family:"Times New Roman";
	mso-bidi-theme-font:minor-bidi;}
p.MsoListParagraphCxSpLast, li.MsoListParagraphCxSpLast, div.MsoListParagraphCxSpLast
	{mso-style-priority:34;
	mso-style-unhide:no;
	mso-style-qformat:yes;
	mso-style-type:export-only;
	margin-top:0cm;
	margin-right:0cm;
	margin-bottom:10.0pt;
	margin-left:36.0pt;
	mso-add-space:auto;
	mso-pagination:widow-orphan;
	font-size:11.0pt;
	mso-bidi-font-size:10.0pt;
	font-family:"Calibri","sans-serif";
	mso-ascii-font-family:Calibri;
	mso-ascii-theme-font:minor-latin;
	mso-fareast-font-family:"Times New Roman";
	mso-fareast-theme-font:minor-fareast;
	mso-hansi-font-family:Calibri;
	mso-hansi-theme-font:minor-latin;
	mso-bidi-font-family:"Times New Roman";
	mso-bidi-theme-font:minor-bidi;}
.MsoChpDefault
	{mso-style-type:export-only;
	mso-default-props:yes;
	mso-bidi-font-size:10.0pt;
	mso-ascii-font-family:Calibri;
	mso-ascii-theme-font:minor-latin;
	mso-fareast-font-family:"Times New Roman";
	mso-fareast-theme-font:minor-fareast;
	mso-hansi-font-family:Calibri;
	mso-hansi-theme-font:minor-latin;
	mso-bidi-font-family:"Times New Roman";
	mso-bidi-theme-font:minor-bidi;}
.MsoPapDefault
	{mso-style-type:export-only;
	margin-bottom:10.0pt;}
@page Section1
	{size:612.0pt 792.0pt;
	margin:72.0pt 72.0pt 72.0pt 72.0pt;
	mso-header-margin:36.0pt;
	mso-footer-margin:36.0pt;
	mso-paper-source:0;}
div.Section1
	{page:Section1;}
 /* List Definitions */
 @list l0
	{mso-list-id:1664165705;
	mso-list-type:hybrid;
	mso-list-template-ids:-1453919300 67698689 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;}
@list l0:level1
	{mso-level-number-format:bullet;
	mso-level-text:;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-18.0pt;
	font-family:Symbol;}
ol
	{margin-bottom:0cm;}
ul
	{margin-bottom:0cm;}
--&gt;&lt;/style&gt;&lt;!--[if gte mso 10]&gt;
&lt;style&gt;
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-qformat:yes;
mso-style-parent:"";
mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
mso-para-margin-top:0cm;
mso-para-margin-right:0cm;
mso-para-margin-bottom:10.0pt;
mso-para-margin-left:0cm;
mso-pagination:widow-orphan;
font-size:11.0pt;
mso-bidi-font-size:10.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;}
&lt;/style&gt;
&lt;![endif]--&gt;
&lt;p align="center" class="MsoNormal" style="text-align: center;"&gt;&lt;span style="font-size: 10pt;"&gt;[Source: &lt;/span&gt;&lt;a href="../../../../EltonStoneman"&gt;&lt;span style="font-size: 10pt;"&gt;http://geekswithblogs.net/EltonStoneman&lt;/span&gt;&lt;/a&gt;&lt;span style="font-size: 10pt;"&gt;]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;We’ve had a couple of projects recently with similar requirements to process an Excel file as a batch upload of data. One was a BizTalk project where the &lt;a href="http://www.fpoint.com/biztalk/default.aspx"&gt;FarPoint Spread pipeline component&lt;/a&gt; was a good fit; the other was a Web app where we put together a custom parser based on the open-source &lt;a href="http://www.codeplex.com/ExcelDataReader"&gt;ExcelDataReader&lt;/a&gt;. The custom solution was appropriate for the expected size of upload files, but wouldn’t scale well to deal with large files quickly, so I wanted to look at a distributed alternative using &lt;a href="http://www.nservicebus.com/"&gt;nServiceBus&lt;/a&gt;. My sample implementation is on MSDN Code Gallery here: &lt;a href="http://code.msdn.microsoft.com/NSBExcelUpload"&gt;nServiceBus Excel Upload&lt;/a&gt;. I’ll look at a comparative BizTalk solution in a future post.&lt;/p&gt;
&lt;p class="MsoNormal"&gt;If you haven’t come across nServiceBus, it’s a queue-based messaging framework which is inherently asynchronous. “Scalability and reliability are in its DNA”, and it has some impressive case studies. Using nServiceBus you can set up a simple publish-subscribe architecture between nodes, or a load-balanced architecture with a central distributor. In the distributed version, the upload sample looks like this:&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;img height="259" width="400" alt="" src="/images/geekswithblogs_net/EltonStoneman/ExcelNSB.png" /&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span style=""&gt;&lt;v:shapetype id="_x0000_t75" coordsize="21600,21600" o:spt="75" o:preferrelative="t" path="m@4@5l@4@11@9@11@9@5xe" filled="f" stroked="f"&gt;  &lt;v:stroke joinstyle="miter"&gt;  &lt;v:formulas&gt;   &lt;v:f eqn="if lineDrawn pixelLineWidth 0"&gt;   &lt;v:f eqn="sum @0 1 0"&gt;   &lt;v:f eqn="sum 0 0 @1"&gt;   &lt;v:f eqn="prod @2 1 2"&gt;   &lt;v:f eqn="prod @3 21600 pixelWidth"&gt;   &lt;v:f eqn="prod @3 21600 pixelHeight"&gt;   &lt;v:f eqn="sum @0 0 1"&gt;   &lt;v:f eqn="prod @6 1 2"&gt;   &lt;v:f eqn="prod @7 21600 pixelWidth"&gt;   &lt;v:f eqn="sum @8 21600 0"&gt;   &lt;v:f eqn="prod @7 21600 pixelHeight"&gt;   &lt;v:f eqn="sum @10 21600 0"&gt;  &lt;/v:f&gt;  &lt;v:path o:extrusionok="f" gradientshapeok="t" o:connecttype="rect"&gt;  &lt;o:lock v:ext="edit" aspectratio="t"&gt; &lt;/o:lock&gt;&lt;v:shape id="Picture_x0020_2" o:spid="_x0000_i1025" type="#_x0000_t75" alt="ExcelNSB.png" style="width: 330pt; height: 213.75pt; visibility: visible;"&gt;  &lt;v:imagedata src="file:///C:\DOCUME~1\ELTON~1.STO\LOCALS~1\Temp\msohtmlclip1\01\clip_image001.png" o:title="ExcelNSB"&gt; &lt;/v:imagedata&gt;&lt;/v:shape&gt;&lt;/v:path&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:formulas&gt;&lt;/v:stroke&gt;&lt;/v:shapetype&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;(Note that the diagram represents the bus as a separate entity, in reality it’s distributed among the queues of all the nodes. The diagram also omits the distributor).&lt;/p&gt;
&lt;p class="MsoNormal"&gt;In nServiceBus, services are requested by publishing messages onto the bus. Requests are fulfilled by a handler which subscribes to a type of message. The Excel upload sample takes a workbook which contains a set of products and uploads them to the AdventureWorks database. There are three types of message:&lt;/p&gt;
&lt;ul&gt;
    &lt;li&gt;&lt;!--[if !supportLists]--&gt;&lt;!--[endif]--&gt;&lt;b style=""&gt;StartBatchUpload&lt;/b&gt; – published when a file has been received and is ready to be processed; subscriber does some basic validation on the Excel data structure, and then for each row in the worksheet publishes an AddProduct message;&lt;/li&gt;
    &lt;li&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-family: Symbol;"&gt;&lt;span style=""&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;b style=""&gt;AddProduct&lt;/b&gt; – subscriber maps the product defined in the message to a stored procedure call which inserts the new product. When the last product in the batch is reached, sends a BatchStatusChanged message to the original publisher of the StartBatchUpload message;&lt;/li&gt;
    &lt;li&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-family: Symbol;"&gt;&lt;span style=""&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;b style=""&gt;BatchStatusChanged&lt;/b&gt; – logs the status change and renames the Excel upload file.&lt;/li&gt;
&lt;/ul&gt;
&lt;p class="MsoNormal"&gt;This is a basic example, more validation would be expected, but the workflow is representative. Parsing the Excel file is done quickly, allowing for any number of nodes to participate in the resource-intensive work of creating the products. Using a single host with 5 threads, an Excel file with 3,500 rows takes just over 4 minutes to process on a dev laptop. That’s 13 messages per second which is nothing special, but this is on a single host which is also running the distributor and SQL Server. The processing host has a flat memory profile (consistently around 40Mb) and runs at less than 20% CPU. The distributor takes around 15% CPU, and MSMQ another 15%.&lt;/p&gt;
&lt;p class="MsoNormal"&gt;For a much larger upload – 12,000 rows – the processing and memory profile is the same, and the upload takes around 14 minutes (~14 messages per second) on the same infrastructure.&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;i style=""&gt;Running the Sample&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;Access to a SQL Server instance with the &lt;a href="http://msftdbprodsamples.codeplex.com/"&gt;AdventureWorks sample database&lt;/a&gt; installed is a pre-requisite. You’ll need to add the new stored procedure with &lt;i style=""&gt;uspInsertProduct.CREATE.sql&lt;/i&gt;. The connection string used by the host is specified in &lt;i style=""&gt;ExcelUpload.Host.exe.config&lt;/i&gt; (defaults to unnamed local instance).&lt;/p&gt;
&lt;p class="MsoNormal"&gt;You’ll need MSMQ running on all nodes. Queues are specified in configuration and are created by nServiceBus if they don’t exist – an exception is the storage queue for the distributor which needs to be manually created, this PowerShell snippet will do it:&lt;/p&gt;
&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;      &lt;/span&gt;[Reflection.Assembly]::LoadWithPartialName("System.Messaging")&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;      &lt;/span&gt;[System.Messaging.MessageQueue]::Create(".\Private$\distributorStorage", $true)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;Unzip the file &lt;i style=""&gt;ExcelUpload.Binaries.zip&lt;/i&gt;. You’ll have a batch file – &lt;i style=""&gt;start.cmd&lt;/i&gt; – and five subdirectories – Client, Host, Distributor, SampleFiles and Drops. Run &lt;i style=""&gt;start.cmd&lt;/i&gt;, check the console screens for errors, then copy one of the Excel files from SampleFiles to Drops. You should see activity in the host, client and distributor console screens, and new rows being added to the [Production].[Product] table.&lt;/p&gt;
&lt;p class="MsoNormal"&gt;If you drop the same file twice, the unique key on Products will be violated, so the upload will error. On a fresh install there are under 1000 products, so this resets the table to the default state:&lt;/p&gt;
&lt;p class="MsoNormal" style="text-indent: 36pt;"&gt;&lt;span lang="EN-US" style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: blue;"&gt;delete&lt;/span&gt;&lt;span lang="EN-US" style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt; [Production]&lt;span style="color: gray;"&gt;.&lt;/span&gt;[Product] &lt;span style="color: blue;"&gt;where&lt;/span&gt; ProductID &lt;span style="color: gray;"&gt;&amp;gt;&lt;/span&gt; 999&lt;span style="color: gray;"&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;i style=""&gt;Implementation Details&lt;/i&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;The sample uses the release version of nServiceBus – &lt;a href="http://garr.dl.sourceforge.net/project/nservicebus/nservicebus/Version%201.9%20RTM/NServiceBus_version_1.9_RTM_Core_Binaries.zip"&gt;1.9&lt;/a&gt; – as the distributor was broken in the 2.0 beta at the time of writing.&lt;/p&gt;
&lt;p class="MsoNormal"&gt;The two console apps run the “client” (which monitors a configured file location for an Excel drop, and publishes the StartBatchUpload message), and the “host” (which subscribes to StartBatchUpload and publishes AddProduct and BatchStatusChanged messages). Both use &lt;a href="http://codebetter.com/blogs/dru.sellers/archive/2009/01/11/topshelf.aspx"&gt;Topshelf&lt;/a&gt; so they can run as a console, or can be installed as a Windows service (e.g. &lt;i style=""&gt;ExcelUpload.Client.exe /install&lt;/i&gt;).&lt;/p&gt;
&lt;p class="MsoNormal"&gt;If you want to run several hosts on the same machine, they will need to use different queues. Copy the whole of the Host directory, and modify &lt;i style=""&gt;ExcelUpload.Host.exe.config&lt;/i&gt; to specify a unique queue name:&lt;/p&gt;
&lt;p class="MsoNormal" style="text-indent: 36pt;"&gt;&lt;span lang="EN-US" style="font-size: 9pt; font-family: &amp;quot;Courier New&amp;quot;; color: red;"&gt;InputQueue&lt;/span&gt;&lt;span lang="EN-US" style="font-size: 9pt; font-family: &amp;quot;Courier New&amp;quot;; color: blue;"&gt;=&lt;/span&gt;&lt;span lang="EN-US" style="font-size: 9pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;"&lt;span style="color: blue;"&gt;ExcelUpload.Service.1.InputQueue&lt;/span&gt;"&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;Then run &lt;i style=""&gt;ExcelUpload.Host.exe&lt;/i&gt; from all the copied locations, and you’ll see the console hosts sharing the message processing when a file is dropped.&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;




&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=136390"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=136390" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/EltonStoneman/aggbug/136390.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>EltonStoneman</dc:creator>
            <guid>http://geekswithblogs.net/EltonStoneman/archive/2009/11/18/processing-an-excel-upload-with-nservicebus.aspx</guid>
            <pubDate>Wed, 18 Nov 2009 15:46:13 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/EltonStoneman/comments/136390.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/EltonStoneman/archive/2009/11/18/processing-an-excel-upload-with-nservicebus.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/EltonStoneman/comments/commentRss/136390.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Retrieving Nested Properties from Lambda Expressions</title>
            <category>Code Snippet</category>
            <link>http://geekswithblogs.net/EltonStoneman/archive/2009/11/05/retrieving-nested-properties-from-lambda-expressions.aspx</link>
            <description>&lt;link rel="File-List" href="file:///C:\DOCUME~1\ELTON~1.STO\LOCALS~1\Temp\msohtmlclip1\01\clip_filelist.xml" /&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
&lt;o:OfficeDocumentSettings&gt;
&lt;o:RelyOnVML /&gt;
&lt;o:AllowPNG /&gt;
&lt;/o:OfficeDocumentSettings&gt;
&lt;/xml&gt;&lt;![endif]--&gt;
&lt;link rel="themeData" href="file:///C:\DOCUME~1\ELTON~1.STO\LOCALS~1\Temp\msohtmlclip1\01\clip_themedata.thmx" /&gt;
&lt;link rel="colorSchemeMapping" href="file:///C:\DOCUME~1\ELTON~1.STO\LOCALS~1\Temp\msohtmlclip1\01\clip_colorschememapping.xml" /&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
&lt;w:WordDocument&gt;
&lt;w:View&gt;Normal&lt;/w:View&gt;
&lt;w:Zoom&gt;0&lt;/w:Zoom&gt;
&lt;w:TrackMoves /&gt;
&lt;w:TrackFormatting /&gt;
&lt;w:DoNotShowRevisions /&gt;
&lt;w:DoNotPrintRevisions /&gt;
&lt;w:DoNotShowComments /&gt;
&lt;w:DoNotShowInsertionsAndDeletions /&gt;
&lt;w:DoNotShowPropertyChanges /&gt;
&lt;w:PunctuationKerning /&gt;
&lt;w:ValidateAgainstSchemas /&gt;
&lt;w:SaveIfXMLInvalid&gt;false&lt;/w:SaveIfXMLInvalid&gt;
&lt;w:IgnoreMixedContent&gt;false&lt;/w:IgnoreMixedContent&gt;
&lt;w:AlwaysShowPlaceholderText&gt;false&lt;/w:AlwaysShowPlaceholderText&gt;
&lt;w:DoNotPromoteQF /&gt;
&lt;w:LidThemeOther&gt;EN-GB&lt;/w:LidThemeOther&gt;
&lt;w:LidThemeAsian&gt;X-NONE&lt;/w:LidThemeAsian&gt;
&lt;w:LidThemeComplexScript&gt;X-NONE&lt;/w:LidThemeComplexScript&gt;
&lt;w:Compatibility&gt;
&lt;w:BreakWrappedTables /&gt;
&lt;w:SnapToGridInCell /&gt;
&lt;w:WrapTextWithPunct /&gt;
&lt;w:UseAsianBreakRules /&gt;
&lt;w:DontGrowAutofit /&gt;
&lt;w:SplitPgBreakAndParaMark /&gt;
&lt;w:DontVertAlignCellWithSp /&gt;
&lt;w:DontBreakConstrainedForcedTables /&gt;
&lt;w:DontVertAlignInTxbx /&gt;
&lt;w:Word11KerningPairs /&gt;
&lt;w:CachedColBalance /&gt;
&lt;w:UseFELayout /&gt;
&lt;/w:Compatibility&gt;
&lt;w:DoNotOptimizeForBrowser /&gt;
&lt;m:mathPr&gt;
&lt;m:mathFont m:val="Cambria Math" /&gt;
&lt;m:brkBin m:val="before" /&gt;
&lt;m:brkBinSub m:val="&amp;#45;-" /&gt;
&lt;m:smallFrac m:val="off" /&gt;
&lt;m:dispDef /&gt;
&lt;m:lMargin m:val="0" /&gt;
&lt;m:rMargin m:val="0" /&gt;
&lt;m:defJc m:val="centerGroup" /&gt;
&lt;m:wrapIndent m:val="1440" /&gt;
&lt;m:intLim m:val="subSup" /&gt;
&lt;m:naryLim m:val="undOvr" /&gt;
&lt;/m:mathPr&gt;&lt;/w:WordDocument&gt;
&lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
&lt;w:LatentStyles DefLockedState="false" DefUnhideWhenUsed="true"
DefSemiHidden="true" DefQFormat="false" DefPriority="99"
LatentStyleCount="267"&gt;
&lt;w:LsdException Locked="false" Priority="1" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Normal" /&gt;
&lt;w:LsdException Locked="false" Priority="9" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="heading 1" /&gt;
&lt;w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 2" /&gt;
&lt;w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 3" /&gt;
&lt;w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 4" /&gt;
&lt;w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 5" /&gt;
&lt;w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 6" /&gt;
&lt;w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 7" /&gt;
&lt;w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 8" /&gt;
&lt;w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 9" /&gt;
&lt;w:LsdException Locked="false" Priority="39" Name="toc 1" /&gt;
&lt;w:LsdException Locked="false" Priority="39" Name="toc 2" /&gt;
&lt;w:LsdException Locked="false" Priority="39" Name="toc 3" /&gt;
&lt;w:LsdException Locked="false" Priority="39" Name="toc 4" /&gt;
&lt;w:LsdException Locked="false" Priority="39" Name="toc 5" /&gt;
&lt;w:LsdException Locked="false" Priority="39" Name="toc 6" /&gt;
&lt;w:LsdException Locked="false" Priority="39" Name="toc 7" /&gt;
&lt;w:LsdException Locked="false" Priority="39" Name="toc 8" /&gt;
&lt;w:LsdException Locked="false" Priority="39" Name="toc 9" /&gt;
&lt;w:LsdException Locked="false" Priority="35" QFormat="true" Name="caption" /&gt;
&lt;w:LsdException Locked="false" Priority="10" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Title" /&gt;
&lt;w:LsdException Locked="false" Priority="1" Name="Default Paragraph Font" /&gt;
&lt;w:LsdException Locked="false" Priority="11" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtitle" /&gt;
&lt;w:LsdException Locked="false" Priority="22" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Strong" /&gt;
&lt;w:LsdException Locked="false" Priority="20" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Emphasis" /&gt;
&lt;w:LsdException Locked="false" Priority="59" SemiHidden="false"
UnhideWhenUsed="false" Name="Table Grid" /&gt;
&lt;w:LsdException Locked="false" UnhideWhenUsed="false" Name="Placeholder Text" /&gt;
&lt;w:LsdException Locked="false" Priority="1" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="No Spacing" /&gt;
&lt;w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading" /&gt;
&lt;w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List" /&gt;
&lt;w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid" /&gt;
&lt;w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1" /&gt;
&lt;w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2" /&gt;
&lt;w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1" /&gt;
&lt;w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2" /&gt;
&lt;w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1" /&gt;
&lt;w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2" /&gt;
&lt;w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3" /&gt;
&lt;w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List" /&gt;
&lt;w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading" /&gt;
&lt;w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List" /&gt;
&lt;w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid" /&gt;
&lt;w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 1" /&gt;
&lt;w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 1" /&gt;
&lt;w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 1" /&gt;
&lt;w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 1" /&gt;
&lt;w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 1" /&gt;
&lt;w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 1" /&gt;
&lt;w:LsdException Locked="false" UnhideWhenUsed="false" Name="Revision" /&gt;
&lt;w:LsdException Locked="false" Priority="34" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="List Paragraph" /&gt;
&lt;w:LsdException Locked="false" Priority="29" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Quote" /&gt;
&lt;w:LsdException Locked="false" Priority="30" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Quote" /&gt;
&lt;w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 1" /&gt;
&lt;w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 1" /&gt;
&lt;w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 1" /&gt;
&lt;w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 1" /&gt;
&lt;w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 1" /&gt;
&lt;w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 1" /&gt;
&lt;w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 1" /&gt;
&lt;w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 1" /&gt;
&lt;w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 2" /&gt;
&lt;w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 2" /&gt;
&lt;w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 2" /&gt;
&lt;w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 2" /&gt;
&lt;w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 2" /&gt;
&lt;w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 2" /&gt;
&lt;w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 2" /&gt;
&lt;w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 2" /&gt;
&lt;w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 2" /&gt;
&lt;w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 2" /&gt;
&lt;w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 2" /&gt;
&lt;w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 2" /&gt;
&lt;w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 2" /&gt;
&lt;w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 2" /&gt;
&lt;w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 3" /&gt;
&lt;w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 3" /&gt;
&lt;w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 3" /&gt;
&lt;w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 3" /&gt;
&lt;w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 3" /&gt;
&lt;w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 3" /&gt;
&lt;w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 3" /&gt;
&lt;w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 3" /&gt;
&lt;w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 3" /&gt;
&lt;w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 3" /&gt;
&lt;w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 3" /&gt;
&lt;w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 3" /&gt;
&lt;w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 3" /&gt;
&lt;w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 3" /&gt;
&lt;w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 4" /&gt;
&lt;w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 4" /&gt;
&lt;w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 4" /&gt;
&lt;w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 4" /&gt;
&lt;w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 4" /&gt;
&lt;w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 4" /&gt;
&lt;w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 4" /&gt;
&lt;w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 4" /&gt;
&lt;w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 4" /&gt;
&lt;w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 4" /&gt;
&lt;w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 4" /&gt;
&lt;w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 4" /&gt;
&lt;w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 4" /&gt;
&lt;w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 4" /&gt;
&lt;w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 5" /&gt;
&lt;w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 5" /&gt;
&lt;w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 5" /&gt;
&lt;w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 5" /&gt;
&lt;w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 5" /&gt;
&lt;w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 5" /&gt;
&lt;w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 5" /&gt;
&lt;w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 5" /&gt;
&lt;w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 5" /&gt;
&lt;w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 5" /&gt;
&lt;w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 5" /&gt;
&lt;w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 5" /&gt;
&lt;w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 5" /&gt;
&lt;w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 5" /&gt;
&lt;w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 6" /&gt;
&lt;w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 6" /&gt;
&lt;w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 6" /&gt;
&lt;w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 6" /&gt;
&lt;w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 6" /&gt;
&lt;w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 6" /&gt;
&lt;w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 6" /&gt;
&lt;w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 6" /&gt;
&lt;w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 6" /&gt;
&lt;w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 6" /&gt;
&lt;w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 6" /&gt;
&lt;w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 6" /&gt;
&lt;w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 6" /&gt;
&lt;w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 6" /&gt;
&lt;w:LsdException Locked="false" Priority="19" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtle Emphasis" /&gt;
&lt;w:LsdException Locked="false" Priority="21" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Emphasis" /&gt;
&lt;w:LsdException Locked="false" Priority="31" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtle Reference" /&gt;
&lt;w:LsdException Locked="false" Priority="32" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Reference" /&gt;
&lt;w:LsdException Locked="false" Priority="33" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Book Title" /&gt;
&lt;w:LsdException Locked="false" Priority="37" Name="Bibliography" /&gt;
&lt;w:LsdException Locked="false" Priority="39" QFormat="true" Name="TOC Heading" /&gt;
&lt;/w:LatentStyles&gt;
&lt;/xml&gt;&lt;![endif]--&gt;&lt;style type="text/css"&gt;&lt;!--
 /* Font Definitions */
 @font-face
	{font-family:"Cambria Math";
	panose-1:2 4 5 3 5 4 6 3 2 4;
	mso-font-charset:0;
	mso-generic-font-family:roman;
	mso-font-pitch:variable;
	mso-font-signature:-1610611985 1107304683 0 0 159 0;}
@font-face
	{font-family:Calibri;
	panose-1:2 15 5 2 2 2 4 3 2 4;
	mso-font-charset:0;
	mso-generic-font-family:swiss;
	mso-font-pitch:variable;
	mso-font-signature:-1610611985 1073750139 0 0 159 0;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
	{mso-style-priority:1;
	mso-style-unhide:no;
	mso-style-qformat:yes;
	mso-style-parent:"";
	margin-top:0cm;
	margin-right:0cm;
	margin-bottom:10.0pt;
	margin-left:0cm;
	mso-pagination:widow-orphan;
	font-size:11.0pt;
	mso-bidi-font-size:10.0pt;
	font-family:"Calibri","sans-serif";
	mso-ascii-font-family:Calibri;
	mso-ascii-theme-font:minor-latin;
	mso-fareast-font-family:"Times New Roman";
	mso-fareast-theme-font:minor-fareast;
	mso-hansi-font-family:Calibri;
	mso-hansi-theme-font:minor-latin;
	mso-bidi-font-family:"Times New Roman";
	mso-bidi-theme-font:minor-bidi;}
a:link, span.MsoHyperlink
	{mso-style-noshow:yes;
	mso-style-priority:99;
	mso-style-unhide:no;
	color:blue;
	mso-themecolor:hyperlink;
	text-decoration:underline;
	text-underline:single;}
a:visited, span.MsoHyperlinkFollowed
	{mso-style-noshow:yes;
	mso-style-priority:99;
	color:purple;
	mso-themecolor:followedhyperlink;
	text-decoration:underline;
	text-underline:single;}
.MsoChpDefault
	{mso-style-type:export-only;
	mso-default-props:yes;
	mso-bidi-font-size:10.0pt;
	mso-ascii-font-family:Calibri;
	mso-ascii-theme-font:minor-latin;
	mso-fareast-font-family:"Times New Roman";
	mso-fareast-theme-font:minor-fareast;
	mso-hansi-font-family:Calibri;
	mso-hansi-theme-font:minor-latin;
	mso-bidi-font-family:"Times New Roman";
	mso-bidi-theme-font:minor-bidi;}
.MsoPapDefault
	{mso-style-type:export-only;
	margin-bottom:10.0pt;}
@page Section1
	{size:612.0pt 792.0pt;
	margin:72.0pt 72.0pt 72.0pt 72.0pt;
	mso-header-margin:36.0pt;
	mso-footer-margin:36.0pt;
	mso-paper-source:0;}
div.Section1
	{page:Section1;}
--&gt;&lt;/style&gt;&lt;!--[if gte mso 10]&gt;
&lt;style&gt;
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-qformat:yes;
mso-style-parent:"";
mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
mso-para-margin-top:0cm;
mso-para-margin-right:0cm;
mso-para-margin-bottom:10.0pt;
mso-para-margin-left:0cm;
mso-pagination:widow-orphan;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;}
&lt;/style&gt;
&lt;![endif]--&gt;
&lt;p align="center" class="MsoNormal" style="text-align: center;"&gt;&lt;span style="font-size: 10pt;"&gt;[Source: &lt;/span&gt;&lt;a href="../../../../EltonStoneman"&gt;&lt;span style="font-size: 10pt;"&gt;http://geekswithblogs.net/EltonStoneman&lt;/span&gt;&lt;/a&gt;&lt;span style="font-size: 10pt;"&gt;]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;Supposing you’re using a lambda expression as a neat way to access a named property:&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span style=""&gt;                &lt;/span&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;s =&amp;gt; s.FirstName&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;- when what you really want is to access it without using a string for the property name (“FirstName”), for example to specify the source or target property for a mapping exercise.&lt;/p&gt;
&lt;p class="MsoNormal"&gt;It’s easy if the expression is a direct property of the parameter type – a member of the “s” in the expression; casting the whole expression as a &lt;strong style=""&gt;MemberExpression&lt;/strong&gt; gives you access to the member as a &lt;strong style=""&gt;PropertyInfo&lt;/strong&gt;. You can encapsulate it in an extension method of &lt;strong style=""&gt;LambdaExpression&lt;/strong&gt;:&lt;/p&gt;
&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;    &lt;/span&gt;&lt;span style="color: blue;"&gt;public&lt;/span&gt; &lt;span style="color: blue;"&gt;static&lt;/span&gt; &lt;span style="color: rgb(43, 145, 175);"&gt;PropertyInfo&lt;/span&gt; AsPropertyInfo(&lt;span style="color: blue;"&gt;this&lt;/span&gt; &lt;span style="color: rgb(43, 145, 175);"&gt;LambdaExpression&lt;/span&gt; expression)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;    &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;        &lt;/span&gt;&lt;span style="color: rgb(43, 145, 175);"&gt;PropertyInfo&lt;/span&gt; info = &lt;span style="color: blue;"&gt;null&lt;/span&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;        &lt;/span&gt;&lt;span style="color: blue;"&gt;if&lt;/span&gt; (expression.Body.NodeType == &lt;span style="color: rgb(43, 145, 175);"&gt;ExpressionType&lt;/span&gt;.MemberAccess)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;        &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;            &lt;/span&gt;info = ((&lt;span style="color: rgb(43, 145, 175);"&gt;MemberExpression&lt;/span&gt;)expression.Body).Member &lt;span style="color: blue;"&gt;as&lt;/span&gt; &lt;span style="color: rgb(43, 145, 175);"&gt;PropertyInfo&lt;/span&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;        &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;        &lt;/span&gt;&lt;span style="color: blue;"&gt;return&lt;/span&gt; info;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;    &lt;/span&gt;}&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;- which lets you access the property like this:&lt;/p&gt;
&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;    &lt;/span&gt;&lt;span style="color: rgb(43, 145, 175);"&gt;Expression&lt;/span&gt;&amp;lt;&lt;span style="color: rgb(43, 145, 175);"&gt;Func&lt;/span&gt;&amp;lt;&lt;span style="color: rgb(43, 145, 175);"&gt;FullUser&lt;/span&gt;, &lt;span style="color: blue;"&gt;object&lt;/span&gt;&amp;gt;&amp;gt; exp = s =&amp;gt; s.FirstName;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;    &lt;/span&gt;&lt;span style="color: rgb(43, 145, 175);"&gt;PropertyInfo&lt;/span&gt; sourceProperty = exp.AsPropertyInfo();&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;But if the expression represents a property of a nested type, or a property of&lt;span style=""&gt;  &lt;/span&gt;a nested type of a nested type:&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span style=""&gt;                &lt;/span&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;s =&amp;gt; s.Address.Line1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;      &lt;/span&gt;s =&amp;gt; s.Address.PostCode.Code&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;- then it’s different. &lt;/p&gt;
&lt;p class="MsoNormal"&gt;What you want in this case is an executable expression which will access the containing object of the property (e.g. get you the &lt;em style=""&gt;Address&lt;/em&gt; property of the source object, or the &lt;em style=""&gt;PostCode&lt;/em&gt; property of the &lt;em style=""&gt;Address&lt;/em&gt; property of the source object). You also want the &lt;strong style=""&gt;PropertyInfo&lt;/strong&gt; of the target property (e.g. &lt;em style=""&gt;Line1&lt;/em&gt; or &lt;em style=""&gt;Code&lt;/em&gt;). And you want both the property accessor and the &lt;strong style=""&gt;PropertyInfo&lt;/strong&gt; from the same expression.&lt;/p&gt;
&lt;p class="MsoNormal"&gt;This is not too difficult. It doesn’t require a stack of target objects and &lt;strong style=""&gt;PropertyInfo&lt;/strong&gt;s as originally feared. Firstly store the &lt;strong style=""&gt;PropertyInfo&lt;/strong&gt; from the nested target in the normal way:&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;    &lt;/span&gt;targetPropertyInfo = targetExpression.AsPropertyInfo();&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;- this gives us access to &lt;em style=""&gt;Line1 &lt;/em&gt;or &lt;em style=""&gt;Code&lt;/em&gt;. Then store the expression which retrieves the path to the containing object for the property from the original source - .&lt;em style=""&gt;Address &lt;/em&gt;&lt;span style=""&gt; &lt;/span&gt;or .&lt;em style=""&gt;Address.Postcode&lt;/em&gt;. In the expression tree, this is the expression which contains the root to the original parameter:&lt;/p&gt;
&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;    &lt;/span&gt;&lt;span style="color: blue;"&gt;if&lt;/span&gt; (targetExpression.Body.NodeType == &lt;span style="color: rgb(43, 145, 175);"&gt;ExpressionType&lt;/span&gt;.MemberAccess)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;    &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;        &lt;/span&gt;&lt;span style="color: rgb(43, 145, 175);"&gt;MemberExpression&lt;/span&gt; memberExpression = targetExpression.Body &lt;span style="color: blue;"&gt;as&lt;/span&gt; &lt;span style="color: rgb(43, 145, 175);"&gt;MemberExpression&lt;/span&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;        &lt;/span&gt;&lt;span style="color: blue;"&gt;if&lt;/span&gt; (memberExpression.Expression.NodeType != &lt;span style="color: rgb(43, 145, 175);"&gt;ExpressionType&lt;/span&gt;.Parameter)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;        &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;            &lt;/span&gt;&lt;span style="color: rgb(43, 145, 175);"&gt;ParameterExpression&lt;/span&gt; parameter = &lt;u&gt;GetParameterExpression&lt;/u&gt;(memberExpression.Expression);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;            &lt;/span&gt;&lt;span style="color: blue;"&gt;if&lt;/span&gt; (parameter != &lt;span style="color: blue;"&gt;null&lt;/span&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;            &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;                &lt;/span&gt;_targetExpression = &lt;span style="color: rgb(43, 145, 175);"&gt;Expression&lt;/span&gt;.Lambda(memberExpression.Expression, parameter);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;            &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;        &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;    &lt;/span&gt;}&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;The key line is the one which contains &lt;em style=""&gt;Expression.Lambda()&lt;/em&gt;. The parent expression is a &lt;strong style=""&gt;MemberExpression&lt;/strong&gt; (e.g. &lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;s.Address&lt;/span&gt;, or &lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;s.Address.PostCode&lt;/span&gt;) which itself is not executable. You can’t compile a &lt;strong style=""&gt;MemberExpression&lt;/strong&gt; and execute it on an object to get the member, as the expression needs to know the parameter it executes against.&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/bb336566.aspx"&gt;Expression.Lambda&lt;/a&gt; creates a compilable, executable expression against a provided target parameter – which we already have from the “s” of the original expression, and we can find for any level of nesting:&lt;/p&gt;
&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;    &lt;/span&gt;&lt;span style="color: blue;"&gt;private&lt;/span&gt; &lt;span style="color: rgb(43, 145, 175);"&gt;ParameterExpression&lt;/span&gt; &lt;u&gt;GetParameterExpression&lt;/u&gt;(&lt;span style="color: rgb(43, 145, 175);"&gt;Expression&lt;/span&gt; expression)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;    &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;        &lt;/span&gt;&lt;span style="color: blue;"&gt;while&lt;/span&gt; (expression.NodeType == &lt;span style="color: rgb(43, 145, 175);"&gt;ExpressionType&lt;/span&gt;.MemberAccess)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;        &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;            &lt;/span&gt;expression = ((&lt;span style="color: rgb(43, 145, 175);"&gt;MemberExpression&lt;/span&gt;)expression).Expression;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;        &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;        &lt;/span&gt;&lt;span style="color: blue;"&gt;if&lt;/span&gt; (expression.NodeType == &lt;span style="color: rgb(43, 145, 175);"&gt;ExpressionType&lt;/span&gt;.Parameter)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;        &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;            &lt;/span&gt;&lt;span style="color: blue;"&gt;return&lt;/span&gt; (&lt;span style="color: rgb(43, 145, 175);"&gt;ParameterExpression&lt;/span&gt;)expression;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;        &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;        &lt;/span&gt;&lt;span style="color: blue;"&gt;return&lt;/span&gt; &lt;span style="color: blue;"&gt;null&lt;/span&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;    &lt;/span&gt;}&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;So now we have the &lt;strong style=""&gt;PropertyInfo&lt;/strong&gt; for the nested target, and an expression which will give us the nested target, we can set the target property value like this:&lt;/p&gt;
&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;    &lt;/span&gt;&lt;span style="color: blue;"&gt;object&lt;/span&gt; target; &lt;span style="color: green;"&gt;//this is the top-level object&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;    &lt;/span&gt;&lt;span style="color: green;"&gt;//...&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;    &lt;/span&gt;realTarget = expression.Compile().DynamicInvoke(target);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;    &lt;/span&gt;targetPropertyInfo.SetValue(realTarget, value, &lt;span style="color: blue;"&gt;null&lt;/span&gt;);&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;It’s quite a complex requirement, but the solution is straightforward and the complexity is isolated from the calling code. Note that the example code above only deals with nested properties, not expressions with mixed properties and method calls (e.g. &lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;s.Address.GetPostCode().InwardCode&lt;/span&gt;), but it’s straightforward to cover those cases too.&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;br /&gt;
&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=136053"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=136053" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/EltonStoneman/aggbug/136053.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>EltonStoneman</dc:creator>
            <guid>http://geekswithblogs.net/EltonStoneman/archive/2009/11/05/retrieving-nested-properties-from-lambda-expressions.aspx</guid>
            <pubDate>Fri, 06 Nov 2009 04:14:55 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/EltonStoneman/comments/136053.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/EltonStoneman/archive/2009/11/05/retrieving-nested-properties-from-lambda-expressions.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/EltonStoneman/comments/commentRss/136053.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Avoiding TNSNAMES in Oracle .NET data connections</title>
            <category>Oracle</category>
            <link>http://geekswithblogs.net/EltonStoneman/archive/2009/11/05/avoiding-tnsnames-in-oracle-.net-data-connections.aspx</link>
            <description>&lt;link rel="File-List" href="file:///C:\DOCUME~1\ELTON~1.STO\LOCALS~1\Temp\msohtmlclip1\01\clip_filelist.xml" /&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
&lt;o:OfficeDocumentSettings&gt;
&lt;o:RelyOnVML /&gt;
&lt;o:AllowPNG /&gt;
&lt;/o:OfficeDocumentSettings&gt;
&lt;/xml&gt;&lt;![endif]--&gt;
&lt;link rel="themeData" href="file:///C:\DOCUME~1\ELTON~1.STO\LOCALS~1\Temp\msohtmlclip1\01\clip_themedata.thmx" /&gt;
&lt;link rel="colorSchemeMapping" href="file:///C:\DOCUME~1\ELTON~1.STO\LOCALS~1\Temp\msohtmlclip1\01\clip_colorschememapping.xml" /&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
&lt;w:WordDocument&gt;
&lt;w:View&gt;Normal&lt;/w:View&gt;
&lt;w:Zoom&gt;0&lt;/w:Zoom&gt;
&lt;w:TrackMoves /&gt;
&lt;w:TrackFormatting /&gt;
&lt;w:DoNotShowRevisions /&gt;
&lt;w:DoNotPrintRevisions /&gt;
&lt;w:DoNotShowComments /&gt;
&lt;w:DoNotShowInsertionsAndDeletions /&gt;
&lt;w:DoNotShowPropertyChanges /&gt;
&lt;w:PunctuationKerning /&gt;
&lt;w:ValidateAgainstSchemas /&gt;
&lt;w:SaveIfXMLInvalid&gt;false&lt;/w:SaveIfXMLInvalid&gt;
&lt;w:IgnoreMixedContent&gt;false&lt;/w:IgnoreMixedContent&gt;
&lt;w:AlwaysShowPlaceholderText&gt;false&lt;/w:AlwaysShowPlaceholderText&gt;
&lt;w:DoNotPromoteQF /&gt;
&lt;w:LidThemeOther&gt;EN-GB&lt;/w:LidThemeOther&gt;
&lt;w:LidThemeAsian&gt;X-NONE&lt;/w:LidThemeAsian&gt;
&lt;w:LidThemeComplexScript&gt;X-NONE&lt;/w:LidThemeComplexScript&gt;
&lt;w:Compatibility&gt;
&lt;w:BreakWrappedTables /&gt;
&lt;w:SnapToGridInCell /&gt;
&lt;w:WrapTextWithPunct /&gt;
&lt;w:UseAsianBreakRules /&gt;
&lt;w:DontGrowAutofit /&gt;
&lt;w:SplitPgBreakAndParaMark /&gt;
&lt;w:DontVertAlignCellWithSp /&gt;
&lt;w:DontBreakConstrainedForcedTables /&gt;
&lt;w:DontVertAlignInTxbx /&gt;
&lt;w:Word11KerningPairs /&gt;
&lt;w:CachedColBalance /&gt;
&lt;w:UseFELayout /&gt;
&lt;/w:Compatibility&gt;
&lt;w:DoNotOptimizeForBrowser /&gt;
&lt;m:mathPr&gt;
&lt;m:mathFont m:val="Cambria Math" /&gt;
&lt;m:brkBin m:val="before" /&gt;
&lt;m:brkBinSub m:val="&amp;#45;-" /&gt;
&lt;m:smallFrac m:val="off" /&gt;
&lt;m:dispDef /&gt;
&lt;m:lMargin m:val="0" /&gt;
&lt;m:rMargin m:val="0" /&gt;
&lt;m:defJc m:val="centerGroup" /&gt;
&lt;m:wrapIndent m:val="1440" /&gt;
&lt;m:intLim m:val="subSup" /&gt;
&lt;m:naryLim m:val="undOvr" /&gt;
&lt;/m:mathPr&gt;&lt;/w:WordDocument&gt;
&lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
&lt;w:LatentStyles DefLockedState="false" DefUnhideWhenUsed="true"
DefSemiHidden="true" DefQFormat="false" DefPriority="99"
LatentStyleCount="267"&gt;
&lt;w:LsdException Locked="false" Priority="1" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Normal" /&gt;
&lt;w:LsdException Locked="false" Priority="9" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="heading 1" /&gt;
&lt;w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 2" /&gt;
&lt;w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 3" /&gt;
&lt;w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 4" /&gt;
&lt;w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 5" /&gt;
&lt;w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 6" /&gt;
&lt;w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 7" /&gt;
&lt;w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 8" /&gt;
&lt;w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 9" /&gt;
&lt;w:LsdException Locked="false" Priority="39" Name="toc 1" /&gt;
&lt;w:LsdException Locked="false" Priority="39" Name="toc 2" /&gt;
&lt;w:LsdException Locked="false" Priority="39" Name="toc 3" /&gt;
&lt;w:LsdException Locked="false" Priority="39" Name="toc 4" /&gt;
&lt;w:LsdException Locked="false" Priority="39" Name="toc 5" /&gt;
&lt;w:LsdException Locked="false" Priority="39" Name="toc 6" /&gt;
&lt;w:LsdException Locked="false" Priority="39" Name="toc 7" /&gt;
&lt;w:LsdException Locked="false" Priority="39" Name="toc 8" /&gt;
&lt;w:LsdException Locked="false" Priority="39" Name="toc 9" /&gt;
&lt;w:LsdException Locked="false" Priority="35" QFormat="true" Name="caption" /&gt;
&lt;w:LsdException Locked="false" Priority="10" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Title" /&gt;
&lt;w:LsdException Locked="false" Priority="1" Name="Default Paragraph Font" /&gt;
&lt;w:LsdException Locked="false" Priority="11" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtitle" /&gt;
&lt;w:LsdException Locked="false" Priority="22" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Strong" /&gt;
&lt;w:LsdException Locked="false" Priority="20" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Emphasis" /&gt;
&lt;w:LsdException Locked="false" Priority="59" SemiHidden="false"
UnhideWhenUsed="false" Name="Table Grid" /&gt;
&lt;w:LsdException Locked="false" UnhideWhenUsed="false" Name="Placeholder Text" /&gt;
&lt;w:LsdException Locked="false" Priority="1" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="No Spacing" /&gt;
&lt;w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading" /&gt;
&lt;w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List" /&gt;
&lt;w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid" /&gt;
&lt;w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1" /&gt;
&lt;w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2" /&gt;
&lt;w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1" /&gt;
&lt;w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2" /&gt;
&lt;w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1" /&gt;
&lt;w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2" /&gt;
&lt;w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3" /&gt;
&lt;w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List" /&gt;
&lt;w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading" /&gt;
&lt;w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List" /&gt;
&lt;w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid" /&gt;
&lt;w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 1" /&gt;
&lt;w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 1" /&gt;
&lt;w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 1" /&gt;
&lt;w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 1" /&gt;
&lt;w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 1" /&gt;
&lt;w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 1" /&gt;
&lt;w:LsdException Locked="false" UnhideWhenUsed="false" Name="Revision" /&gt;
&lt;w:LsdException Locked="false" Priority="34" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="List Paragraph" /&gt;
&lt;w:LsdException Locked="false" Priority="29" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Quote" /&gt;
&lt;w:LsdException Locked="false" Priority="30" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Quote" /&gt;
&lt;w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 1" /&gt;
&lt;w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 1" /&gt;
&lt;w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 1" /&gt;
&lt;w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 1" /&gt;
&lt;w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 1" /&gt;
&lt;w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 1" /&gt;
&lt;w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 1" /&gt;
&lt;w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 1" /&gt;
&lt;w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 2" /&gt;
&lt;w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 2" /&gt;
&lt;w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 2" /&gt;
&lt;w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 2" /&gt;
&lt;w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 2" /&gt;
&lt;w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 2" /&gt;
&lt;w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 2" /&gt;
&lt;w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 2" /&gt;
&lt;w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 2" /&gt;
&lt;w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 2" /&gt;
&lt;w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 2" /&gt;
&lt;w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 2" /&gt;
&lt;w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 2" /&gt;
&lt;w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 2" /&gt;
&lt;w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 3" /&gt;
&lt;w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 3" /&gt;
&lt;w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 3" /&gt;
&lt;w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 3" /&gt;
&lt;w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 3" /&gt;
&lt;w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 3" /&gt;
&lt;w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 3" /&gt;
&lt;w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 3" /&gt;
&lt;w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 3" /&gt;
&lt;w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 3" /&gt;
&lt;w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 3" /&gt;
&lt;w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 3" /&gt;
&lt;w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 3" /&gt;
&lt;w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 3" /&gt;
&lt;w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 4" /&gt;
&lt;w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 4" /&gt;
&lt;w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 4" /&gt;
&lt;w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 4" /&gt;
&lt;w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 4" /&gt;
&lt;w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 4" /&gt;
&lt;w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 4" /&gt;
&lt;w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 4" /&gt;
&lt;w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 4" /&gt;
&lt;w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 4" /&gt;
&lt;w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 4" /&gt;
&lt;w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 4" /&gt;
&lt;w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 4" /&gt;
&lt;w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 4" /&gt;
&lt;w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 5" /&gt;
&lt;w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 5" /&gt;
&lt;w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 5" /&gt;
&lt;w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 5" /&gt;
&lt;w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 5" /&gt;
&lt;w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 5" /&gt;
&lt;w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 5" /&gt;
&lt;w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 5" /&gt;
&lt;w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 5" /&gt;
&lt;w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 5" /&gt;
&lt;w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 5" /&gt;
&lt;w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 5" /&gt;
&lt;w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 5" /&gt;
&lt;w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 5" /&gt;
&lt;w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 6" /&gt;
&lt;w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 6" /&gt;
&lt;w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 6" /&gt;
&lt;w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 6" /&gt;
&lt;w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 6" /&gt;
&lt;w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 6" /&gt;
&lt;w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 6" /&gt;
&lt;w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 6" /&gt;
&lt;w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 6" /&gt;
&lt;w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 6" /&gt;
&lt;w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 6" /&gt;
&lt;w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 6" /&gt;
&lt;w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 6" /&gt;
&lt;w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 6" /&gt;
&lt;w:LsdException Locked="false" Priority="19" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtle Emphasis" /&gt;
&lt;w:LsdException Locked="false" Priority="21" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Emphasis" /&gt;
&lt;w:LsdException Locked="false" Priority="31" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtle Reference" /&gt;
&lt;w:LsdException Locked="false" Priority="32" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Reference" /&gt;
&lt;w:LsdException Locked="false" Priority="33" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Book Title" /&gt;
&lt;w:LsdException Locked="false" Priority="37" Name="Bibliography" /&gt;
&lt;w:LsdException Locked="false" Priority="39" QFormat="true" Name="TOC Heading" /&gt;
&lt;/w:LatentStyles&gt;
&lt;/xml&gt;&lt;![endif]--&gt;&lt;style type="text/css"&gt;&lt;!--
 /* Font Definitions */
 @font-face
	{font-family:"Cambria Math";
	panose-1:2 4 5 3 5 4 6 3 2 4;
	mso-font-charset:1;
	mso-generic-font-family:roman;
	mso-font-format:other;
	mso-font-pitch:variable;
	mso-font-signature:0 0 0 0 0 0;}
@font-face
	{font-family:Calibri;
	panose-1:2 15 5 2 2 2 4 3 2 4;
	mso-font-charset:0;
	mso-generic-font-family:swiss;
	mso-font-pitch:variable;
	mso-font-signature:-1610611985 1073750139 0 0 159 0;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
	{mso-style-priority:1;
	mso-style-unhide:no;
	mso-style-qformat:yes;
	mso-style-parent:"";
	margin-top:0cm;
	margin-right:0cm;
	margin-bottom:10.0pt;
	margin-left:0cm;
	mso-pagination:widow-orphan;
	font-size:11.0pt;
	mso-bidi-font-size:10.0pt;
	font-family:"Calibri","sans-serif";
	mso-ascii-font-family:Calibri;
	mso-ascii-theme-font:minor-latin;
	mso-fareast-font-family:"Times New Roman";
	mso-fareast-theme-font:minor-fareast;
	mso-hansi-font-family:Calibri;
	mso-hansi-theme-font:minor-latin;
	mso-bidi-font-family:"Times New Roman";
	mso-bidi-theme-font:minor-bidi;}
a:link, span.MsoHyperlink
	{mso-style-noshow:yes;
	mso-style-priority:99;
	mso-style-unhide:no;
	color:blue;
	mso-themecolor:hyperlink;
	text-decoration:underline;
	text-underline:single;}
a:visited, span.MsoHyperlinkFollowed
	{mso-style-noshow:yes;
	mso-style-priority:99;
	color:purple;
	mso-themecolor:followedhyperlink;
	text-decoration:underline;
	text-underline:single;}
.MsoChpDefault
	{mso-style-type:export-only;
	mso-default-props:yes;
	mso-bidi-font-size:10.0pt;
	mso-ascii-font-family:Calibri;
	mso-ascii-theme-font:minor-latin;
	mso-fareast-font-family:"Times New Roman";
	mso-fareast-theme-font:minor-fareast;
	mso-hansi-font-family:Calibri;
	mso-hansi-theme-font:minor-latin;
	mso-bidi-font-family:"Times New Roman";
	mso-bidi-theme-font:minor-bidi;}
.MsoPapDefault
	{mso-style-type:export-only;
	margin-bottom:10.0pt;}
@page Section1
	{size:612.0pt 792.0pt;
	margin:72.0pt 72.0pt 72.0pt 72.0pt;
	mso-header-margin:36.0pt;
	mso-footer-margin:36.0pt;
	mso-paper-source:0;}
div.Section1
	{page:Section1;}
--&gt;&lt;/style&gt;&lt;!--[if gte mso 10]&gt;
&lt;style&gt;
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-qformat:yes;
mso-style-parent:"";
mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
mso-para-margin-top:0cm;
mso-para-margin-right:0cm;
mso-para-margin-bottom:10.0pt;
mso-para-margin-left:0cm;
mso-pagination:widow-orphan;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;}
&lt;/style&gt;
&lt;![endif]--&gt;
&lt;p align="center" class="MsoNormal" style="text-align: center;"&gt;&lt;span style="font-size: 10pt;"&gt;[Source: &lt;/span&gt;&lt;a href="../../../../EltonStoneman"&gt;&lt;span style="font-size: 10pt;"&gt;http://geekswithblogs.net/EltonStoneman&lt;/span&gt;&lt;/a&gt;&lt;span style="font-size: 10pt;"&gt;]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;The typical approach for connecting to Oracle data sources using ODP.NET is to use a named source in the connection string and rely on the name being resolved through SQLNAMES.ORA and TNSNAMES.ORA:&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;em style=""&gt;app.config:&lt;o:p&gt;&lt;/o:p&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: 9pt; font-family: &amp;quot;Courier New&amp;quot;; color: blue;"&gt;&lt;span style=""&gt;  &lt;/span&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: &amp;quot;Courier New&amp;quot;; color: rgb(163, 21, 21);"&gt;connectionStrings&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: &amp;quot;Courier New&amp;quot;; color: blue;"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: 9pt; font-family: &amp;quot;Courier New&amp;quot;; color: blue;"&gt;&lt;span style=""&gt;    &lt;/span&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: &amp;quot;Courier New&amp;quot;; color: rgb(163, 21, 21);"&gt;add&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: &amp;quot;Courier New&amp;quot;; color: blue;"&gt; &lt;/span&gt;&lt;span style="font-size: 9pt; font-family: &amp;quot;Courier New&amp;quot;; color: red;"&gt;name&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: &amp;quot;Courier New&amp;quot;; color: blue;"&gt;=&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;"&lt;span style="color: blue;"&gt;XYZ&lt;/span&gt;"&lt;span style="color: blue;"&gt; &lt;/span&gt;&lt;span style="color: red;"&gt;connectionString&lt;/span&gt;&lt;span style="color: blue;"&gt;=&lt;/span&gt;"&lt;span style="color: blue;"&gt;Data Source=&lt;u&gt;XYZ.WORLD&lt;/u&gt;;User ID=xyz;Password=xyz;&lt;/span&gt;"&lt;span style="color: blue;"&gt;/&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span style="font-size: 9pt; font-family: &amp;quot;Courier New&amp;quot;; color: blue;"&gt;&lt;span style=""&gt;  &lt;/span&gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: &amp;quot;Courier New&amp;quot;; color: rgb(163, 21, 21);"&gt;connectionStrings&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: &amp;quot;Courier New&amp;quot;; color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;em style=""&gt;TNSNAMES.ORA:&lt;o:p&gt;&lt;/o:p&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;u&gt;&lt;span style="font-size: 9pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;XYZ.WORLD&lt;/span&gt;&lt;/u&gt;&lt;span style="font-size: 9pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt; =&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: 9pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;  &lt;/span&gt;(DESCRIPTION =&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: 9pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;    &lt;/span&gt;(ADDRESS_LIST =&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: 9pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;      &lt;/span&gt;(LOAD_BALANCE = off)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: 9pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;      &lt;/span&gt;(FAILOVER = on)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: 9pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;      &lt;/span&gt;(ADDRESS_LIST =&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: 9pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;        &lt;/span&gt;(LOAD_BALANCE = on)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: 9pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;        &lt;/span&gt;(FAILOVER = on)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: 9pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;        &lt;/span&gt;(ADDRESS = (PROTOCOL = TCP)(HOST = XYZ1-1.internal.xyz.org.uk)(PORT = 1522))&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: 9pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;        &lt;/span&gt;(ADDRESS = (PROTOCOL = TCP)(HOST = XYZ1-2.internal.xyz.org.uk)(PORT = 1522))&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: 9pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;      &lt;/span&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: 9pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;      &lt;/span&gt;(ADDRESS_LIST =&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: 9pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;        &lt;/span&gt;(LOAD_BALANCE = on)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: 9pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;        &lt;/span&gt;(FAILOVER = on)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: 9pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;        &lt;/span&gt;(ADDRESS = (PROTOCOL = TCP)(HOST = XYZ2-1.internal.xyz.org.uk)(PORT = 1522))&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: 9pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;        &lt;/span&gt;(ADDRESS = (PROTOCOL = TCP)(HOST = XYZ2-2.internal.xyz.org.uk)(PORT = 1522))&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: 9pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;      &lt;/span&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: 9pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;    &lt;/span&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: 9pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;    &lt;/span&gt;(CONNECT_DATA =&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: 9pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;      &lt;/span&gt;(SERVICE_NAME = XYZ)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: 9pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;      &lt;/span&gt;(FAILOVER_MODE =&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: 9pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;        &lt;/span&gt;(TYPE = select)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: 9pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;        &lt;/span&gt;(METHOD = basic)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: 9pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;        &lt;/span&gt;(RETRIES = 16)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: 9pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;        &lt;/span&gt;(DELAY = 1)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: 9pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;      &lt;/span&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: 9pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;    &lt;/span&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: 9pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;  &lt;/span&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;This is fine until you upgrade your Oracle client, or have multiple instances – if the wrong TNSNAMES gets picked up you’ll get error &lt;a href="http://ora-12514.ora-code.com/"&gt;ORA-12514: TNS:could not resolve the connect identifier specified&lt;/a&gt;, and it can be fiddly to track down.&lt;/p&gt;
&lt;p class="MsoNormal"&gt;A neater way is to put the whole set of service details in the connection string, avoid the named identifier and circumvent TNSNAMES.ORA altogether:&lt;/p&gt;
&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: 9pt; font-family: &amp;quot;Courier New&amp;quot;; color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: &amp;quot;Courier New&amp;quot;; color: rgb(163, 21, 21);"&gt;connectionStrings&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: &amp;quot;Courier New&amp;quot;; color: blue;"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: 9pt; font-family: &amp;quot;Courier New&amp;quot;; color: blue;"&gt;&lt;span style=""&gt;    &lt;/span&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: &amp;quot;Courier New&amp;quot;; color: rgb(163, 21, 21);"&gt;add&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: &amp;quot;Courier New&amp;quot;; color: blue;"&gt; &lt;/span&gt;&lt;span style="font-size: 9pt; font-family: &amp;quot;Courier New&amp;quot;; color: red;"&gt;name&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: &amp;quot;Courier New&amp;quot;; color: blue;"&gt;=&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;"&lt;span style="color: blue;"&gt;XYZ&lt;/span&gt;"&lt;span style="color: blue;"&gt; &lt;/span&gt;&lt;span style="color: red;"&gt;connectionString&lt;/span&gt;&lt;span style="color: blue;"&gt;=&lt;/span&gt;"&lt;span style="color: blue;"&gt;Data Source=(DESCRIPTION =&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: 9pt; font-family: &amp;quot;Courier New&amp;quot;; color: blue;"&gt;&lt;span style=""&gt;    &lt;/span&gt;(ADDRESS_LIST =&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: 9pt; font-family: &amp;quot;Courier New&amp;quot;; color: blue;"&gt;&lt;span style=""&gt;      &lt;/span&gt;(LOAD_BALANCE = off)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: 9pt; font-family: &amp;quot;Courier New&amp;quot;; color: blue;"&gt;&lt;span style=""&gt;      &lt;/span&gt;(FAILOVER = on)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: 9pt; font-family: &amp;quot;Courier New&amp;quot;; color: blue;"&gt;&lt;span style=""&gt;      &lt;/span&gt;(ADDRESS_LIST =&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: 9pt; font-family: &amp;quot;Courier New&amp;quot;; color: blue;"&gt;&lt;span style=""&gt;        &lt;/span&gt;(LOAD_BALANCE = on)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: 9pt; font-family: &amp;quot;Courier New&amp;quot;; color: blue;"&gt;&lt;span style=""&gt;        &lt;/span&gt;(FAILOVER = on)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: 9pt; font-family: &amp;quot;Courier New&amp;quot;; color: blue;"&gt;&lt;span style=""&gt;        &lt;/span&gt;(ADDRESS = (PROTOCOL = TCP)(HOST = XYZ1-1.internal.xyz.org.uk)(PORT = 1522))&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: 9pt; font-family: &amp;quot;Courier New&amp;quot;; color: blue;"&gt;&lt;span style=""&gt;        &lt;/span&gt;(ADDRESS = (PROTOCOL = TCP)(HOST = XYZ1-2.internal.xyz.org.uk)(PORT = 1522))&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: 9pt; font-family: &amp;quot;Courier New&amp;quot;; color: blue;"&gt;&lt;span style=""&gt;      &lt;/span&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: 9pt; font-family: &amp;quot;Courier New&amp;quot;; color: blue;"&gt;&lt;span style=""&gt;      &lt;/span&gt;(ADDRESS_LIST =&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: 9pt; font-family: &amp;quot;Courier New&amp;quot;; color: blue;"&gt;&lt;span style=""&gt;        &lt;/span&gt;(LOAD_BALANCE = on)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: 9pt; font-family: &amp;quot;Courier New&amp;quot;; color: blue;"&gt;&lt;span style=""&gt;        &lt;/span&gt;(FAILOVER = on)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: 9pt; font-family: &amp;quot;Courier New&amp;quot;; color: blue;"&gt;&lt;span style=""&gt;        &lt;/span&gt;(ADDRESS = (PROTOCOL = TCP)(HOST = XYZ2-1.internal.xyz.org.uk)(PORT = 1522))&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: 9pt; font-family: &amp;quot;Courier New&amp;quot;; color: blue;"&gt;&lt;span style=""&gt;        &lt;/span&gt;(ADDRESS = (PROTOCOL = TCP)(HOST = XYZ2-1.internal.xyz.org.uk)(PORT = 1522))&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: 9pt; font-family: &amp;quot;Courier New&amp;quot;; color: blue;"&gt;&lt;span style=""&gt;      &lt;/span&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: 9pt; font-family: &amp;quot;Courier New&amp;quot;; color: blue;"&gt;&lt;span style=""&gt;    &lt;/span&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: 9pt; font-family: &amp;quot;Courier New&amp;quot;; color: blue;"&gt;&lt;span style=""&gt;    &lt;/span&gt;(CONNECT_DATA =&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: 9pt; font-family: &amp;quot;Courier New&amp;quot;; color: blue;"&gt;&lt;span style=""&gt;      &lt;/span&gt;(SERVICE_NAME = UVASA)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: 9pt; font-family: &amp;quot;Courier New&amp;quot;; color: blue;"&gt;&lt;span style=""&gt;      &lt;/span&gt;(FAILOVER_MODE =&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: 9pt; font-family: &amp;quot;Courier New&amp;quot;; color: blue;"&gt;&lt;span style=""&gt;        &lt;/span&gt;(TYPE = select)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: 9pt; font-family: &amp;quot;Courier New&amp;quot;; color: blue;"&gt;&lt;span style=""&gt;        &lt;/span&gt;(METHOD = basic)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: 9pt; font-family: &amp;quot;Courier New&amp;quot;; color: blue;"&gt;&lt;span style=""&gt;        &lt;/span&gt;(RETRIES = 16)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: 9pt; font-family: &amp;quot;Courier New&amp;quot;; color: blue;"&gt;&lt;span style=""&gt;        &lt;/span&gt;(DELAY = 1)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: 9pt; font-family: &amp;quot;Courier New&amp;quot;; color: blue;"&gt;&lt;span style=""&gt;      &lt;/span&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: 9pt; font-family: &amp;quot;Courier New&amp;quot;; color: blue;"&gt;&lt;span style=""&gt;    &lt;/span&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: 9pt; font-family: &amp;quot;Courier New&amp;quot;; color: blue;"&gt;&lt;span style=""&gt;  &lt;/span&gt;);User ID=xyz;Password=xyz;&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;"&lt;span style="color: blue;"&gt;/&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span style="font-size: 9pt; font-family: &amp;quot;Courier New&amp;quot;; color: blue;"&gt;&lt;span style=""&gt;  &lt;/span&gt;&amp;lt;/&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: &amp;quot;Courier New&amp;quot;; color: rgb(163, 21, 21);"&gt;connectionStrings&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: &amp;quot;Courier New&amp;quot;; color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;Service details contain the whole of the TNSNAMES entry following the identifier (i.e. from &lt;u&gt;DESCRIPTION=&lt;/u&gt; onwards), and can span multiple lines in the config file.&lt;/p&gt;
&lt;p class="MsoNormal"&gt;Incidentally, if you’re not using ODP.NET in favour of the Microsoft’s framework Oracle provider, &lt;strong style=""&gt;System.Data.OracleClient&lt;/strong&gt;, consider migrating as it will be &lt;a href="http://blogs.msdn.com/adonet/archive/2009/06/15/system-data-oracleclient-update.aspx"&gt;deprecated from .NET 4.0&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=136052"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=136052" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/EltonStoneman/aggbug/136052.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>EltonStoneman</dc:creator>
            <guid>http://geekswithblogs.net/EltonStoneman/archive/2009/11/05/avoiding-tnsnames-in-oracle-.net-data-connections.aspx</guid>
            <pubDate>Fri, 06 Nov 2009 04:03:04 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/EltonStoneman/comments/136052.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/EltonStoneman/archive/2009/11/05/avoiding-tnsnames-in-oracle-.net-data-connections.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/EltonStoneman/comments/commentRss/136052.aspx</wfw:commentRss>
        </item>
        <item>
            <title>jQuery Date Validation in Chrome</title>
            <category>Annoying problems</category>
            <category>Code Snippet</category>
            <link>http://geekswithblogs.net/EltonStoneman/archive/2009/10/29/jquery-date-validation-in-chrome.aspx</link>
            <description>&lt;p style="TEXT-ALIGN: center"&gt;&lt;span style="FONT-SIZE: 10pt"&gt;[Source: &lt;a href="http://geekswithblogs.net/EltonStoneman"&gt;http://geekswithblogs.net/EltonStoneman&lt;/a&gt;] &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;We had a fiddly issue with date validation in an ASP.NET MVC page failing for a valid date in Chrome, but passing in Firefox, IE etc. Tracing through our own code and &lt;a href="http://xval.codeplex.com/"&gt;xVal&lt;/a&gt;, the issue was narrowed down to the &lt;a href="http://plugins.jquery.com/project/validate"&gt;jQuery validation plugin&lt;/a&gt; (jquery.validate.js). For simple date validation, the library instantiates a date object from the given text value and lets JavaScript raise errors for invalid dates: &lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 9pt; FONT-FAMILY: Courier New"&gt;    date: &lt;span style="COLOR: blue"&gt;function&lt;/span&gt;(value, element) { &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 9pt; FONT-FAMILY: Courier New"&gt;     &lt;span style="COLOR: blue"&gt;return&lt;/span&gt; &lt;span style="COLOR: blue"&gt;this&lt;/span&gt;.optional(element) || !/Invalid|NaN/.test(&lt;span style="COLOR: blue"&gt;new&lt;/span&gt; Date(value)); &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 9pt; FONT-FAMILY: Courier New"&gt;    },&lt;/span&gt; &lt;/p&gt;
&lt;p&gt;Chrome seems to ignore the current locale when it creates the date object, so a valid date in UK &lt;em&gt;dd/mm/yy&lt;/em&gt; format – 29/10/2009 – fails as Chrome seems to interpret it in US &lt;em&gt;mm/dd/yy &lt;/em&gt;format. Easy to test outside of all other code by entering some simple JavaScript into the address bar: &lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;    javascript:new Date('29/10/2009').toString() &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Which Firefox renders as expected: &lt;/p&gt;
&lt;p&gt;&lt;img alt="" src="http://geekswithblogs.net/images/geekswithblogs_net/eltonstoneman/102909_1920_jQueryDateV1.png" /&gt; &lt;/p&gt;
&lt;p&gt;- as does IE (even IE6): &lt;/p&gt;
&lt;p&gt;&lt;img alt="" src="http://geekswithblogs.net/images/geekswithblogs_net/eltonstoneman/102909_1920_jQueryDateV2.png" /&gt; &lt;/p&gt;
&lt;p&gt;- but which Chrome renders as an invalid date: &lt;/p&gt;
&lt;p&gt;&lt;img alt="" src="http://geekswithblogs.net/images/geekswithblogs_net/eltonstoneman/102909_1920_jQueryDateV3.png" /&gt; &lt;/p&gt;
&lt;p&gt;You can also test it by navigating to the &lt;a href="http://docs.jquery.com/Plugins/Validation/Methods/date"&gt;jQuery date validation sample page&lt;/a&gt;, and checking results for the same date in different browsers. &lt;/p&gt;
&lt;p&gt;The fix is a simple change to the jQuery script to force the use of the current locale: &lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 9pt; FONT-FAMILY: Courier New"&gt;    &lt;span style="COLOR: green"&gt;// http://docs.jquery.com/Plugins/Validation/Methods/date &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 9pt; FONT-FAMILY: Courier New"&gt;    date: &lt;span style="COLOR: blue"&gt;function&lt;/span&gt;(value, element) { &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 9pt; FONT-FAMILY: Courier New"&gt;     &lt;span style="COLOR: green"&gt;//ES - Chrome does not use the locale when new Date objects instantiated: &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 9pt; FONT-FAMILY: Courier New"&gt;     &lt;span style="COLOR: green"&gt;//return this.optional(element) || !/Invalid|NaN/.test(new Date(value)); &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 9pt; FONT-FAMILY: Courier New"&gt;     &lt;span style="COLOR: blue"&gt;var&lt;/span&gt; d = &lt;span style="COLOR: blue"&gt;new&lt;/span&gt; Date(); &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 9pt; FONT-FAMILY: Courier New"&gt;     &lt;span style="COLOR: blue"&gt;return&lt;/span&gt; &lt;span style="COLOR: blue"&gt;this&lt;/span&gt;.optional(element) || !/Invalid|NaN/.test(&lt;strong&gt;&lt;span style="COLOR: blue"&gt;new&lt;/span&gt; Date(d.toLocaleDateString(value))&lt;/strong&gt;); &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 9pt; FONT-FAMILY: Courier New"&gt;    }, &lt;/span&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=135841"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=135841" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/EltonStoneman/aggbug/135841.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>EltonStoneman</dc:creator>
            <guid>http://geekswithblogs.net/EltonStoneman/archive/2009/10/29/jquery-date-validation-in-chrome.aspx</guid>
            <pubDate>Thu, 29 Oct 2009 19:20:53 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/EltonStoneman/comments/135841.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/EltonStoneman/archive/2009/10/29/jquery-date-validation-in-chrome.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/EltonStoneman/comments/commentRss/135841.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Duck Typing with Castle</title>
            <category>MSDN Code Gallery</category>
            <link>http://geekswithblogs.net/EltonStoneman/archive/2009/10/21/duck-typing-with-castle.aspx</link>
            <description>&lt;link rel="File-List" href="file:///C:\DOCUME~1\STONEM~1\LOCALS~1\Temp\msohtmlclip1\01\clip_filelist.xml" /&gt;
&lt;link rel="Edit-Time-Data" href="file:///C:\DOCUME~1\STONEM~1\LOCALS~1\Temp\msohtmlclip1\01\clip_editdata.mso" /&gt;&lt;!--[if !mso]&gt;
&lt;style&gt;
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
&lt;/style&gt;
&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
&lt;o:OfficeDocumentSettings&gt;
&lt;o:RelyOnVML /&gt;
&lt;o:AllowPNG /&gt;
&lt;/o:OfficeDocumentSettings&gt;
&lt;/xml&gt;&lt;![endif]--&gt;
&lt;link rel="themeData" href="file:///C:\DOCUME~1\STONEM~1\LOCALS~1\Temp\msohtmlclip1\01\clip_themedata.thmx" /&gt;
&lt;link rel="colorSchemeMapping" href="file:///C:\DOCUME~1\STONEM~1\LOCALS~1\Temp\msohtmlclip1\01\clip_colorschememapping.xml" /&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
&lt;w:WordDocument&gt;
&lt;w:View&gt;Normal&lt;/w:View&gt;
&lt;w:Zoom&gt;0&lt;/w:Zoom&gt;
&lt;w:TrackMoves&gt;false&lt;/w:TrackMoves&gt;
&lt;w:TrackFormatting /&gt;
&lt;w:PunctuationKerning /&gt;
&lt;w:ValidateAgainstSchemas /&gt;
&lt;w:SaveIfXMLInvalid&gt;false&lt;/w:SaveIfXMLInvalid&gt;
&lt;w:IgnoreMixedContent&gt;false&lt;/w:IgnoreMixedContent&gt;
&lt;w:AlwaysShowPlaceholderText&gt;false&lt;/w:AlwaysShowPlaceholderText&gt;
&lt;w:DoNotPromoteQF /&gt;
&lt;w:LidThemeOther&gt;EN-GB&lt;/w:LidThemeOther&gt;
&lt;w:LidThemeAsian&gt;X-NONE&lt;/w:LidThemeAsian&gt;
&lt;w:LidThemeComplexScript&gt;X-NONE&lt;/w:LidThemeComplexScript&gt;
&lt;w:Compatibility&gt;
&lt;w:BreakWrappedTables /&gt;
&lt;w:SnapToGridInCell /&gt;
&lt;w:WrapTextWithPunct /&gt;
&lt;w:UseAsianBreakRules /&gt;
&lt;w:DontGrowAutofit /&gt;
&lt;w:SplitPgBreakAndParaMark /&gt;
&lt;w:DontVertAlignCellWithSp /&gt;
&lt;w:DontBreakConstrainedForcedTables /&gt;
&lt;w:DontVertAlignInTxbx /&gt;
&lt;w:Word11KerningPairs /&gt;
&lt;w:CachedColBalance /&gt;
&lt;w:UseFELayout /&gt;
&lt;/w:Compatibility&gt;
&lt;w:DoNotOptimizeForBrowser /&gt;
&lt;m:mathPr&gt;
&lt;m:mathFont m:val="Cambria Math" /&gt;
&lt;m:brkBin m:val="before" /&gt;
&lt;m:brkBinSub m:val="&amp;#45;-" /&gt;
&lt;m:smallFrac m:val="off" /&gt;
&lt;m:dispDef /&gt;
&lt;m:lMargin m:val="0" /&gt;
&lt;m:rMargin m:val="0" /&gt;
&lt;m:defJc m:val="centerGroup" /&gt;
&lt;m:wrapIndent m:val="1440" /&gt;
&lt;m:intLim m:val="subSup" /&gt;
&lt;m:naryLim m:val="undOvr" /&gt;
&lt;/m:mathPr&gt;&lt;/w:WordDocument&gt;
&lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
&lt;w:LatentStyles DefLockedState="false" DefUnhideWhenUsed="true"
DefSemiHidden="true" DefQFormat="false" DefPriority="99"
LatentStyleCount="267"&gt;
&lt;w:LsdException Locked="false" Priority="1" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Normal" /&gt;
&lt;w:LsdException Locked="false" Priority="9" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="heading 1" /&gt;
&lt;w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 2" /&gt;
&lt;w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 3" /&gt;
&lt;w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 4" /&gt;
&lt;w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 5" /&gt;
&lt;w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 6" /&gt;
&lt;w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 7" /&gt;
&lt;w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 8" /&gt;
&lt;w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 9" /&gt;
&lt;w:LsdException Locked="false" Priority="39" Name="toc 1" /&gt;
&lt;w:LsdException Locked="false" Priority="39" Name="toc 2" /&gt;
&lt;w:LsdException Locked="false" Priority="39" Name="toc 3" /&gt;
&lt;w:LsdException Locked="false" Priority="39" Name="toc 4" /&gt;
&lt;w:LsdException Locked="false" Priority="39" Name="toc 5" /&gt;
&lt;w:LsdException Locked="false" Priority="39" Name="toc 6" /&gt;
&lt;w:LsdException Locked="false" Priority="39" Name="toc 7" /&gt;
&lt;w:LsdException Locked="false" Priority="39" Name="toc 8" /&gt;
&lt;w:LsdException Locked="false" Priority="39" Name="toc 9" /&gt;
&lt;w:LsdException Locked="false" Priority="35" QFormat="true" Name="caption" /&gt;
&lt;w:LsdException Locked="false" Priority="10" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Title" /&gt;
&lt;w:LsdException Locked="false" Priority="1" Name="Default Paragraph Font" /&gt;
&lt;w:LsdException Locked="false" Priority="11" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtitle" /&gt;
&lt;w:LsdException Locked="false" Priority="22" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Strong" /&gt;
&lt;w:LsdException Locked="false" Priority="20" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Emphasis" /&gt;
&lt;w:LsdException Locked="false" Priority="59" SemiHidden="false"
UnhideWhenUsed="false" Name="Table Grid" /&gt;
&lt;w:LsdException Locked="false" UnhideWhenUsed="false" Name="Placeholder Text" /&gt;
&lt;w:LsdException Locked="false" Priority="1" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="No Spacing" /&gt;
&lt;w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading" /&gt;
&lt;w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List" /&gt;
&lt;w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid" /&gt;
&lt;w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1" /&gt;
&lt;w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2" /&gt;
&lt;w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1" /&gt;
&lt;w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2" /&gt;
&lt;w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1" /&gt;
&lt;w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2" /&gt;
&lt;w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3" /&gt;
&lt;w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List" /&gt;
&lt;w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading" /&gt;
&lt;w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List" /&gt;
&lt;w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid" /&gt;
&lt;w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 1" /&gt;
&lt;w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 1" /&gt;
&lt;w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 1" /&gt;
&lt;w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 1" /&gt;
&lt;w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 1" /&gt;
&lt;w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 1" /&gt;
&lt;w:LsdException Locked="false" UnhideWhenUsed="false" Name="Revision" /&gt;
&lt;w:LsdException Locked="false" Priority="34" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="List Paragraph" /&gt;
&lt;w:LsdException Locked="false" Priority="29" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Quote" /&gt;
&lt;w:LsdException Locked="false" Priority="30" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Quote" /&gt;
&lt;w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 1" /&gt;
&lt;w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 1" /&gt;
&lt;w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 1" /&gt;
&lt;w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 1" /&gt;
&lt;w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 1" /&gt;
&lt;w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 1" /&gt;
&lt;w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 1" /&gt;
&lt;w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 1" /&gt;
&lt;w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 2" /&gt;
&lt;w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 2" /&gt;
&lt;w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 2" /&gt;
&lt;w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 2" /&gt;
&lt;w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 2" /&gt;
&lt;w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 2" /&gt;
&lt;w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 2" /&gt;
&lt;w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 2" /&gt;
&lt;w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 2" /&gt;
&lt;w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 2" /&gt;
&lt;w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 2" /&gt;
&lt;w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 2" /&gt;
&lt;w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 2" /&gt;
&lt;w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 2" /&gt;
&lt;w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 3" /&gt;
&lt;w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 3" /&gt;
&lt;w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 3" /&gt;
&lt;w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 3" /&gt;
&lt;w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 3" /&gt;
&lt;w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 3" /&gt;
&lt;w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 3" /&gt;
&lt;w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 3" /&gt;
&lt;w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 3" /&gt;
&lt;w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 3" /&gt;
&lt;w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 3" /&gt;
&lt;w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 3" /&gt;
&lt;w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 3" /&gt;
&lt;w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 3" /&gt;
&lt;w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 4" /&gt;
&lt;w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 4" /&gt;
&lt;w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 4" /&gt;
&lt;w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 4" /&gt;
&lt;w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 4" /&gt;
&lt;w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 4" /&gt;
&lt;w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 4" /&gt;
&lt;w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 4" /&gt;
&lt;w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 4" /&gt;
&lt;w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 4" /&gt;
&lt;w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 4" /&gt;
&lt;w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 4" /&gt;
&lt;w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 4" /&gt;
&lt;w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 4" /&gt;
&lt;w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 5" /&gt;
&lt;w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 5" /&gt;
&lt;w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 5" /&gt;
&lt;w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 5" /&gt;
&lt;w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 5" /&gt;
&lt;w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 5" /&gt;
&lt;w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 5" /&gt;
&lt;w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 5" /&gt;
&lt;w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 5" /&gt;
&lt;w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 5" /&gt;
&lt;w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 5" /&gt;
&lt;w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 5" /&gt;
&lt;w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 5" /&gt;
&lt;w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 5" /&gt;
&lt;w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 6" /&gt;
&lt;w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 6" /&gt;
&lt;w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 6" /&gt;
&lt;w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 6" /&gt;
&lt;w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 6" /&gt;
&lt;w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 6" /&gt;
&lt;w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 6" /&gt;
&lt;w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 6" /&gt;
&lt;w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 6" /&gt;
&lt;w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 6" /&gt;
&lt;w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 6" /&gt;
&lt;w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 6" /&gt;
&lt;w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 6" /&gt;
&lt;w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 6" /&gt;
&lt;w:LsdException Locked="false" Priority="19" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtle Emphasis" /&gt;
&lt;w:LsdException Locked="false" Priority="21" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Emphasis" /&gt;
&lt;w:LsdException Locked="false" Priority="31" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtle Reference" /&gt;
&lt;w:LsdException Locked="false" Priority="32" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Reference" /&gt;
&lt;w:LsdException Locked="false" Priority="33" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Book Title" /&gt;
&lt;w:LsdException Locked="false" Priority="37" Name="Bibliography" /&gt;
&lt;w:LsdException Locked="false" Priority="39" QFormat="true" Name="TOC Heading" /&gt;
&lt;/w:LatentStyles&gt;
&lt;/xml&gt;&lt;![endif]--&gt;&lt;style type="text/css"&gt;&lt;!--
 /* Font Definitions */
 @font-face
	{font-family:"Cambria Math";
	panose-1:2 4 5 3 5 4 6 3 2 4;
	mso-font-charset:0;
	mso-generic-font-family:roman;
	mso-font-pitch:variable;
	mso-font-signature:-1610611985 1107304683 0 0 159 0;}
@font-face
	{font-family:Calibri;
	panose-1:2 15 5 2 2 2 4 3 2 4;
	mso-font-charset:0;
	mso-generic-font-family:swiss;
	mso-font-pitch:variable;
	mso-font-signature:-1610611985 1073750139 0 0 159 0;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
	{mso-style-priority:1;
	mso-style-unhide:no;
	mso-style-qformat:yes;
	mso-style-parent:"";
	margin-top:0cm;
	margin-right:0cm;
	margin-bottom:10.0pt;
	margin-left:0cm;
	mso-pagination:widow-orphan;
	font-size:11.0pt;
	mso-bidi-font-size:10.0pt;
	font-family:"Calibri","sans-serif";
	mso-ascii-font-family:Calibri;
	mso-ascii-theme-font:minor-latin;
	mso-fareast-font-family:"Times New Roman";
	mso-fareast-theme-font:minor-fareast;
	mso-hansi-font-family:Calibri;
	mso-hansi-theme-font:minor-latin;
	mso-bidi-font-family:"Times New Roman";
	mso-bidi-theme-font:minor-bidi;}
a:link, span.MsoHyperlink
	{mso-style-noshow:yes;
	mso-style-priority:99;
	mso-style-unhide:no;
	color:blue;
	mso-themecolor:hyperlink;
	text-decoration:underline;
	text-underline:single;}
a:visited, span.MsoHyperlinkFollowed
	{mso-style-noshow:yes;
	mso-style-priority:99;
	color:purple;
	mso-themecolor:followedhyperlink;
	text-decoration:underline;
	text-underline:single;}
.MsoChpDefault
	{mso-style-type:export-only;
	mso-default-props:yes;
	mso-bidi-font-size:10.0pt;
	mso-ascii-font-family:Calibri;
	mso-ascii-theme-font:minor-latin;
	mso-fareast-font-family:"Times New Roman";
	mso-fareast-theme-font:minor-fareast;
	mso-hansi-font-family:Calibri;
	mso-hansi-theme-font:minor-latin;
	mso-bidi-font-family:"Times New Roman";
	mso-bidi-theme-font:minor-bidi;}
.MsoPapDefault
	{mso-style-type:export-only;
	margin-bottom:10.0pt;}
@page Section1
	{size:612.0pt 792.0pt;
	margin:72.0pt 72.0pt 72.0pt 72.0pt;
	mso-header-margin:36.0pt;
	mso-footer-margin:36.0pt;
	mso-paper-source:0;}
div.Section1
	{page:Section1;}
--&gt;&lt;/style&gt;&lt;!--[if gte mso 10]&gt;
&lt;style&gt;
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-qformat:yes;
mso-style-parent:"";
mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
mso-para-margin-top:0cm;
mso-para-margin-right:0cm;
mso-para-margin-bottom:10.0pt;
mso-para-margin-left:0cm;
mso-pagination:widow-orphan;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;}
&lt;/style&gt;
&lt;![endif]--&gt;
&lt;p align="center" class="MsoNormal" style="text-align: center;"&gt;&lt;span style="font-size: 10pt;"&gt;[Source: &lt;/span&gt;&lt;a href="../../../../EltonStoneman"&gt;&lt;span style="font-size: 10pt;"&gt;http://geekswithblogs.net/EltonStoneman&lt;/span&gt;&lt;/a&gt;&lt;span style="font-size: 10pt;"&gt;]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;a href="http://www.deftflux.net/blog/page/Duck-Typing-Project.aspx"&gt;David Meyer&lt;/a&gt; has a neat duck typing library for .NET which I’ve been looking at as I had a requirement to treat objects of various types in the same way. They all expose a “Value” property, but don’t implement an interface.&lt;/p&gt;
&lt;p class="MsoNormal"&gt;The library does more than I needed so I put together a quick duck typing implementation which just lets me treat an instance of an object which tacitly implements an interface, as a true implementation of the interface. In this example I can access &lt;strong style=""&gt;BespokeDateTime &lt;/strong&gt;and &lt;strong style=""&gt;BespokeInt&lt;/strong&gt; as &lt;strong style=""&gt;IHasValue&lt;/strong&gt;:&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;img height="251" width="450" alt="" src="/images/geekswithblogs_net/EltonStoneman/duck1.PNG" /&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span style=""&gt;&lt;v:shapetype id="_x0000_t75" coordsize="21600,21600" o:spt="75" o:preferrelative="t" path="m@4@5l@4@11@9@11@9@5xe" filled="f" stroked="f"&gt;  &lt;v:stroke joinstyle="miter"&gt;  &lt;v:formulas&gt;   &lt;v:f eqn="if lineDrawn pixelLineWidth 0"&gt;   &lt;v:f eqn="sum @0 1 0"&gt;   &lt;v:f eqn="sum 0 0 @1"&gt;   &lt;v:f eqn="prod @2 1 2"&gt;   &lt;v:f eqn="prod @3 21600 pixelWidth"&gt;   &lt;v:f eqn="prod @3 21600 pixelHeight"&gt;   &lt;v:f eqn="sum @0 0 1"&gt;   &lt;v:f eqn="prod @6 1 2"&gt;   &lt;v:f eqn="prod @7 21600 pixelWidth"&gt;   &lt;v:f eqn="sum @8 21600 0"&gt;   &lt;v:f eqn="prod @7 21600 pixelHeight"&gt;   &lt;v:f eqn="sum @10 21600 0"&gt;  &lt;/v:f&gt;  &lt;v:path o:extrusionok="f" gradientshapeok="t" o:connecttype="rect"&gt;  &lt;o:lock v:ext="edit" aspectratio="t"&gt; &lt;/o:lock&gt;&lt;v:shape id="_x0000_i1026" type="#_x0000_t75" style="width: 333.75pt; height: 183.75pt; visibility: visible;"&gt;  &lt;v:imagedata src="file:///C:\DOCUME~1\STONEM~1\LOCALS~1\Temp\msohtmlclip1\01\clip_image001.png" o:title=""&gt; &lt;/v:imagedata&gt;&lt;/v:shape&gt;&lt;/v:path&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:formulas&gt;&lt;/v:stroke&gt;&lt;/v:shapetype&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;Using &lt;a href="http://www.castleproject.org/dynamicproxy/index.html"&gt;Castle’s Dynamic Proxy&lt;/a&gt;, this is simple to do – just requiring you to generate an interface proxy with a custom interceptor. The interceptor invokes the interface method on the real object, so you effectively wrap an instance in an interface it doesn’t explicitly implement:&lt;/p&gt;
&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;    &lt;/span&gt;&lt;span style="color: rgb(43, 145, 175);"&gt;BespokeDateTime&lt;/span&gt; bespoke = &lt;span style="color: blue;"&gt;new&lt;/span&gt; &lt;span style="color: rgb(43, 145, 175);"&gt;BespokeDateTime&lt;/span&gt;(&lt;span style="color: blue;"&gt;new&lt;/span&gt; &lt;span style="color: rgb(43, 145, 175);"&gt;DateTime&lt;/span&gt;(2000, 1, 1));&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;    &lt;/span&gt;&lt;span style="color: rgb(43, 145, 175);"&gt;IHasValue&lt;/span&gt; duck = &lt;span style="color: rgb(43, 145, 175);"&gt;DuckType&lt;/span&gt;.As&amp;lt;&lt;span style="color: rgb(43, 145, 175);"&gt;IHasValue&lt;/span&gt;&amp;gt;(bespoke);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;    &lt;/span&gt;&lt;span style="color: rgb(43, 145, 175);"&gt;Console&lt;/span&gt;.WriteLine(duck.Value);&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;- or using an object extension to hide the implementation:&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;    &lt;/span&gt;bespoke.As&amp;lt;&lt;span style="color: rgb(43, 145, 175);"&gt;IHasValue&lt;/span&gt;&amp;gt;().Value;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;Iterating over collections is much cleaner with duck typing – if I have a collection that contains both &lt;strong style=""&gt;BespokeDateTime&lt;/strong&gt; and &lt;strong style=""&gt;BespokeInt&lt;/strong&gt; objects, to get all their values I can use:&lt;/p&gt;
&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;    &lt;/span&gt;&lt;span style="color: blue;"&gt;foreach&lt;/span&gt; (&lt;span style="color: blue;"&gt;object&lt;/span&gt; obj &lt;span style="color: blue;"&gt;in&lt;/span&gt; GetObjects())&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;    &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;        &lt;/span&gt;&lt;span style="color: rgb(43, 145, 175);"&gt;Assert&lt;/span&gt;.IsNotNull(&lt;span style="color: rgb(43, 145, 175);"&gt;DuckType&lt;/span&gt;.As&amp;lt;&lt;span style="color: rgb(43, 145, 175);"&gt;IHasValue&lt;/span&gt;&amp;gt;(obj).Value);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;    &lt;/span&gt;}&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;- compared to casting each object:&lt;/p&gt;
&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;    &lt;/span&gt;&lt;span style="color: blue;"&gt;foreach&lt;/span&gt; (&lt;span style="color: blue;"&gt;object&lt;/span&gt; obj &lt;span style="color: blue;"&gt;in&lt;/span&gt; GetObjects())&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;    &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;        &lt;/span&gt;&lt;span style="color: rgb(43, 145, 175);"&gt;BespokeDateTime&lt;/span&gt; bespokeDateTime = obj &lt;span style="color: blue;"&gt;as&lt;/span&gt; &lt;span style="color: rgb(43, 145, 175);"&gt;BespokeDateTime&lt;/span&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;        &lt;/span&gt;&lt;span style="color: blue;"&gt;if&lt;/span&gt; (bespokeDateTime != &lt;span style="color: blue;"&gt;null&lt;/span&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;        &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;            &lt;/span&gt;&lt;span style="color: rgb(43, 145, 175);"&gt;Assert&lt;/span&gt;.IsNotNull(bespokeDateTime.Value);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;        &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;        &lt;/span&gt;&lt;span style="color: blue;"&gt;else&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;        &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;            &lt;/span&gt;&lt;span style="color: rgb(43, 145, 175);"&gt;BespokeInt&lt;/span&gt; bespokeInt = (&lt;span style="color: rgb(43, 145, 175);"&gt;BespokeInt&lt;/span&gt;) obj;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;            &lt;/span&gt;&lt;span style="color: rgb(43, 145, 175);"&gt;Assert&lt;/span&gt;.IsNotNull(bespokeInt.Value);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;        &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;    &lt;/span&gt;}&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;Use with caution over large collections, as there is a noticeable performance hit in using the duck type. Over 500,000 items the duck-typed code takes 40-50 times as long as the casting code, averaging 8 seconds to 0.2 seconds, with duck-typing by extension taking marginally longer again:&lt;/p&gt;
&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;o:p&gt;&lt;img height="77" width="373" alt="" src="/images/geekswithblogs_net/EltonStoneman/duck2.PNG" /&gt;&lt;br /&gt;
&lt;/o:p&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;span style=""&gt;&lt;v:shape id="Picture_x0020_1" o:spid="_x0000_i1025" type="#_x0000_t75" style="width: 276pt; height: 56.25pt; visibility: visible;"&gt;  &lt;v:imagedata src="file:///C:\DOCUME~1\STONEM~1\LOCALS~1\Temp\msohtmlclip1\01\clip_image002.png" o:title=""&gt; &lt;/v:imagedata&gt;&lt;/v:shape&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;The full code (all 34 lines – including validation that the type to duck does tacitly implement the interface) is on MSDN Code Gallery here: &lt;a href="http://code.msdn.microsoft.com/DuckTypingWithCastle"&gt;Duck Typing with Castle&lt;/a&gt;.&lt;/p&gt;
&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=135617"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=135617" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/EltonStoneman/aggbug/135617.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>EltonStoneman</dc:creator>
            <guid>http://geekswithblogs.net/EltonStoneman/archive/2009/10/21/duck-typing-with-castle.aspx</guid>
            <pubDate>Wed, 21 Oct 2009 07:59:24 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/EltonStoneman/comments/135617.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/EltonStoneman/archive/2009/10/21/duck-typing-with-castle.aspx#feedback</comments>
            <slash:comments>1</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/EltonStoneman/comments/commentRss/135617.aspx</wfw:commentRss>
        </item>
        <item>
            <title>The People’s Jukebox</title>
            <category>CodePlex Project</category>
            <link>http://geekswithblogs.net/EltonStoneman/archive/2009/09/30/the-peoples-jukebox.aspx</link>
            <description>&lt;p style="text-align: center;"&gt;&lt;span style="font-size: 10pt;"&gt;[Source: &lt;a href="http://geekswithblogs.net/EltonStoneman"&gt;http://geekswithblogs.net/EltonStoneman&lt;/a&gt;] &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;For a forthcoming celebration, I've been working on a jukebox web application: &lt;/p&gt;
&lt;p&gt;&lt;img alt="" src="http://geekswithblogs.net/images/geekswithblogs_net/EltonStoneman/093009_1900_ThePeoplesJ1.png" /&gt; 	&lt;/p&gt;
&lt;p&gt;The client controls the music being played on the server, so its intended for local networks where you want shared control of a central music player. If you can find a use for it, help yourself – it's on CodePlex here: &lt;a href="http://thepeoplesjukebox.codeplex.com/"&gt;The People's Jukebox&lt;/a&gt;. If nothing else it's a straightforward example of a Silverlight 2.0 client talking to WCF REST services, in what's probably a familiar domain. &lt;/p&gt;
&lt;p&gt;The user experience is meant to be zero-guidance. You can try it out on a version where the UI functions but doesn't play any music: &lt;a href="http://www.sixeyed.com/ThePeoplesJukebox.html"&gt;The People's Jukebox on sixeyed.com&lt;/a&gt;. &lt;/p&gt;
&lt;p&gt;The initial screen shows what's currently playing and has a big button for you to select a track. In the next screen you choose either to search for a specific track, browse through the collection, or have the jukebox randomly choose some options for you. From any of those routes, you select a track, confirm your choice and it gets queued: &lt;/p&gt;
&lt;p&gt;&lt;img alt="" src="http://geekswithblogs.net/images/geekswithblogs_net/EltonStoneman/093009_1900_ThePeoplesJ2.png" /&gt; 	&lt;/p&gt;
&lt;p&gt;The queuing is what gives The People's Jukebox its democratic flavour – if you select a track which is already queued, you increment its vote count. When the current track finishes, the jukebox picks the next track with the most votes. When a track is selected the UI forces you to wait for a few seconds before you can continue, to discourage The People from abusing their power and making the same selection over and over again. &lt;/p&gt;
&lt;p&gt;If no one's choosing tracks, the jukebox will randomly pick one which it hasn't already played, so it should keep playing until all the songs are played, or the web server is stopped. &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Usage &lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Run the MSI and the jukebox Web site and services will be installed with default configuration options, using the installing user's "My Music" as the root folder to look for tracks. It will populate the track catalogue from the file system, expecting to find a conventional root/artist/album/track hierarchy: &lt;/p&gt;
&lt;ul&gt;
    &lt;li&gt;
    &lt;div&gt;My Music &lt;/div&gt;
    &lt;ul&gt;
        &lt;li&gt;
        &lt;div&gt;The Beatles &lt;/div&gt;
        &lt;ul&gt;
            &lt;li&gt;
            &lt;div&gt;Abbey Road &lt;/div&gt;
            &lt;ul&gt;
                &lt;li&gt;01. Come Together &lt;/li&gt;
                &lt;li&gt;etc.  &lt;/li&gt;
            &lt;/ul&gt;
            &lt;/li&gt;
        &lt;/ul&gt;
        &lt;/li&gt;
    &lt;/ul&gt;
    &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Open &lt;a href="http://localhost/ThePeoplesJukebox/"&gt;http://localhost/ThePeoplesJukebox/&lt;/a&gt; and hit &lt;em&gt;Start&lt;/em&gt; - the music should start playing and you should be able to navigate around your music collection. The jukebox services log everything they do, by default to &lt;em&gt;C:\TEMP\PeoplesJukeboxService.log&lt;/em&gt;, so if nothing happens that's the place to look for clues.  &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Configuration&lt;/strong&gt; 	&lt;/p&gt;
&lt;p&gt;The jukebox is configurable through Web.config on the services. Options are documented in comments – the installer sets up the root music directory, and the types of music files in the &lt;em&gt;fileSystemConfiguration &lt;/em&gt;element: &lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Courier New; font-size: 10pt;"&gt;&lt;span style="color: blue;"&gt;    &amp;lt;!--&lt;/span&gt;&lt;span style="color: green;"&gt;Specify the root path for music files, and &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: green; font-family: Courier New; font-size: 10pt;"&gt;        the types of files to load. Directory can be  &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Courier New; font-size: 10pt;"&gt;&lt;span style="color: green;"&gt;        a network path, extensions are comma-separated:&lt;/span&gt;&lt;span style="color: blue;"&gt;--&amp;gt; &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Courier New; font-size: 10pt;"&gt;&lt;span style="color: blue;"&gt;    &amp;lt;&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21);"&gt;fileSystemCatalogueConfiguration &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Courier New; font-size: 10pt;"&gt;&lt;span style="color: blue;"&gt; 			&lt;/span&gt;&lt;span style="color: red;"&gt;rootDirectory&lt;/span&gt;&lt;span style="color: blue;"&gt;=&lt;/span&gt;"&lt;span style="color: blue;"&gt;x:\My Music&lt;/span&gt;" &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Courier New; font-size: 10pt;"&gt;&lt;span style="color: blue;"&gt; 			&lt;/span&gt;&lt;span style="color: red;"&gt;fileExtensions&lt;/span&gt;&lt;span style="color: blue;"&gt;=&lt;/span&gt;"&lt;span style="color: blue;"&gt;*.wav,*.mp3&lt;/span&gt;" &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: blue; font-family: Courier New; font-size: 10pt;"&gt;    /&amp;gt; &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;rootDirectory&lt;/em&gt; can be local or a UNC path, e.g.  \\nas\music. &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Track Lists &lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Track lists are what drives the song selection behaviour; this is also configurable. Three types of tracklist are provided. When the jukebox finishes playing a track, it will query the tracklists in priority order until one returns a track, which will be loaded and played next: &lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Courier New; font-size: 10pt;"&gt;&lt;span style="color: blue;"&gt;    &amp;lt;!--&lt;/span&gt;&lt;span style="color: green;"&gt; Tracklists to use, and the order in which they are queried.  &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: green; font-family: Courier New; font-size: 10pt;"&gt;         Specify "chosenByText" to display which tracklist chose the  &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Courier New; font-size: 10pt;"&gt;&lt;span style="color: green;"&gt;         Now Playing track on the client &lt;/span&gt;&lt;span style="color: blue;"&gt;--&amp;gt; &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Courier New; font-size: 10pt;"&gt;&lt;span style="color: blue;"&gt;    &amp;lt;&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21);"&gt;trackLists&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt; &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Courier New; font-size: 10pt;"&gt;&lt;span style="color: blue;"&gt;      &amp;lt;&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21);"&gt;trackList&lt;/span&gt;&lt;span style="color: blue;"&gt; 			&lt;/span&gt;&lt;span style="color: red;"&gt;type&lt;/span&gt;&lt;span style="color: blue;"&gt;=&lt;/span&gt;"&lt;span style="color: blue;"&gt;PeoplesJukebox.Core.TrackLists.ConfiguredTrackList, PeoplesJukebox.Core&lt;/span&gt;"&lt;span style="color: blue;"&gt; 			&lt;/span&gt;&lt;span style="color: red;"&gt;priority&lt;/span&gt;&lt;span style="color: blue;"&gt;=&lt;/span&gt;"&lt;span style="color: blue;"&gt;1&lt;/span&gt;"&lt;span style="color: blue;"&gt;/&amp;gt; &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Courier New; font-size: 10pt;"&gt;&lt;span style="color: blue;"&gt;      &amp;lt;&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21);"&gt;trackList&lt;/span&gt;&lt;span style="color: blue;"&gt; 			&lt;/span&gt;&lt;span style="color: red;"&gt;type&lt;/span&gt;&lt;span style="color: blue;"&gt;=&lt;/span&gt;"&lt;span style="color: blue;"&gt;PeoplesJukebox.Core.TrackLists.SelectedTrackList, PeoplesJukebox.Core&lt;/span&gt;"&lt;span style="color: blue;"&gt; 			&lt;/span&gt;&lt;span style="color: red;"&gt;priority&lt;/span&gt;&lt;span style="color: blue;"&gt;=&lt;/span&gt;"&lt;span style="color: blue;"&gt;2&lt;/span&gt;"&lt;span style="color: blue;"&gt; 			&lt;/span&gt;&lt;span style="color: red;"&gt;chosenByText&lt;/span&gt;&lt;span style="color: blue;"&gt;=&lt;/span&gt;"&lt;span style="color: blue;"&gt;The People&lt;/span&gt;"&lt;span style="color: blue;"&gt;/&amp;gt; &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Courier New; font-size: 10pt;"&gt;&lt;span style="color: blue;"&gt;      &amp;lt;&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21);"&gt;trackList&lt;/span&gt;&lt;span style="color: blue;"&gt; 			&lt;/span&gt;&lt;span style="color: red;"&gt;type&lt;/span&gt;&lt;span style="color: blue;"&gt;=&lt;/span&gt;"&lt;span style="color: blue;"&gt;PeoplesJukebox.Core.TrackLists.RandomTrackList, PeoplesJukebox.Core&lt;/span&gt;"&lt;span style="color: blue;"&gt; 			&lt;/span&gt;&lt;span style="color: red;"&gt;priority&lt;/span&gt;&lt;span style="color: blue;"&gt;=&lt;/span&gt;"&lt;span style="color: blue;"&gt;3&lt;/span&gt;"&lt;span style="color: blue;"&gt;/&amp;gt; &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Courier New; font-size: 10pt;"&gt;&lt;span style="color: blue;"&gt;    &amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21);"&gt;trackLists&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt; 	&lt;/p&gt;
&lt;p&gt;In default form, the jukebox lets you start off with some specified songs, moving onto the selections of The People, with the jukebox picking a random track if none are queued, so tracklists are queried in the following order: &lt;/p&gt;
&lt;p&gt;&lt;em&gt;1. ConfiguredTrackList&lt;/em&gt; – reads a list of specific track names from configuration, and returns them in priority order. Will not play a track that's already been played. Configuration looks like: &lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Courier New; font-size: 10pt;"&gt;&lt;span style="color: blue;"&gt;    &amp;lt;&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21);"&gt;trackConfiguration&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt; &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Courier New; font-size: 10pt;"&gt;&lt;span style="color: blue;"&gt;      &amp;lt;&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21);"&gt;tracks&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt; &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Courier New; font-size: 10pt;"&gt;&lt;span style="color: blue;"&gt;        &amp;lt;&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21);"&gt;track&lt;/span&gt;&lt;span style="color: blue;"&gt; 			&lt;/span&gt;&lt;span style="color: red;"&gt;trackName&lt;/span&gt;&lt;span style="color: blue;"&gt;=&lt;/span&gt;"&lt;span style="color: blue;"&gt;Blank Slate&lt;/span&gt;"&lt;span style="color: blue;"&gt; 			&lt;/span&gt;&lt;span style="color: red;"&gt;position&lt;/span&gt;&lt;span style="color: blue;"&gt;=&lt;/span&gt;"&lt;span style="color: blue;"&gt;1&lt;/span&gt;"&lt;span style="color: blue;"&gt;/&amp;gt; &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Courier New; font-size: 10pt;"&gt;&lt;span style="color: blue;"&gt;        &amp;lt;&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21);"&gt;track&lt;/span&gt;&lt;span style="color: blue;"&gt; 			&lt;/span&gt;&lt;span style="color: red;"&gt;trackName&lt;/span&gt;&lt;span style="color: blue;"&gt;=&lt;/span&gt;"&lt;span style="color: blue;"&gt;Love Is Noise&lt;/span&gt;"&lt;span style="color: blue;"&gt; 			&lt;/span&gt;&lt;span style="color: red;"&gt;position&lt;/span&gt;&lt;span style="color: blue;"&gt;=&lt;/span&gt;"&lt;span style="color: blue;"&gt;2&lt;/span&gt;"&lt;span style="color: blue;"&gt;/&amp;gt; &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Courier New; font-size: 10pt;"&gt;&lt;span style="color: blue;"&gt;      &amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21);"&gt;tracks&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt; &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Courier New; font-size: 10pt;"&gt;&lt;span style="color: blue;"&gt;    &amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21);"&gt;trackConfiguration&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt; 	&lt;/p&gt;
&lt;p&gt;Intended to start the evening off with a known selection, when the configured tracks have been played, the list returns null so the jukebox moves on to the next tracklist. &lt;/p&gt;
&lt;p&gt;&lt;em&gt;2. SelectedTrackList&lt;/em&gt; – hopefully the main provider, queues up track requests as users make a selection. Operates the voting mechanism, so tracks which are selected multiple times move up the queue. If all queued tracks have the same number of votes, they're played in the order they were first selected. Will allow tracks to be played multiple times, but not sequentially – if you choose a track that's already queued, you increase its vote count; if you choose the same track again whilst its playing, or after it has  been played, it gets queued again. Returns null if no tracks are queued. &lt;/p&gt;
&lt;p&gt;&lt;em&gt;3. RandomTrackList&lt;/em&gt; – failsafe list, to ensure music is always playing, picks tracks at random from the catalogue. Will not play a track that's already been played. Allows the administrator to sneak in some favourites by configuring "must-have" tracks. Must-haves will be inserted between random selections, at a configured frequency: &lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Courier New; font-size: 10pt;"&gt;&lt;span style="color: blue;"&gt;  &amp;lt;&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21);"&gt;randomTrackListConfiguration&lt;/span&gt;&lt;span style="color: blue;"&gt; 			&lt;/span&gt;&lt;span style="color: red;"&gt;mustHaveTrackFrequency&lt;/span&gt;&lt;span style="color: blue;"&gt;=&lt;/span&gt;"&lt;span style="color: blue;"&gt;5&lt;/span&gt;"&lt;span style="color: blue;"&gt;&amp;gt; &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Courier New; font-size: 10pt;"&gt;&lt;span style="color: blue;"&gt;    &amp;lt;&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21);"&gt;mustHaveTracks&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt; &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Courier New; font-size: 10pt;"&gt;&lt;span style="color: blue;"&gt;      &amp;lt;&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21);"&gt;track&lt;/span&gt;&lt;span style="color: blue;"&gt; 			&lt;/span&gt;&lt;span style="color: red;"&gt;trackName&lt;/span&gt;&lt;span style="color: blue;"&gt;=&lt;/span&gt;"&lt;span style="color: blue;"&gt;Black Eyed Dog&lt;/span&gt;"&lt;span style="color: blue;"&gt; 			&lt;/span&gt;&lt;span style="color: red;"&gt;position&lt;/span&gt;&lt;span style="color: blue;"&gt;=&lt;/span&gt;"&lt;span style="color: blue;"&gt;1&lt;/span&gt;"&lt;span style="color: blue;"&gt;/&amp;gt; &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Courier New; font-size: 10pt;"&gt;&lt;span style="color: blue;"&gt;      &amp;lt;&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21);"&gt;track&lt;/span&gt;&lt;span style="color: blue;"&gt; 			&lt;/span&gt;&lt;span style="color: red;"&gt;trackName&lt;/span&gt;&lt;span style="color: blue;"&gt;=&lt;/span&gt;"&lt;span style="color: blue;"&gt;The Magic Position&lt;/span&gt;"&lt;span style="color: blue;"&gt; 			&lt;/span&gt;&lt;span style="color: red;"&gt;position&lt;/span&gt;&lt;span style="color: blue;"&gt;=&lt;/span&gt;"&lt;span style="color: blue;"&gt;2&lt;/span&gt;"&lt;span style="color: blue;"&gt;/&amp;gt; &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Courier New; font-size: 10pt;"&gt;&lt;span style="color: blue;"&gt;    &amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21);"&gt;mustHaveTracks&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt; &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Courier New; font-size: 10pt;"&gt;&lt;span style="color: blue;"&gt;  &amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21);"&gt;randomTrackListConfiguration&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt; 	&lt;/p&gt;
&lt;p&gt;- meaning every fifth track will be picked from the configured list, then the next four will be random. If no must-haves are specified, or they have all been played, the selection will be random. &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Technical Details &lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Much of the implementation is straightforward. WCF has in-built support for REST, so you can expose a WCF service with a RESTful endpoint like &lt;a href="http://localhost/PeoplesJukebox.Services/CatalogueService.svc/artist/2"&gt;http://localhost/PeoplesJukebox.Services/CatalogueService.svc/artist/2&lt;/a&gt; (to get the list of tracks from artist with ID=2 from the catalogue service), just by flagging the service implementation with the &lt;em&gt;WebGet&lt;/em&gt; attribute: &lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Courier New; font-size: 10pt;"&gt;    [&lt;span style="color: rgb(43, 145, 175);"&gt;WebGet&lt;/span&gt;(UriTemplate = &lt;span style="color: rgb(163, 21, 21);"&gt;"artist/{artistId}"&lt;/span&gt;, ResponseFormat = &lt;span style="color: rgb(43, 145, 175);"&gt;WebMessageFormat&lt;/span&gt;.Xml)] &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Courier New; font-size: 10pt;"&gt; 			&lt;span style="color: blue;"&gt;public&lt;/span&gt; 			&lt;span style="color: rgb(43, 145, 175);"&gt;Artist&lt;/span&gt; GetArtist(&lt;span style="color: blue;"&gt;string&lt;/span&gt; artistId) &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Courier New; font-size: 10pt;"&gt;    {...&lt;/span&gt; 	&lt;/p&gt;
&lt;p&gt;Task-driven workflow implementation in Silverlight is also straightforward, by hosting multiple pages on the application, all of which are invisible except the current page. When the current page completes, it hides itself and loads the next page – handled through events in &lt;em&gt;Page.xaml.cs&lt;/em&gt;: &lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Courier New; font-size: 10pt;"&gt; 			&lt;span style="color: blue;"&gt;public&lt;/span&gt; Page() &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Courier New; font-size: 10pt;"&gt;    { &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Courier New; font-size: 10pt;"&gt;        InitializeComponent(); &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Courier New; font-size: 10pt;"&gt; 			&lt;span style="color: blue;"&gt;foreach&lt;/span&gt; (&lt;span style="color: rgb(43, 145, 175);"&gt;PageBase&lt;/span&gt; page &lt;span style="color: blue;"&gt;in&lt;/span&gt; Pages) &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Courier New; font-size: 10pt;"&gt;        { &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Courier New; font-size: 10pt;"&gt;            page.Complete += &lt;span style="color: blue;"&gt;new&lt;/span&gt; 			&lt;span style="color: rgb(43, 145, 175);"&gt;PageBase&lt;/span&gt;.&lt;span style="color: rgb(43, 145, 175);"&gt;OnCompleteEventHandler&lt;/span&gt;(PageComplete); &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Courier New; font-size: 10pt;"&gt;            page.Cancelled += &lt;span style="color: blue;"&gt;new&lt;/span&gt; 			&lt;span style="color: rgb(43, 145, 175);"&gt;PageBase&lt;/span&gt;.&lt;span style="color: rgb(43, 145, 175);"&gt;OnCancelledEventHandler&lt;/span&gt;(PageCancelled); &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Courier New; font-size: 10pt;"&gt;        } &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Courier New; font-size: 10pt;"&gt; 			&lt;span style="color: blue;"&gt;this&lt;/span&gt;.CurrentPage = &lt;span style="color: blue;"&gt;this&lt;/span&gt;.ucStartPage; &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Courier New; font-size: 10pt;"&gt;    }&lt;/span&gt; 	&lt;/p&gt;
&lt;p&gt;Silverlight 2.0 doesn't work so well with non-GET web requests, which is why all the services are GETs where some should really be POSTs.  &lt;/p&gt;
&lt;p&gt;The only difficult part was playing music files through IIS in a background thread, while continuing to respond to web service and web site requests. If you're really interested in looking into this, you'll see the music playing component is also specified in config: &lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Courier New; font-size: 10pt;"&gt;&lt;span style="color: blue;"&gt;    &amp;lt;!--&lt;/span&gt;&lt;span style="color: green;"&gt; Core configuration - which implementations to use for &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Courier New; font-size: 10pt;"&gt;&lt;span style="color: green;"&gt;         media player and catalogue components &lt;/span&gt;&lt;span style="color: blue;"&gt;--&amp;gt; &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Courier New; font-size: 10pt;"&gt;&lt;span style="color: blue;"&gt;    &amp;lt;&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21);"&gt;peoplesJukeboxConfiguration &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Courier New; font-size: 10pt;"&gt;&lt;span style="color: blue;"&gt; 			&lt;/span&gt;&lt;span style="color: red;"&gt;mediaPlayer&lt;/span&gt;&lt;span style="color: blue;"&gt;=&lt;/span&gt;"&lt;span style="color: blue;"&gt;PeoplesJukebox.Core.Players.FMODPlayer, PeoplesJukebox.Core&lt;/span&gt;" &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Courier New; font-size: 10pt;"&gt;&lt;span style="color: blue;"&gt; 			&lt;/span&gt;&lt;span style="color: red;"&gt;mediaCatalogue&lt;/span&gt;&lt;span style="color: blue;"&gt;=&lt;/span&gt;"&lt;span style="color: blue;"&gt;PeoplesJukebox.Core.Catalogues.FileSystemCatalogue, PeoplesJukebox.Core&lt;/span&gt;" &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: blue; font-family: Courier New; font-size: 10pt;"&gt;    &amp;gt;&lt;/span&gt; 	&lt;/p&gt;
&lt;p&gt;There are several (failed) implementations in the source which are not built in the solution (under ..\PeoplesJukebox\PeoplesJukebox.Core\Players). Of the five attempts, all of them had showstopper issues except the excellent &lt;a href="http://www.fmod.org/"&gt;FMOD&lt;/a&gt; library: &lt;/p&gt;
&lt;ul&gt;
    &lt;li&gt;&lt;em&gt;DirectX&lt;/em&gt; – using the Audio class from the managed wrapper in the &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=b66e14b8-8505-4b17-bf80-edb2df5abad4"&gt;DirectX SDK&lt;/a&gt;. Redistributable install is massive, which  is offputting, but more importantly the &lt;em&gt;Audio.Ending&lt;/em&gt; event didn't fire reliably, so playback would intermittently stop and never resume; &lt;/li&gt;
    &lt;li&gt;&lt;em&gt;Windows Media Player&lt;/em&gt; – using the managed WMPLib wrapper in the &lt;a href="http://download.microsoft.com/download/A/7/E/A7E58606-58A3-429B-AFC0-50159DB5BC13/WMPlayer10SDK.exe"&gt;Windows Media Player SDK&lt;/a&gt;, to devolve playing responsibility to Media Player. Didn't like the extra dependency, or the alarming memory profile. Worse, the player would randomly change state to &lt;em&gt;Stopping&lt;/em&gt; in the middle of playback and not resume; &lt;/li&gt;
    &lt;li&gt;&lt;em&gt;Sound&lt;/em&gt; – using .NET's native sound player in System.Media. Fine for playing WAVs, at the cost of having to manage your own threads. Main issue that WAVs are not normalized so tracks will be played at their native volume, which is likely to mean volume changes between songs. Unable to play other media types; &lt;/li&gt;
    &lt;li&gt;&lt;a href="http://www.alvas.net/alvas.audio.aspx"&gt;&lt;em&gt;Alvas Audio&lt;/em&gt;&lt;/a&gt; – looked good, but highly unfriendly API. Couldn't get the thing to play at all; &lt;/li&gt;
    &lt;li&gt;&lt;a href="http://www.fmod.org/"&gt;&lt;em&gt;FMOD&lt;/em&gt;&lt;/a&gt; – highly-featured C++ audio processor which does its own thread management, copes with various media types, plays reliably for extended periods and has an efficient memory model. The library is free for non-commercial use, so The People's Jukebox has the same restriction. The library is complex, but I've used it through &lt;a href="http://sourceforge.net/projects/fmodnet/"&gt;FMOD.NET&lt;/a&gt; – Rafael Nicoletti's very nice C# wrapper. &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The &lt;em&gt;mediaCatalogue&lt;/em&gt; element lets you choose how the catalogue is built. Currently, only a file system catalogue is provided, but extending it (e.g. to use &lt;a href="http://www.logitechsqueezebox.com/support/download-squeezebox-server.html"&gt;SqueezeCenter – now SqueezeBox Server&lt;/a&gt;), is an option. &lt;/p&gt;
&lt;p&gt;If you download the jukebox and find any issues using it, let me know through a comment or a CodePlex bug. &lt;/p&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=135193"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=135193" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/EltonStoneman/aggbug/135193.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>EltonStoneman</dc:creator>
            <guid>http://geekswithblogs.net/EltonStoneman/archive/2009/09/30/the-peoples-jukebox.aspx</guid>
            <pubDate>Wed, 30 Sep 2009 19:00:38 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/EltonStoneman/comments/135193.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/EltonStoneman/archive/2009/09/30/the-peoples-jukebox.aspx#feedback</comments>
            <slash:comments>4</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/EltonStoneman/comments/commentRss/135193.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Resolving Special Folders in WiX 3.0</title>
            <category>Code Snippet</category>
            <category>Wix</category>
            <link>http://geekswithblogs.net/EltonStoneman/archive/2009/09/29/resolving-special-folders-in-wix-3.0.aspx</link>
            <description>&lt;p style="TEXT-ALIGN: center"&gt;&lt;span style="FONT-SIZE: 10pt"&gt;[Source: &lt;a href="http://geekswithblogs.net/EltonStoneman"&gt;http://geekswithblogs.net/EltonStoneman&lt;/a&gt;] &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;One of the frustrations of working with WiX is that when you want to do something out of the ordinary, chances are it's provided somewhere in a WiX extension, but unless you trawl through the XSDs you're not likely to find it. I had this issue when I wanted to resolve the special folder &lt;em&gt;My Music&lt;/em&gt; through WiX, so I could put the full path into a config file. &lt;/p&gt;
&lt;p&gt;Various special folders are already available as &lt;a href="http://msdn.microsoft.com/en-us/library/aa370905%28VS.85%29.aspx"&gt;properties to the installer&lt;/a&gt;, including &lt;em&gt;My Documents&lt;/em&gt; and &lt;em&gt;My Pictures&lt;/em&gt;, but not &lt;em&gt;My Music&lt;/em&gt;. Adding an extension to expose &lt;strong&gt;Environment.GetSpecialFolder()&lt;/strong&gt; to WiX is a trivial implementation in a couple of classes (comments omitted for brevity): &lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&lt;span style="COLOR: blue"&gt;public&lt;/span&gt; &lt;span style="COLOR: blue"&gt;class&lt;/span&gt; &lt;span style="COLOR: #2b91af"&gt;EnvironmentExtension&lt;/span&gt; : &lt;span style="COLOR: #2b91af"&gt;WiXExtension &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;{ &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&lt;span style="COLOR: blue"&gt;private&lt;/span&gt; &lt;span style="COLOR: #2b91af"&gt;EnvironmentPreprocessorExtension&lt;/span&gt; preprocessorExtension; &lt;/span&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&lt;span style="COLOR: blue"&gt;public&lt;/span&gt; &lt;span style="COLOR: blue"&gt;override&lt;/span&gt; &lt;span style="COLOR: #2b91af"&gt;PreprocessorExtension&lt;/span&gt; PreprocessorExtension &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;{ &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&lt;span style="COLOR: blue"&gt;get &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;{ &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&lt;span style="COLOR: blue"&gt;if&lt;/span&gt; (&lt;span style="COLOR: blue"&gt;this&lt;/span&gt;.preprocessorExtension == &lt;span style="COLOR: blue"&gt;null&lt;/span&gt;) &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;{ &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&lt;span style="COLOR: blue"&gt;this&lt;/span&gt;.preprocessorExtension = &lt;span style="COLOR: blue"&gt;new&lt;/span&gt; &lt;span style="COLOR: #2b91af"&gt;EnvironmentPreprocessorExtension&lt;/span&gt;(); &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;} &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&lt;span style="COLOR: blue"&gt;return&lt;/span&gt; &lt;span style="COLOR: blue"&gt;this&lt;/span&gt;.preprocessorExtension; &lt;/span&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;} &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;} &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;}&lt;/span&gt; &lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&lt;span style="COLOR: blue"&gt;public&lt;/span&gt; &lt;span style="COLOR: blue"&gt;class&lt;/span&gt; &lt;span style="COLOR: #2b91af"&gt;EnvironmentPreprocessorExtension&lt;/span&gt; : &lt;span style="COLOR: #2b91af"&gt;PreprocessorExtension &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;{ &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&lt;span style="COLOR: blue"&gt;private&lt;/span&gt; &lt;span style="COLOR: blue"&gt;const&lt;/span&gt; &lt;span style="COLOR: blue"&gt;string&lt;/span&gt; SPECIALFOLDER = &lt;span style="COLOR: #a31515"&gt;"specialFolder"&lt;/span&gt;; &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&lt;span style="COLOR: blue"&gt;public&lt;/span&gt; &lt;span style="COLOR: blue"&gt;override&lt;/span&gt; &lt;span style="COLOR: blue"&gt;string&lt;/span&gt;[] Prefixes { &lt;span style="COLOR: blue"&gt;get&lt;/span&gt; { &lt;span style="COLOR: blue"&gt;return&lt;/span&gt; &lt;span style="COLOR: blue"&gt;new&lt;/span&gt; &lt;span style="COLOR: blue"&gt;string&lt;/span&gt;[] { SPECIALFOLDER }; } } &lt;/span&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&lt;span style="COLOR: blue"&gt;private&lt;/span&gt; &lt;span style="COLOR: #2b91af"&gt;List&lt;/span&gt;&amp;lt;&lt;span style="COLOR: blue"&gt;string&lt;/span&gt;&amp;gt; _specialFolders; &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&lt;span style="COLOR: blue"&gt;private&lt;/span&gt; &lt;span style="COLOR: #2b91af"&gt;List&lt;/span&gt;&amp;lt;&lt;span style="COLOR: blue"&gt;string&lt;/span&gt;&amp;gt; SpecialFolders &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;{ &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&lt;span style="COLOR: blue"&gt;get &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;{ &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&lt;span style="COLOR: blue"&gt;if&lt;/span&gt; (_specialFolders == &lt;span style="COLOR: blue"&gt;null&lt;/span&gt;) &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;{ &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;_specialFolders = &lt;span style="COLOR: blue"&gt;new&lt;/span&gt; &lt;span style="COLOR: #2b91af"&gt;List&lt;/span&gt;&amp;lt;&lt;span style="COLOR: blue"&gt;string&lt;/span&gt;&amp;gt;(&lt;span style="COLOR: #2b91af"&gt;Enum&lt;/span&gt;.GetNames(&lt;span style="COLOR: blue"&gt;typeof&lt;/span&gt;(&lt;span style="COLOR: #2b91af"&gt;Environment&lt;/span&gt;.&lt;span style="COLOR: #2b91af"&gt;SpecialFolder&lt;/span&gt;))); &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;} &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&lt;span style="COLOR: blue"&gt;return&lt;/span&gt; _specialFolders; &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;} &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;} &lt;/span&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&lt;span style="COLOR: blue"&gt;public&lt;/span&gt; &lt;span style="COLOR: blue"&gt;override&lt;/span&gt; &lt;span style="COLOR: blue"&gt;string&lt;/span&gt; GetVariableValue(&lt;span style="COLOR: blue"&gt;string&lt;/span&gt; prefix, &lt;span style="COLOR: blue"&gt;string&lt;/span&gt; name) &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;{ &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&lt;span style="COLOR: blue"&gt;string&lt;/span&gt; result = &lt;span style="COLOR: blue"&gt;null&lt;/span&gt;; &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&lt;span style="COLOR: blue"&gt;if&lt;/span&gt; (prefix == SPECIALFOLDER &amp;amp;&amp;amp; SpecialFolders.Contains(name)) &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;{ &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&lt;span style="COLOR: #2b91af"&gt;Environment&lt;/span&gt;.&lt;span style="COLOR: #2b91af"&gt;SpecialFolder&lt;/span&gt; specialFolder = (&lt;span style="COLOR: #2b91af"&gt;Environment&lt;/span&gt;.&lt;span style="COLOR: #2b91af"&gt;SpecialFolder&lt;/span&gt;)&lt;span style="COLOR: #2b91af"&gt;Enum&lt;/span&gt;.Parse(&lt;span style="COLOR: blue"&gt;typeof&lt;/span&gt;(&lt;span style="COLOR: #2b91af"&gt;Environment&lt;/span&gt;.&lt;span style="COLOR: #2b91af"&gt;SpecialFolder&lt;/span&gt;), name, &lt;span style="COLOR: blue"&gt;true&lt;/span&gt;); &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;result = &lt;span style="COLOR: #2b91af"&gt;Environment&lt;/span&gt;.GetFolderPath(specialFolder); &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;} &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&lt;span style="COLOR: blue"&gt;return&lt;/span&gt; result; &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;} &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;} &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Reference the folder you want from the &lt;a href="http://msdn.microsoft.com/en-us/library/system.environment.specialfolder.aspx"&gt;Environment.SpecialFolders enum&lt;/a&gt; as a property in your WiX script: &lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&lt;span style="COLOR: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #a31515"&gt;Property&lt;/span&gt;&lt;span style="COLOR: blue"&gt; &lt;/span&gt;&lt;span style="COLOR: red"&gt;Id&lt;/span&gt;&lt;span style="COLOR: blue"&gt;=&lt;/span&gt;"&lt;span style="COLOR: blue"&gt;MUSICPATH&lt;/span&gt;"&lt;span style="COLOR: blue"&gt; &lt;/span&gt;&lt;span style="COLOR: red"&gt;Value&lt;/span&gt;&lt;span style="COLOR: blue"&gt;=&lt;/span&gt;"&lt;span style="COLOR: blue"&gt;$(specialFolder.&lt;strong&gt;MyMusic&lt;/strong&gt;)&lt;/span&gt;"&lt;span style="COLOR: blue"&gt;/&amp;gt; &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;- and add the extension assembly to your &lt;strong&gt;light&lt;/strong&gt; and &lt;strong&gt;candle&lt;/strong&gt; calls, making sure the DLL is available at runtime : &lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;candle -out x.y.z.WiXobj x.y.z.wxs &lt;strong&gt;-ext&lt;/strong&gt; &lt;strong&gt;EnvironmentExtension&lt;/strong&gt; &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;light -out x.y.z.msi x.y.z.WiXobj &lt;strong&gt;-ext&lt;/strong&gt; &lt;strong&gt;EnvironmentExtension&lt;/strong&gt; -cultures:en-us &lt;/span&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;But I suspect it's already available somewhere in WiX. &lt;/p&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=135162"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=135162" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/EltonStoneman/aggbug/135162.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>EltonStoneman</dc:creator>
            <guid>http://geekswithblogs.net/EltonStoneman/archive/2009/09/29/resolving-special-folders-in-wix-3.0.aspx</guid>
            <pubDate>Tue, 29 Sep 2009 18:09:43 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/EltonStoneman/comments/135162.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/EltonStoneman/archive/2009/09/29/resolving-special-folders-in-wix-3.0.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/EltonStoneman/comments/commentRss/135162.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Lazy-Loading with Object Extensions</title>
            <category>Code Snippet</category>
            <link>http://geekswithblogs.net/EltonStoneman/archive/2009/09/23/lazy-loading-with-object-extensions.aspx</link>
            <description>&lt;p style="TEXT-ALIGN: center"&gt;&lt;span style="FONT-SIZE: 10pt"&gt;[Source: &lt;a href="http://geekswithblogs.net/EltonStoneman"&gt;http://geekswithblogs.net/EltonStoneman&lt;/a&gt;] &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;If you make heavy use of lazy-loaded properties, the repetitive if-backing-field-null-then-instantiate code can be centralized in an extension method on the object class: &lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&lt;span style="COLOR: gray"&gt;///&lt;/span&gt;&lt;span style="COLOR: green"&gt; &lt;/span&gt;&lt;span style="COLOR: gray"&gt;&amp;lt;summary&amp;gt; &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&lt;span style="COLOR: gray"&gt;///&lt;/span&gt;&lt;span style="COLOR: green"&gt; Extension methods for &lt;/span&gt;&lt;span style="COLOR: gray"&gt;&amp;lt;see cref="Object"/&amp;gt; &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&lt;span style="COLOR: gray"&gt;///&lt;/span&gt;&lt;span style="COLOR: green"&gt; &lt;/span&gt;&lt;span style="COLOR: gray"&gt;&amp;lt;/summary&amp;gt; &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&lt;span style="COLOR: blue"&gt;public&lt;/span&gt; &lt;span style="COLOR: blue"&gt;static&lt;/span&gt; &lt;span style="COLOR: blue"&gt;class&lt;/span&gt; &lt;span style="COLOR: #2b91af"&gt;ObjectExtensions &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;{ &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&lt;span style="COLOR: gray"&gt;///&lt;/span&gt;&lt;span style="COLOR: green"&gt; &lt;/span&gt;&lt;span style="COLOR: gray"&gt;&amp;lt;summary&amp;gt; &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&lt;span style="COLOR: gray"&gt;///&lt;/span&gt;&lt;span style="COLOR: green"&gt; Lazy-loads a property &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&lt;span style="COLOR: gray"&gt;///&lt;/span&gt;&lt;span style="COLOR: green"&gt; &lt;/span&gt;&lt;span style="COLOR: gray"&gt;&amp;lt;/summary&amp;gt; &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&lt;span style="COLOR: gray"&gt;///&lt;/span&gt;&lt;span style="COLOR: green"&gt; &lt;/span&gt;&lt;span style="COLOR: gray"&gt;&amp;lt;typeparam name="T"&amp;gt;&lt;/span&gt;&lt;span style="COLOR: green"&gt;Type of property&lt;/span&gt;&lt;span style="COLOR: gray"&gt;&amp;lt;/typeparam&amp;gt; &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&lt;span style="COLOR: gray"&gt;///&lt;/span&gt;&lt;span style="COLOR: green"&gt; &lt;/span&gt;&lt;span style="COLOR: gray"&gt;&amp;lt;param name="obj"&amp;gt;&lt;/span&gt;&lt;span style="COLOR: green"&gt;Extended object&lt;/span&gt;&lt;span style="COLOR: gray"&gt;&amp;lt;/param&amp;gt; &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&lt;span style="COLOR: gray"&gt;///&lt;/span&gt;&lt;span style="COLOR: green"&gt; &lt;/span&gt;&lt;span style="COLOR: gray"&gt;&amp;lt;param name="field"&amp;gt;&lt;/span&gt;&lt;span style="COLOR: green"&gt;Property backing field&lt;/span&gt;&lt;span style="COLOR: gray"&gt;&amp;lt;/param&amp;gt; &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&lt;span style="COLOR: gray"&gt;///&lt;/span&gt;&lt;span style="COLOR: green"&gt; &lt;/span&gt;&lt;span style="COLOR: gray"&gt;&amp;lt;param name="load"&amp;gt;&lt;/span&gt;&lt;span style="COLOR: green"&gt;Property loading function&lt;/span&gt;&lt;span style="COLOR: gray"&gt;&amp;lt;/param&amp;gt; &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&lt;span style="COLOR: gray"&gt;///&lt;/span&gt;&lt;span style="COLOR: green"&gt; &lt;/span&gt;&lt;span style="COLOR: gray"&gt;&amp;lt;returns&amp;gt;&lt;/span&gt;&lt;span style="COLOR: green"&gt;Lazy-loaded property&lt;/span&gt;&lt;span style="COLOR: gray"&gt;&amp;lt;/returns&amp;gt; &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&lt;span style="COLOR: blue"&gt;public&lt;/span&gt; &lt;span style="COLOR: blue"&gt;static&lt;/span&gt; T LazyLoad&amp;lt;T&amp;gt;(&lt;span style="COLOR: blue"&gt;this&lt;/span&gt; &lt;span style="COLOR: blue"&gt;object&lt;/span&gt; obj, &lt;span style="COLOR: blue"&gt;ref&lt;/span&gt; T field, &lt;span style="COLOR: #2b91af"&gt;Func&lt;/span&gt;&amp;lt;T&amp;gt; load) &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;{ &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&lt;span style="COLOR: blue"&gt;if&lt;/span&gt; (field == &lt;span style="COLOR: blue"&gt;null&lt;/span&gt; || field.Equals(&lt;span style="COLOR: blue"&gt;default&lt;/span&gt;(T))) &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;{ &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;field = load(); &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;} &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&lt;span style="COLOR: blue"&gt;return&lt;/span&gt; field; &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;} &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;} &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Classes then define lazy-loaded properties using the extension method, specifying the backing field and the method used to populate it: &lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&lt;span style="COLOR: blue"&gt;protected&lt;/span&gt; &lt;span style="COLOR: #2b91af"&gt;List&lt;/span&gt;&amp;lt;&lt;span style="COLOR: #2b91af"&gt;MediaItem&lt;/span&gt;&amp;gt; AllItems &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;{ &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&lt;span style="COLOR: blue"&gt;get &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;{ &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&lt;span style="COLOR: blue"&gt;return&lt;/span&gt; &lt;span style="COLOR: blue"&gt;this&lt;/span&gt;.LazyLoad&amp;lt;&lt;span style="COLOR: #2b91af"&gt;List&lt;/span&gt;&amp;lt;&lt;span style="COLOR: #2b91af"&gt;MediaItem&lt;/span&gt;&amp;gt;&amp;gt;(&lt;span style="COLOR: blue"&gt;ref&lt;/span&gt; &lt;span style="COLOR: blue"&gt;this&lt;/span&gt;._allItems, &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;() =&amp;gt; &lt;span style="COLOR: blue"&gt;new&lt;/span&gt; &lt;span style="COLOR: #2b91af"&gt;List&lt;/span&gt;&amp;lt;&lt;span style="COLOR: #2b91af"&gt;MediaItem&lt;/span&gt;&amp;gt;()); &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;} &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;}&lt;/span&gt; &lt;/p&gt;
&lt;p&gt;- rather than: &lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&lt;span style="COLOR: blue"&gt;protected&lt;/span&gt; &lt;span style="COLOR: #2b91af"&gt;List&lt;/span&gt;&amp;lt;&lt;span style="COLOR: #2b91af"&gt;MediaItem&lt;/span&gt;&amp;gt; AllItems &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;{ &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&lt;span style="COLOR: blue"&gt;get &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;{ &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&lt;span style="COLOR: blue"&gt;if&lt;/span&gt; (&lt;span style="COLOR: blue"&gt;this&lt;/span&gt;._allItems == &lt;span style="COLOR: blue"&gt;null&lt;/span&gt;) &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;{ &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&lt;span style="COLOR: blue"&gt;this&lt;/span&gt;._allItems = &lt;span style="COLOR: blue"&gt;new&lt;/span&gt; &lt;span style="COLOR: #2b91af"&gt;List&lt;/span&gt;&amp;lt;&lt;span style="COLOR: #2b91af"&gt;MediaItem&lt;/span&gt;&amp;gt;(); &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;} &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&lt;span style="COLOR: blue"&gt;return&lt;/span&gt; &lt;span style="COLOR: blue"&gt;this&lt;/span&gt;._allItems; &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;} &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;}&lt;/span&gt; &lt;/p&gt;
&lt;p&gt;Only a tiny enhancement, but it isolates some general code and reduces the chances of causing an infinite loop by typing the property name rather than the field name. &lt;/p&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=135050"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=135050" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/EltonStoneman/aggbug/135050.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>EltonStoneman</dc:creator>
            <guid>http://geekswithblogs.net/EltonStoneman/archive/2009/09/23/lazy-loading-with-object-extensions.aspx</guid>
            <pubDate>Wed, 23 Sep 2009 18:38:57 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/EltonStoneman/comments/135050.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/EltonStoneman/archive/2009/09/23/lazy-loading-with-object-extensions.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/EltonStoneman/comments/commentRss/135050.aspx</wfw:commentRss>
        </item>
        <item>
            <title>CA1502:AvoidExcessiveComplexity and Lambdas</title>
            <category>FxCop</category>
            <link>http://geekswithblogs.net/EltonStoneman/archive/2009/09/21/ca1502avoidexcessivecomplexity-and-lambdas.aspx</link>
            <description>&lt;p style="TEXT-ALIGN: center"&gt;&lt;span style="FONT-SIZE: 10pt"&gt;[Source: &lt;a href="http://geekswithblogs.net/EltonStoneman"&gt;http://geekswithblogs.net/EltonStoneman&lt;/a&gt;] &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;In code with lots of lambda expressions, you may trigger a false positive for the Code Analysis rule CA1502 "AvoidExcessiveComplexity". The rule calculates &lt;a href="http://www.literateprogramming.com/mccabe.pdf"&gt;cyclomatic complexity&lt;/a&gt; using the logic in &lt;strong&gt;Microsoft.FxCop.Sdk.MethodMetrics&lt;/strong&gt;, which enumerates the instruction set and increments complexity count when it finds one of a given set of opcodes. &lt;/p&gt;
&lt;p&gt;The rule was triggered by code which uses the &lt;a href="http://geekswithblogs.net/EltonStoneman/archive/2009/09/08/fluent-dal-mapping.aspx"&gt;Fluent DAL&lt;/a&gt; approach to populate a composite entity: &lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 9pt; FONT-FAMILY: Courier New"&gt;&lt;span style="COLOR: blue"&gt;public&lt;/span&gt; &lt;span style="COLOR: blue"&gt;static&lt;/span&gt; &lt;span style="COLOR: #2b91af"&gt;Entity&lt;/span&gt; GetEntity(&lt;span style="COLOR: blue"&gt;int&lt;/span&gt; entityId) &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 9pt; FONT-FAMILY: Courier New"&gt;{ &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 9pt; FONT-FAMILY: Courier New"&gt;&lt;span style="COLOR: green"&gt;//populate basic details: &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 9pt; FONT-FAMILY: Courier New"&gt;&lt;span style="COLOR: #2b91af"&gt;Entity&lt;/span&gt; entity = &lt;span style="COLOR: #2b91af"&gt;Fluently&lt;/span&gt;.Load&amp;lt;&lt;span style="COLOR: #2b91af"&gt;Entity&lt;/span&gt;&amp;gt;().With&amp;lt;&lt;span style="COLOR: #2b91af"&gt;EntityMap&lt;/span&gt;&amp;gt;() &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 9pt; FONT-FAMILY: Courier New"&gt;.From&amp;lt;&lt;span style="COLOR: #2b91af"&gt;GetEntity&lt;/span&gt;&amp;gt;(i =&amp;gt; i.Id = entityId, &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 9pt; FONT-FAMILY: Courier New"&gt;x =&amp;gt; x.Execute()); &lt;/span&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 9pt; FONT-FAMILY: Courier New"&gt;&lt;span style="COLOR: green"&gt;//load child entities: &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 9pt; FONT-FAMILY: Courier New"&gt;&lt;span style="COLOR: blue"&gt;if&lt;/span&gt; (entity.IsKnown) &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 9pt; FONT-FAMILY: Courier New"&gt;{ &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 9pt; FONT-FAMILY: Courier New"&gt;entity.Address = &lt;span style="COLOR: #2b91af"&gt;Fluently&lt;/span&gt;.Load&amp;lt;&lt;span style="COLOR: #2b91af"&gt;Address&lt;/span&gt;&amp;gt;().With&amp;lt;&lt;span style="COLOR: #2b91af"&gt;AddressMap&lt;/span&gt;&amp;gt;() &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 9pt; FONT-FAMILY: Courier New"&gt;.From&amp;lt;&lt;span style="COLOR: #2b91af"&gt;GetEntityAddresses&lt;/span&gt;&amp;gt;(i =&amp;gt; i.Id = entityId, &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 9pt; FONT-FAMILY: Courier New"&gt;x =&amp;gt; x.Execute()); &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 9pt; FONT-FAMILY: Courier New"&gt;entity.Contact = &lt;span style="COLOR: #2b91af"&gt;Fluently&lt;/span&gt;.Load&amp;lt;&lt;span style="COLOR: #2b91af"&gt;Contact&lt;/span&gt;&amp;gt;().With&amp;lt;&lt;span style="COLOR: #2b91af"&gt;ContactMap&lt;/span&gt;&amp;gt;() &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 9pt; FONT-FAMILY: Courier New"&gt;.From&amp;lt;&lt;span style="COLOR: #2b91af"&gt;GetEntityContacts&lt;/span&gt;&amp;gt;(i =&amp;gt; i.Id = entityId, &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 9pt; FONT-FAMILY: Courier New"&gt;x =&amp;gt; x.Execute()); &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 9pt; FONT-FAMILY: Courier New"&gt;} &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 9pt; FONT-FAMILY: Courier New"&gt;&lt;span style="COLOR: blue"&gt;else &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 9pt; FONT-FAMILY: Courier New"&gt;{ &lt;/span&gt;&lt;/p&gt;
&lt;p style="MARGIN-LEFT: 36pt"&gt;&lt;span style="FONT-SIZE: 9pt; FONT-FAMILY: Courier New"&gt;&lt;span style="COLOR: green"&gt;//more of the same&lt;/span&gt;... &lt;/span&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;The method in question had a single if/else branch, no other conditional logic, but 7 fluent calls totalling 12 lambdas. I calculate the cyclomatic complexity to be 2, and &lt;a href="http://www.ndepend.com/"&gt;NDepend&lt;/a&gt; agrees. &lt;a href="http://msdn.microsoft.com/en-us/library/bb429476(VS.80).aspx"&gt;FxCop&lt;/a&gt; tells me the complexity is 26. &lt;/p&gt;
&lt;p&gt;I stripped this down to a much simpler sample and found the same issue: &lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&lt;span style="COLOR: blue"&gt;public&lt;/span&gt; &lt;span style="COLOR: blue"&gt;void&lt;/span&gt; CCCheck2() &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;{ &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&lt;span style="COLOR: #2b91af"&gt;Fluently&lt;/span&gt;.Load().With().From(i =&amp;gt; i.ToString(), x =&amp;gt; x.ToString()); &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&lt;span style="COLOR: #2b91af"&gt;Fluently&lt;/span&gt;.Load().With().From(i =&amp;gt; i.ToString(), x =&amp;gt; x.ToString()); &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&lt;span style="COLOR: #2b91af"&gt;Fluently&lt;/span&gt;.Load().With().From(i =&amp;gt; i.ToString(), x =&amp;gt; x.ToString()); &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;}&lt;/span&gt; &lt;/p&gt;
&lt;p&gt;- this gives a CC of 13, although it has no conditional logic at all. &lt;/p&gt;
&lt;p&gt;The answer's in the IL – the lambdas are emitted as private static classes and executed using an instance which is lazy-loaded: &lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;IL_000b: ldsfld class [System.Core]System.Func`2&amp;lt;int32,string&amp;gt; FxCopCC.LambdaSample::'CS$&amp;lt;&amp;gt;9__CachedAnonymousMethodDelegate6' &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;IL_0010: &lt;span style="BACKGROUND-COLOR: yellow"&gt;brtrue.s IL_0025&lt;/span&gt; &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;IL_0012: ldnull &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;IL_0013: ldftn string FxCopCC.LambdaSample::'&amp;lt;CCCheck&amp;gt;b__0'(int32) &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;IL_0019: newobj instance void class [System.Core]System.Func`2&amp;lt;int32,string&amp;gt;::.ctor(object, &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;native int) &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;IL_001e: stsfld class [System.Core]System.Func`2&amp;lt;int32,string&amp;gt; FxCopCC.LambdaSample::'CS$&amp;lt;&amp;gt;9__CachedAnonymousMethodDelegate6' &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;IL_0023: &lt;span style="BACKGROUND-COLOR: yellow"&gt;br.s IL_0025&lt;/span&gt;&lt;/span&gt; &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;br&lt;/strong&gt; and &lt;strong&gt;brtrue&lt;/strong&gt; are transfer of control statements, so every lambda expression actually causes a branch – where the IL checks to see if there's a cached instance of the delegate, or whether it needs to instantiate one – and a return. The complexity rating is correct for the IL, as 1 + 2x(number of lambdas). &lt;/p&gt;
&lt;p&gt;But cyclomatic complexity is a measure of readability, so the additional branches in the IL should be irrelevant. The short term solution is to suppress the message on methods with heavy lambda usage. A longer term option is an alternative rule which uses a different calculation. &lt;/p&gt;
&lt;p&gt;A side point is that the IL isn't aggressively optimised by the compiler – lambdas with identical code are generated as separate private classes, each with their own lazy-loading check, so to avoid that overhead lambdas which are reused can be centralised: &lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&lt;span style="COLOR: blue"&gt;private&lt;/span&gt; &lt;span style="COLOR: #2b91af"&gt;Func&lt;/span&gt;&amp;lt;&lt;span style="COLOR: blue"&gt;int&lt;/span&gt;, &lt;span style="COLOR: blue"&gt;string&lt;/span&gt;&amp;gt; GetInitialise() &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;{ &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;&lt;span style="COLOR: blue"&gt;return&lt;/span&gt; &lt;span style="COLOR: blue"&gt;new&lt;/span&gt; &lt;span style="COLOR: #2b91af"&gt;Func&lt;/span&gt;&amp;lt;&lt;span style="COLOR: blue"&gt;int&lt;/span&gt;,&lt;span style="COLOR: blue"&gt;string&lt;/span&gt;&amp;gt;(i =&amp;gt; i.ToString()); &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New"&gt;}&lt;/span&gt; &lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt; &lt;/p&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=134988"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=134988" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/EltonStoneman/aggbug/134988.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>EltonStoneman</dc:creator>
            <guid>http://geekswithblogs.net/EltonStoneman/archive/2009/09/21/ca1502avoidexcessivecomplexity-and-lambdas.aspx</guid>
            <pubDate>Mon, 21 Sep 2009 20:47:01 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/EltonStoneman/comments/134988.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/EltonStoneman/archive/2009/09/21/ca1502avoidexcessivecomplexity-and-lambdas.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/EltonStoneman/comments/commentRss/134988.aspx</wfw:commentRss>
        </item>
    </channel>
</rss>