<?xml version="1.0" encoding="utf-8"?>
<feed xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xml:lang="en-us" xmlns="http://www.w3.org/2005/Atom">
  <title>A Random Walk Around .Net</title>
  <link rel="alternate" type="text/html" href="http://www.ifinancialsystems.com/" />
  <link rel="self" href="http://www.ifinancialsystems.com/SyndicationService.asmx/GetAtom" />
  <icon>favicon.ico</icon>
  <updated>2008-06-09T22:15:11.54875-04:00</updated>
  <author>
    <name>Yezdaan Baber</name>
  </author>
  <subtitle />
  <id>http://www.ifinancialsystems.com/</id>
  <generator uri="http://www.dasblog.net" version="2.0.7180.0">DasBlog</generator>
  <entry>
    <title>Black Scholes F#</title>
    <link rel="alternate" type="text/html" href="http://www.ifinancialsystems.com/2008/06/10/BlackScholesF.aspx" />
    <id>http://www.ifinancialsystems.com/PermaLink,guid,6df3b787-cccd-4354-8c74-9d520e78a9aa.aspx</id>
    <published>2008-06-09T22:15:11.54875-04:00</published>
    <updated>2008-06-09T22:15:11.54875-04:00</updated>
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p class="MsoNormal" style="MARGIN: 0in 0in 10pt; TEXT-INDENT: 0.5in">
          <font face="Calibri" color="#000000" size="3">F# is a relatively new .NET technology
that is worthy of a developer’s arsenal.<span style="mso-spacerun: yes">  </span>It
provides quite a few benefits such as type inference, native non-mutable states for
concurrency, pattern matching and script-esque capabilities.</font>
        </p>
        <p class="MsoNormal" style="MARGIN: 0in 0in 10pt">
          <font size="3">
            <font color="#000000">
              <font face="Calibri">
                <span style="mso-tab-count: 1">                </span>One
thing I would love is the ability to write unit tests in F#.<span style="mso-spacerun: yes">  </span>I
believe the resulting code would be succinct and reusable.<span style="mso-spacerun: yes">  </span>Though,
I have not figured out such a framework, here is my first attempt at F# through the
famous Black Scholes .</font>
            </font>
          </font>
        </p>
        <p class="MsoNormal" style="MARGIN: 0in 0in 10pt">
          <font size="3">
            <font color="#000000">
              <font face="Calibri">
                <span style="mso-tab-count: 1">                </span>Without
much of a history, finance or math lesson, Black Scholes is an equation to price options.<span style="mso-spacerun: yes">  </span>Basically,
an option is a financial instrument that gives the buyer the option to buy or sell
another underlying asset at a certain price in the future for a premium paid today.<span style="mso-spacerun: yes">  </span>Black
Scholes is a closed form equation to help estimate the premium to charge for such
an option. </font>
            </font>
          </font>
        </p>
        <pre>
          <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">#light
open System type PutOrCall <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span><span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">|</span> Call <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> 1 <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">|</span> Put <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> 2
let CumulativeNormalDistribution (x: <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">double</span>) <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> let
L <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> abs(x)
let K <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> 1.0 <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">/</span> (1.0 <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">+</span> 0.2316419 <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">*</span> L)
let dcnd <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> 1.0 <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">-</span> 1.0 <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">/</span> sqrt(2.0 <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">*</span> Math.PI) <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">*</span> exp(-L <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">*</span> L <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">/</span> 2.0) <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">*</span> (0.31938153 <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">*</span> K <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">+</span> -0.356563782 <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">*</span> K <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">*</span> K <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">+</span> 1.781477937 <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">*</span> Math.Pow(K,
3.0) <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">+</span> -1.821255978 <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">*</span> Math.Pow(K,
4.0) <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">+</span> 1.330274429 <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">*</span> Math.Pow(K,
5.0)) <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">if</span> x
&lt; 0.0 then 1.0 <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">-</span> dcnd <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">else</span> dcnd
let BlackScholes (pc: PutOrCall) stock strike time interestRate vol <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> let
d1 <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> (log(stock <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">/</span> strike) <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">+</span> (interestRate <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">+</span> vol <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">*</span> vol <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">/</span> 2.0) <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">*</span> time) <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">/</span> (vol <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">*</span> sqrt(time))
let d2 <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> d1 <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">-</span> vol <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">*</span> sqrt(time) <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">if</span> pc <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> PutOrCall.Call
then stock <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">*</span> CumulativeNormalDistribution(d1) <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">-</span> strike <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">*</span> exp(-interestRate <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">*</span> time) <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">*</span> CumulativeNormalDistribution(d2) <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">else</span> strike <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">*</span> exp(-interestRate <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">*</span> time) <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">*</span> CumulativeNormalDistribution(-d2) <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">-</span> stock <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">*</span> CumulativeNormalDistribution(-d1)</span>
        </pre>
        <img width="0" height="0" src="http://www.ifinancialsystems.com/aggbug.ashx?id=6df3b787-cccd-4354-8c74-9d520e78a9aa" />
        <br />
        <hr />
This weblog is sponsored by <a href="http://www.ifinancialsystems.com">IFinancialSystems</a>. 
</div>
    </content>
  </entry>
  <entry>
    <title>A New Laptop. . . </title>
    <link rel="alternate" type="text/html" href="http://www.ifinancialsystems.com/2008/06/08/ANewLaptop.aspx" />
    <id>http://www.ifinancialsystems.com/PermaLink,guid,9e84753b-8495-40b5-89b3-46a01eb2c260.aspx</id>
    <published>2008-06-07T22:24:15.4095-04:00</published>
    <updated>2008-06-07T22:24:15.4095-04:00</updated>
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p class="MsoNormal" style="MARGIN: 0in 0in 10pt">
          <font size="3">
            <font color="#000000">
              <font face="Calibri">
                <span style="mso-tab-count: 1">                </span>I
finally decided to get a new laptop to support at my home development process.<span style="mso-spacerun: yes">   </span>My
previous laptop was a three year old IBM Think Pad.<span style="mso-spacerun: yes">  </span>Unfortunately,
trying to run Visual Studio 2008 (with many of the new additions) and Office 2007
was painfully slow.<span style="mso-spacerun: yes">  </span>Basically, I found
myself waiting 5-10 minutes between builds on large scale projects.</font>
            </font>
          </font>
        </p>
        <p class="MsoNormal" style="MARGIN: 0in 0in 10pt">
          <font size="3">
            <font color="#000000">
              <font face="Calibri">
                <span style="mso-tab-count: 1">                </span>While
researching which laptop to get, the hardware was the easy part.<span style="mso-spacerun: yes">  </span>My
dream choice was an Intel Core 2 Duo, 4 GB Ram and 200 GB @ 7200 rpm.<span style="mso-spacerun: yes">  </span>The
much harder question was which brand: IBM, Dell, Sony or another computer.<span style="mso-spacerun: yes">  </span>After
quite a bit of research, I decided why not a MAC?</font>
            </font>
          </font>
        </p>
        <p class="MsoNormal" style="MARGIN: 0in 0in 10pt">
          <font size="3">
            <font color="#000000">
              <font face="Calibri">
                <span style="mso-tab-count: 1">                </span>One
might think; how does one run Visual Studio on a Mac?<span style="mso-spacerun: yes">  </span>Vmware
fusion is the answer.<span style="mso-spacerun: yes">  </span>If you have never
tried developing on a virtual machine, it is must.<span style="mso-spacerun: yes">  </span>Moreover,
when you can run Windows Server 2008 and Vista Ultimate simultaneously to replicate
a SOA environment is amazing.<span style="mso-spacerun: yes">  </span>Furthermore,
debugging the SOA environment is a breeze with the .NET remote debugger.</font>
            </font>
          </font>
        </p>
        <p class="MsoNormal" style="MARGIN: 0in 0in 10pt">
          <font size="3">
            <font color="#000000">
              <font face="Calibri">
                <span style="mso-tab-count: 1">                </span>Another
benefit of virtual machines is the ability to save states.<span style="mso-spacerun: yes">  </span>The
obvious reason is recovery; however, two other reasons are more useful in daily development.<span style="mso-spacerun: yes">  </span>First,
the ability to suspend a development session and restart, at a later time, exactly
where you left off.<span style="mso-spacerun: yes">  </span>Furthermore, the
restarting of session seems faster than restarting the operating system and visual
studio.<span style="mso-spacerun: yes">  </span>Second, the ability pass a session
to a fellow developer is quite useful.<span style="mso-spacerun: yes">  </span>Basically,
this saves quite a bit of time explaining setup procedures to another developer.</font>
            </font>
          </font>
        </p>
        <p class="MsoNormal" style="MARGIN: 0in 0in 10pt">
          <font size="3">
            <font color="#000000">
              <font face="Calibri">
                <span style="mso-tab-count: 1">                </span>Finally,
I choose Vmware over Parallels mainly because of the dual core support.<span style="mso-spacerun: yes">  </span>The
Unity view allows me to seamlessly browse the web in safari and program in visual
studio.<span style="mso-spacerun: yes">  </span>Though I don’t do much website
design, I could imagine such a scenario could be quite useful.</font>
            </font>
          </font>
        </p>
        <p class="MsoNormal" style="MARGIN: 0in 0in 10pt">
          <font size="3">
            <font color="#000000">
              <font face="Calibri">
                <span style="mso-tab-count: 1">                </span>All
in all, I am very happy with my current enviorment.</font>
            </font>
          </font>
        </p>
        <p>
        </p>
        <img src="http://www.ifinancialsystems.com/content/binary/screen-capture-1.png" border="0" />
        <img width="0" height="0" src="http://www.ifinancialsystems.com/aggbug.ashx?id=9e84753b-8495-40b5-89b3-46a01eb2c260" />
        <br />
        <hr />
This weblog is sponsored by <a href="http://www.ifinancialsystems.com">IFinancialSystems</a>. 
</div>
    </content>
  </entry>
  <entry>
    <title>A Better ReaderWriterLock Wrapper</title>
    <link rel="alternate" type="text/html" href="http://www.ifinancialsystems.com/2008/05/03/ABetterReaderWriterLockWrapper.aspx" />
    <id>http://www.ifinancialsystems.com/PermaLink,guid,a8d57a51-adc9-453b-a5e7-18ed8dd18fa9.aspx</id>
    <published>2008-05-02T23:24:10.356-04:00</published>
    <updated>2008-05-02T23:24:10.356-04:00</updated>
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p class="MsoNormal" style="MARGIN: 0in 0in 0pt">
          <font face="Times New Roman" color="#000000" size="3">Due to the fact my background
is in financial markets (trading systems to be exact), I find my self continuously
trying to scrounge up milliseconds by code improvements.<span style="mso-spacerun: yes">  </span>My
weapon of choice is parallel processing or otherwise called threading.<span style="mso-spacerun: yes">  </span>Over
the years it has been both my greatest asset any my most malevolent foe.<span style="mso-spacerun: yes">  </span>Many
have commented on the impeding doom of mutable states and many core processors in
software design; hence functional programming.</font>
        </p>
        <p class="MsoNormal" style="MARGIN: 0in 0in 0pt">
          <font size="3">
            <font color="#000000">
              <font face="Times New Roman">
                <span style="mso-tab-count: 1">            </span>I
have aspiration to neither speak about functional programming nor give a class on
threading best practices.<span style="mso-spacerun: yes">  </span>Instead, I
am interested in providing an easier ReaderWriterLock schematic; most likely to the
joy of my team.</font>
            </font>
          </font>
        </p>
        <p class="MsoNormal" style="MARGIN: 0in 0in 0pt">
          <font size="3">
            <font color="#000000">
              <font face="Times New Roman">
                <span style="mso-tab-count: 1">            </span>The
“lock{}” keyword (or “SyncLock” keyword for VB.NET) is very useful and concise in
its usage; though anyone trying to squeeze milliseconds knows the performance benefits
of a ReaderWriterLock in many cases.<span style="mso-spacerun: yes">  </span>(Stop
here if the previous statement doesn’t make sense to you and go Google the ReaderWriterLock.)<span style="mso-spacerun: yes">  </span>However,
the implementation of a ReaderWriterLock requires much more code and can cause dead
locks if implemented incorrectly.</font>
            </font>
          </font>
        </p>
        <p class="MsoNormal" style="MARGIN: 0in 0in 0pt">
          <font size="3">
            <font color="#000000">
              <font face="Times New Roman">
                <span style="mso-tab-count: 1">            </span>Thus,
I came up with the attached solution.<span style="mso-spacerun: yes">  </span>It
offers improvements on two fronts.<span style="mso-spacerun: yes">  </span>One,
it allows a user to retry a function N number of times before raising an exception.<span style="mso-spacerun: yes">  </span>Second,
it ensures the locks are acquired and released correctly.</font>
            </font>
          </font>
        </p>
        <p class="MsoNormal" style="MARGIN: 0in 0in 0pt">
          <font size="3">
            <font color="#000000">
              <font face="Times New Roman">
                <span style="mso-tab-count: 1">            </span>I
am not exactly thrilled with this design because the use of anonymous methods makes
for a non simple solution.<span style="mso-spacerun: yes">  </span>Nevertheless,
I think it is better then writing the internalized code in ever method that needs
to be locked.<span style="mso-spacerun: yes">  </span>Finally, I have not performance
tested this yet; but I will post later with results.</font>
            </font>
          </font>
        </p>
        <pre>
          <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">
            <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">public</span>
            <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">class</span> ClassThanNeedsLocking
{ ReTryReaderWriterLock _rw <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">new</span> ReTryReaderWriterLock(); <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">private</span> Dictionary&lt;<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">double</span>, <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">double</span>&gt;
_valueMap; <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">public</span> ClassThanNeedsLocking()
{ <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">this</span>._valueMap <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">new</span> Dictionary&lt;<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">double</span>, <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">double</span>&gt;();
} <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">public</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">void</span> AddSomething(<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">double</span> key, <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">double</span> value)
{ ReTryReaderWriterLock.FunctionalityToLock temp <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">delegate</span> { <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">this</span>._valueMap.Add(key,
value); }; <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">this</span>._rw.WriterLockFunction(temp,
100, 5, 10); } <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">public</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">double</span> GetSomething(<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">double</span> key)
{ <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">double</span> value <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> 0;
ReTryReaderWriterLock.FunctionalityToLock temp <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">delegate</span> { <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">if</span> (<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">this</span>._valueMap.TryGetValue(key, <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">out</span> value))
{ <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">throw</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">new</span> ArgumentException(<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"Key
Does Not Exist."</span>, <span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"key"</span>);
} }; <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">this</span>._rw.ReaderLockFunction(temp,
100, 5, 10); <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">return</span> value;
} } <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">public</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">class</span> ReTryReaderWriterLock
{ <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">public</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">delegate</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">void</span> FunctionalityToLock(); <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">private</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">delegate</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">void</span> RepeatTryLock(<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">int</span> timesTried); <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">private</span> ReaderWriterLock
_rw <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">new</span> ReaderWriterLock(); <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">private</span> ILock
_reader <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">new</span> ReaderLock(); <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">private</span> ILock
_writer <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">new</span> WriterLock(); <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">public</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">void</span> ReaderLockFunction(FunctionalityToLock
function, <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">int</span> timeOutPerTry, <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">int</span> timesToTry, <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">int</span> timeToWaitBeforeTryingAgain)
{ LockFunction(function, timeOutPerTry, timesToTry, timeToWaitBeforeTryingAgain, <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">this</span>._reader);
} <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">public</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">void</span> WriterLockFunction(FunctionalityToLock
function, <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">int</span> timeOutPerTry, <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">int</span> timesToTry, <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">int</span> timeToWaitBeforeTryingAgain)
{ LockFunction(function, timeOutPerTry, timesToTry, timeToWaitBeforeTryingAgain, <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">this</span>._writer);
} <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">private</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">void</span> LockFunction(FunctionalityToLock
function, <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">int</span> timeOutPerTry, <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">int</span> timesToTry, <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">int</span> timeToWaitBeforeTryingAgain,
ILock typeOfLock) { RepeatTryLock repeater <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">null</span>;
repeater <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">delegate</span>(<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">int</span> timesTried)
{ <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">try</span> {
typeOfLock.Acquire(<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">this</span>._rw,
timeOutPerTry); function(); } <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">catch</span> (ApplicationException)
{ <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">if</span> (timesTried
&lt; timesToTry) { Thread.Sleep(timeToWaitBeforeTryingAgain); timesTried += 1; repeater(timesTried); <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">return</span>;
} <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">throw</span>;
} <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">finally</span> {
typeOfLock.Release(<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">this</span>._rw);
} }; repeater(0); } <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">private</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">interface</span> ILock
{ <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">void</span> Acquire(ReaderWriterLock
rw, <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">int</span> timeOutPerTry); <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">void</span> Release(ReaderWriterLock
rw); } <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">private</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">class</span> ReaderLock
: ILock { <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">public</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">void</span> Acquire(ReaderWriterLock
rw, <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">int</span> timeOutPerTry)
{ rw.AcquireReaderLock(timeOutPerTry); } <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">public</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">void</span> Release(ReaderWriterLock
rw) { <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">if</span> (rw.IsReaderLockHeld
== <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">true</span>)
{ rw.ReleaseReaderLock(); } } } <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">private</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">class</span> WriterLock
: ILock { <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">public</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">void</span> Acquire(ReaderWriterLock
rw, <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">int</span> timeOutPerTry)
{ rw.AcquireWriterLock(timeOutPerTry); } <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">public</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">void</span> Release(ReaderWriterLock
rw) { <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">if</span> (rw.IsWriterLockHeld
== <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">true</span>)
{ rw.ReleaseWriterLock(); } } } }</span>
        </pre>
        <img width="0" height="0" src="http://www.ifinancialsystems.com/aggbug.ashx?id=a8d57a51-adc9-453b-a5e7-18ed8dd18fa9" />
        <br />
        <hr />
This weblog is sponsored by <a href="http://www.ifinancialsystems.com">IFinancialSystems</a>. 
</div>
    </content>
  </entry>
  <entry>
    <title>Bridging Silverlight, WCF, WPF, LINQ and Entity Mappings in an Evening</title>
    <link rel="alternate" type="text/html" href="http://www.ifinancialsystems.com/2008/04/29/BridgingSilverlightWCFWPFLINQAndEntityMappingsInAnEvening.aspx" />
    <id>http://www.ifinancialsystems.com/PermaLink,guid,66388739-fedb-4847-a60f-4b32f138c657.aspx</id>
    <published>2008-04-28T22:55:50.761-04:00</published>
    <updated>2008-04-28T23:01:58.293-04:00</updated>
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p class="MsoNormal" style="MARGIN: 0in 0in 0pt">
          <font face="Times New Roman" color="#000000" size="3">            I
am sure I have said this before; has anyone else noticed how little code I have written?<span style="mso-spacerun: yes">  </span>I
have quite a bit to talk about, so tonight I will just drop all my code and screen
shots unaccompanied.<span style="mso-spacerun: yes">  </span>Thereafter, we will
spend the next few evening talking about exactly what was done.</font>
        </p>
        <p class="MsoNormal" style="MARGIN: 0in 0in 0pt; TEXT-INDENT: 0.5in">
          <font face="Times New Roman" color="#000000" size="3">First, I created the data contracts.</font>
        </p>
        <p class="MsoNormal" style="MARGIN: 0in 0in 0pt; TEXT-INDENT: 0.5in">
 
</p>
        <p>
          <img src="http://www.ifinancialsystems.com/content/binary/dataContracts.bmp" border="0" />
        </p>
        <p class="MsoNormal" style="MARGIN: 0in 0in 0pt; TEXT-INDENT: 0.5in">
          <font face="Times New Roman" color="#000000" size="3">Second, I created the service
contracts.</font>
        </p>
        <p>
 
</p>
        <p>
          <img src="http://www.ifinancialsystems.com/content/binary/serviceContracts.bmp" border="0" />
        </p>
        <p class="MsoNormal" style="MARGIN: 0in 0in 0pt; TEXT-INDENT: 0.5in">
          <font face="Times New Roman" color="#000000" size="3">Third, I added a Silverlight
browser project.</font>
        </p>
        <p>
 
</p>
        <p>
          <img src="http://www.ifinancialsystems.com/content/binary/solutions.bmp" border="0" />
        </p>
        <p class="MsoNormal" style="MARGIN: 0in 0in 0pt; TEXT-INDENT: 0.5in">
          <font face="Times New Roman" color="#000000" size="3">Fourth, I added the WPF XAML
for the Silverlight front end.</font>
        </p>
        <p class="MsoNormal" style="MARGIN: 0in 0in 0pt; TEXT-INDENT: 0.5in">
          <font face="Times New Roman" color="#0000ff" size="2">
          </font> 
</p>
        <pre>
          <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">&lt;UserControl
x:Class=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"DBinsor.Svc.WCF.Browser.Page"</span> xmlns=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"http://schemas.microsoft.com/client/2007"</span> xmlns:x=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"http://schemas.microsoft.com/winfx/2006/xaml"</span> xmlns:grid <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span><span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data"</span>&gt;
&lt;Grid x:Name=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"LayoutRoot"</span> Background=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"White"</span> ShowGridLines=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"False"</span>&gt;
&lt;Grid.RowDefinitions&gt; &lt;RowDefinition Height=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"10"</span> /&gt;
&lt;RowDefinition Height=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"90"</span> /&gt;
&lt;RowDefinition Height=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"50*"</span> /&gt;
&lt;RowDefinition Height=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"50*"</span> /&gt;
&lt;RowDefinition Height=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"10"</span> /&gt;
&lt;/Grid.RowDefinitions&gt; &lt;Grid.ColumnDefinitions&gt; &lt;ColumnDefinition Width=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"10"</span> /&gt;
&lt;ColumnDefinition Width=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"50*"</span> /&gt;
&lt;ColumnDefinition Width=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"50*"</span> /&gt;
&lt;ColumnDefinition Width=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"10"</span> /&gt;
&lt;/Grid.ColumnDefinitions&gt; &lt;grid:DataGrid x:Name=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"CastleGrid"</span> AlternatingRowBackground=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"Beige"</span> AutoGenerateColumns=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"True"</span> Grid.Row=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"1"</span> Grid.Column=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"2"</span> MouseLeftButtonDown=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"CastleGrid_MouseLeftButtonDown"</span> /&gt;
&lt;grid:DataGrid x:Name=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"ContractGrid"</span> AlternatingRowBackground=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"Beige"</span> AutoGenerateColumns=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"True"</span> Grid.Row=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"1"</span> Grid.Column=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"1"</span> MouseLeftButtonDown=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"ContractGrid_MouseLeftButtonDown"</span>/&gt;
&lt;grid:DataGrid x:Name=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"ComponentGrid"</span> AlternatingRowBackground=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"Beige"</span> AutoGenerateColumns=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"True"</span> Grid.Row=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"2"</span> Grid.Column=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"2"</span> MouseLeftButtonDown=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"ComponentGrid_MouseLeftButtonDown"</span> /&gt;
&lt;grid:DataGrid x:Name=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"ImplementationGrid"</span> AlternatingRowBackground=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"Beige"</span> AutoGenerateColumns=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"True"</span> Grid.Row=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"2"</span> Grid.Column=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"1"</span> /&gt;
&lt;grid:DataGrid x:Name=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"ComponentParametersGrid"</span> AlternatingRowBackground=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"Beige"</span> AutoGenerateColumns=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"True"</span> Grid.Row=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"3"</span> Grid.Column=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"2"</span> CanUserResizeColumns=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"True"</span> /&gt;
&lt;grid:DataGrid x:Name=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"ContractParametersGrid"</span> AlternatingRowBackground=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"Beige"</span> AutoGenerateColumns=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"True"</span> Grid.Row=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"3"</span> Grid.Column=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"1"</span> CanUserResizeColumns=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"True"</span> /&gt;
&lt;/Grid&gt; &lt;/UserControl&gt;</span>
        </pre>
        <p class="MsoNormal" style="MARGIN: 0in 0in 0pt; TEXT-INDENT: 0.5in">
          <font face="Times New Roman" color="#000000" size="3">Fifth, I hooked the WCF Service
to the Silverlight browser.</font>
        </p>
        <p class="MsoNormal" style="MARGIN: 0in 0in 0pt; TEXT-INDENT: 0.5in">
          <font face="Times New Roman" color="#000000" size="3">
          </font> 
</p>
        <pre>
          <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">
            <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">using</span> System; <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">using</span> System.Windows.Browser; <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">using</span> System.Windows.Controls; <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">using</span> System.Windows.Input; <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">using</span> DBinsor.Svc.WCF.Browser.DatabaseProxy; <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">namespace</span> DBinsor.Svc.WCF.Browser
{ <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">public</span> partial <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">class</span> Page
: UserControl { DatabaseServiceContractClient _dscc; Castle _selectedCastle; Contract
_selectedContract; Component _selectedComponent; <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">public</span> Page()
{ InitializeComponent(); <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">this</span>._dscc <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">new</span> DatabaseServiceContractClient(); <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">this</span>._dscc.DemandCastlesCompleted
+= <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">new</span> EventHandler&lt;DemandCastlesCompletedEventArgs&gt;(_dscc_DemandCastlesCompleted); <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">this</span>._dscc.DemandComponentParametersCompleted
+= <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">new</span> EventHandler&lt;DemandComponentParametersCompletedEventArgs&gt;(_dscc_DemandComponentParametersCompleted); <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">this</span>._dscc.DemandComponentsCompleted
+= <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">new</span> EventHandler&lt;DemandComponentsCompletedEventArgs&gt;(_dscc_DemandComponentsCompleted); <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">this</span>._dscc.DemandContractParametersCompleted
+= <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">new</span> EventHandler&lt;DemandContractParametersCompletedEventArgs&gt;(_dscc_DemandContractParametersCompleted); <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">this</span>._dscc.DemandContractsCompleted
+= <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">new</span> EventHandler&lt;DemandContractsCompletedEventArgs&gt;(_dscc_DemandContractsCompleted); <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">this</span>._dscc.DemandImplementationsCompleted
+= <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">new</span> EventHandler&lt;DemandImplementationsCompletedEventArgs&gt;(_dscc_DemandImplementationsCompleted);
LoadPrimaryTables(); } <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">private</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">void</span> LoadPrimaryTables()
{ <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">this</span>._dscc.DemandCastlesAsync(); <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">this</span>._dscc.DemandContractsAsync();
} <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">private</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">void</span> _dscc_DemandCastlesCompleted(<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">object</span> sender,
DemandCastlesCompletedEventArgs e) { <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">if</span> (e.Error
!<span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">null</span>)
{ HtmlPage.Window.Alert(e.Error.Message); <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">return</span>;
} <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">if</span> (e.Result.Count
== 0) { <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">return</span>;
} <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">this</span>.CastleGrid.ItemsSource <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> e.Result;
} <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">private</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">void</span> _dscc_DemandComponentParametersCompleted(<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">object</span> sender,
DemandComponentParametersCompletedEventArgs e) { <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">if</span> (e.Error
!<span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">null</span>)
{ HtmlPage.Window.Alert(e.Error.Message); <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">return</span>;
} <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">if</span> (e.Result.Count
== 0) { <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">return</span>;
} <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">this</span>.ComponentParametersGrid.ItemsSource <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> e.Result;
} <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">private</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">void</span> _dscc_DemandComponentsCompleted(<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">object</span> sender,
DemandComponentsCompletedEventArgs e) { <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">if</span> (e.Error
!<span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">null</span>)
{ HtmlPage.Window.Alert(e.Error.Message); <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">return</span>;
} <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">if</span> (e.Result.Count
== 0) { <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">return</span>;
} <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">this</span>.ComponentGrid.ItemsSource <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> e.Result;
} <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">private</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">void</span> _dscc_DemandContractParametersCompleted(<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">object</span> sender,
DemandContractParametersCompletedEventArgs e) { <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">if</span> (e.Error
!<span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">null</span>)
{ HtmlPage.Window.Alert(e.Error.Message); <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">return</span>;
} <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">if</span> (e.Result.Count
== 0) { <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">return</span>;
} <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">this</span>.ContractParametersGrid.ItemsSource <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> e.Result;
} <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">private</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">void</span> _dscc_DemandContractsCompleted(<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">object</span> sender,
DemandContractsCompletedEventArgs e) { <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">if</span> (e.Error
!<span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">null</span>)
{ HtmlPage.Window.Alert(e.Error.Message); <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">return</span>;
} <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">if</span> (e.Result.Count
== 0) { <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">return</span>;
} <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">this</span>.ContractGrid.ItemsSource <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> e.Result;
} <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">private</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">void</span> _dscc_DemandImplementationsCompleted(<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">object</span> sender,
DemandImplementationsCompletedEventArgs e) { <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">if</span> (e.Error
!<span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">null</span>)
{ HtmlPage.Window.Alert(e.Error.Message); <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">return</span>;
} <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">if</span> (e.Result.Count
== 0) { <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">return</span>;
} <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">this</span>.ImplementationGrid.ItemsSource <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> e.Result;
} <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">private</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">void</span> CastleGrid_MouseLeftButtonDown(<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">object</span> sender,
MouseButtonEventArgs e) { <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">object</span> temp <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> CastleGrid.SelectedItem; <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">if</span> (temp
== <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">null</span>)
{ <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">return</span>;
} <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">this</span>._selectedCastle <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> temp <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">as</span> Castle; <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">this</span>._dscc.DemandComponentsAsync(<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">this</span>._selectedCastle);
} <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">private</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">void</span> ContractGrid_MouseLeftButtonDown(<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">object</span> sender,
MouseButtonEventArgs e) { <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">object</span> temp <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> ContractGrid.SelectedItem; <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">if</span> (temp
== <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">null</span>)
{ <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">return</span>;
} <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">this</span>._selectedContract <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> temp <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">as</span> Contract; <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">this</span>._dscc.DemandImplementationsAsync(<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">this</span>._selectedContract); <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">this</span>._dscc.DemandContractParametersAsync(<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">this</span>._selectedContract);
} <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">private</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">void</span> ComponentGrid_MouseLeftButtonDown(<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">object</span> sender,
MouseButtonEventArgs e) { <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">object</span> temp <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> ComponentGrid.SelectedItem; <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">if</span> (temp
== <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">null</span>)
{ <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">return</span>;
} <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">this</span>._selectedComponent <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> temp <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">as</span> Component; <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">this</span>._dscc.DemandComponentParametersAsync(<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">this</span>._selectedComponent);
} } } </span>
        </pre>
        <p class="MsoNormal" style="MARGIN: 0in 0in 0pt; TEXT-INDENT: 0.5in">
          <font face="Times New Roman" color="#000000" size="3">Sixth, I used LINQ to Extract
Data from the Entity Framework.</font>
        </p>
        <p class="MsoNormal" style="MARGIN: 0in 0in 0pt; TEXT-INDENT: 0.5in">
          <font face="Times New Roman" color="#000000" size="3">
          </font> 
</p>
        <pre>
          <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">
            <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">using</span> System.Linq; <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">namespace</span> DBinsor.Svc.WCF.BusinessLogic
{ <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">public</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">static</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">class</span> DatabaseToDataContractGenerator
{ <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">public</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">static</span> DataContracts.Castles
GetCastles() { <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">using</span> (DataAccess.Model.Entities
db <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">new</span> DataAccess.Model.Entities())
{ DataContracts.Castles ret <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">new</span> DataContracts.Castles();
var dataCastles <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> from
castle <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">in</span> db.Castle
select castle; <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">foreach</span> (DataAccess.Model.Castle
dataCastle <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">in</span> dataCastles)
{ DataContracts.Castle serviceCastle <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">new</span> DataContracts.Castle();
serviceCastle.id <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> dataCastle.Id;
serviceCastle.name <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> dataCastle.Name;
ret.Add(serviceCastle); } <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">return</span> ret;
} } <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">public</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">static</span> DataContracts.Components
GetComponents(DataContracts.Castle castle) { <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">using</span> (DataAccess.Model.Entities
db <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">new</span> DataAccess.Model.Entities())
{ <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">int</span> temp;
DataContracts.Components ret <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">new</span> DataContracts.Components();
var dataComponents <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> from
component <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">in</span> db.Components
where component.Castle.Id == castle.id select component; <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">foreach</span> (DataAccess.Model.Components
dataComponent <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">in</span> dataComponents)
{ DataContracts.Component serviceComponent <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">new</span> DataContracts.Component();
serviceComponent.id <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> dataComponent.Id; <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">int</span>.TryParse(dataComponent.InitialPoolSize.ToString(), <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">out</span> temp);
serviceComponent.initialPoolSize <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> temp;
serviceComponent.inspectionBehavior <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> dataComponent.InspectionBehavior;
serviceComponent.lifestyle <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> dataComponent.Lifestyle; <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">int</span>.TryParse(dataComponent.MaxPoolSize.ToString(), <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">out</span> temp);
serviceComponent.maxPoolSize <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> temp;
serviceComponent.Castle <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> castle;
serviceComponent.Implementation <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">new</span> DataContracts.Implementation(); <span style="FONT-SIZE: 11px; COLOR: green; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">//todo:
Add Implementation Name</span> ret.Add(serviceComponent); } <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">return</span> ret;
} } <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">public</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">static</span> DataContracts.ComponentParameters
GetComponentParameters(DataContracts.Component component) { <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">using</span> (DataAccess.Model.Entities
db <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">new</span> DataAccess.Model.Entities())
{ DataContracts.ComponentParameters ret <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">new</span> DataContracts.ComponentParameters();
var dataComponentParameters <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> from
componentParameter <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">in</span> db.ComponentParameters
where componentParameter.Components.Id == component.id select componentParameter; <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">foreach</span> (DataAccess.Model.ComponentParameters
dataComponentParameter <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">in</span> dataComponentParameters)
{ DataContracts.ComponentParameter serviceComponentParameter <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">new</span> DataContracts.ComponentParameter();
serviceComponentParameter.Component <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> component;
serviceComponentParameter.overrideValue <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> dataComponentParameter.OverrideValue; <span style="FONT-SIZE: 11px; COLOR: green; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">//todo:
Add Contract Parameter Name</span> ret.Add(serviceComponentParameter); } <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">return</span> ret;
} } <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">public</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">static</span> DataContracts.Contracts
GetContracts() { <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">using</span> (DataAccess.Model.Entities
db <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">new</span> DataAccess.Model.Entities())
{ DataContracts.Contracts ret <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">new</span> DataContracts.Contracts();
var dataContracts <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> from
contract <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">in</span> db.Contracts
select contract; <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">foreach</span> (DataAccess.Model.Contracts
dataContract <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">in</span> dataContracts)
{ DataContracts.Contract serviceContract <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">new</span> DataContracts.Contract();
serviceContract.id <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> dataContract.Id;
serviceContract.contractNamespace <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> dataContract.Namespace;
serviceContract.contractInterface <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> dataContract.Interface;
ret.Add(serviceContract); } <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">return</span> ret;
} } <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">public</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">static</span> DataContracts.Implementations
GetImplementations(DataContracts.Contract contract) { <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">using</span> (DataAccess.Model.Entities
db <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">new</span> DataAccess.Model.Entities())
{ DataContracts.Implementations ret <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">new</span> DataContracts.Implementations();
var dataImplementations <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> from
implementation <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">in</span> db.Implementations
where implementation.Contracts.Id == contract.id select implementation; <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">foreach</span> (DataAccess.Model.Implementations
dataImplementation <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">in</span> dataImplementations)
{ DataContracts.Implementation serviceImplementation <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">new</span> DataContracts.Implementation();
serviceImplementation.name <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> dataImplementation.Name;
serviceImplementation.Contract <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> contract;
ret.Add(serviceImplementation); } <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">return</span> ret;
} } <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">public</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">static</span> DataContracts.ContractParameters
GetContractParameters(DataContracts.Contract contract) { <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">using</span> (DataAccess.Model.Entities
db <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">new</span> DataAccess.Model.Entities())
{ DataContracts.ContractParameters ret <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">new</span> DataContracts.ContractParameters();
var dataContractParameters <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> from
contractParameter <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">in</span> db.ContractParameters
where contractParameter.Contracts.Id == contract.id select contractParameter; <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">foreach</span> (DataAccess.Model.ContractParameters
dataContractParameter <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">in</span> dataContractParameters)
{ DataContracts.ContractParameter serviceContractParameter <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">new</span> DataContracts.ContractParameter();
serviceContractParameter.name <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> dataContractParameter.Name;
serviceContractParameter.defaultValue <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> dataContractParameter.DefaultValue;
serviceContractParameter.Contract <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> contract;
ret.Add(serviceContractParameter); } <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">return</span> ret;
} } } } </span>
        </pre>
        <p class="MsoNormal" style="MARGIN: 0in 0in 0pt; TEXT-INDENT: 0.5in">
          <font face="Times New Roman" color="#000000" size="3">Seventh, I had to add the CSDL,
MSL and SSDL files to my host project to make things work.<span style="mso-spacerun: yes">  </span>Still
need to think about a better way to do this:</font>
        </p>
        <p class="MsoNormal" style="MARGIN: 0in 0in 0pt; TEXT-INDENT: 0.5in">
          <font face="Times New Roman" color="#000000" size="3">
          </font> 
</p>
        <p>
          <img src="http://www.ifinancialsystems.com/content/binary/addedfiled.bmp" border="0" />  
</p>
        <pre>
          <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">&lt;connectionStrings&gt;
&lt;add name=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"DBinsor.Svc.WCF.DataAccess.Properties.Settings.WindsorDataBaseConnectionString"</span> connectionString=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"Data
Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\WindsorDataBase.mdf;Integrated
Security=True;User Instance=True"</span> providerName=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"System.Data.SqlClient"</span> /&gt;
&lt;/connectionStrings&gt;</span>
        </pre>
        <pre>
          <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">
            <p class="MsoNormal" style="MARGIN: 0in 0in 0pt; TEXT-INDENT: 0.5in">
              <font face="Times New Roman" size="3">Finally, Here is the End Product:</font>
            </p>
          </span>
        </pre>
        <img width="0" height="0" src="http://www.ifinancialsystems.com/aggbug.ashx?id=66388739-fedb-4847-a60f-4b32f138c657" />
        <br />
        <hr />
This weblog is sponsored by <a href="http://www.ifinancialsystems.com">IFinancialSystems</a>. 
</div>
    </content>
  </entry>
  <entry>
    <title>One Drawback of LINQ to SQL and The Entity Framework</title>
    <link rel="alternate" type="text/html" href="http://www.ifinancialsystems.com/2008/04/28/OneDrawbackOfLINQToSQLAndTheEntityFramework.aspx" />
    <id>http://www.ifinancialsystems.com/PermaLink,guid,bc2436da-250d-45ea-be4e-4ff0a1cfa574.aspx</id>
    <published>2008-04-27T21:00:28.168-04:00</published>
    <updated>2008-04-27T21:00:28.168-04:00</updated>
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p class="MsoNormal" style="MARGIN: 0in 0in 0pt">
          <font size="3">
            <font color="#000000">
              <font face="Times New Roman">
                <span style="mso-tab-count: 1">            </span>Both
of these technologies are very powerful ways of implementing object to relational
mapping.<span style="mso-spacerun: yes">  </span>With LINQ to SQL, I feel it
should be built on top of “views” so when one makes table changes the whole system
doesn’t come crashing down.<span style="mso-spacerun: yes">  </span>The Entity
Framework seems to cover such scenarios in its mapping functionality.</font>
            </font>
          </font>
        </p>
        <p class="MsoNormal" style="MARGIN: 0in 0in 0pt">
          <font size="3">
            <font color="#000000">
              <font face="Times New Roman">
                <span style="mso-tab-count: 1">            </span>However,
neither seems to place nice in the n-tier model.<span style="mso-spacerun: yes">  </span>That
is, in which DLL should the EDMX or the DBML files belong?<span style="mso-spacerun: yes">  </span>In
one sense they do data access and in another they define business entities. <span style="mso-spacerun: yes"> </span>On
the one hand, I suppose one could put them in the data access layer and use business
logic to convert those entities to ones defined in the business tier.<span style="mso-spacerun: yes">  </span>Yet,
that seems like a lot of work and bit un-refactored.<span style="mso-spacerun: yes">  </span>On
the other hand, we could put them in the business layer, but then we are doing data
access from the business layer.</font>
            </font>
          </font>
        </p>
        <p class="MsoNormal" style="MARGIN: 0in 0in 0pt">
          <font size="3">
            <font color="#000000">
              <font face="Times New Roman">
                <span style="mso-tab-count: 1">            </span>I
would like to see a system where the data access is decoupled from the entities.<span style="mso-spacerun: yes">  </span>For
now, I am going to add these files to the data access layer.<span style="mso-spacerun: yes">  </span>Furthermore,
I am going to add the Data Contracts from my service layer to my business layer: not
really happy about that.<span style="mso-spacerun: yes">  </span>However, this
will allow me the ability to use my business layer as a translator to expose my entities
to the Silverlight frontend.</font>
            </font>
          </font>
        </p>
        <p class="MsoNormal" style="MARGIN: 0in 0in 0pt">
          <font size="3">
            <font color="#000000">
              <font face="Times New Roman">
                <span style="mso-tab-count: 1">            </span>I
could add the data access to my service implementation project, but I think it is
better to do such translations in the business layer.<span style="mso-spacerun: yes">  </span>Obviously,
we could build duplicate entities in the business layer and translate twice, then
again to much work and not that refactored.</font>
            </font>
          </font>
        </p>
        <p>
        </p>
        <img width="0" height="0" src="http://www.ifinancialsystems.com/aggbug.ashx?id=bc2436da-250d-45ea-be4e-4ff0a1cfa574" />
        <br />
        <hr />
This weblog is sponsored by <a href="http://www.ifinancialsystems.com">IFinancialSystems</a>. 
</div>
    </content>
  </entry>
  <entry>
    <title>Silverlight Oddness</title>
    <link rel="alternate" type="text/html" href="http://www.ifinancialsystems.com/2008/04/27/SilverlightOddness.aspx" />
    <id>http://www.ifinancialsystems.com/PermaLink,guid,0a286d56-b8f8-4b72-96fa-655abd8fe44e.aspx</id>
    <published>2008-04-26T20:33:42.386-04:00</published>
    <updated>2008-04-27T20:33:42.38675-04:00</updated>
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p class="MsoNormal" style="MARGIN: 0in 0in 0pt">
          <font face="Times New Roman" color="#000000" size="3">I am using Windows XP Professional,
Visual Studio 2008 Professional, IE 7.0 and Silverlight 2.0.<span style="mso-spacerun: yes">  </span>The
weird thing is I must delete my history every time in IE before I can view changes
to my Silverlight application.<span style="mso-spacerun: yes">  </span>I am assuming
that is caching the XAP file in the browser and not reloading it when I make changes.<span style="mso-spacerun: yes">  </span>I
am sure there is a work around, but I have not had time to look for it.<span style="mso-spacerun: yes">  </span>Any
ideas?</font>
        </p>
        <img width="0" height="0" src="http://www.ifinancialsystems.com/aggbug.ashx?id=0a286d56-b8f8-4b72-96fa-655abd8fe44e" />
        <br />
        <hr />
This weblog is sponsored by <a href="http://www.ifinancialsystems.com">IFinancialSystems</a>. 
</div>
    </content>
  </entry>
  <entry>
    <title>Silverlight</title>
    <link rel="alternate" type="text/html" href="http://www.ifinancialsystems.com/2008/04/25/Silverlight.aspx" />
    <id>http://www.ifinancialsystems.com/PermaLink,guid,3498ac23-9c65-45bb-adc8-2a4f9eab67ee.aspx</id>
    <published>2008-04-25T19:15:16.918-04:00</published>
    <updated>2008-04-27T20:34:12.339875-04:00</updated>
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p class="MsoNormal" style="MARGIN: 0in 0in 0pt; TEXT-INDENT: 0.5in">
          <font face="Times New Roman" color="#000000" size="3">It has been a couple weeks since
my last post.<span style="mso-spacerun: yes">  </span>As with many juggling family,
career, socializing and hobbies can be quite a circus act.<span style="mso-spacerun: yes">  </span>Nonetheless,
the DBinsor solution has not yet reached a critical mass for usability.</font>
        </p>
        <p class="MsoNormal" style="MARGIN: 0in 0in 0pt; TEXT-INDENT: 0.5in">
          <font face="Times New Roman" color="#000000" size="3">It is great that one can pull
the configuration from the database, but how does one put it there in the first place.<span style="mso-spacerun: yes">  </span>Moreover,
this process of insertion should be intuitive as well as allow for a holistic view
of the data.</font>
        </p>
        <p class="MsoNormal" style="MARGIN: 0in 0in 0pt; TEXT-INDENT: 0.5in">
          <font face="Times New Roman" color="#000000" size="3">The end user of choice for DBinsor
would be a system which utilized a plug in methodology meshed with a SOA topology.<span style="mso-spacerun: yes">  </span>More
specifically, one who utilizes services contracts where the implementation is defined
by configuration settings.<span style="mso-spacerun: yes">  </span>Thus utilizing
DBinsor as a centralized configuration store should be quite appealing.</font>
        </p>
        <p class="MsoNormal" style="MARGIN: 0in 0in 0pt; TEXT-INDENT: 0.5in">
          <font face="Times New Roman" color="#000000" size="3">With this type of user in mind,
a web user interface is the only sensible approach.<span style="mso-spacerun: yes">  </span>For
example, an administrator could seamlessly change configurations of any service from
any computer with accessibility to the DBinsor server without installing a windows
client.</font>
        </p>
        <p class="MsoNormal" style="MARGIN: 0in 0in 0pt; TEXT-INDENT: 0.5in">
          <font face="Times New Roman" color="#000000" size="3">We could have chosen web forms
or the new model view controller framework; however </font>
          <a href="http://silverlight.net/">
            <font face="Times New Roman" color="#800080" size="3">Silverlight</font>
          </a>
          <font face="Times New Roman" color="#000000" size="3"> 2.0
seems the most intriguing.<span style="mso-spacerun: yes">  </span>Moreover,
we get the chance to work with XAML instead of HTML and Java Script.<span style="mso-spacerun: yes">  </span>The
“</font>
          <a href="http://silverlight.net/Learn/videocat.aspx?cat=2">
            <font face="Times New Roman" color="#800080" size="3">Learn</font>
          </a>
          <font face="Times New Roman" color="#000000" size="3">”
section has been quite helpful in the process of learning Silverlight.</font>
        </p>
        <p class="MsoNormal" style="MARGIN: 0in 0in 0pt; TEXT-INDENT: 0.5in">
          <font face="Times New Roman" color="#000000" size="3">We will post something once
we have basic functionality working.</font>
        </p>
        <img width="0" height="0" src="http://www.ifinancialsystems.com/aggbug.ashx?id=3498ac23-9c65-45bb-adc8-2a4f9eab67ee" />
        <br />
        <hr />
This weblog is sponsored by <a href="http://www.ifinancialsystems.com">IFinancialSystems</a>. 
</div>
    </content>
  </entry>
  <entry>
    <title>Beta Version 1.0.0.0</title>
    <link rel="alternate" type="text/html" href="http://www.ifinancialsystems.com/2008/04/14/BetaVersion1000.aspx" />
    <id>http://www.ifinancialsystems.com/PermaLink,guid,0798da44-f178-413d-810b-83285cac6991.aspx</id>
    <published>2008-04-13T20:07:53.999-04:00</published>
    <updated>2008-04-13T20:09:09.14-04:00</updated>
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p class="MsoNormal" style="MARGIN: 0in 0in 0pt">
          <font face="Times New Roman" color="#000000" size="3">            We
uploaded the working code to the Code Gallery Site.<span style="mso-spacerun: yes">  </span>This
should allow readers of this blog the ability to see exactly what is happening underneath
the hood.<span style="mso-spacerun: yes">  </span>One very interesting use of
this application is a centralized configuration repository.<span style="mso-spacerun: yes">  </span>That
is because of the parameters feature of the Windsor Library, a user should use those
instead of a configuration file.</font>
        </p>
        <p class="MsoNormal" style="MARGIN: 0in 0in 0pt; TEXT-INDENT: 0.5in">
          <font face="Times New Roman" color="#000000" size="3">If anyone is interested in contributing
to this project, please send me an email.<span style="mso-spacerun: yes">  </span>The
next features will include: </font>
        </p>
        <p class="MsoListParagraphCxSpFirst" style="MARGIN: 0in 0in 0pt 0.75in; TEXT-INDENT: -0.25in; mso-add-space: auto; mso-list: l0 level1 lfo1">
          <font color="#000000">
            <span style="FONT-FAMILY: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol">
              <span style="mso-list: Ignore">
                <font size="3">·</font>
                <span style="FONT: 7pt 'Times New Roman'">         </span>
              </span>
            </span>
            <font face="Times New Roman" size="3">A
web GUI to access the database</font>
          </font>
        </p>
        <p class="MsoListParagraphCxSpMiddle" style="MARGIN: 0in 0in 0pt 0.75in; TEXT-INDENT: -0.25in; mso-add-space: auto; mso-list: l0 level1 lfo1">
          <font color="#000000">
            <span style="FONT-FAMILY: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol">
              <span style="mso-list: Ignore">
                <font size="3">·</font>
                <span style="FONT: 7pt 'Times New Roman'">         </span>
              </span>
            </span>
            <font face="Times New Roman" size="3">A
windows application using reflection to auto generate data from an assembly</font>
          </font>
        </p>
        <p class="MsoListParagraphCxSpMiddle" style="MARGIN: 0in 0in 0pt 0.75in; TEXT-INDENT: -0.25in; mso-add-space: auto; mso-list: l0 level1 lfo1">
          <font color="#000000">
            <span style="FONT-FAMILY: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol">
              <span style="mso-list: Ignore">
                <font size="3">·</font>
                <span style="FONT: 7pt 'Times New Roman'">         </span>
              </span>
            </span>
            <font face="Times New Roman" size="3">Using
card space to add security</font>
          </font>
        </p>
        <p class="MsoListParagraphCxSpMiddle" style="MARGIN: 0in 0in 0pt 0.75in; TEXT-INDENT: -0.25in; mso-add-space: auto; mso-list: l0 level1 lfo1">
          <font color="#000000">
            <span style="FONT-FAMILY: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol">
              <span style="mso-list: Ignore">
                <font size="3">·</font>
                <span style="FONT: 7pt 'Times New Roman'">         </span>
              </span>
            </span>
            <font face="Times New Roman" size="3">Exposing
all the features of the container.</font>
          </font>
        </p>
        <p class="MsoListParagraphCxSpMiddle" style="MARGIN: 0in 0in 0pt 0.75in; TEXT-INDENT: -0.25in; mso-add-space: auto; mso-list: l0 level1 lfo1">
          <font color="#000000">
            <span style="FONT-FAMILY: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol">
              <span style="mso-list: Ignore">
                <font size="3">·</font>
                <span style="FONT: 7pt 'Times New Roman'">         </span>
              </span>
            </span>
            <font face="Times New Roman" size="3">Performance
Enhancements</font>
          </font>
        </p>
        <p class="MsoListParagraphCxSpLast" style="MARGIN: 0in 0in 0pt 0.75in; TEXT-INDENT: -0.25in; mso-add-space: auto; mso-list: l0 level1 lfo1">
          <font color="#000000">
            <span style="FONT-FAMILY: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol">
              <span style="mso-list: Ignore">
                <font size="3">·</font>
                <span style="FONT: 7pt 'Times New Roman'">         </span>
              </span>
            </span>
            <font face="Times New Roman" size="3">And
others.</font>
          </font>
        </p>
        <p class="MsoNormal" style="MARGIN: 0in 0in 0pt">
          <font face="Times New Roman" color="#000000" size="3">We have also added Code Gallery
to Navigation Section.</font>
        </p>
        <p>
        </p>
        <img width="0" height="0" src="http://www.ifinancialsystems.com/aggbug.ashx?id=0798da44-f178-413d-810b-83285cac6991" />
        <br />
        <hr />
This weblog is sponsored by <a href="http://www.ifinancialsystems.com">IFinancialSystems</a>. 
</div>
    </content>
  </entry>
  <entry>
    <title>Does It Work???</title>
    <link rel="alternate" type="text/html" href="http://www.ifinancialsystems.com/2008/04/12/DoesItWork.aspx" />
    <id>http://www.ifinancialsystems.com/PermaLink,guid,1e9887d6-1a11-438c-8627-a1a2eef397c6.aspx</id>
    <published>2008-04-12T19:19:55.468-04:00</published>
    <updated>2008-04-13T19:19:55.468125-04:00</updated>
    <content type="html">&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;To test this, we decided to setup
an interface and two derived classes.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;Then
we added corresponding data to the database (we will build an intuitive graphical
user interface eventually).&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;Finally,
we used the Container Singleton class to resolve our types and print out the results.&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;
&lt;o:p&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font size=3&gt;&lt;font color=#000000&gt;&lt;font face="Times New Roman"&gt;&lt;span style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Class
Diagram:&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;img src="http://www.ifinancialsystems.com/content/binary/ClassDiagram1.bmp" border=0&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;Database:&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;o:p&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font size=3&gt;&lt;font color=#000000&gt;&lt;font face="Times New Roman"&gt;&lt;span style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Windsor
Component View&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;table class=MsoNormalTable style="mso-cellspacing: 1.5pt; mso-table-layout-alt: fixed; mso-yfti-tbllook: 1184" cellpadding=0 width=579 border=0&gt;
&lt;tbody&gt;
&lt;tr style="mso-yfti-irow: 0; mso-yfti-firstrow: yes"&gt;
&lt;td style="BORDER-RIGHT: #ece9d8; PADDING-RIGHT: 0.75pt; BORDER-TOP: #ece9d8; PADDING-LEFT: 0.75pt; PADDING-BOTTOM: 0.75pt; BORDER-LEFT: #ece9d8; WIDTH: 0.5in; PADDING-TOP: 0.75pt; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: transparent" width=48&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-SIZE: 10pt"&gt;&lt;font color=#000000&gt;&lt;font face="Times New Roman"&gt;Lookup
Name&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;td style="BORDER-RIGHT: #ece9d8; PADDING-RIGHT: 0.75pt; BORDER-TOP: #ece9d8; PADDING-LEFT: 0.75pt; PADDING-BOTTOM: 0.75pt; BORDER-LEFT: #ece9d8; WIDTH: 61.5pt; PADDING-TOP: 0.75pt; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: transparent" width=82&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-SIZE: 10pt"&gt;&lt;font color=#000000&gt;&lt;font face="Times New Roman"&gt;Namespace&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;td style="BORDER-RIGHT: #ece9d8; PADDING-RIGHT: 0.75pt; BORDER-TOP: #ece9d8; PADDING-LEFT: 0.75pt; PADDING-BOTTOM: 0.75pt; BORDER-LEFT: #ece9d8; WIDTH: 43.5pt; PADDING-TOP: 0.75pt; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: transparent" width=58&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-SIZE: 10pt"&gt;&lt;font color=#000000&gt;&lt;font face="Times New Roman"&gt;Contract&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;td style="BORDER-RIGHT: #ece9d8; PADDING-RIGHT: 0.75pt; BORDER-TOP: #ece9d8; PADDING-LEFT: 0.75pt; PADDING-BOTTOM: 0.75pt; BORDER-LEFT: #ece9d8; WIDTH: 70.5pt; PADDING-TOP: 0.75pt; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: transparent" width=94&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-SIZE: 10pt"&gt;&lt;font color=#000000&gt;&lt;font face="Times New Roman"&gt;Implementation&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;td style="BORDER-RIGHT: #ece9d8; PADDING-RIGHT: 0.75pt; BORDER-TOP: #ece9d8; PADDING-LEFT: 0.75pt; PADDING-BOTTOM: 0.75pt; BORDER-LEFT: #ece9d8; WIDTH: 93pt; PADDING-TOP: 0.75pt; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: transparent" width=124&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-SIZE: 10pt"&gt;&lt;font color=#000000&gt;&lt;font face="Times New Roman"&gt;Component
Id&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;td style="BORDER-RIGHT: #ece9d8; PADDING-RIGHT: 0.75pt; BORDER-TOP: #ece9d8; PADDING-LEFT: 0.75pt; PADDING-BOTTOM: 0.75pt; BORDER-LEFT: #ece9d8; WIDTH: 119.25pt; PADDING-TOP: 0.75pt; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: transparent" width=159&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-SIZE: 10pt"&gt;&lt;font color=#000000&gt;&lt;font face="Times New Roman"&gt;Contract
Id&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style="mso-yfti-irow: 1"&gt;
&lt;td style="BORDER-RIGHT: #ece9d8; PADDING-RIGHT: 0.75pt; BORDER-TOP: #ece9d8; PADDING-LEFT: 0.75pt; PADDING-BOTTOM: 0.75pt; BORDER-LEFT: #ece9d8; WIDTH: 0.5in; PADDING-TOP: 0.75pt; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: transparent" width=48&gt;
&lt;font face="Times New Roman" color=#000000&gt;&lt;/font&gt;&lt;/td&gt;
&lt;td style="BORDER-RIGHT: #ece9d8; PADDING-RIGHT: 0.75pt; BORDER-TOP: #ece9d8; PADDING-LEFT: 0.75pt; PADDING-BOTTOM: 0.75pt; BORDER-LEFT: #ece9d8; WIDTH: 61.5pt; PADDING-TOP: 0.75pt; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: transparent" width=82&gt;
&lt;font face="Times New Roman" color=#000000&gt;&lt;/font&gt;&lt;/td&gt;
&lt;td style="BORDER-RIGHT: #ece9d8; PADDING-RIGHT: 0.75pt; BORDER-TOP: #ece9d8; PADDING-LEFT: 0.75pt; PADDING-BOTTOM: 0.75pt; BORDER-LEFT: #ece9d8; WIDTH: 43.5pt; PADDING-TOP: 0.75pt; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: transparent" width=58&gt;
&lt;font face="Times New Roman" color=#000000&gt;&lt;/font&gt;&lt;/td&gt;
&lt;td style="BORDER-RIGHT: #ece9d8; PADDING-RIGHT: 0.75pt; BORDER-TOP: #ece9d8; PADDING-LEFT: 0.75pt; PADDING-BOTTOM: 0.75pt; BORDER-LEFT: #ece9d8; WIDTH: 70.5pt; PADDING-TOP: 0.75pt; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: transparent" width=94&gt;
&lt;font face="Times New Roman" color=#000000&gt;&lt;/font&gt;&lt;/td&gt;
&lt;td style="BORDER-RIGHT: #ece9d8; PADDING-RIGHT: 0.75pt; BORDER-TOP: #ece9d8; PADDING-LEFT: 0.75pt; PADDING-BOTTOM: 0.75pt; BORDER-LEFT: #ece9d8; WIDTH: 93pt; PADDING-TOP: 0.75pt; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: transparent" width=124&gt;
&lt;font face="Times New Roman" color=#000000&gt;&lt;/font&gt;&lt;/td&gt;
&lt;td style="BORDER-RIGHT: #ece9d8; PADDING-RIGHT: 0.75pt; BORDER-TOP: #ece9d8; PADDING-LEFT: 0.75pt; PADDING-BOTTOM: 0.75pt; BORDER-LEFT: #ece9d8; WIDTH: 119.25pt; PADDING-TOP: 0.75pt; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: transparent" width=159&gt;
&lt;font face="Times New Roman" color=#000000&gt;&lt;/font&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style="mso-yfti-irow: 2"&gt;
&lt;td style="BORDER-RIGHT: #ece9d8; PADDING-RIGHT: 0.75pt; BORDER-TOP: #ece9d8; PADDING-LEFT: 0.75pt; PADDING-BOTTOM: 0.75pt; BORDER-LEFT: #ece9d8; WIDTH: 0.5in; PADDING-TOP: 0.75pt; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: transparent" width=48&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-SIZE: 10pt"&gt;&lt;font color=#000000&gt;&lt;font face="Times New Roman"&gt;Test1&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;td style="BORDER-RIGHT: #ece9d8; PADDING-RIGHT: 0.75pt; BORDER-TOP: #ece9d8; PADDING-LEFT: 0.75pt; PADDING-BOTTOM: 0.75pt; BORDER-LEFT: #ece9d8; WIDTH: 61.5pt; PADDING-TOP: 0.75pt; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: transparent" width=82&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-SIZE: 10pt"&gt;&lt;font color=#000000&gt;&lt;font face="Times New Roman"&gt;DBinsor.Svc.WCF.Client&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;td style="BORDER-RIGHT: #ece9d8; PADDING-RIGHT: 0.75pt; BORDER-TOP: #ece9d8; PADDING-LEFT: 0.75pt; PADDING-BOTTOM: 0.75pt; BORDER-LEFT: #ece9d8; WIDTH: 43.5pt; PADDING-TOP: 0.75pt; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: transparent" width=58&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-SIZE: 10pt"&gt;&lt;font color=#000000&gt;&lt;font face="Times New Roman"&gt;IMath&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;td style="BORDER-RIGHT: #ece9d8; PADDING-RIGHT: 0.75pt; BORDER-TOP: #ece9d8; PADDING-LEFT: 0.75pt; PADDING-BOTTOM: 0.75pt; BORDER-LEFT: #ece9d8; WIDTH: 70.5pt; PADDING-TOP: 0.75pt; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: transparent" width=94&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-SIZE: 10pt"&gt;&lt;font color=#000000&gt;&lt;font face="Times New Roman"&gt;Add&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;td style="BORDER-RIGHT: #ece9d8; PADDING-RIGHT: 0.75pt; BORDER-TOP: #ece9d8; PADDING-LEFT: 0.75pt; PADDING-BOTTOM: 0.75pt; BORDER-LEFT: #ece9d8; WIDTH: 93pt; PADDING-TOP: 0.75pt; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: transparent" width=124&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-SIZE: 10pt"&gt;&lt;font color=#000000&gt;&lt;font face="Times New Roman"&gt;1844d2e0-455e-4d44-a9ff-1c63f78e407b&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;td style="BORDER-RIGHT: #ece9d8; PADDING-RIGHT: 0.75pt; BORDER-TOP: #ece9d8; PADDING-LEFT: 0.75pt; PADDING-BOTTOM: 0.75pt; BORDER-LEFT: #ece9d8; WIDTH: 119.25pt; PADDING-TOP: 0.75pt; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: transparent" width=159&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-SIZE: 10pt"&gt;&lt;font color=#000000&gt;&lt;font face="Times New Roman"&gt;0aa71152-91d4-4e8f-a4a0-4124a98e2851&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style="mso-yfti-irow: 3; mso-yfti-lastrow: yes"&gt;
&lt;td style="BORDER-RIGHT: #ece9d8; PADDING-RIGHT: 0.75pt; BORDER-TOP: #ece9d8; PADDING-LEFT: 0.75pt; PADDING-BOTTOM: 0.75pt; BORDER-LEFT: #ece9d8; WIDTH: 0.5in; PADDING-TOP: 0.75pt; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: transparent" width=48&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-SIZE: 10pt"&gt;&lt;font color=#000000&gt;&lt;font face="Times New Roman"&gt;Test1&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;td style="BORDER-RIGHT: #ece9d8; PADDING-RIGHT: 0.75pt; BORDER-TOP: #ece9d8; PADDING-LEFT: 0.75pt; PADDING-BOTTOM: 0.75pt; BORDER-LEFT: #ece9d8; WIDTH: 61.5pt; PADDING-TOP: 0.75pt; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: transparent" width=82&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-SIZE: 10pt"&gt;&lt;font color=#000000&gt;&lt;font face="Times New Roman"&gt;DBinsor.Svc.WCF.Client&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;td style="BORDER-RIGHT: #ece9d8; PADDING-RIGHT: 0.75pt; BORDER-TOP: #ece9d8; PADDING-LEFT: 0.75pt; PADDING-BOTTOM: 0.75pt; BORDER-LEFT: #ece9d8; WIDTH: 43.5pt; PADDING-TOP: 0.75pt; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: transparent" width=58&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-SIZE: 10pt"&gt;&lt;font color=#000000&gt;&lt;font face="Times New Roman"&gt;IMath&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;td style="BORDER-RIGHT: #ece9d8; PADDING-RIGHT: 0.75pt; BORDER-TOP: #ece9d8; PADDING-LEFT: 0.75pt; PADDING-BOTTOM: 0.75pt; BORDER-LEFT: #ece9d8; WIDTH: 70.5pt; PADDING-TOP: 0.75pt; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: transparent" width=94&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-SIZE: 10pt"&gt;&lt;font color=#000000&gt;&lt;font face="Times New Roman"&gt;Subtract&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;td style="BORDER-RIGHT: #ece9d8; PADDING-RIGHT: 0.75pt; BORDER-TOP: #ece9d8; PADDING-LEFT: 0.75pt; PADDING-BOTTOM: 0.75pt; BORDER-LEFT: #ece9d8; WIDTH: 93pt; PADDING-TOP: 0.75pt; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: transparent" width=124&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-SIZE: 10pt"&gt;&lt;font color=#000000&gt;&lt;font face="Times New Roman"&gt;5c3ee79a-926c-4438-8391-44a437bd8f47&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;td style="BORDER-RIGHT: #ece9d8; PADDING-RIGHT: 0.75pt; BORDER-TOP: #ece9d8; PADDING-LEFT: 0.75pt; PADDING-BOTTOM: 0.75pt; BORDER-LEFT: #ece9d8; WIDTH: 119.25pt; PADDING-TOP: 0.75pt; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: transparent" width=159&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-SIZE: 10pt"&gt;&lt;font color=#000000&gt;&lt;font face="Times New Roman"&gt;0aa71152-91d4-4e8f-a4a0-4124a98e2851&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="mso-tab-count: 1"&gt;&lt;font face="Times New Roman" color=#000000 size=3&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font size=3&gt;&lt;font color=#000000&gt;&lt;font face="Times New Roman"&gt;&lt;span style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Windsor
Parameters View&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;table class=MsoNormalTable style="mso-cellspacing: 1.5pt; mso-yfti-tbllook: 1184" cellpadding=0 border=0&gt;
&lt;tbody&gt;
&lt;tr style="mso-yfti-irow: 0; mso-yfti-firstrow: yes"&gt;
&lt;td style="BORDER-RIGHT: #ece9d8; PADDING-RIGHT: 0.75pt; BORDER-TOP: #ece9d8; PADDING-LEFT: 0.75pt; PADDING-BOTTOM: 0.75pt; BORDER-LEFT: #ece9d8; WIDTH: 99pt; PADDING-TOP: 0.75pt; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: transparent" width=132&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-SIZE: 10pt"&gt;&lt;font color=#000000&gt;&lt;font face="Times New Roman"&gt;Component
Id&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;td style="BORDER-RIGHT: #ece9d8; PADDING-RIGHT: 0.75pt; BORDER-TOP: #ece9d8; PADDING-LEFT: 0.75pt; PADDING-BOTTOM: 0.75pt; BORDER-LEFT: #ece9d8; WIDTH: 97.5pt; PADDING-TOP: 0.75pt; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: transparent" width=130&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-SIZE: 10pt"&gt;&lt;font color=#000000&gt;&lt;font face="Times New Roman"&gt;Contract
Id&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;td style="BORDER-RIGHT: #ece9d8; PADDING-RIGHT: 0.75pt; BORDER-TOP: #ece9d8; PADDING-LEFT: 0.75pt; PADDING-BOTTOM: 0.75pt; BORDER-LEFT: #ece9d8; WIDTH: 52.5pt; PADDING-TOP: 0.75pt; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: transparent" width=70&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-SIZE: 10pt"&gt;&lt;font color=#000000&gt;&lt;font face="Times New Roman"&gt;Parm
Name&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;td style="BORDER-RIGHT: #ece9d8; PADDING-RIGHT: 0.75pt; BORDER-TOP: #ece9d8; PADDING-LEFT: 0.75pt; PADDING-BOTTOM: 0.75pt; BORDER-LEFT: #ece9d8; WIDTH: 31.5pt; PADDING-TOP: 0.75pt; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: transparent" width=42&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-SIZE: 10pt"&gt;&lt;font color=#000000&gt;&lt;font face="Times New Roman"&gt;Default&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;td style="BORDER-RIGHT: #ece9d8; PADDING-RIGHT: 0.75pt; BORDER-TOP: #ece9d8; PADDING-LEFT: 0.75pt; PADDING-BOTTOM: 0.75pt; BORDER-LEFT: #ece9d8; WIDTH: 105.75pt; PADDING-TOP: 0.75pt; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: transparent" width=141&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-SIZE: 10pt"&gt;&lt;font color=#000000&gt;&lt;font face="Times New Roman"&gt;Override&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style="mso-yfti-irow: 1"&gt;
&lt;td style="BORDER-RIGHT: #ece9d8; PADDING-RIGHT: 0.75pt; BORDER-TOP: #ece9d8; PADDING-LEFT: 0.75pt; PADDING-BOTTOM: 0.75pt; BORDER-LEFT: #ece9d8; WIDTH: 99pt; PADDING-TOP: 0.75pt; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: transparent" width=132&gt;
&lt;font face="Times New Roman" color=#000000&gt;&lt;/font&gt;&lt;/td&gt;
&lt;td style="BORDER-RIGHT: #ece9d8; PADDING-RIGHT: 0.75pt; BORDER-TOP: #ece9d8; PADDING-LEFT: 0.75pt; PADDING-BOTTOM: 0.75pt; BORDER-LEFT: #ece9d8; WIDTH: 97.5pt; PADDING-TOP: 0.75pt; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: transparent" width=130&gt;
&lt;font face="Times New Roman" color=#000000&gt;&lt;/font&gt;&lt;/td&gt;
&lt;td style="BORDER-RIGHT: #ece9d8; PADDING-RIGHT: 0.75pt; BORDER-TOP: #ece9d8; PADDING-LEFT: 0.75pt; PADDING-BOTTOM: 0.75pt; BORDER-LEFT: #ece9d8; WIDTH: 52.5pt; PADDING-TOP: 0.75pt; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: transparent" width=70&gt;
&lt;font face="Times New Roman" color=#000000&gt;&lt;/font&gt;&lt;/td&gt;
&lt;td style="BORDER-RIGHT: #ece9d8; PADDING-RIGHT: 0.75pt; BORDER-TOP: #ece9d8; PADDING-LEFT: 0.75pt; PADDING-BOTTOM: 0.75pt; BORDER-LEFT: #ece9d8; WIDTH: 31.5pt; PADDING-TOP: 0.75pt; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: transparent" width=42&gt;
&lt;font face="Times New Roman" color=#000000&gt;&lt;/font&gt;&lt;/td&gt;
&lt;td style="BORDER-RIGHT: #ece9d8; PADDING-RIGHT: 0.75pt; BORDER-TOP: #ece9d8; PADDING-LEFT: 0.75pt; PADDING-BOTTOM: 0.75pt; BORDER-LEFT: #ece9d8; WIDTH: 105.75pt; PADDING-TOP: 0.75pt; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: transparent" width=141&gt;
&lt;font face="Times New Roman" color=#000000&gt;&lt;/font&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style="mso-yfti-irow: 2"&gt;
&lt;td style="BORDER-RIGHT: #ece9d8; PADDING-RIGHT: 0.75pt; BORDER-TOP: #ece9d8; PADDING-LEFT: 0.75pt; PADDING-BOTTOM: 0.75pt; BORDER-LEFT: #ece9d8; WIDTH: 99pt; PADDING-TOP: 0.75pt; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: transparent" width=132&gt;
&lt;font face="Times New Roman" color=#000000&gt;&lt;/font&gt;&lt;/td&gt;
&lt;td style="BORDER-RIGHT: #ece9d8; PADDING-RIGHT: 0.75pt; BORDER-TOP: #ece9d8; PADDING-LEFT: 0.75pt; PADDING-BOTTOM: 0.75pt; BORDER-LEFT: #ece9d8; WIDTH: 97.5pt; PADDING-TOP: 0.75pt; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: transparent" width=130&gt;
&lt;font face="Times New Roman" color=#000000&gt;&lt;/font&gt;&lt;/td&gt;
&lt;td style="BORDER-RIGHT: #ece9d8; PADDING-RIGHT: 0.75pt; BORDER-TOP: #ece9d8; PADDING-LEFT: 0.75pt; PADDING-BOTTOM: 0.75pt; BORDER-LEFT: #ece9d8; WIDTH: 52.5pt; PADDING-TOP: 0.75pt; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: transparent" width=70&gt;
&lt;font face="Times New Roman" color=#000000&gt;&lt;/font&gt;&lt;/td&gt;
&lt;td style="BORDER-RIGHT: #ece9d8; PADDING-RIGHT: 0.75pt; BORDER-TOP: #ece9d8; PADDING-LEFT: 0.75pt; PADDING-BOTTOM: 0.75pt; BORDER-LEFT: #ece9d8; WIDTH: 31.5pt; PADDING-TOP: 0.75pt; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: transparent" width=42&gt;
&lt;font face="Times New Roman" color=#000000&gt;&lt;/font&gt;&lt;/td&gt;
&lt;td style="BORDER-RIGHT: #ece9d8; PADDING-RIGHT: 0.75pt; BORDER-TOP: #ece9d8; PADDING-LEFT: 0.75pt; PADDING-BOTTOM: 0.75pt; BORDER-LEFT: #ece9d8; WIDTH: 105.75pt; PADDING-TOP: 0.75pt; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: transparent" width=141&gt;
&lt;font face="Times New Roman" color=#000000&gt;&lt;/font&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style="mso-yfti-irow: 3"&gt;
&lt;td style="BORDER-RIGHT: #ece9d8; PADDING-RIGHT: 0.75pt; BORDER-TOP: #ece9d8; PADDING-LEFT: 0.75pt; PADDING-BOTTOM: 0.75pt; BORDER-LEFT: #ece9d8; WIDTH: 99pt; PADDING-TOP: 0.75pt; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: transparent" width=132&gt;
&lt;font face="Times New Roman" color=#000000&gt;&lt;/font&gt;&lt;/td&gt;
&lt;td style="BORDER-RIGHT: #ece9d8; PADDING-RIGHT: 0.75pt; BORDER-TOP: #ece9d8; PADDING-LEFT: 0.75pt; PADDING-BOTTOM: 0.75pt; BORDER-LEFT: #ece9d8; WIDTH: 97.5pt; PADDING-TOP: 0.75pt; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: transparent" width=130&gt;
&lt;font face="Times New Roman" color=#000000&gt;&lt;/font&gt;&lt;/td&gt;
&lt;td style="BORDER-RIGHT: #ece9d8; PADDING-RIGHT: 0.75pt; BORDER-TOP: #ece9d8; PADDING-LEFT: 0.75pt; PADDING-BOTTOM: 0.75pt; BORDER-LEFT: #ece9d8; WIDTH: 52.5pt; PADDING-TOP: 0.75pt; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: transparent" width=70&gt;
&lt;font face="Times New Roman" color=#000000&gt;&lt;/font&gt;&lt;/td&gt;
&lt;td style="BORDER-RIGHT: #ece9d8; PADDING-RIGHT: 0.75pt; BORDER-TOP: #ece9d8; PADDING-LEFT: 0.75pt; PADDING-BOTTOM: 0.75pt; BORDER-LEFT: #ece9d8; WIDTH: 31.5pt; PADDING-TOP: 0.75pt; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: transparent" width=42&gt;
&lt;font face="Times New Roman" color=#000000&gt;&lt;/font&gt;&lt;/td&gt;
&lt;td style="BORDER-RIGHT: #ece9d8; PADDING-RIGHT: 0.75pt; BORDER-TOP: #ece9d8; PADDING-LEFT: 0.75pt; PADDING-BOTTOM: 0.75pt; BORDER-LEFT: #ece9d8; WIDTH: 105.75pt; PADDING-TOP: 0.75pt; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: transparent" width=141&gt;
&lt;font face="Times New Roman" color=#000000&gt;&lt;/font&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style="mso-yfti-irow: 4"&gt;
&lt;td style="BORDER-RIGHT: #ece9d8; PADDING-RIGHT: 0.75pt; BORDER-TOP: #ece9d8; PADDING-LEFT: 0.75pt; PADDING-BOTTOM: 0.75pt; BORDER-LEFT: #ece9d8; WIDTH: 99pt; PADDING-TOP: 0.75pt; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: transparent" width=132&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-SIZE: 10pt"&gt;&lt;font color=#000000&gt;&lt;font face="Times New Roman"&gt;5c3ee79a-926c-4438-8391-44a437bd8f47&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;td style="BORDER-RIGHT: #ece9d8; PADDING-RIGHT: 0.75pt; BORDER-TOP: #ece9d8; PADDING-LEFT: 0.75pt; PADDING-BOTTOM: 0.75pt; BORDER-LEFT: #ece9d8; WIDTH: 97.5pt; PADDING-TOP: 0.75pt; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: transparent" width=130&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-SIZE: 10pt"&gt;&lt;font color=#000000&gt;&lt;font face="Times New Roman"&gt;0aa71152-91d4-4e8f-a4a0-4124a98e2851&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;td style="BORDER-RIGHT: #ece9d8; PADDING-RIGHT: 0.75pt; BORDER-TOP: #ece9d8; PADDING-LEFT: 0.75pt; PADDING-BOTTOM: 0.75pt; BORDER-LEFT: #ece9d8; WIDTH: 52.5pt; PADDING-TOP: 0.75pt; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: transparent" width=70&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-SIZE: 10pt"&gt;&lt;font color=#000000&gt;&lt;font face="Times New Roman"&gt;a&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;td style="BORDER-RIGHT: #ece9d8; PADDING-RIGHT: 0.75pt; BORDER-TOP: #ece9d8; PADDING-LEFT: 0.75pt; PADDING-BOTTOM: 0.75pt; BORDER-LEFT: #ece9d8; WIDTH: 31.5pt; PADDING-TOP: 0.75pt; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: transparent" width=42&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-SIZE: 10pt"&gt;&lt;font color=#000000&gt;&lt;font face="Times New Roman"&gt;1&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;td style="BORDER-RIGHT: #ece9d8; PADDING-RIGHT: 0.75pt; BORDER-TOP: #ece9d8; PADDING-LEFT: 0.75pt; PADDING-BOTTOM: 0.75pt; BORDER-LEFT: #ece9d8; WIDTH: 105.75pt; PADDING-TOP: 0.75pt; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: transparent" width=141&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-SIZE: 10pt"&gt;&lt;font color=#000000&gt;&lt;font face="Times New Roman"&gt;13&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style="mso-yfti-irow: 5"&gt;
&lt;td style="BORDER-RIGHT: #ece9d8; PADDING-RIGHT: 0.75pt; BORDER-TOP: #ece9d8; PADDING-LEFT: 0.75pt; PADDING-BOTTOM: 0.75pt; BORDER-LEFT: #ece9d8; WIDTH: 99pt; PADDING-TOP: 0.75pt; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: transparent" width=132&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-SIZE: 10pt"&gt;&lt;font color=#000000&gt;&lt;font face="Times New Roman"&gt;5c3ee79a-926c-4438-8391-44a437bd8f47&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;td style="BORDER-RIGHT: #ece9d8; PADDING-RIGHT: 0.75pt; BORDER-TOP: #ece9d8; PADDING-LEFT: 0.75pt; PADDING-BOTTOM: 0.75pt; BORDER-LEFT: #ece9d8; WIDTH: 97.5pt; PADDING-TOP: 0.75pt; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: transparent" width=130&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-SIZE: 10pt"&gt;&lt;font color=#000000&gt;&lt;font face="Times New Roman"&gt;0aa71152-91d4-4e8f-a4a0-4124a98e2851&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;td style="BORDER-RIGHT: #ece9d8; PADDING-RIGHT: 0.75pt; BORDER-TOP: #ece9d8; PADDING-LEFT: 0.75pt; PADDING-BOTTOM: 0.75pt; BORDER-LEFT: #ece9d8; WIDTH: 52.5pt; PADDING-TOP: 0.75pt; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: transparent" width=70&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-SIZE: 10pt"&gt;&lt;font color=#000000&gt;&lt;font face="Times New Roman"&gt;b&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;td style="BORDER-RIGHT: #ece9d8; PADDING-RIGHT: 0.75pt; BORDER-TOP: #ece9d8; PADDING-LEFT: 0.75pt; PADDING-BOTTOM: 0.75pt; BORDER-LEFT: #ece9d8; WIDTH: 31.5pt; PADDING-TOP: 0.75pt; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: transparent" width=42&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-SIZE: 10pt"&gt;&lt;font color=#000000&gt;&lt;font face="Times New Roman"&gt;2&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;td style="BORDER-RIGHT: #ece9d8; PADDING-RIGHT: 0.75pt; BORDER-TOP: #ece9d8; PADDING-LEFT: 0.75pt; PADDING-BOTTOM: 0.75pt; BORDER-LEFT: #ece9d8; WIDTH: 105.75pt; PADDING-TOP: 0.75pt; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: transparent" width=141&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-SIZE: 10pt"&gt;&lt;font color=#000000&gt;&lt;font face="Times New Roman"&gt;NULL&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style="mso-yfti-irow: 6"&gt;
&lt;td style="BORDER-RIGHT: #ece9d8; PADDING-RIGHT: 0.75pt; BORDER-TOP: #ece9d8; PADDING-LEFT: 0.75pt; PADDING-BOTTOM: 0.75pt; BORDER-LEFT: #ece9d8; WIDTH: 99pt; PADDING-TOP: 0.75pt; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: transparent" width=132&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-SIZE: 10pt"&gt;&lt;font color=#000000&gt;&lt;font face="Times New Roman"&gt;1844d2e0-455e-4d44-a9ff-1c63f78e407b&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;td style="BORDER-RIGHT: #ece9d8; PADDING-RIGHT: 0.75pt; BORDER-TOP: #ece9d8; PADDING-LEFT: 0.75pt; PADDING-BOTTOM: 0.75pt; BORDER-LEFT: #ece9d8; WIDTH: 97.5pt; PADDING-TOP: 0.75pt; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: transparent" width=130&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-SIZE: 10pt"&gt;&lt;font color=#000000&gt;&lt;font face="Times New Roman"&gt;0aa71152-91d4-4e8f-a4a0-4124a98e2851&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;td style="BORDER-RIGHT: #ece9d8; PADDING-RIGHT: 0.75pt; BORDER-TOP: #ece9d8; PADDING-LEFT: 0.75pt; PADDING-BOTTOM: 0.75pt; BORDER-LEFT: #ece9d8; WIDTH: 52.5pt; PADDING-TOP: 0.75pt; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: transparent" width=70&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-SIZE: 10pt"&gt;&lt;font color=#000000&gt;&lt;font face="Times New Roman"&gt;a&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;td style="BORDER-RIGHT: #ece9d8; PADDING-RIGHT: 0.75pt; BORDER-TOP: #ece9d8; PADDING-LEFT: 0.75pt; PADDING-BOTTOM: 0.75pt; BORDER-LEFT: #ece9d8; WIDTH: 31.5pt; PADDING-TOP: 0.75pt; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: transparent" width=42&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-SIZE: 10pt"&gt;&lt;font color=#000000&gt;&lt;font face="Times New Roman"&gt;1&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;td style="BORDER-RIGHT: #ece9d8; PADDING-RIGHT: 0.75pt; BORDER-TOP: #ece9d8; PADDING-LEFT: 0.75pt; PADDING-BOTTOM: 0.75pt; BORDER-LEFT: #ece9d8; WIDTH: 105.75pt; PADDING-TOP: 0.75pt; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: transparent" width=141&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-SIZE: 10pt"&gt;&lt;font color=#000000&gt;&lt;font face="Times New Roman"&gt;NULL&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style="mso-yfti-irow: 7; mso-yfti-lastrow: yes"&gt;
&lt;td style="BORDER-RIGHT: #ece9d8; PADDING-RIGHT: 0.75pt; BORDER-TOP: #ece9d8; PADDING-LEFT: 0.75pt; PADDING-BOTTOM: 0.75pt; BORDER-LEFT: #ece9d8; WIDTH: 99pt; PADDING-TOP: 0.75pt; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: transparent" width=132&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-SIZE: 10pt"&gt;&lt;font color=#000000&gt;&lt;font face="Times New Roman"&gt;1844d2e0-455e-4d44-a9ff-1c63f78e407b&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;td style="BORDER-RIGHT: #ece9d8; PADDING-RIGHT: 0.75pt; BORDER-TOP: #ece9d8; PADDING-LEFT: 0.75pt; PADDING-BOTTOM: 0.75pt; BORDER-LEFT: #ece9d8; WIDTH: 97.5pt; PADDING-TOP: 0.75pt; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: transparent" width=130&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-SIZE: 10pt"&gt;&lt;font color=#000000&gt;&lt;font face="Times New Roman"&gt;0aa71152-91d4-4e8f-a4a0-4124a98e2851&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;td style="BORDER-RIGHT: #ece9d8; PADDING-RIGHT: 0.75pt; BORDER-TOP: #ece9d8; PADDING-LEFT: 0.75pt; PADDING-BOTTOM: 0.75pt; BORDER-LEFT: #ece9d8; WIDTH: 52.5pt; PADDING-TOP: 0.75pt; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: transparent" width=70&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-SIZE: 10pt"&gt;&lt;font color=#000000&gt;&lt;font face="Times New Roman"&gt;b&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;td style="BORDER-RIGHT: #ece9d8; PADDING-RIGHT: 0.75pt; BORDER-TOP: #ece9d8; PADDING-LEFT: 0.75pt; PADDING-BOTTOM: 0.75pt; BORDER-LEFT: #ece9d8; WIDTH: 31.5pt; PADDING-TOP: 0.75pt; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: transparent" width=42&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-SIZE: 10pt"&gt;&lt;font color=#000000&gt;&lt;font face="Times New Roman"&gt;2&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;td style="BORDER-RIGHT: #ece9d8; PADDING-RIGHT: 0.75pt; BORDER-TOP: #ece9d8; PADDING-LEFT: 0.75pt; PADDING-BOTTOM: 0.75pt; BORDER-LEFT: #ece9d8; WIDTH: 105.75pt; PADDING-TOP: 0.75pt; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: transparent" width=141&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-SIZE: 10pt"&gt;&lt;font color=#000000&gt;&lt;font face="Times New Roman"&gt;NULL&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;o:p&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font size=3&gt;&lt;font color=#000000&gt;&lt;font face="Times New Roman"&gt;&lt;span style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Classes:&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;o:p&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font size=3&gt;&lt;font color=#000000&gt;&lt;font face="Times New Roman"&gt;&lt;span style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Test:&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; COLOR: #2b91af; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;IMath&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt; proxy
= &lt;/font&gt;&lt;span style="COLOR: #2b91af"&gt;ContainerSingleton&lt;/span&gt;&lt;font color=#000000&gt;.Instance.Resolve&amp;lt;&lt;/font&gt;&lt;span style="COLOR: #2b91af"&gt;Add&lt;/span&gt;&lt;font color=#000000&gt;, &lt;/font&gt;&lt;span style="COLOR: #2b91af"&gt;IMath&lt;/span&gt;&lt;font color=#000000&gt;&amp;gt;();&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; COLOR: #2b91af; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;Console&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt;.WriteLine(proxy.Calculate().ToString());&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;
&lt;o:p&gt;
&lt;font color=#000000&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt;proxy
= &lt;/font&gt;&lt;span style="COLOR: #2b91af"&gt;ContainerSingleton&lt;/span&gt;&lt;font color=#000000&gt;.Instance.Resolve&amp;lt;&lt;/font&gt;&lt;span style="COLOR: #2b91af"&gt;Subtract&lt;/span&gt;&lt;font color=#000000&gt;, &lt;/font&gt;&lt;span style="COLOR: #2b91af"&gt;IMath&lt;/span&gt;&lt;font color=#000000&gt;&amp;gt;();&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; COLOR: #2b91af; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;Console&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt;.WriteLine(proxy.Calculate().ToString());&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;
&lt;o:p&gt;
&lt;font color=#000000&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-SIZE: 10pt; COLOR: #2b91af; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;Console&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt;.WriteLine(&lt;/font&gt;&lt;span style="COLOR: #2b91af"&gt;ContainerSingleton&lt;/span&gt;&lt;font color=#000000&gt;.Instance.Xml);&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="mso-tab-count: 1"&gt;&lt;font face="Times New Roman" color=#000000 size=3&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font size=3&gt;&lt;font color=#000000&gt;&lt;font face="Times New Roman"&gt;&lt;span style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Result:&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt;3&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;
&lt;o:p&gt;
&lt;font color=#000000&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt;11&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;
&lt;o:p&gt;
&lt;font color=#000000&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt;&amp;lt;configuration&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;&amp;lt;components&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&amp;lt;component
id="DBinsor.Svc.WCF.Client.Add" 
&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt;service="DBinsor.Svc.WCF.Client.IMath,
DBinsor.Svc.WCF.Client" type="DBinsor.Svc.WCF.Client.Add, DBinsor.Svc.WCF.Client"&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&amp;lt;parameters&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&amp;lt;a&amp;gt;1&amp;lt;/a&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&amp;lt;b&amp;gt;2&amp;lt;/b&amp;gt;&lt;span style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;
&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&amp;lt;/parameters&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&amp;lt;/component&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&amp;lt;component
id="DBinsor.Svc.WCF.Client.Subtract"&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt;service="DBinsor.Svc.WCF.Client.IMath,
DBinsor.Svc.WCF.Client" type="DBinsor.Svc.WCF.Client.Subtract, DBinsor.Svc.WCF.Client"&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&amp;lt;parameters&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&amp;lt;a&amp;gt;13&amp;lt;/a&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&amp;lt;b&amp;gt;2&amp;lt;/b&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&amp;lt;/parameters&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/span&gt;&amp;lt;/component&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;&amp;lt;/components&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;span style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: EN-US; mso-fareast-font-family: 'Times New Roman'; mso-fareast-language: EN-US; mso-bidi-language: AR-SA; mso-no-proof: yes"&gt;&lt;font color=#000000&gt;&amp;lt;/configuration&amp;gt;&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.ifinancialsystems.com/aggbug.ashx?id=1e9887d6-1a11-438c-8627-a1a2eef397c6" /&gt;
&lt;br /&gt;
&lt;hr /&gt;
This weblog is sponsored by &lt;a href="http://www.ifinancialsystems.com"&gt;IFinancialSystems&lt;/a&gt;. </content>
  </entry>
  <entry>
    <title>Public Interface</title>
    <link rel="alternate" type="text/html" href="http://www.ifinancialsystems.com/2008/04/11/PublicInterface.aspx" />
    <id>http://www.ifinancialsystems.com/PermaLink,guid,53028771-0ae5-4fb2-aa05-dfe765dc0793.aspx</id>
    <published>2008-04-11T18:10:54.124-04:00</published>
    <updated>2008-04-13T18:12:44.73375-04:00</updated>
    <content type="html">&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; TEXT-INDENT: 0.5in"&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;One thing we have found useful over
the years is to wrap a service proxy in a public interface Dynamic Link Library.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;Though
this in one sense may contradict the idea of Service Oriented Architecture (SOA);
in another sense it holds up the idea of refactoring.&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; TEXT-INDENT: 0.5in"&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;In this project, we have created
a singleton that loads the configuration file from the database.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;Furthermore,
this singleton aggregates Windsor Container for easy of accessibility throughout ones
program. &lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/span&gt;One draw back is (depending
on usage) the load time of ones program may suffer due to Service / Database Access.&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font size=3&gt;&lt;font color=#000000&gt;&lt;font face="Times New Roman"&gt;&lt;span style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Previously,
we stated that DBinsor required each class to implement an interface.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;Thus,
we ensured this by added our custom resolve method in the singleton.&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;pre&gt;&lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;public&lt;/span&gt; T
Resolve&amp;lt;T, S&amp;gt;() where T : &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;class&lt;/span&gt;,
S { &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;return&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;this&lt;/span&gt;._container.Resolve&amp;lt;S&amp;gt;(&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;typeof&lt;/span&gt;(T).ToString()) &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;as&lt;/span&gt; T;
}&lt;/span&gt;&lt;/pre&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;In
future releases of this library, we will add more methods to the singleton to provide
access to other functionality of the Windsor Container.&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font size=3&gt;&lt;font color=#000000&gt;&lt;font face="Times New Roman"&gt;&lt;span style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Again,
we used the factory methodology to allow for multiple sources for the Windsor Container.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;That
is, we plan to allow a user to pick from our database service, an application configuration
file, a web configuration file or a standalone xml file as their source for the singleton.&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font size=3&gt;&lt;font color=#000000&gt;&lt;font face="Times New Roman"&gt;&lt;span style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;The
public interface uses the “app.config” or the “web.config” files for three things:
lookup name, resource source and service binding.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;Here
is a sample:&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;font color=#0000ff size=2&gt; 
&lt;p style="MARGIN: 0in 0in 0pt"&gt;
&lt;font face="Times New Roman"&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt;&amp;lt;?&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: #a31515"&gt;xml&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt; &lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: red"&gt;version&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt;=&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: black"&gt;"&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt;1.0&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: black"&gt;"&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt; &lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: red"&gt;encoding&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt;=&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: black"&gt;"&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt;utf-8&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: black"&gt;"&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt;&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt; ?&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="MARGIN: 0in 0in 0pt 0.5in"&gt;
&lt;font face="Times New Roman"&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: #a31515"&gt;configuration&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="MARGIN: 0in 0in 0pt 1in"&gt;
&lt;font face="Times New Roman"&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: #a31515"&gt;appSettings&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="MARGIN: 0in 0in 0pt 1.5in"&gt;
&lt;font face="Times New Roman"&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: #a31515"&gt;add&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt; &lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: red"&gt;key&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt;=&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: black"&gt;"&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt;LookupName&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: black"&gt;"&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt; &lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: red"&gt;value&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt;=&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: black"&gt;"&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt;Test1&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: black"&gt;"&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt; /&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="MARGIN: 0in 0in 0pt 1.5in"&gt;
&lt;font face="Times New Roman"&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: #a31515"&gt;add&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt; &lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: red"&gt;key&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt;=&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: black"&gt;"&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt;ResourceSource&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: black"&gt;"&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt; &lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: red"&gt;value&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt;=&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: black"&gt;"&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt;Database&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: black"&gt;"&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt; /&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="MARGIN: 0in 0in 0pt 1in"&gt;
&lt;font face="Times New Roman"&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: #a31515"&gt;appSettings&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="MARGIN: 0in 0in 0pt 0.5in"&gt;
&lt;font face="Times New Roman"&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: #a31515"&gt;system.serviceModel&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="MARGIN: 0in 0in 0pt 1in"&gt;
&lt;font face="Times New Roman"&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: #a31515"&gt;bindings&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="MARGIN: 0in 0in 0pt 1.5in"&gt;
&lt;font face="Times New Roman"&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: #a31515"&gt;basicHttpBinding&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="MARGIN: 0in 0in 0pt 2in"&gt;
&lt;font face="Times New Roman"&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: #a31515"&gt;binding&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt; &lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: red"&gt;name&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt;=&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: black"&gt;"&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt;ConfigSvcEndPoint&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: black"&gt;"&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt; &lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: red"&gt;closeTimeout&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt;=&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: black"&gt;"&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt;00:01:00&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: black"&gt;"&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt; &lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: red"&gt;openTimeout&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt;=&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: black"&gt;"&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt;00:01:00&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: black"&gt;"&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: #003300"&gt;
&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="MARGIN: 0in 0in 0pt 2in"&gt;
&lt;font face="Times New Roman"&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: red"&gt;receiveTimeout&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt;=&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: black"&gt;"&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt;00:10:00&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: black"&gt;"&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt; &lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: red"&gt;sendTimeout&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt;=&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: black"&gt;"&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt;00:01:00&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: black"&gt;"&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt; &lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: red"&gt;allowCookies&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt;=&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: black"&gt;"&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt;false&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: black"&gt;"&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: #003300"&gt;
&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="MARGIN: 0in 0in 0pt 2in"&gt;
&lt;font face="Times New Roman"&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: red"&gt;bypassProxyOnLocal&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt;=&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: black"&gt;"&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt;false&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: black"&gt;"&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt; &lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: red"&gt;hostNameComparisonMode&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt;=&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: black"&gt;"&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt;StrongWildcard&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: black"&gt;"&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: #003300"&gt;
&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="MARGIN: 0in 0in 0pt 2in"&gt;
&lt;font face="Times New Roman"&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: red"&gt;maxBufferSize&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt;=&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: black"&gt;"&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt;65536&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: black"&gt;"&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt; &lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: red"&gt;maxBufferPoolSize&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt;=&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: black"&gt;"&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt;524288&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: black"&gt;"&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt; &lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: red"&gt;maxReceivedMessageSize&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt;=&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: black"&gt;"&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt;65536&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: black"&gt;"&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: #003300"&gt;
&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="MARGIN: 0in 0in 0pt 2in"&gt;
&lt;font face="Times New Roman"&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: red"&gt;messageEncoding&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt;=&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: black"&gt;"&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt;Text&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: black"&gt;"&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt; &lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: red"&gt;textEncoding&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt;=&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: black"&gt;"&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt;utf-8&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: black"&gt;"&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt; &lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: red"&gt;transferMode&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt;=&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: black"&gt;"&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt;Buffered&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: black"&gt;"&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: #003300"&gt;
&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="MARGIN: 0in 0in 0pt 2in"&gt;
&lt;font face="Times New Roman"&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: red"&gt;useDefaultWebProxy&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt;=&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: black"&gt;"&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt;true&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: black"&gt;"&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="MARGIN: 0in 0in 0pt 2in"&gt;
&lt;font face="Times New Roman"&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: #a31515"&gt;readerQuotas&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt; &lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: red"&gt;maxDepth&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt;=&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: black"&gt;"&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt;32&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: black"&gt;"&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt; &lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: red"&gt;maxStringContentLength&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt;=&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: black"&gt;"&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt;8192&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: black"&gt;"&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt; &lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: red"&gt;maxArrayLength&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt;=&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: black"&gt;"&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt;16384&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: black"&gt;"&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: #003300"&gt;
&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="MARGIN: 0in 0in 0pt 2in"&gt;
&lt;font face="Times New Roman"&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: red"&gt;maxBytesPerRead&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt;=&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: black"&gt;"&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt;4096&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: black"&gt;"&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt; &lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: red"&gt;maxNameTableCharCount&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt;=&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: black"&gt;"&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt;16384&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: black"&gt;"&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt; /&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="MARGIN: 0in 0in 0pt 2in"&gt;
&lt;font face="Times New Roman"&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: #a31515"&gt;security&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt; &lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: red"&gt;mode&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt;=&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: black"&gt;"&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt;None&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: black"&gt;"&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="MARGIN: 0in 0in 0pt 2in"&gt;
&lt;font face="Times New Roman"&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: #a31515"&gt;transport&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt; &lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: red"&gt;clientCredentialType&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt;=&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: black"&gt;"&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt;None&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: black"&gt;"&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt; &lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: red"&gt;proxyCredentialType&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt;=&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: black"&gt;"&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt;None&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: black"&gt;"&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: #003300"&gt;
&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="MARGIN: 0in 0in 0pt 2in"&gt;
&lt;font face="Times New Roman"&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: red"&gt;realm&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt;=&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: black"&gt;""&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt; /&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="MARGIN: 0in 0in 0pt 2in"&gt;
&lt;font face="Times New Roman"&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: #a31515"&gt;message&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt; &lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: red"&gt;clientCredentialType&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt;=&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: black"&gt;"&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt;UserName&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: black"&gt;"&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt; &lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: red"&gt;algorithmSuite&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt;=&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: black"&gt;"&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt;Default&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: black"&gt;"&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt; /&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="MARGIN: 0in 0in 0pt 2in"&gt;
&lt;font face="Times New Roman"&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: #a31515"&gt;security&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="MARGIN: 0in 0in 0pt 2in"&gt;
&lt;font face="Times New Roman"&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: #a31515"&gt;binding&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="MARGIN: 0in 0in 0pt 1.5in"&gt;
&lt;font face="Times New Roman"&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: #a31515"&gt;basicHttpBinding&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: 0.5in"&gt;
&lt;font face="Times New Roman"&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: #a31515"&gt;bindings&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="MARGIN: 0in 0in 0pt 1in"&gt;
&lt;font face="Times New Roman"&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: #a31515"&gt;client&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="MARGIN: 0in 0in 0pt 1.5in"&gt;
&lt;font face="Times New Roman"&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: #a31515"&gt;endpoint&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt; &lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: red"&gt;address&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt;=&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: black"&gt;"&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt;http://localhost:3837/DBinsor.Svc.WCF.Host/Configuration.svc&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: black"&gt;"&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: #003300"&gt;
&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="MARGIN: 0in 0in 0pt 1.5in"&gt;
&lt;font face="Times New Roman"&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: red"&gt;binding&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt;=&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: black"&gt;"&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt;basicHttpBinding&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: black"&gt;"&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt; &lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: red"&gt;bindingConfiguration&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt;=&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: black"&gt;"&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt;ConfigSvcEndPoint&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: black"&gt;"&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: #003300"&gt;
&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="MARGIN: 0in 0in 0pt 1.5in"&gt;
&lt;font face="Times New Roman"&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: red"&gt;contract&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt;=&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: black"&gt;"&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt;ConfigurationServiceProxy.ConfigurationServiceContract&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: black"&gt;"&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: #003300"&gt;
&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="MARGIN: 0in 0in 0pt 1.5in"&gt;
&lt;font face="Times New Roman"&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: red"&gt;name&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt;=&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: black"&gt;"&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt;ConfigSvcEndPoint&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: black"&gt;"&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt; /&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="MARGIN: 0in 0in 0pt 1in"&gt;
&lt;font face="Times New Roman"&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: #a31515"&gt;client&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="MARGIN: 0in 0in 0pt 0.5in"&gt;
&lt;font face="Times New Roman"&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: #a31515"&gt;system.serviceModel&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="MARGIN: 0in 0in 0pt"&gt;
&lt;font face="Times New Roman"&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: #a31515"&gt;configuration&lt;/span&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="MARGIN: 0in 0in 0pt"&gt;
&lt;font face="Times New Roman"&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt;&lt;/span&gt;&lt;/font&gt;&amp;nbsp;
&lt;/p&gt;
&lt;p style="MARGIN: 0in 0in 0pt"&gt;
&lt;font face="Times New Roman"&gt;&lt;span style="FONT-SIZE: 9pt; COLOR: blue"&gt;&lt;/span&gt;&lt;/font&gt;
&lt;/font&gt;&lt;font color=#0000ff size=2&gt;&amp;nbsp;&gt;
&lt;/font&gt;&lt;img width="0" height="0" src="http://www.ifinancialsystems.com/aggbug.ashx?id=53028771-0ae5-4fb2-aa05-dfe765dc0793" /&gt;
&lt;br /&gt;
&lt;hr /&gt;
This weblog is sponsored by &lt;a href="http://www.ifinancialsystems.com"&gt;IFinancialSystems&lt;/a&gt;. </content>
  </entry>
  <entry>
    <title>LINQ SQL =&gt; XML</title>
    <link rel="alternate" type="text/html" href="http://www.ifinancialsystems.com/2008/04/10/LINQSQLXML.aspx" />
    <id>http://www.ifinancialsystems.com/PermaLink,guid,1af3f458-4057-46bc-b3fe-e2d9b3640427.aspx</id>
    <published>2008-04-10T17:11:33.155-04:00</published>
    <updated>2008-04-13T18:12:12.593125-04:00</updated>
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p class="MsoNormal" style="MARGIN: 0in 0in 0pt; TEXT-INDENT: 0.5in">
          <font face="Times New Roman" color="#000000" size="3">In the last post, we purposely
did not address the core question of how does one generate the xml configuration from
the database.<span style="mso-spacerun: yes">  </span>This used to require quite
a bit of code; however, we have LINQ (praise the Microsoft Gods).<span style="mso-spacerun: yes">  </span>I
am by no means a LINQ expert, nevertheless I know enough to make it work.</font>
        </p>
        <p class="MsoNormal" style="MARGIN: 0in 0in 0pt; TEXT-INDENT: 0.5in">
          <font face="Times New Roman" color="#000000" size="3">The code is pretty straight
forward; we used LINQ to SQL to select all rows from the database where the lookup
name equals our requested name.<span style="mso-spacerun: yes">  </span>Then
we used LINQ to XML to put those rows into an XML file.<span style="mso-spacerun: yes">  </span>This
was almost too trivial of a task.</font>
        </p>
        <pre>
          <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">
            <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">using</span> System; <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">using</span> System.Linq; <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">using</span> System.Xml.Linq; <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">using</span> DBinsor.Svc.WCF.BusinessEntities; <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">using</span> DBinsor.Svc.WCF.DataAccess; <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">namespace</span> DBinsor.Svc.WCF.BusinessLogic
{ <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">public</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">class</span> ResourceFromDatabase
: IResource { <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">public</span> ConfigurationEntity
GenerateXml(ConfigurationEntity entity) { <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">if</span> (entity
== <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">null</span>)
{ <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">throw</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">new</span> ArgumentException(<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"Configuration
Entity Was Null."</span>, <span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"entity"</span>);
} <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">if</span> (<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">string</span>.IsNullOrEmpty(entity.LookupName)
== <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">true</span>)
{ <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">throw</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">new</span> ArgumentException(<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"Lookup
Name Was Null or Empty."</span>, <span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"entity"</span>);
} <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">using</span> (DBinsorViewDataContext
windsorDataAccess <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">new</span> DBinsorViewDataContext())
{ entity.Xml <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">new</span> XElement(<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"configuration"</span>, <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">new</span> XElement(<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"components"</span>,
from components <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">in</span> windsorDataAccess.WindsorComponents
where components.LookupName == entity.LookupName orderby components.ImplementationName
select <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">new</span> XElement(<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"component"</span>,
AddRequiredAttributes(<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"id"</span>,
components.Namespace <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">+</span><span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"."</span><span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">+</span> components.ImplementationName),
AddRequiredAttributes(<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"service"</span>,
components.Namespace <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">+</span><span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"."</span><span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">+</span> components.ContractName <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">+</span><span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">",
"</span><span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">+</span> components.Namespace),
AddRequiredAttributes(<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"type"</span>,
components.Namespace <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">+</span><span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"."</span><span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">+</span> components.ImplementationName <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">+</span><span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">",
"</span><span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">+</span> components.Namespace),
AddOptionalAttributes(<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"inspectionBehavior"</span>,
components.InspectionBehavior), AddOptionalAttributes(<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"lifestyle"</span>,
components.Lifestyle), AddOptionalAttributes(<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"customLifestyleType"</span>,
components.CustomLifestyleType), AddOptionalAttributes(<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"initialPoolSize"</span>,
components.InitialPoolSize.ToString()), AddOptionalAttributes(<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"maxPoolSize"</span>,
components.MaxPoolSize.ToString()), AddParameters(components.ComponentId, components.ContractId)
) ) ); } <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">return</span> entity;
} <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">private</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">static</span> XAttribute
AddRequiredAttributes(<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">string</span> name, <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">string</span> value)
{ <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">return</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">new</span> XAttribute(name,
value); } <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">private</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">static</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">object</span> AddOptionalAttributes(<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">string</span> name, <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">string</span> value)
{ <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">if</span> (<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">string</span>.IsNullOrEmpty(value)
== <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">true</span>)
{ <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">return</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">null</span>;
} <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">return</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">new</span> XAttribute(name,
value); } <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">private</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">static</span> XElement
AddParameters(Guid componentId, Guid contractId) { <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">using</span> (DBinsorViewDataContext
windsorDataAccess <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">new</span> DBinsorViewDataContext())
{ <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">return</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">new</span> XElement(<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"parameters"</span>,
from parameters <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">in</span> windsorDataAccess.WindsorParmaters
where (parameters.ComponentId == componentId &amp;&amp; parameters.ContractId == contractId)
orderby parameters.ParmName select <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">new</span> XElement(parameters.ParmName,
ReturnDefaultOrOverride(parameters.ParmDefault, parameters.OverrideValue)) ); } } <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">private</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">static</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">string</span> ReturnDefaultOrOverride(<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">string</span> defaultValue, <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">string</span> overrideValue)
{ <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">if</span> (<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">string</span>.IsNullOrEmpty(overrideValue)
== <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">false</span>)
{ <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">return</span> overrideValue;
} <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">return</span> defaultValue;
} } } </span>
        </pre>
        <p>
          <font face="Times New Roman" color="#000000" size="3">            The
only concern I have is in the “AddParameters” function; does it make a round trip
to the database on every select?<span style="mso-spacerun: yes">  </span>I think
it probably does; thus this may be a huge performance bottleneck.<span style="mso-spacerun: yes">  </span>However,
first we should build for proof of concept.<span style="mso-spacerun: yes">  </span>Then
we can go back and optimize. </font>
        </p>
        <img width="0" height="0" src="http://www.ifinancialsystems.com/aggbug.ashx?id=1af3f458-4057-46bc-b3fe-e2d9b3640427" />
        <br />
        <hr />
This weblog is sponsored by <a href="http://www.ifinancialsystems.com">IFinancialSystems</a>. 
</div>
    </content>
  </entry>
  <entry>
    <title>Wiring It Up</title>
    <link rel="alternate" type="text/html" href="http://www.ifinancialsystems.com/2008/04/09/WiringItUp.aspx" />
    <id>http://www.ifinancialsystems.com/PermaLink,guid,f619aeb8-2ba4-4d98-96df-dbe028732f58.aspx</id>
    <published>2008-04-09T16:44:50.968-04:00</published>
    <updated>2008-04-13T18:11:43.0775-04:00</updated>
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p class="MsoNormal" style="MARGIN: 0in 0in 0pt; TEXT-INDENT: 0.5in">
          <font face="Times New Roman" color="#000000" size="3">Quite shockingly, we have etched
out an n-tier service oriented system without writing a single line of code.<span style="mso-spacerun: yes">  </span>Moreover,
we are following best practices to decouple the data layer, business layer, service
layer and presentation layer. Generally, we do this for two reasons: one, to promote
the idea of separation of concerns and two, to allow for future flexibility when addressing
change sets.</font>
        </p>
        <p class="MsoNormal" style="MARGIN: 0in 0in 0pt; TEXT-INDENT: 0.5in">
          <font face="Times New Roman" color="#000000" size="3">The wiring process can be summed
up as adding business entities and logic to link the data layer to the service layer.<span style="mso-spacerun: yes">  </span>Business
entities should be though of as objects that hold state.<span style="mso-spacerun: yes">  </span>Business
logic should be thought of functions or processes that affect business entities.<span style="mso-spacerun: yes">  </span>This
is gray definition, because in some cases business entities might have functionality.<span style="mso-spacerun: yes">  </span>An
example of a business object is a person; who has a name and an age.<span style="mso-spacerun: yes">  </span>However,
this person may have an internal process called heartbeat: thus the grayness.</font>
        </p>
        <p class="MsoNormal" style="MARGIN: 0in 0in 0pt; TEXT-INDENT: 0.5in">
          <font face="Times New Roman" color="#000000" size="3">We will define one business
entity (for now) called “ConfigurationEntity”.<span style="mso-spacerun: yes">  </span>This
entity will have two properties: “LookupName” and “Xml”.<span style="mso-spacerun: yes">  </span>The
“LookupName” will be used to find the castle configuration in the database.<span style="mso-spacerun: yes">  </span>The
“Xml” will hold the dynamically generated xml configuration from the database.</font>
        </p>
        <p class="MsoNormal" style="MARGIN: 0in 0in 0pt; TEXT-INDENT: 0.5in">
          <font face="Times New Roman" color="#000000" size="3">Before we proceed, generally
I would unit test at this point.<span style="mso-spacerun: yes">  </span>Test
Driven Development (TDD) states: we should write tests first then code.<span style="mso-spacerun: yes">  </span>However,
because it would require the use of mocks, I will refrain until a later post.</font>
        </p>
        <p class="MsoNormal" style="MARGIN: 0in 0in 0pt">
          <font color="#000000">
            <font size="3">
              <font face="Times New Roman">
                <span style="mso-tab-count: 1">            </span>Next,
we will use a </font>
            </font>
          </font>
          <a href="http://www.dofactory.com/Patterns/PatternFactory.aspx">
            <font face="Times New Roman" color="#800080" size="3">factory
pattern</font>
          </a>
          <font face="Times New Roman" color="#000000" size="3"> to generate
the xml from the database.<span style="mso-spacerun: yes">  </span>Again, we
are choosing a design that provides for flexibility during future change sets. <span style="mso-spacerun: yes"> </span>The
factory uses an enumeration to decide which type of process to return.</font>
        </p>
        <font face="Times New Roman" color="#000000" size="3">
          <p class="MsoNormal" style="MARGIN: 0in 0in 0pt">
            Finally, we
have to generate translators to and from our service layer data contracts to our business
layer business entities.<span style="mso-spacerun: yes">  </span>These translators
will be used in our service implementation to allow access to our business logic.
</p>
        </font>
        <p class="MsoNormal" style="MARGIN: 0in 0in 0pt">
          <font size="3">
            <font color="#000000">
              <font face="Times New Roman">            </font>
            </font>
          </font>
        </p>
        <p class="MsoNormal" style="MARGIN: 0in 0in 0pt">
          <font size="3">
            <font color="#000000">
              <font face="Times New Roman">Class Diagram:</font>
            </font>
          </font>
        </p>
        <p>
          <img src="http://www.ifinancialsystems.com/content/binary/ClassDiagram.bmp" border="0" />
        </p>
        <p>
          <font face="Times New Roman" color="#000000" size="3">Factory:</font>
        </p>
        <pre>
          <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">
            <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">namespace</span> DBinsor.Svc.WCF.BusinessLogic
{ <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">public</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">static</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">class</span> ResourceFactory
{ <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">public</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">static</span> IResource
GenerateResouce(ResourceLocations location) { <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">switch</span> (location)
{ <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">case</span> ResourceLocations.Database: <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">return</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">new</span> ResourceFromDatabase(); <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">default</span>: <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">throw</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">new</span> ArgumentException(<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"Location
Not Supported."</span>, <span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"location"</span>);
} } } }</span>
          <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">
          </span>
        </pre>
        <pre>
          <p class="MsoNormal" style="MARGIN: 0in 0in 0pt">
            <font face="Times New Roman" size="3">Finally, we have to generate translators to
and from our service layer data contracts to our business layer business </font>
            <font face="Times New Roman" size="3">entities.<span style="mso-spacerun: yes">  </span></font>
          </p>
          <p class="MsoNormal" style="MARGIN: 0in 0in 0pt">
            <font face="Times New Roman" size="3">
              <span style="mso-spacerun: yes">
              </span>These
translators will be used in our service implementation to allow access to our business
logic.</font>
          </p>
          <p class="MsoNormal" style="MARGIN: 0in 0in 0pt">
            <font face="Times New Roman" size="3">
            </font> 
</p>
          <pre>
            <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">
              <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">namespace</span> DBinsor.Svc.WCF.ServiceImplementation
{ <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">public</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">static</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">class</span> TConfigurationEntityAndConfigurationResponse
{ <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">public</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">static</span> ConfigurationResponse
Convert(ConfigurationEntity from) { ConfigurationResponse to <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">new</span> ConfigurationResponse();
to.ConfigurationPart <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">new</span> ConfigurationPart();
to.ConfigurationPart.XmlConfiguration <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">new</span> XmlConfiguration();
to.ConfigurationPart.XmlConfiguration.Config <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> from.Xml.ToString(); <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">return</span> to;
} } }</span>
          </pre>
          <pre>
            <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">
              <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">namespace</span> DBinsor.Svc.WCF.ServiceImplementation
{ <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">public</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">static</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">class</span> TConfigurationEntityAndConfigurationRequest
{ <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">public</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">static</span> ConfigurationEntity
Convert(ConfigurationRequest from) { <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">return</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">new</span> ConfigurationEntity(from.CastleId.LookupName);
} } }</span>
          </pre>
          <pre>
            <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">
              <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">namespace</span> DBinsor.Svc.WCF.ServiceImplementation
{ <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">public</span> partial <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">class</span> ConfigurationService
{ <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">public</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">override</span> ConfigurationResponse
GetConfigurationDemand(ConfigurationRequest request) { IResource businessLogic <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> ResourceFactory.GenerateResouce(ResourceLocations.Database); <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">return</span> TConfigurationEntityAndConfigurationResponse.Convert(
businessLogic.GenerateXml( TConfigurationEntityAndConfigurationRequest.Convert( request)));
} } }</span>
          </pre>
        </pre>
        <img width="0" height="0" src="http://www.ifinancialsystems.com/aggbug.ashx?id=f619aeb8-2ba4-4d98-96df-dbe028732f58" />
        <br />
        <hr />
This weblog is sponsored by <a href="http://www.ifinancialsystems.com">IFinancialSystems</a>. 
</div>
    </content>
  </entry>
  <entry>
    <title>Data Access: LINQ to SQL &amp; ADO.NET Entity Framework</title>
    <link rel="alternate" type="text/html" href="http://www.ifinancialsystems.com/2008/04/08/DataAccessLINQToSQLADONETEntityFramework.aspx" />
    <id>http://www.ifinancialsystems.com/PermaLink,guid,d752887c-6d1f-401e-8d5c-2bdfee7afd05.aspx</id>
    <published>2008-04-08T01:03:53.764-04:00</published>
    <updated>2008-04-09T01:06:16.671-04:00</updated>
    <content type="html">&lt;span style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'; mso-ansi-language: EN-US; mso-fareast-font-family: 'Times New Roman'; mso-fareast-language: EN-US; mso-bidi-language: AR-SA"&gt;&lt;font color=#000000&gt; 
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;At
first glance these two new data access technologies seem to fulfill a common purpose.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;Though,
from my basic understanding the ADO.NET Entity Framework [EF] acts more like an Object
Relational Mapping [ORM] tool, where as the LINQ to SQL [LTOS] acts similar to an
ADO.NET Dataset.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;This is my first observation
and will most likely be discredited through further inspection.
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Functionally,
we are trying to use a technology to extract, insert, modify and delete from our database.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;Thus,
it seems either technology would be well suited.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;For
a production system, we would lean towards LTOS because EF is still in a beta 3 version.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;However,
because we view this project as a learning exercise, we will employee both technologies.
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Due
to the fact the EF is much more like an ORM; we will use it for our data access to
the tables of the database.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;Consequently,
we will use LTOS for the data access associated with the views of the database.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;Basically,
the idea is if we change the underlying table structure, our business object to relational
mapping should not have to change.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; TEXT-INDENT: 0.5in"&gt;
In the above example, this should hold true (pending that EF does have a flexible
Object to Relational Mapping portion).&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;We
will leave this argument unjustified for the moment, because most likely we will have
to change the database later on.
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; TEXT-INDENT: 0.5in"&gt;&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;
&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; TEXT-INDENT: 0.5in"&gt;
ADO.NET Entity Framework Table Map:
&lt;/p&gt;
&lt;p&gt;
&lt;/font&gt;&lt;/span&gt;&gt;
&lt;p&gt;
&lt;img src="http://www.ifinancialsystems.com/content/binary/EntityDesignerDiagram.gif" border=0&gt;
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; TEXT-INDENT: 0.5in"&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;LINQ to SQL View Map:&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;img src="http://www.ifinancialsystems.com/content/binary/DatabaseView.bmp" border=0&gt;
&lt;/p&gt;
&lt;p&gt;
Component:
&lt;/p&gt;
&lt;pre&gt;&lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;SELECT&lt;/span&gt; dbo.Castle.Name &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;AS&lt;/span&gt; LookupName,
dbo.Contracts.Namespace, dbo.Implementations.Id, dbo.Contracts.Interface &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;AS&lt;/span&gt; ContractName,
dbo.Implementations.Name &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;AS&lt;/span&gt; ImplementationName,
dbo.Components.InspectionBehavior, dbo.Components.Lifestyle, dbo.Components.CustomLifestyleType,
dbo.Components.InitialPoolSize, dbo.Components.MaxPoolSize, dbo.Components.Id &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;AS&lt;/span&gt; ComponentId,
dbo.Contracts.Id &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;AS&lt;/span&gt; ContractId &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;FROM&lt;/span&gt; dbo.Castle &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;INNER&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: silver; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;JOIN&lt;/span&gt; dbo.Components &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;ON&lt;/span&gt; dbo.Castle.Id
= dbo.Components.CastleId &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;INNER&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: silver; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;JOIN&lt;/span&gt; dbo.Implementations &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;ON&lt;/span&gt; dbo.Components.ImplementationId
= dbo.Implementations.Id &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;INNER&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: silver; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;JOIN&lt;/span&gt; dbo.Contracts &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;ON&lt;/span&gt; dbo.Implementations.ContractId
= dbo.Contracts.Id&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;
Parameter:
&lt;/p&gt;
&lt;pre&gt;&lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;SELECT&lt;/span&gt; dbo.Components.Id &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;AS&lt;/span&gt; ComponentId,
dbo.Contracts.Id &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;AS&lt;/span&gt; ContractId,
dbo.ContractParameters.Name &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;AS&lt;/span&gt; ParmName,
dbo.ContractParameters.DefaultValue &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;AS&lt;/span&gt; ParmDefault,
dbo.ComponentParameters.OverrideValue &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;FROM&lt;/span&gt; dbo.Components &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;INNER&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: silver; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;JOIN&lt;/span&gt; dbo.Implementations &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;ON&lt;/span&gt; dbo.Components.ImplementationId
= dbo.Implementations.Id &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;INNER&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: silver; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;JOIN&lt;/span&gt; dbo.Contracts &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;ON&lt;/span&gt; dbo.Implementations.ContractId
= dbo.Contracts.Id &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;INNER&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: silver; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;JOIN&lt;/span&gt; dbo.ContractParameters &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;ON&lt;/span&gt; dbo.Contracts.Id
= dbo.ContractParameters.ContractId &lt;span style="FONT-SIZE: 11px; COLOR: fuchsia; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;LEFT&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: silver; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;OUTER&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: silver; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;JOIN&lt;/span&gt; dbo.ComponentParameters &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;ON&lt;/span&gt; dbo.Components.Id
= dbo.ComponentParameters.ComponentId &lt;span style="FONT-SIZE: 11px; COLOR: silver; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;AND&lt;/span&gt; dbo.ContractParameters.Id
= dbo.ComponentParameters.ContractParameterId&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.ifinancialsystems.com/aggbug.ashx?id=d752887c-6d1f-401e-8d5c-2bdfee7afd05" /&gt;
&lt;br /&gt;
&lt;hr /&gt;
This weblog is sponsored by &lt;a href="http://www.ifinancialsystems.com"&gt;IFinancialSystems&lt;/a&gt;. </content>
  </entry>
  <entry>
    <title>Heraclitus</title>
    <link rel="alternate" type="text/html" href="http://www.ifinancialsystems.com/2008/04/08/Heraclitus.aspx" />
    <id>http://www.ifinancialsystems.com/PermaLink,guid,b8f5cd70-103b-41e3-b715-2a9de681bd68.aspx</id>
    <published>2008-04-07T22:55:41.092875-04:00</published>
    <updated>2008-04-07T22:55:41.092875-04:00</updated>
    <content type="html">&lt;p class=MsoNormal style="BACKGROUND: white; MARGIN: 0in 0in 0pt; VERTICAL-ALIGN: top"&gt;
&lt;font color=#000000&gt;&lt;font face="Times New Roman"&gt;&lt;span lang=EN style="FONT-SIZE: 11pt; mso-bidi-font-weight: bold; mso-ansi-language: EN"&gt;Upon
those who step into the same rivers flow other and yet other waters. &lt;/span&gt;&lt;span lang=EN style="FONT-SIZE: 11pt; mso-ansi-language: EN"&gt;&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;
&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="BACKGROUND: white; MARGIN: 0in 0in 0pt; VERTICAL-ALIGN: top"&gt;
&lt;span lang=EN style="FONT-SIZE: 11pt; mso-bidi-font-weight: bold; mso-ansi-language: EN"&gt;&lt;font color=#000000&gt;&lt;font face="Times New Roman"&gt;All
things . . . are in flux like a river.&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="BACKGROUND: white; MARGIN: 0in 0in 0pt; VERTICAL-ALIGN: top"&gt;
&lt;span lang=EN style="FONT-SIZE: 11pt; mso-bidi-font-weight: bold; mso-ansi-language: EN"&gt;
&lt;o:p&gt;
&lt;font face="Times New Roman" color=#000000&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="BACKGROUND: white; MARGIN: 0in 0in 0pt; VERTICAL-ALIGN: top"&gt;
&lt;font color=#000000&gt;&lt;font face="Times New Roman"&gt;&lt;span class=footer1&gt;&lt;span lang=EN style="FONT-SIZE: 8pt; mso-ansi-language: EN"&gt;Trans.
John Mansley Robinson, &lt;i&gt;An Introduction to Early Greek Philosophy&lt;/i&gt;, (Boston:
Houghton Mifflin Company, 1968) p. 91, Fragment 5.15 and p. 89, Fragment 5.10.&lt;/span&gt;&lt;/span&gt;&lt;span lang=EN style="FONT-SIZE: 8pt; mso-ansi-language: EN"&gt;
&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;o:p&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; TEXT-INDENT: 0.5in"&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;In my estimation, embracing change
has revolutionized our conception of software architecture.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;With
the advent of agile methodologies, we are consistently designing for change.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;Moreover,
my team develops core functionality, deploys and welcomes change requests.&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; TEXT-INDENT: 0.5in"&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;The question then becomes how does
one code for change?&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;Some of today’s
biggest buzz words can give a clue: Test Driven Development (TDD), Domain Driven Design
(DDD), Inversion of Control (IOC) and Service Oriented Architecture (SOA).&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; TEXT-INDENT: 0.5in"&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;Test Driven Development, used correctly,
can mitigate bugs during the implementation of change sets.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;Furthermore,
DDD specifies a guide to use design patterns to implement loosely couple objects.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;In
the same vein Inversion of Control, as shown in earlier posts, greatly reduces dependencies
between objects.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;Finally, Service Oriented
Architecture defines architecture to house loosely coupled systems.&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; TEXT-INDENT: 0.5in"&gt;
&lt;font size=3&gt;&lt;font color=#000000&gt;&lt;font face="Times New Roman"&gt;In summation, we should
embrace change throughout our design, implementation, deployment and changes set resolution.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.ifinancialsystems.com/aggbug.ashx?id=b8f5cd70-103b-41e3-b715-2a9de681bd68" /&gt;
&lt;br /&gt;
&lt;hr /&gt;
This weblog is sponsored by &lt;a href="http://www.ifinancialsystems.com"&gt;IFinancialSystems&lt;/a&gt;. </content>
  </entry>
  <entry>
    <title>Expose Thy Logic</title>
    <link rel="alternate" type="text/html" href="http://www.ifinancialsystems.com/2008/04/07/ExposeThyLogic.aspx" />
    <id>http://www.ifinancialsystems.com/PermaLink,guid,7e6828ff-9304-46a4-9b33-794e2c9d68fd.aspx</id>
    <published>2008-04-06T22:34:21.796-04:00</published>
    <updated>2008-04-06T22:34:21.796-04:00</updated>
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p class="MsoNormal" style="MARGIN: 0in 0in 0pt">
          <font face="Times New Roman" color="#000000" size="3">   I normally
utilize the “</font>
          <a href="http://msdn2.microsoft.com/en-us/library/bb931187.aspx">
            <font face="Times New Roman" color="#800080" size="3">Web
Service Software Factory</font>
          </a>
          <font size="3">
            <font color="#000000">
              <font face="Times New Roman">”
to structure and implement my services.<span style="mso-spacerun: yes">  </span>This
package greatly decreases the time spent on the mundane tasks of exposing your business
logic to the service layer.<span style="mso-spacerun: yes">  </span></font>
            </font>
          </font>
        </p>
        <p class="MsoNormal" style="MARGIN: 0in 0in 0pt; TEXT-INDENT: 0.5in">
          <font face="Times New Roman" color="#000000" size="3">One could argue that exposing
business logic is quite simple, add a WCF service to your project and write your business
logic in the *.svc file.<span style="mso-spacerun: yes">  </span>However, we
are here to write loosely coupled code.<span style="mso-spacerun: yes">  </span>To
this end, one can use multiple dynamic link libraries (.dll) to organize one code.<span style="mso-spacerun: yes">  </span>Moreover,
by judicially choosing where objects belong, one can apply the principles of separations
of concerns. </font>
        </p>
        <p class="MsoNormal" style="MARGIN: 0in 0in 0pt; TEXT-INDENT: 0.5in">
          <font face="Times New Roman" color="#000000" size="3">The “</font>
          <a href="http://www.codeplex.com/Release/ProjectReleases.aspx?ProjectName=servicefactory&amp;ReleaseId=7846">
            <font face="Times New Roman" color="#800080" size="3">hands
on lab</font>
          </a>
          <font face="Times New Roman" color="#000000" size="3">” for the web
service factory is top notch.<span style="mso-spacerun: yes">  </span>The modeling
edition allows one to use a graphical approach to define data and services contacts
quickly and correctly.<span style="mso-spacerun: yes">  </span>Below are the
data contract and the service contract files needed to expose a service with a DBinsor
configuration file.<span style="mso-spacerun: yes">  </span>Furthermore, I have
included the projects contained in the solution file.</font>
        </p>
        <p class="MsoNormal" style="MARGIN: 0in 0in 0pt; TEXT-INDENT: 0.5in">
          <font face="Times New Roman" color="#000000" size="3">
          </font> 
</p>
        <p class="MsoNormal" style="MARGIN: 0in 0in 0pt; TEXT-INDENT: 0.5in">
          <font face="Times New Roman" color="#000000" size="3">Data Contract:</font>
        </p>
        <p>
          <img src="http://www.ifinancialsystems.com/content/binary/DataContract.bmp" border="0" />
        </p>
        <p>
         <font face="Times New Roman" color="#000000" size="3">Service
Contract:</font></p>
        <p>
 
</p>
        <p>
          <img src="http://www.ifinancialsystems.com/content/binary/ServiceContract.bmp" border="0" />
        </p>
        <p>
         Solution<font face="Times New Roman" color="#000000" size="3">:</font></p>
        <p>
 
</p>
        <img src="http://www.ifinancialsystems.com/content/binary/SolutionExplorer.bmp" border="0" />
        <img width="0" height="0" src="http://www.ifinancialsystems.com/aggbug.ashx?id=7e6828ff-9304-46a4-9b33-794e2c9d68fd" />
        <br />
        <hr />
This weblog is sponsored by <a href="http://www.ifinancialsystems.com">IFinancialSystems</a>. 
</div>
    </content>
  </entry>
  <entry>
    <title>Database Explanation</title>
    <link rel="alternate" type="text/html" href="http://www.ifinancialsystems.com/2008/04/06/DatabaseExplanation.aspx" />
    <id>http://www.ifinancialsystems.com/PermaLink,guid,52a7da2c-38b8-4fc7-a0a2-8f60afa40948.aspx</id>
    <published>2008-04-06T19:51:15.8585-04:00</published>
    <updated>2008-04-06T19:51:15.8585-04:00</updated>
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p class="MsoNormal" style="MARGIN: 0in 0in 0pt; TEXT-INDENT: 0.5in">
          <font face="Times New Roman" color="#000000" size="3">The </font>
          <a href="http://code.msdn.microsoft.com/DBinsor">
            <font face="Times New Roman" color="#800080" size="3">MSDN
Code Gallery</font>
          </a>
          <font face="Times New Roman" color="#000000" size="3"> is finally
setup.<span style="mso-spacerun: yes">  </span>Prior to uploading a code sample,
I would like to make a bit of headway in the documentation process.</font>
        </p>
        <p class="MsoNormal" style="MARGIN: 0in 0in 0pt; TEXT-INDENT: 0.5in">
          <font face="Times New Roman" color="#000000" size="3">Prior to starting this conversation,
I will make the assumption that one has completed the “</font>
          <a href="http://www.castleproject.org/container/gettingstarted/index.html">
            <font face="Times New Roman" color="#800080" size="3">Getting
Started Project</font>
          </a>
          <font face="Times New Roman" color="#000000" size="3">”.<span style="mso-spacerun: yes">  </span>Moreover,
in the </font>
          <a href="http://www.castleproject.org/container/documentation/v1rc3/index.html">
            <font face="Times New Roman" color="#800080" size="3">RC3
Documentation</font>
          </a>
          <font face="Times New Roman" color="#000000" size="3">, I
would recommend reading the “Concepts” and “User Guides” sections. </font>
        </p>
        <p class="MsoNormal" style="MARGIN: 0in 0in 0pt">
          <font color="#000000">
            <font size="3">
              <font face="Times New Roman">
                <span style="mso-tab-count: 1">            </span>Last
week I uploaded a database diagram without much explanation.<span style="mso-spacerun: yes">  </span>I
plan to rectify that shortcoming in this post.<span style="mso-spacerun: yes">  </span>When
perusing the Castle Windsor documentation, the </font>
            </font>
          </font>
          <a href="http://www.castleproject.org/container/documentation/v1rc3/manual/windsorconfigref.html">
            <font face="Times New Roman" color="#800080" size="3">Windsor
configuration reference</font>
          </a>
          <font face="Times New Roman" color="#000000" size="3"> was
extremely helpful in the design of the database.</font>
        </p>
        <p class="MsoNormal" style="MARGIN: 0in 0in 0pt">
          <font color="#000000">
            <font size="3">
              <font face="Times New Roman">
                <span style="mso-tab-count: 1">            </span>Reading
the tags in a top down manner, I decided the “</font>
            </font>
          </font>
          <a href="http://www.castleproject.org/container/documentation/v1rc3/usersguide/includes.html">
            <font face="Times New Roman" color="#800080" size="3">includes
tag</font>
          </a>
          <font face="Times New Roman" color="#000000" size="3">” was not necessary
in a database scenario.<span style="mso-spacerun: yes">  </span>The “</font>
          <a href="http://www.castleproject.org/container/documentation/v1rc3/usersguide/includes.html">
            <font face="Times New Roman" color="#800080" size="3">includes
tag</font>
          </a>
          <font face="Times New Roman" color="#000000" size="3">” is useful when
one does not want to keep all configurations in one file.<span style="mso-spacerun: yes">  </span>However,
since we are keeping all configurations in a centralized database, the use of multiple
configuration files is unnecessary.<span style="mso-spacerun: yes">  </span>Similarly
speaking, “</font>
          <a href="http://www.castleproject.org/container/documentation/v1rc3/usersguide/properties.html">
            <font face="Times New Roman" color="#800080" size="3">global
properties</font>
          </a>
          <font face="Times New Roman" color="#000000" size="3">” are superfluous
because of the database.<span style="mso-spacerun: yes">  </span>However, the
conception of “</font>
          <a href="http://www.castleproject.org/container/documentation/v1rc3/usersguide/properties.html">
            <font face="Times New Roman" color="#800080" size="3">global
properties</font>
          </a>
          <font face="Times New Roman" color="#000000" size="3">” will
be addressed on the database graphical user interface (GUI).</font>
        </p>
        <p class="MsoNormal" style="MARGIN: 0in 0in 0pt">
          <font color="#000000">
            <font size="3">
              <font face="Times New Roman">
                <span style="mso-tab-count: 1">            </span>“</font>
            </font>
          </font>
          <a href="http://www.castleproject.org/container/documentation/v1rc3/advanced/extendingit.html">
            <font face="Times New Roman" color="#800080" size="3">Facilities</font>
          </a>
          <font face="Times New Roman" color="#000000" size="3">”
are very powerful in that they allow one to extend the container.<span style="mso-spacerun: yes">  </span>Nonetheless,
they are out of scope in this preliminary version of D-Binsor.<span style="mso-spacerun: yes">  </span>Similarly,
the concept of “</font>
          <a href="http://www.castleproject.org/container/documentation/v1rc3/usersguide/interceptors.html">
            <font face="Times New Roman" color="#800080" size="3">interceptors</font>
          </a>
          <font face="Times New Roman" color="#000000" size="3">”
will be left for future version of this library.</font>
        </p>
        <p class="MsoNormal" style="MARGIN: 0in 0in 0pt">
          <font color="#000000">
            <font size="3">
              <font face="Times New Roman">
                <span style="mso-tab-count: 1">            </span>The
heart and soul of this configuration file lies in the use of “components” coupled
with “</font>
            </font>
          </font>
          <a href="http://www.castleproject.org/container/documentation/v1rc3/usersguide/compparams.html">
            <font face="Times New Roman" color="#800080" size="3">parameters</font>
          </a>
          <font size="3">
            <font color="#000000">
              <font face="Times New Roman">”.<span style="mso-spacerun: yes">  </span>With
this in mind, the first table I created was the Contracts Table.<span style="mso-spacerun: yes">  </span></font>
            </font>
          </font>
        </p>
        <p class="MsoNormal" style="MARGIN: 0in 0in 0pt; TEXT-INDENT: 0.5in">
          <font face="Times New Roman" color="#000000" size="3">In general, I create a primary
key, “Id”, for all my tables to make table to table relationships easier.<span style="mso-spacerun: yes">  </span>Many
would not name the primary key for each table the same, though I found with LINQ to
SQL to find the unique identifies in the corresponding object is much easier.</font>
        </p>
        <p class="MsoNormal" style="MARGIN: 0in 0in 0pt; TEXT-INDENT: 0.5in">
          <font face="Times New Roman" color="#000000" size="3">In the theme of trying to be
succinct, I will explain the key design choices I made.<span style="mso-spacerun: yes">  </span>My
first large choice was that every implementation must have a contract.<span style="mso-spacerun: yes">  </span>Windsor
does allow for one to register classes which have no associated interface.<span style="mso-spacerun: yes">  </span>However,
I feel that in a large scale SOA systems, where “D-Binsor” will be most useful, there
is very little drawback to interface programming.<span style="mso-spacerun: yes">  </span>Furthermore,
the extensibility benefits from interface programming, for example “</font>
          <a href="http://www.ibm.com/developerworks/library/j-mocktest.html">
            <font face="Times New Roman" color="#800080" size="3">Mocking</font>
          </a>
          <font face="Times New Roman" color="#000000" size="3">”,
are quite compelling.</font>
        </p>
        <p class="MsoNormal" style="MARGIN: 0in 0in 0pt; TEXT-INDENT: 0.5in">
          <font face="Times New Roman" color="#000000" size="3">This decision allows for function
parameters to only be defined on a contract basis.<span style="mso-spacerun: yes">  </span>Thus,
we have concluded the right side of the diagram.<span style="mso-spacerun: yes">  </span>Before
we discuss the left side, one issue with this design is that one could create two
contracts in the same namespace with the same signature and receive no database warning.<span style="mso-spacerun: yes">  </span>Obviously,
that is unacceptable in the programming space [we will have to tackle this problem
in the business layer].</font>
        </p>
        <p class="MsoNormal" style="MARGIN: 0in 0in 0pt; TEXT-INDENT: 0.5in">
          <font size="3">
            <font color="#000000">
              <font face="Times New Roman">
                <b style="mso-bidi-font-weight: normal">One
of the goals, beyond data storage, of a database should be data integrity</b>.<span style="mso-spacerun: yes">  </span>That
is the database should not allow one to enter data which breaks business rules.</font>
            </font>
          </font>
        </p>
        <p class="MsoNormal" style="MARGIN: 0in 0in 0pt; TEXT-INDENT: 0.5in">
          <font face="Times New Roman" color="#000000" size="3">The left side of the diagram
allows one or more castle configuration files to utilize the contract implementation
structure defined above.<span style="mso-spacerun: yes">  </span>Generally, one
would create a new configuration file by adding data to the castle table.<span style="mso-spacerun: yes">  </span>From
there one could register components and component parameters to generate the correct
configuration file.</font>
        </p>
        <p class="MsoNormal" style="MARGIN: 0in 0in 0pt; TEXT-INDENT: 0.5in">
          <font face="Times New Roman" color="#000000" size="3">To reiterate, one of the goals
of a database should be data integrity.<span style="mso-spacerun: yes">  </span>In
that vein, we should utilize non-null foreign key relationships.<span style="mso-spacerun: yes">  </span>For
example, the implementation table must have a non-null contract id.<span style="mso-spacerun: yes">  </span>Moreover,
we should use a unique key when necessary.<span style="mso-spacerun: yes">  </span>Though
it is not visible in the diagram, in the contract parameters table the combination
of the contract id and name fields should be unique.</font>
        </p>
        <p>
        </p>
        <img width="0" height="0" src="http://www.ifinancialsystems.com/aggbug.ashx?id=52a7da2c-38b8-4fc7-a0a2-8f60afa40948" />
        <br />
        <hr />
This weblog is sponsored by <a href="http://www.ifinancialsystems.com">IFinancialSystems</a>. 
</div>
    </content>
  </entry>
  <entry>
    <title>MSDN Code Gallery</title>
    <link rel="alternate" type="text/html" href="http://www.ifinancialsystems.com/2008/04/04/MSDNCodeGallery.aspx" />
    <id>http://www.ifinancialsystems.com/PermaLink,guid,ddccb345-b0e2-47fc-abef-ae89e4d1098d.aspx</id>
    <published>2008-04-04T09:02:18.499125-04:00</published>
    <updated>2008-04-04T09:02:18.499125-04:00</updated>
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p class="MsoNormal" style="MARGIN: 0in 0in 10pt">
          <font face="Calibri" color="#000000" size="3">We have decided to upload the source
code for this project to the </font>
          <a href="http://code.msdn.microsoft.com/DBinsor">
            <font face="Calibri" color="#800080" size="3">MSDN
Code Gallery</font>
          </a>
          <font face="Calibri" color="#000000" size="3">.<span style="mso-spacerun: yes">  </span>The
code gallery site should be functional by April 6<sup>th</sup>, 2008.<span style="mso-spacerun: yes">  </span>If
you have an interest in joining this project please contact me, by email, through
the blog site.</font>
        </p>
        <img width="0" height="0" src="http://www.ifinancialsystems.com/aggbug.ashx?id=ddccb345-b0e2-47fc-abef-ae89e4d1098d" />
        <br />
        <hr />
This weblog is sponsored by <a href="http://www.ifinancialsystems.com">IFinancialSystems</a>. 
</div>
    </content>
  </entry>
  <entry>
    <title>Database Diagram</title>
    <link rel="alternate" type="text/html" href="http://www.ifinancialsystems.com/2008/04/03/DatabaseDiagram.aspx" />
    <id>http://www.ifinancialsystems.com/PermaLink,guid,9cfa0f65-2f6f-4dd7-a8e0-8ee10b031253.aspx</id>
    <published>2008-04-02T22:46:56.572-04:00</published>
    <updated>2008-04-03T23:13:45.8585-04:00</updated>
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
        </p>
        <p class="MsoNormal" style="MARGIN: 0in 0in 0pt">
          <span style="FONT-SIZE: 10pt; COLOR: #003300; FONT-FAMILY: 'Verdana','sans-serif'">Here
is my preliminary table schema.<span style="mso-spacerun: yes">  </span>Tomorrow
we will probe into how my assumptions influenced its design.</span>
        </p>
        <p>
          <img src="http://www.ifinancialsystems.com/content/binary/dbase.GIF" border="0" />
        </p>
        <img width="0" height="0" src="http://www.ifinancialsystems.com/aggbug.ashx?id=9cfa0f65-2f6f-4dd7-a8e0-8ee10b031253" />
        <br />
        <hr />
This weblog is sponsored by <a href="http://www.ifinancialsystems.com">IFinancialSystems</a>. 
</div>
    </content>
  </entry>
  <entry>
    <title>Persistence</title>
    <link rel="alternate" type="text/html" href="http://www.ifinancialsystems.com/2008/04/02/Persistence.aspx" />
    <id>http://www.ifinancialsystems.com/PermaLink,guid,9a858f18-b91f-4b95-bc1b-05548db1598d.aspx</id>
    <published>2008-04-01T23:51:29.53375-04:00</published>
    <updated>2008-04-01T23:51:29.53375-04:00</updated>
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <font size="3">
          <font color="#000000">
            <font face="Times New Roman">
              <span style="mso-spacerun: yes">
                <p class="MsoNormal" style="MARGIN: 0in 0in 0pt">
                  <span style="mso-tab-count: 1">            </span>A
well written program must implore the services of persistence.<span style="mso-spacerun: yes">  </span>Many
would argue not in all cases; I disagree.<span style="mso-spacerun: yes">  </span>I
personally cannot think of a program that would not benefit from a configuration file
instead of hard coding settings.<span style="mso-spacerun: yes">  </span>Yes,
the configuration file is a means of persisting load settings.<span style="mso-spacerun: yes">  </span>Moreover,
event logs are also crucial to find user aborted exceptions.
</p>
                <p class="MsoNormal" style="MARGIN: 0in 0in 0pt">
                  <span style="mso-tab-count: 1">            </span>Though
most would think database, xml file or file system, my view of persistence is anything
that allows continuity between sessions of you application.<span style="mso-spacerun: yes">  </span>Before
I delve deeply into what SQL Express can provide to this application [my next blog
entry], I would like explore the two aforementioned concepts.
</p>
                <p class="MsoNormal" style="MARGIN: 0in 0in 0pt">
                  <span style="mso-tab-count: 1">            </span>First,
one should use an external configuration source to abstract ones code.<span style="mso-spacerun: yes">  </span>The
avoidance of recompilation and deployment provides for agility and stability.<span style="mso-spacerun: yes">  </span>We
will see later how I see Castle Windsor helping in this process.<span style="mso-spacerun: yes">  </span></p>
                <p class="MsoNormal" style="MARGIN: 0in 0in 0pt; TEXT-INDENT: 0.5in">
Second, never swallow exceptions.<span style="mso-spacerun: yes">  </span>By
swallowing exceptions, I mean try catch without alerting the user.<span style="mso-spacerun: yes">  </span>Moreover,
write the exception to the event log; lost exceptions don’t help the debugging process.<span style="mso-spacerun: yes">  </span>In
general one should throw an exception early and cleanly allow for appropriate remedies.<span style="mso-spacerun: yes">  </span>This
is concept best taught by example.
</p>
              </span>
            </font>
          </font>
        </font>
        <img width="0" height="0" src="http://www.ifinancialsystems.com/aggbug.ashx?id=9a858f18-b91f-4b95-bc1b-05548db1598d" />
        <br />
        <hr />
This weblog is sponsored by <a href="http://www.ifinancialsystems.com">IFinancialSystems</a>. 
</div>
    </content>
  </entry>
  <entry>
    <title>To Be Agile?</title>
    <link rel="alternate" type="text/html" href="http://www.ifinancialsystems.com/2008/04/01/ToBeAgile.aspx" />
    <id>http://www.ifinancialsystems.com/PermaLink,guid,b8acb6a9-ac46-43e0-9d4b-45615f973f04.aspx</id>
    <published>2008-03-31T22:05:39.455625-04:00</published>
    <updated>2008-03-31T22:05:39.455625-04:00</updated>
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p class="MsoNormal" style="MARGIN: 0in 0in 0pt">
          <font face="Times New Roman" color="#000000" size="3">There are many takes on the
agile development process: </font>
          <a href="http://members.cox.net/risingl1/Articles/IEEEScrum.pdf">
            <font face="Times New Roman" color="#800080" size="3">SCRUM</font>
          </a>
          <font face="Times New Roman" color="#000000" size="3">, </font>
          <a href="http://www.amazon.com/Test-Driven-Development-Addison-Wesley-Signature/dp/0321146530">
            <font face="Times New Roman" color="#800080" size="3">TDD</font>
          </a>
          <font face="Times New Roman" color="#000000" size="3"> and </font>
          <a href="http://www.extremeprogramming.org/">
            <font face="Times New Roman" color="#800080" size="3">Extreme
Programming</font>
          </a>
          <font face="Times New Roman" color="#000000" size="3"> to name
a few.<span style="mso-spacerun: yes">  </span>One of the most important, in
my estimation, from the </font>
          <a href="http://agilemanifesto.org/principles.html">
            <font face="Times New Roman" color="#800080" size="3">agile
manifesto</font>
          </a>
          <font face="Times New Roman" color="#000000" size="3"> is: “Deliver
working software frequently, from a couple of weeks to a couple of months, with a
preference to the shorter timescale.”</font>
        </p>
        <p class="MsoNormal" style="MARGIN: 0in 0in 0pt">
          <font size="3">
            <font color="#000000">
              <font face="Times New Roman">
                <span style="mso-tab-count: 1">            </span>With
this in mind, my first function is simply to design a database and extract a compatible
IResource for the Castle Windsor Container.<span style="mso-spacerun: yes">  </span>In
actuality this process was quite trivial [a Sunday afternoon] with the new technologies
of .Net 3.5.<span style="mso-spacerun: yes">  </span>Moreover, it will take me
much longer to explain what I did; than actually do it.</font>
            </font>
          </font>
        </p>
        <p class="MsoNormal" style="MARGIN: 0in 0in 0pt">
          <font size="3">
            <font color="#000000">
              <font face="Times New Roman">
                <span style="mso-tab-count: 1">            </span>In
my next post, I will delve into the database design.</font>
            </font>
          </font>
        </p>
        <img width="0" height="0" src="http://www.ifinancialsystems.com/aggbug.ashx?id=b8acb6a9-ac46-43e0-9d4b-45615f973f04" />
        <br />
        <hr />
This weblog is sponsored by <a href="http://www.ifinancialsystems.com">IFinancialSystems</a>. 
</div>
    </content>
  </entry>
  <entry>
    <title>Inversion of Control and Dependency Injection</title>
    <link rel="alternate" type="text/html" href="http://www.ifinancialsystems.com/2008/03/31/InversionOfControlAndDependencyInjection.aspx" />
    <id>http://www.ifinancialsystems.com/PermaLink,guid,89674007-a03b-46a7-b06e-09e8e84d448e.aspx</id>
    <published>2008-03-30T22:55:23.893125-04:00</published>
    <updated>2008-03-30T22:55:23.893125-04:00</updated>
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <font face="Times New Roman" color="#000000" size="3">
          <p class="MsoNormal" style="MARGIN: 0in 0in 0pt">
            These concepts
have been around for quite a few years: from Martin Fowler’s <a href="http://martinfowler.com/articles/injection.html"><font color="#800080">description</font></a> to
this month’s MSDN magazine’s <a href="http://msdn2.microsoft.com/en-us/magazine/cc337885.aspx"><font color="#800080">tutorial</font></a>.<span style="mso-spacerun: yes">  </span>Stefano
Mazzocchi <a href="http://www.betaversion.org/~stefano/linotype/news/38/"><font color="#800080">wrote</font></a>:
“IOC is about enforcing isolation.”<span style="mso-spacerun: yes">  </span>Not
many would argue that the n-tier architecture is a bad thing, however have you ever
tried instantiating one class from the business tier by itself?
</p>
          <p class="MsoNormal" style="MARGIN: 0in 0in 0pt">
            <span style="mso-tab-count: 1">            </span>To
facilitate such a scenario, the idea of dependency injection and containers comes
into play. One example of such a tool for .Net is <a href="http://www.castleproject.org/container/index.html"><font color="#800080">Castle
Windsor</font></a>.<span style="mso-spacerun: yes">  </span>This open source
project allows a user to “<a href="http://en.wikipedia.org/wiki/Separation_of_concerns"><font color="#800080">Separate
Concerns</font></a>” by injecting dependencies through an xml specification.
</p>
          <p class="MsoNormal" style="MARGIN: 0in 0in 0pt">
            <span style="mso-tab-count: 1">            </span>As
with many, I have a love hate relationship with xml configuration files.<span style="mso-spacerun: yes">  </span>For
example, Oren Eini has created <a href="http://www.ayende.com/Blog/archive/7268.aspx"><font color="#800080">Binsor</font></a> to
combat his xml irritations.<span style="mso-spacerun: yes">  </span>My thought
is instead; let us put it in a database. 
</p>
          <p class="MsoNormal" style="MARGIN: 0in 0in 0pt">
            <span style="mso-tab-count: 1">            </span>
            <span style="mso-spacerun: yes"> </span>I
plan to use some new interesting technologies to do this.<span style="mso-spacerun: yes">  </span>The
idea is to use SQL Express with LINQ to SQL to handle the object relational mapping.<span style="mso-spacerun: yes">  </span>Then
I will use LINQ to XML to auto generate an XML document [I could probably bypass the
Xml Interpreter altogether if wanted].<span style="mso-spacerun: yes">  </span>From
there I will use WCF to expose the generated xml as a service.<span style="mso-spacerun: yes">  </span>Once
this is done, we will talk about GUI’s to update the database.
</p>
          <p class="MsoNormal" style="MARGIN: 0in 0in 0pt">
            <span style="mso-tab-count: 1">            </span>So
let’s get started.
</p>
          <p>
          </p>
        </font>
        <img width="0" height="0" src="http://www.ifinancialsystems.com/aggbug.ashx?id=89674007-a03b-46a7-b06e-09e8e84d448e" />
        <br />
        <hr />
This weblog is sponsored by <a href="http://www.ifinancialsystems.com">IFinancialSystems</a>. 
</div>
    </content>
  </entry>
  <entry>
    <title>A Posteriori</title>
    <link rel="alternate" type="text/html" href="http://www.ifinancialsystems.com/2008/03/29/APosteriori.aspx" />
    <id>http://www.ifinancialsystems.com/PermaLink,guid,7d3a6244-45df-408d-801f-156ce9e5174d.aspx</id>
    <published>2008-03-29T13:48:13.643-04:00</published>
    <updated>2008-03-30T21:50:51.486875-04:00</updated>
    <content type="html">&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; TEXT-INDENT: 0.5in"&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;I had a professor in graduate school
who once said that Computer Science, as an educational institution, is backwards.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;Furthermore,
he went on to say that in no other field do professors teach without practical experience.
For example, a professor of trial law would not teach how to cross examine a defendant
if one did not have the corresponding experience.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;Nor
would a professor of surgery explain the procedure of a heart transplant, if one did
not have multiple transplants under one’s belt.&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font size=3&gt;&lt;font color=#000000&gt;&lt;font face="Times New Roman"&gt;&lt;span style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Obviously,
the previous statement is quite general and a bit drastic.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;Nonetheless,
as I interview prospective employees I am very disheartened by their conceptual knowledge
of the field. &lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; TEXT-INDENT: 0.5in"&gt;&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;
&lt;o:p&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; TEXT-INDENT: 0.5in"&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;Out stems a few questions:&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; TEXT-INDENT: 0.5in"&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;How has our industry come to such
a state? &lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; TEXT-INDENT: 0.5in"&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;How can we educate better?&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; TEXT-INDENT: 0.5in"&gt;
&lt;o:p&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; TEXT-INDENT: 0.5in"&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;As a .Net Developer, we are in a
whirlwind of new ideas, technologies and practices.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;Thus,
it is an exciting time as well as a crucial time to educate as we do along.&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; TEXT-INDENT: 0.5in"&gt;
&lt;o:p&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; TEXT-INDENT: 0.5in"&gt;
&lt;font size=3&gt;&lt;font color=#000000&gt;&lt;font face="Times New Roman"&gt;The purpose of my blog
is to educate on ideas, technologies, and practices from my personal experiences.&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.ifinancialsystems.com/aggbug.ashx?id=7d3a6244-45df-408d-801f-156ce9e5174d" /&gt;
&lt;br /&gt;
&lt;hr /&gt;
This weblog is sponsored by &lt;a href="http://www.ifinancialsystems.com"&gt;IFinancialSystems&lt;/a&gt;. </content>
  </entry>
</feed>