<feed xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns="http://www.w3.org/2005/Atom" xml:lang="en-US">
    <title>Mike Nichols - SonOfNun Technology</title>
    <link rel="self" type="application/xml" href="http://geekswithblogs.net/opiesblog/Atom.aspx" />
    <subtitle type="html">If I were the captain on a big steamboat...</subtitle>
    <id>http://geekswithblogs.net/opiesblog/Default.aspx</id>
    <author>
        <name>Mike Nichols</name>
        <uri>http://geekswithblogs.net/opiesblog/Default.aspx</uri>
    </author>
    <generator uri="http://subtextproject.com" version="Subtext Version 0.0.0.0">Subtext</generator>
    <updated>2007-01-08T21:26:17Z</updated>
    <entry>
        <title>No Mo Here</title>
        <link rel="self" type="text/html" href="http://geekswithblogs.net/opiesblog/archive/2007/01/08/103114.aspx" />
        <id>http://geekswithblogs.net/opiesblog/archive/2007/01/08/103114.aspx</id>
        <published>2007-01-08T21:26:00-06:00:00</published>
        <updated>2007-01-08T21:26:00Z</updated>
        <content type="html">No blogs are getting posted here...update feeds to &lt;b&gt;http://blogs.chayachronicles.com/sonofnun/Rss.aspx&lt;/b&gt; or swing by  the site at &lt;b&gt;http://blogs.chayachronicles.com/sonofnun/Default.aspx&lt;/b&gt;.
See you there :)
MIKE
&lt;img src="http://geekswithblogs.net/opiesblog/aggbug/103114.aspx" width="1" height="1" /&gt;</content>
        <wfw:comment>http://geekswithblogs.net/opiesblog/comments/103114.aspx</wfw:comment>
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://geekswithblogs.net/opiesblog/comments/commentRss/103114.aspx</wfw:commentRss>
        <trackback:ping>http://geekswithblogs.net/opiesblog/services/trackbacks/103114.aspx</trackback:ping>
    </entry>
    <entry>
        <title>Moving Day - Feeds, Update Thineselves (both of you)</title>
        <link rel="self" type="text/html" href="http://geekswithblogs.net/opiesblog/archive/2006/10/04/93183.aspx" />
        <id>http://geekswithblogs.net/opiesblog/archive/2006/10/04/93183.aspx</id>
        <published>2006-10-04T11:13:00-05:00:00</published>
        <updated>2006-10-04T11:13:00Z</updated>
        <content type="html">&lt;h2&gt;We've moved&lt;/h2&gt;
&lt;p&gt;New blog found &lt;a href="http://blogs.chayachronicles.com/sonofnun/Default.aspx"&gt;here&lt;/a&gt; at http://blogs.chayachronicles.com/sonofnun/Default.aspx&lt;/p&gt;
&lt;p&gt;RSS is &lt;a href="http://blogs.chayachronicles.com/sonofnun/Rss.aspx"&gt;here&lt;/a&gt; at http://blogs.chayachronicles.com/sonofnun/Rss.aspx&lt;/p&gt;

Thanks to GWB for parking me here for a spell :)

MIKE&lt;img src="http://geekswithblogs.net/opiesblog/aggbug/93183.aspx" width="1" height="1" /&gt;</content>
        <wfw:comment>http://geekswithblogs.net/opiesblog/comments/93183.aspx</wfw:comment>
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://geekswithblogs.net/opiesblog/comments/commentRss/93183.aspx</wfw:commentRss>
        <trackback:ping>http://geekswithblogs.net/opiesblog/services/trackbacks/93183.aspx</trackback:ping>
    </entry>
    <entry>
        <title>When Design Decisions Aren't</title>
        <link rel="self" type="text/html" href="http://geekswithblogs.net/opiesblog/archive/2006/09/30/92819.aspx" />
        <id>http://geekswithblogs.net/opiesblog/archive/2006/09/30/92819.aspx</id>
        <published>2006-09-30T12:29:00-05:00:00</published>
        <updated>2006-09-30T12:29:00Z</updated>
        <content type="html">&lt;p&gt;I've been working exclusively alone on a project for a while and have as much liberty as any developer could hope for. I'm a blessed man. Nonetheless, I have tried to kind of "pretend" like I am working in a team environment that has regimented deadlines. This is mostly due to integrity and partly due to prevention for laziness...how easy is it to constantly be researching solutions without implementing them?&lt;/p&gt;
&lt;p&gt;There was a necessary period of growth in skill sets that had to occur and while I certainly haven't 'arrived' at some point the rubber has to hit the road and instead of striking out to google for an answer first, there must be some confidence on the toolkit that has been developed. A car has to at least be moving before turning the wheels even in the right direction will make any difference. &lt;/p&gt;
&lt;p&gt;So design decisions whether regarding overall architectural structure or about simple object creation aren't strictly design decisions, but are really business decisions. Maintainability is almost at the top of my list for development ; partly because it's just fun to meet the challenge, but also because I work alone and I could be buried with feature requests if I am not careful to write robust, scalable code. Still, this goal has a way of stalling design decisions if you're not careful. &lt;/p&gt;
&lt;p&gt;Realigning my thinking into Test Driven Development has largely stumped this phenomenon. Most importantly because TDD isn't about the tests, but meeting requirements in a iterative, thoughtful way. &lt;/p&gt;
&lt;p&gt;An example of this came up for deciding how I am going to query my DB using NHibernate as my OR/M. Now, I am using an IRepository&lt;T&gt; for controlling access to the NHibernate implementation of data access and this brings along a whole sweet suite (excuse me) of tools that are a snap to use. I need to create Query Objects to get the data I need in my domain, but do I really want to wrap so much that NHibernate already does for you? For example, do I need to wrap every ICriteria implementation with my own custom implementation to avoid the dependency on NHIbernate's API?How far does one take isolating a domain from specific implementation of these tools?&lt;/p&gt;
&lt;p&gt;There seem to be at least three options:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;Have more specific IRepository&amp;lt;T&amp;gt; implementations that expose methods like "GetCustomerByNameAndGender(string name, Gender gender)", perhaps in CustomerRepository:IRepository&amp;lt;Customer&amp;gt;&lt;/li&gt;
&lt;li&gt;Create an Object Query language as I go that accepts calls maybe with fluid interface calls like .Where(PropertyName name) and so on&lt;/li&gt;
&lt;li&gt;Respect the Single Reponsibility Principle and use NHibernate's API within the Domain, but only within query objects.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The first option really just moves the complexity into different area. Maintaining a million little methods really misses out on the joys of Object Oriented thinking where you can treat tasks as things and have adaptable code. The second option is tempting at first, but this is where the business man in me has to speak up and question the wisdom in this route. Do I really want to write a parallel Object Query language just for the sake of independence from an external tool's API? I think this is called "not created here" (or something like that) syndrome, right?&lt;/p&gt;
&lt;p&gt;So, after weighing my options, I very simply refactored my implementations of IQuery&amp;lt;T&amp;gt; to use the rich NHIbernate API and my Domain Entities use these objects that fill a collection of ICriteria objects, IProjection types and so on. MY IRepository&amp;lt;T&amp;gt; accepts any object of type IQuery&amp;lt;T&amp;gt; and returns the results I need. If I ever need to switch to a different OR/M provider I'll have to write implementations of IQuery&amp;lt;T&amp;gt; that speak that ORM's language. Really, if I am making that kind of change to an application, this level of adaption seems acceptable.&lt;/p&gt;
&lt;p&gt;One tool that can keep these changes from affecting my service layer is some kind of Dependency Injection container that gets the appropriate instance for me at runtime. So instead of instantiating IQuery&amp;lt;T&amp;gt; implementations directly from, say, a higher service layer, I can invoke Castle or Structure Map or whatever to get the instance that I configured. These kinds of tools are perfect for these situations. &lt;/p&gt;
&lt;i&gt;OK ...back to coding.&lt;/i&gt;&lt;img src="http://geekswithblogs.net/opiesblog/aggbug/92819.aspx" width="1" height="1" /&gt;</content>
        <wfw:comment>http://geekswithblogs.net/opiesblog/comments/92819.aspx</wfw:comment>
        <slash:comments>3</slash:comments>
        <wfw:commentRss>http://geekswithblogs.net/opiesblog/comments/commentRss/92819.aspx</wfw:commentRss>
        <trackback:ping>http://geekswithblogs.net/opiesblog/services/trackbacks/92819.aspx</trackback:ping>
    </entry>
    <entry>
        <title>Isolating NHibernate Logging</title>
        <link rel="self" type="text/html" href="http://geekswithblogs.net/opiesblog/archive/2006/09/29/92721.aspx" />
        <id>http://geekswithblogs.net/opiesblog/archive/2006/09/29/92721.aspx</id>
        <published>2006-09-29T07:58:00-05:00:00</published>
        <updated>2006-09-29T08:01:00Z</updated>
        <content type="html">&lt;p&gt;I am sure everyone else has already figured this out but thought I'd jot it down here.&lt;/p&gt;
&lt;p&gt; I wanted to isolate all messages being sent from NHibernate to its own logging file. NHibernate has lots to say during its operations and often the messages it delivers are the only way of tracking down some obsure error since sometimes the exception messages in NHibernate are...well, wanting. After poking around the forums and trying out a few methods, here is how I finally split my NHibernate logs from the rest of my application logs. &lt;/p&gt;
&lt;h3&gt;The Configuration&lt;/h3&gt;
&lt;p&gt;For simplicity, say I want just two log text files produced, &lt;b&gt;system.log&lt;/b&gt; and &lt;b&gt;nhibernatelog.log&lt;/b&gt;. Look over the log4net configuration and Ignore the Console and AspNetTraceAppenders below:&lt;/p&gt;
&lt;!--
{\rtf1\ansi\ansicpg\lang1024\noproof65001\uc1 \deff0{\fonttbl{\f0\fnil\fcharset0\fprq1 Tahoma;}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0??;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;??\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;??\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;??\red192\green192\blue192;}??\fs24 \cf2\cb8\highlight8   &amp;lt;\cf13 log4net\cf2 &amp;gt;\par ??    &amp;lt;\cf13 appender\cf2  \cf6 name\cf2 =\cf0 "\cf2 Console\cf0 "\cf2  \cf6 type\cf2 =\cf0 "\cf2 log4net.Appender.ConsoleAppender\cf0 "\cf2 &amp;gt;\par ??      &amp;lt;\cf13 layout\cf2  \cf6 type\cf2 =\cf0 "\cf2 log4net.Layout.PatternLayout\cf0 "\cf2 &amp;gt;\par ??        &amp;lt;!--\cf15  Pattern to output the caller's file name and line number \cf2 --&amp;gt;\par ??        &amp;lt;\cf13 conversionPattern\cf2  \cf6 value\cf2 =\cf0 "\cf2 %5level [%thread] (%file:%line) - %message%newline\cf0 "\cf2 /&amp;gt;\par ??      &amp;lt;/\cf13 layout\cf2 &amp;gt;\par ??    &amp;lt;/\cf13 appender\cf2 &amp;gt;\par ??    &amp;lt;\cf13 appender\cf2  \cf6 name\cf2 =\cf0 "\cf2 AspNetTraceAppender\cf0 "\cf2  \cf6 type\cf2 =\cf0 "\cf2 log4net.Appender.AspNetTraceAppender\cf0 "\cf2 &amp;gt;\par ??      &amp;lt;\cf13 layout\cf2  \cf6 type\cf2 =\cf0 "\cf2 log4net.Layout.PatternLayout\cf0 "\cf2 &amp;gt;\par ??        &amp;lt;\cf13 conversionPattern\cf2  \cf6 value\cf2 =\cf0 "\cf2 %date [%thread] %-5level %logger [%property\{NDC\}] - %message%newline\cf0 "\cf2 /&amp;gt;\par ??      &amp;lt;/\cf13 layout\cf2 &amp;gt;\par ??    &amp;lt;/\cf13 appender\cf2 &amp;gt;\par ??    &amp;lt;\cf13 appender\cf2  \cf6 name\cf2 =\cf0 "\cf2 NHibernateAppender\cf0 "\cf2  \cf6 type\cf2 =\cf0 "\cf2 log4net.Appender.RollingFileAppender\cf0 "\cf2 &amp;gt;\par ??      &amp;lt;\cf13 file\cf2  \cf6 value\cf2 =\cf0 "\cf2 ../../../log/nhibernatelog.log\cf0 "\cf2 /&amp;gt;\par ??      &amp;lt;\cf13 appendToFile\cf2  \cf6 value\cf2 =\cf0 "\cf2 true\cf0 "\cf2 /&amp;gt;\par ??      &amp;lt;\cf13 maximumFileSize\cf2  \cf6 value\cf2 =\cf0 "\cf2 1000KB\cf0 "\cf2 /&amp;gt;\par ??      &amp;lt;\cf13 maxSizeRollBackups\cf2  \cf6 value\cf2 =\cf0 "\cf2 2\cf0 "\cf2 /&amp;gt;\par ??      &amp;lt;\cf13 layout\cf2  \cf6 type\cf2 =\cf0 "\cf2 log4net.Layout.PatternLayout\cf0 "\cf2 &amp;gt;\par ??        &amp;lt;\cf13 conversionPattern\cf2  \cf6 value\cf2 =\cf0 "\cf2 %date %level %thread %logger - %message%newline\cf0 "\cf2 /&amp;gt;\par ??      &amp;lt;/\cf13 layout\cf2 &amp;gt;\par ??    &amp;lt;/\cf13 appender\cf2 &amp;gt;\par ??    &amp;lt;\cf13 appender\cf2  \cf6 name\cf2 =\cf0 "\cf2 SystemAppender\cf0 "\cf2  \cf6 type\cf2 =\cf0 "\cf2 log4net.Appender.RollingFileAppender\cf0 "\cf2 &amp;gt;\par ??      &amp;lt;\cf13 file\cf2  \cf6 value\cf2 =\cf0 "\cf2 ../../../log/system.log\cf0 "\cf2 /&amp;gt;\par ??      &amp;lt;\cf13 appendToFile\cf2  \cf6 value\cf2 =\cf0 "\cf2 true\cf0 "\cf2 /&amp;gt;\par ??      &amp;lt;\cf13 maximumFileSize\cf2  \cf6 value\cf2 =\cf0 "\cf2 1000KB\cf0 "\cf2 /&amp;gt;\par ??      &amp;lt;\cf13 maxSizeRollBackups\cf2  \cf6 value\cf2 =\cf0 "\cf2 2\cf0 "\cf2 /&amp;gt;\par ??      &amp;lt;\cf13 layout\cf2  \cf6 type\cf2 =\cf0 "\cf2 log4net.Layout.PatternLayout\cf0 "\cf2 &amp;gt;\par ??        &amp;lt;\cf13 conversionPattern\cf2  \cf6 value\cf2 =\cf0 "\cf2 %date %level %thread %logger - %message%newline\cf0 "\cf2 /&amp;gt;\par ??      &amp;lt;/\cf13 layout\cf2 &amp;gt;\par ??    &amp;lt;/\cf13 appender\cf2 &amp;gt;\par ??    \par ??    &amp;lt;\cf13 root\cf2 &amp;gt;\par ??      &amp;lt;\cf13 level\cf2  \cf6 value\cf2 =\cf0 "\cf2 ALL\cf0 "\cf2 /&amp;gt;\par ??      &amp;lt;\cf13 appender-ref\cf2  \cf6 ref\cf2 =\cf0 "\cf2 AspNetTraceAppender\cf0 "\cf2 /&amp;gt;\par ??      &amp;lt;\cf13 appender-ref\cf2  \cf6 ref\cf2 =\cf0 "\cf2 Console\cf0 "\cf2 /&amp;gt;\par ??    &amp;lt;/\cf13 root\cf2 &amp;gt;\par ??\par ??    &amp;lt;\cf13 logger\cf2  \cf6 name\cf2 =\cf0 "\cf2 NHibernate\cf0 "\cf2 &amp;gt;\par ??      &amp;lt;\cf13 level\cf2  \cf6 value\cf2 =\cf0 "\cf2 ERROR\cf0 "\cf2  /&amp;gt;\par ??      &amp;lt;\cf13 appender-ref\cf2  \cf6 ref\cf2 =\cf0 "\cf2 NHibernateAppender\cf0 "\cf2 /&amp;gt;\par ??    &amp;lt;/\cf13 logger\cf2 &amp;gt;\par ??    &amp;lt;\cf13 logger\cf2  \cf6 name\cf2 =\cf0 "\cf2 NHibernate.Loader.Loader\cf0 "\cf2 &amp;gt;\par ??      &amp;lt;\cf13 level\cf2  \cf6 value\cf2 =\cf0 "\cf2 INFO\cf0 "\cf2  /&amp;gt;\par ??      &amp;lt;\cf13 appender-ref\cf2  \cf6 ref\cf2 =\cf0 "\cf2 NHibernateAppender\cf0 "\cf2 /&amp;gt;\par ??    &amp;lt;/\cf13 logger\cf2 &amp;gt;\par ??    &amp;lt;\cf13 logger\cf2  \cf6 name\cf2 =\cf0 "\cf2 System\cf0 "\cf2 &amp;gt;\par ??      &amp;lt;\cf13 level\cf2  \cf6 value\cf2 =\cf0 "\cf2 ALL\cf0 "\cf2  /&amp;gt;\par ??      &amp;lt;\cf13 appender-ref\cf2  \cf6 ref\cf2 =\cf0 "\cf2 SystemAppender\cf0 "\cf2 /&amp;gt;\par ??    &amp;lt;/\cf13 logger\cf2 &amp;gt;\par ??\par ??  &amp;lt;/\cf13 log4net\cf2 &amp;gt;}
--&gt;
&lt;div style="font-family: Tahoma; font-size: 12pt; color: black; background: #e2e2e2;"&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="color: maroon; background: white; background-color:Transparent;"&gt;log4net&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;nbsp; &amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="color: maroon; background: white; background-color:Transparent;"&gt;appender&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt; &lt;/span&gt;&lt;span style="color: red; background: white; background-color:Transparent;"&gt;name&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;=&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;Console&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt; &lt;/span&gt;&lt;span style="color: red; background: white; background-color:Transparent;"&gt;type&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;=&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;log4net.Appender.ConsoleAppender&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="color: maroon; background: white; background-color:Transparent;"&gt;layout&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt; &lt;/span&gt;&lt;span style="color: red; background: white; background-color:Transparent;"&gt;type&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;=&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;log4net.Layout.PatternLayout&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;!--&lt;/span&gt;&lt;span style="color: gray; background: white; background-color:Transparent;"&gt; Pattern to output the caller's file name and line number &lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;--&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="color: maroon; background: white; background-color:Transparent;"&gt;conversionPattern&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt; &lt;/span&gt;&lt;span style="color: red; background: white; background-color:Transparent;"&gt;value&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;=&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;%5level [%thread] (%file:%line) - %message%newline&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;/&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/&lt;/span&gt;&lt;span style="color: maroon; background: white; background-color:Transparent;"&gt;layout&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;nbsp; &amp;nbsp; &amp;lt;/&lt;/span&gt;&lt;span style="color: maroon; background: white; background-color:Transparent;"&gt;appender&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;nbsp; &amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="color: maroon; background: white; background-color:Transparent;"&gt;appender&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt; &lt;/span&gt;&lt;span style="color: red; background: white; background-color:Transparent;"&gt;name&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;=&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;AspNetTraceAppender&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt; &lt;/span&gt;&lt;span style="color: red; background: white; background-color:Transparent;"&gt;type&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;=&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;log4net.Appender.AspNetTraceAppender&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="color: maroon; background: white; background-color:Transparent;"&gt;layout&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt; &lt;/span&gt;&lt;span style="color: red; background: white; background-color:Transparent;"&gt;type&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;=&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;log4net.Layout.PatternLayout&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="color: maroon; background: white; background-color:Transparent;"&gt;conversionPattern&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt; &lt;/span&gt;&lt;span style="color: red; background: white; background-color:Transparent;"&gt;value&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;=&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;%date [%thread] %-5level %logger [%property{NDC}] - %message%newline&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;/&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/&lt;/span&gt;&lt;span style="color: maroon; background: white; background-color:Transparent;"&gt;layout&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;nbsp; &amp;nbsp; &amp;lt;/&lt;/span&gt;&lt;span style="color: maroon; background: white; background-color:Transparent;"&gt;appender&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;nbsp; &amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="color: maroon; background: white; background-color:Transparent;"&gt;appender&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt; &lt;/span&gt;&lt;span style="color: red; background: white; background-color:Transparent;"&gt;name&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;=&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;NHibernateAppender&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt; &lt;/span&gt;&lt;span style="color: red; background: white; background-color:Transparent;"&gt;type&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;=&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;log4net.Appender.RollingFileAppender&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="color: maroon; background: white; background-color:Transparent;"&gt;file&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt; &lt;/span&gt;&lt;span style="color: red; background: white; background-color:Transparent;"&gt;value&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;=&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;../../../log/nhibernatelog.log&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;/&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="color: maroon; background: white; background-color:Transparent;"&gt;appendToFile&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt; &lt;/span&gt;&lt;span style="color: red; background: white; background-color:Transparent;"&gt;value&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;=&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;true&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;/&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="color: maroon; background: white; background-color:Transparent;"&gt;maximumFileSize&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt; &lt;/span&gt;&lt;span style="color: red; background: white; background-color:Transparent;"&gt;value&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;=&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;1000KB&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;/&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="color: maroon; background: white; background-color:Transparent;"&gt;maxSizeRollBackups&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt; &lt;/span&gt;&lt;span style="color: red; background: white; background-color:Transparent;"&gt;value&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;=&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;2&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;/&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="color: maroon; background: white; background-color:Transparent;"&gt;layout&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt; &lt;/span&gt;&lt;span style="color: red; background: white; background-color:Transparent;"&gt;type&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;=&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;log4net.Layout.PatternLayout&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="color: maroon; background: white; background-color:Transparent;"&gt;conversionPattern&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt; &lt;/span&gt;&lt;span style="color: red; background: white; background-color:Transparent;"&gt;value&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;=&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;%date %level %thread %logger - %message%newline&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;/&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/&lt;/span&gt;&lt;span style="color: maroon; background: white; background-color:Transparent;"&gt;layout&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;nbsp; &amp;nbsp; &amp;lt;/&lt;/span&gt;&lt;span style="color: maroon; background: white; background-color:Transparent;"&gt;appender&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;nbsp; &amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="color: maroon; background: white; background-color:Transparent;"&gt;appender&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt; &lt;/span&gt;&lt;span style="color: red; background: white; background-color:Transparent;"&gt;name&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;=&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;SystemAppender&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt; &lt;/span&gt;&lt;span style="color: red; background: white; background-color:Transparent;"&gt;type&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;=&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;log4net.Appender.RollingFileAppender&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="color: maroon; background: white; background-color:Transparent;"&gt;file&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt; &lt;/span&gt;&lt;span style="color: red; background: white; background-color:Transparent;"&gt;value&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;=&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;../../../log/system.log&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;/&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="color: maroon; background: white; background-color:Transparent;"&gt;appendToFile&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt; &lt;/span&gt;&lt;span style="color: red; background: white; background-color:Transparent;"&gt;value&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;=&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;true&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;/&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="color: maroon; background: white; background-color:Transparent;"&gt;maximumFileSize&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt; &lt;/span&gt;&lt;span style="color: red; background: white; background-color:Transparent;"&gt;value&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;=&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;1000KB&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;/&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="color: maroon; background: white; background-color:Transparent;"&gt;maxSizeRollBackups&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt; &lt;/span&gt;&lt;span style="color: red; background: white; background-color:Transparent;"&gt;value&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;=&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;2&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;/&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="color: maroon; background: white; background-color:Transparent;"&gt;layout&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt; &lt;/span&gt;&lt;span style="color: red; background: white; background-color:Transparent;"&gt;type&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;=&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;log4net.Layout.PatternLayout&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="color: maroon; background: white; background-color:Transparent;"&gt;conversionPattern&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt; &lt;/span&gt;&lt;span style="color: red; background: white; background-color:Transparent;"&gt;value&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;=&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;%date %level %thread %logger - %message%newline&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;/&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/&lt;/span&gt;&lt;span style="color: maroon; background: white; background-color:Transparent;"&gt;layout&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;nbsp; &amp;nbsp; &amp;lt;/&lt;/span&gt;&lt;span style="color: maroon; background: white; background-color:Transparent;"&gt;appender&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;nbsp; &amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="color: maroon; background: white; background-color:Transparent;"&gt;root&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="color: maroon; background: white; background-color:Transparent;"&gt;level&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt; &lt;/span&gt;&lt;span style="color: red; background: white; background-color:Transparent;"&gt;value&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;=&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;ALL&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;/&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="color: maroon; background: white; background-color:Transparent;"&gt;appender-ref&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt; &lt;/span&gt;&lt;span style="color: red; background: white; background-color:Transparent;"&gt;ref&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;=&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;AspNetTraceAppender&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;/&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="color: maroon; background: white; background-color:Transparent;"&gt;appender-ref&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt; &lt;/span&gt;&lt;span style="color: red; background: white; background-color:Transparent;"&gt;ref&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;=&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;Console&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;/&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;nbsp; &amp;nbsp; &amp;lt;/&lt;/span&gt;&lt;span style="color: maroon; background: white; background-color:Transparent;"&gt;root&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;nbsp; &amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="color: maroon; background: white; background-color:Transparent;"&gt;logger&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt; &lt;/span&gt;&lt;span style="color: red; background: white; background-color:Transparent;"&gt;name&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;=&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;NHibernate&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="color: maroon; background: white; background-color:Transparent;"&gt;level&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt; &lt;/span&gt;&lt;span style="color: red; background: white; background-color:Transparent;"&gt;value&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;=&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;ERROR&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt; /&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="color: maroon; background: white; background-color:Transparent;"&gt;appender-ref&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt; &lt;/span&gt;&lt;span style="color: red; background: white; background-color:Transparent;"&gt;ref&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;=&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;NHibernateAppender&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;/&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;nbsp; &amp;nbsp; &amp;lt;/&lt;/span&gt;&lt;span style="color: maroon; background: white; background-color:Transparent;"&gt;logger&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;nbsp; &amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="color: maroon; background: white; background-color:Transparent;"&gt;logger&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt; &lt;/span&gt;&lt;span style="color: red; background: white; background-color:Transparent;"&gt;name&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;=&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;NHibernate.Loader.Loader&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="color: maroon; background: white; background-color:Transparent;"&gt;level&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt; &lt;/span&gt;&lt;span style="color: red; background: white; background-color:Transparent;"&gt;value&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;=&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;INFO&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt; /&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="color: maroon; background: white; background-color:Transparent;"&gt;appender-ref&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt; &lt;/span&gt;&lt;span style="color: red; background: white; background-color:Transparent;"&gt;ref&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;=&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;NHibernateAppender&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;/&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;nbsp; &amp;nbsp; &amp;lt;/&lt;/span&gt;&lt;span style="color: maroon; background: white; background-color:Transparent;"&gt;logger&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;nbsp; &amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="color: maroon; background: white; background-color:Transparent;"&gt;logger&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt; &lt;/span&gt;&lt;span style="color: red; background: white; background-color:Transparent;"&gt;name&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;=&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;System&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="color: maroon; background: white; background-color:Transparent;"&gt;level&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt; &lt;/span&gt;&lt;span style="color: red; background: white; background-color:Transparent;"&gt;value&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;=&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;ALL&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt; /&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="color: maroon; background: white; background-color:Transparent;"&gt;appender-ref&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt; &lt;/span&gt;&lt;span style="color: red; background: white; background-color:Transparent;"&gt;ref&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;=&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;SystemAppender&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;/&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;nbsp; &amp;nbsp; &amp;lt;/&lt;/span&gt;&lt;span style="color: maroon; background: white; background-color:Transparent;"&gt;logger&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;nbsp; &amp;lt;/&lt;/span&gt;&lt;span style="color: maroon; background: white; background-color:Transparent;"&gt;log4net&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;

&lt;p&gt;The primary points of interest are:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;I do not have my SystemAppender or my NHibernateAppender inside the &amp;lt;root /&amp;gt; element. Doing so resulted in duplicate entries&lt;/li&gt;
&lt;li&gt;The 'name' attribute on the &amp;lt;logger/&amp;gt; element is important. Take note.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;Start 'er up&lt;/h3&gt;
&lt;p&gt;To get things wired up when the application starts, add this to your global.asax in the Application_Start section:&lt;/p&gt;
&lt;!--
{\rtf1\ansi\ansicpg\lang1024\noproof1252\uc1 \deff0{\fonttbl{\f0\fnil\fcharset0\fprq1 Tahoma;}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0??;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;??\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;??\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;??\red192\green192\blue192;}??\fs24 \cb8\highlight8             log4net.Config.\cf10 XmlConfigurator\cf0 .Configure();\par ??}
--&gt;
&lt;div style="font-family: Tahoma; font-size: 12pt; color: black; background: #e2e2e2;"&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="background: white; background-color:Transparent;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; log4net.Config.&lt;/span&gt;&lt;span style="color: teal; background: white; background-color:Transparent;"&gt;XmlConfigurator&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;.Configure();&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;

&lt;h3&gt;Logging to 'system.log'&lt;/h3&gt;
&lt;p&gt;To get a reference to my 'system' logger, i just have to use the following:&lt;/p&gt;
&lt;!--
{\rtf1\ansi\ansicpg\lang1024\noproof1252\uc1 \deff0{\fonttbl{\f0\fnil\fcharset0\fprq1 Tahoma;}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0??;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;??\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;??\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;??\red192\green192\blue192;}??\fs24 \cb8\highlight8         \cf2 static\cf0  \cf10 ILog\cf0  logger = \cf10 LogManager\cf0 .GetLogger(\cf13 "System"\cf0 );\par ??}
--&gt;
&lt;div style="font-family: Tahoma; font-size: 12pt; color: black; background: #e2e2e2;"&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="background: white; background-color:Transparent;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;static&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt; &lt;/span&gt;&lt;span style="color: teal; background: white; background-color:Transparent;"&gt;ILog&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt; logger = &lt;/span&gt;&lt;span style="color: teal; background: white; background-color:Transparent;"&gt;LogManager&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;.GetLogger(&lt;/span&gt;&lt;span style="color: maroon; background: white; background-color:Transparent;"&gt;"System"&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;);&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;Notice that I am referencing the logger by its name ("System") in the &amp;lt;logger/&amp;gt; section above. Then to write out to the file, just this:&lt;/p&gt;
&lt;!--
{\rtf1\ansi\ansicpg\lang1024\noproof1252\uc1 \deff0{\fonttbl{\f0\fnil\fcharset0\fprq1 Tahoma;}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0??;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;??\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;??\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;??\red192\green192\blue192;}??\fs24 \cb8\highlight8             logger.Debug(\cf13 "Starting Unit Of Work For Request"\cf0 );\par ??}
--&gt;
&lt;div style="font-family: Tahoma; font-size: 12pt; color: black; background: #e2e2e2;"&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="background: white; background-color:Transparent;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; logger.Debug(&lt;/span&gt;&lt;span style="color: maroon; background: white; background-color:Transparent;"&gt;"Writing Debug Message"&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;);&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;

&lt;h3&gt;Logging to 'nhibernate.log'&lt;/h3&gt;
&lt;p&gt;The important thing to understand about controlling logging for NHibernate is that it writes using the following call:&lt;/p&gt;
&lt;p&gt;&lt;b&gt;LogManager.GetLogger( Type or string )&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;Check out &lt;a href="http://forum.hibernate.org/viewtopic.php?t=952087&amp;highlight=logger"&gt;this forum post&lt;/a&gt; for an explanation of the implications. I snagged the 'logger' setup from this post.&lt;/p&gt;
&lt;p&gt;What this means is that the &amp;lt;logger/&amp;gt; element in the configuration will need to have its 'name' set to 'NHibernate' since that is how it is called...any other name NHibernate just won't recognize and logging won't happen. &lt;/p&gt;
&lt;p&gt;Note, too , that the configuration above is only logging the SQL (NHibernate.Loader.Loader) sent to the DB and error messages. This helps sift out the rif-raf that I am not real interested in usually. &lt;/p&gt;

&lt;p&gt;Once these have been all set up I was successfully logging to the right file. Here are the posts that helped me:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href="http://wiki.nhibernate.org/display/NH/Configuring+log4net+Logging"&gt;General log4net configuration with NHibernate&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://forum.hibernate.org/viewtopic.php?t=952087&amp;highlight=logger"&gt;Seperating loggers and how NHibernate logs&lt;/a&gt;&lt;/li&gt;
&lt;ul&gt;

&lt;i&gt;I Hope this helps another NHibernator!&lt;/i&gt;





&lt;img src="http://geekswithblogs.net/opiesblog/aggbug/92721.aspx" width="1" height="1" /&gt;</content>
        <wfw:comment>http://geekswithblogs.net/opiesblog/comments/92721.aspx</wfw:comment>
        <slash:comments>3</slash:comments>
        <wfw:commentRss>http://geekswithblogs.net/opiesblog/comments/commentRss/92721.aspx</wfw:commentRss>
        <trackback:ping>http://geekswithblogs.net/opiesblog/services/trackbacks/92721.aspx</trackback:ping>
    </entry>
    <entry>
        <title>NHibernate Class Mapping With Generic Parameters</title>
        <link rel="self" type="text/html" href="http://geekswithblogs.net/opiesblog/archive/2006/09/24/92220.aspx" />
        <id>http://geekswithblogs.net/opiesblog/archive/2006/09/24/92220.aspx</id>
        <published>2006-09-24T20:36:00-05:00:00</published>
        <updated>2006-09-24T20:36:00Z</updated>
        <content type="html">&lt;p&gt;I needed to implement a component that uses generic parameters. Documentation is sketchy on NHibernate so thot I'd jot it here. I *stole* an IRange&lt;T&gt; implementation from &lt;b&gt;someone&lt;/b&gt; and needed to use it for a date range within a class. &lt;/p&gt;
&lt;!--
{\rtf1\ansi\ansicpg\lang1024\noproof65001\uc1 \deff0{\fonttbl{\f0\fnil\fcharset0\fprq1 ProggyClean;}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0??;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;??\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;??\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;??\red192\green192\blue192;}??\fs24 \cf2\cb8\highlight8     &amp;lt;\cf13 component\cf2  \cf6 name\cf2 =\cf0 "\cf2 DateTimeRange\cf0 "\cf2  \cf6 class\cf2 =\cf0 "\cf2 Cei.eMerge.Common.Range`1[System.DateTime], Cei.eMerge.Common\cf0 "\cf2  \cf6 access\cf2 =\cf0 "\cf2 field.camelcase-underscore\cf0 "\cf2  &amp;gt;\par ??      &amp;lt;\cf13 property\cf2  \cf6 name\cf2 =\cf0 "\cf2 Start\cf0 "\cf2  \cf6 access\cf2 =\cf0 "\cf2 field.camelcase\cf0 "\cf2 &amp;gt;\par ??        &amp;lt;\cf13 column\cf2  \cf6 name\cf2 =\cf0 "\cf2 StartDate\cf0 "\cf2  \cf6 not-null\cf2 =\cf0 "\cf2 true\cf0 "\cf2  /&amp;gt;\par ??      &amp;lt;/\cf13 property\cf2 &amp;gt;\par ??      &amp;lt;\cf13 property\cf2  \cf6 name\cf2 =\cf0 "\cf2 End\cf0 "\cf2  \cf6 access\cf2 =\cf0 "\cf2 field.camelcase\cf0 "\cf2 &amp;gt;\par ??        &amp;lt;\cf13 column\cf2  \cf6 name\cf2 =\cf0 "\cf2 EndDate\cf0 "\cf2  \cf6 not-null\cf2 =\cf0 "\cf2 true\cf0 "\cf2 /&amp;gt;\par ??      &amp;lt;/\cf13 property\cf2 &amp;gt;\par ??    &amp;lt;/\cf13 component\cf2 &amp;gt;\par ??}
--&gt;
&lt;div style="font-family: ProggyClean; font-size: 12pt; color: black; background: #e2e2e2;"&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;nbsp; &amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="color: maroon; background: white; background-color:Transparent;"&gt;component&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt; &lt;/span&gt;&lt;span style="color: red; background: white; background-color:Transparent;"&gt;name&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;=&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;DateTimeRange&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt; &lt;/span&gt;&lt;span style="color: red; background: white; background-color:Transparent;"&gt;class&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;=&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;Cei.eMerge.Common.Range`1[System.DateTime], Cei.eMerge.Common&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt; &lt;/span&gt;&lt;span style="color: red; background: white; background-color:Transparent;"&gt;access&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;=&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;field.camelcase-underscore&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt; &amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="color: maroon; background: white; background-color:Transparent;"&gt;property&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt; &lt;/span&gt;&lt;span style="color: red; background: white; background-color:Transparent;"&gt;name&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;=&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;Start&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt; &lt;/span&gt;&lt;span style="color: red; background: white; background-color:Transparent;"&gt;access&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;=&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;field.camelcase&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="color: maroon; background: white; background-color:Transparent;"&gt;column&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt; &lt;/span&gt;&lt;span style="color: red; background: white; background-color:Transparent;"&gt;name&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;=&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;StartDate&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt; &lt;/span&gt;&lt;span style="color: red; background: white; background-color:Transparent;"&gt;not-null&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;=&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;true&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt; /&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/&lt;/span&gt;&lt;span style="color: maroon; background: white; background-color:Transparent;"&gt;property&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="color: maroon; background: white; background-color:Transparent;"&gt;property&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt; &lt;/span&gt;&lt;span style="color: red; background: white; background-color:Transparent;"&gt;name&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;=&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;End&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt; &lt;/span&gt;&lt;span style="color: red; background: white; background-color:Transparent;"&gt;access&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;=&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;field.camelcase&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style="color: maroon; background: white; background-color:Transparent;"&gt;column&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt; &lt;/span&gt;&lt;span style="color: red; background: white; background-color:Transparent;"&gt;name&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;=&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;EndDate&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt; &lt;/span&gt;&lt;span style="color: red; background: white; background-color:Transparent;"&gt;not-null&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;=&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;true&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;"&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;/&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/&lt;/span&gt;&lt;span style="color: maroon; background: white; background-color:Transparent;"&gt;property&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;nbsp; &amp;nbsp; &amp;lt;/&lt;/span&gt;&lt;span style="color: maroon; background: white; background-color:Transparent;"&gt;component&lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;

&lt;p&gt;Note the &lt;b&gt;`[genericTypeParameter]&lt;/b&gt; syntax. Here's how we map it. Be sure you have a default constructor! The exceptions thrown by NOT having a default constructor are riddles at best. &lt;/p&gt;
&lt;img src="http://geekswithblogs.net/opiesblog/aggbug/92220.aspx" width="1" height="1" /&gt;</content>
        <wfw:comment>http://geekswithblogs.net/opiesblog/comments/92220.aspx</wfw:comment>
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://geekswithblogs.net/opiesblog/comments/commentRss/92220.aspx</wfw:commentRss>
        <trackback:ping>http://geekswithblogs.net/opiesblog/services/trackbacks/92220.aspx</trackback:ping>
    </entry>
    <entry>
        <title>NHibernate Parameters and Escaping Special Characters in HQL</title>
        <link rel="self" type="text/html" href="http://geekswithblogs.net/opiesblog/archive/2006/09/19/91635.aspx" />
        <id>http://geekswithblogs.net/opiesblog/archive/2006/09/19/91635.aspx</id>
        <published>2006-09-19T11:48:00-05:00:00</published>
        <updated>2006-09-19T11:50:00Z</updated>
        <content type="html">&lt;p&gt;I am sure I everyone else knows this by now, but I wanted to jot a note. When you are passing strings to an HQL query, it's best practice to assign those strings to a parameter (named or positional) and let HQL escape the special characters for you. So it would look like this when searching by a Name and Distinction tag on an Entity:&lt;/p&gt;
&lt;!--
{\rtf1\ansi\ansicpg\lang1024\noproof1252\uc1 \deff0{\fonttbl{\f0\fnil\fcharset0\fprq1 ProggyClean;}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0??;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;??\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;??\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;??\red192\green192\blue192;}??\fs24 \cb8\highlight8             \cf10 StringBuilder\cf0  queryString = \cf2 new\cf0  \cf10 StringBuilder\cf0 ();\par ??            \par ??            queryString.Append(\cf13 "from Entity e where e.Name= :name AND "\cf0 );\par ??            queryString.Append(\cf13 "e.DistinctionTag = :distinctionTag "\cf0 );\par ??\par ??            \cf2 try\par ??\cf0             \{\par ??                query.Match = Session.CreateQuery(queryString.ToString()).SetString(\cf13 "name"\cf0 ,query.Name)\par ??                                  .SetString(\cf13 "distinctionTag"\cf0 ,query.DistinctionTag).UniqueResult() \cf2 as\cf0  \cf10 IEntity\cf0 ;\par ??            \}\par ??            \cf2 catch\cf0  (\cf10 NonUniqueResultException\cf0 )\par ??            \{\par ??                query.Match = \cf2 new\cf0  \cf10 NullEntity\cf0 ();\par ??            \}\par ??            \cf2 return\cf0  query.Match;\par ??}
--&gt;
&lt;div style="font-family: ProggyClean; font-size: 12pt; color: black; background: #e2e2e2;"&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="background: white; background-color:Transparent;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: teal; background: white; background-color:Transparent;"&gt;StringBuilder&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt; queryString = &lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;new&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt; &lt;/span&gt;&lt;span style="color: teal; background: white; background-color:Transparent;"&gt;StringBuilder&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;();&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="background: white; background-color:Transparent;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; queryString.Append(&lt;/span&gt;&lt;span style="color: maroon; background: white; background-color:Transparent;"&gt;"from Entity e where e.Name= :name AND "&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;);&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="background: white; background-color:Transparent;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; queryString.Append(&lt;/span&gt;&lt;span style="color: maroon; background: white; background-color:Transparent;"&gt;"e.DistinctionTag = :distinctionTag "&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;);&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="background: white; background-color:Transparent;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;try&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="background: white; background-color:Transparent;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="background: white; background-color:Transparent;"&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; query.Match = Session.CreateQuery(queryString.ToString()).SetString(&lt;/span&gt;&lt;span style="color: maroon; background: white; background-color:Transparent;"&gt;"name"&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;,query.Name)&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="background: white; background-color:Transparent;"&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; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; .SetString(&lt;/span&gt;&lt;span style="color: maroon; background: white; background-color:Transparent;"&gt;"distinctionTag"&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;,query.DistinctionTag).UniqueResult() &lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;as&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt; &lt;/span&gt;&lt;span style="color: teal; background: white; background-color:Transparent;"&gt;IEntity&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="background: white; background-color:Transparent;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="background: white; background-color:Transparent;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;catch&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt; (&lt;/span&gt;&lt;span style="color: teal; background: white; background-color:Transparent;"&gt;NonUniqueResultException&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;)&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="background: white; background-color:Transparent;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="background: white; background-color:Transparent;"&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; query.Match = &lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;new&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt; &lt;/span&gt;&lt;span style="color: teal; background: white; background-color:Transparent;"&gt;NullEntity&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt;();&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="background: white; background-color:Transparent;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px; background-color:Transparent;"&gt;&lt;span style="background: white; background-color:Transparent;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; background: white; background-color:Transparent;"&gt;return&lt;/span&gt;&lt;span style="background: white; background-color:Transparent;"&gt; query.Match;&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;



&lt;p&gt;The call to .SetString() is where we assign our parameters to our string values. This works for matching Custom Classes and even Custom Type Properties as well. Sweet.&lt;/p&gt;
&lt;h5&gt;Further Info&lt;/h5&gt;
&lt;ul&gt;&lt;li&gt;&lt;i&gt;Hibernate in Action&lt;/i&gt; pp. 245-247&lt;/li&gt;&lt;/ulul&gt;&lt;img src="http://geekswithblogs.net/opiesblog/aggbug/91635.aspx" width="1" height="1" /&gt;</content>
        <wfw:comment>http://geekswithblogs.net/opiesblog/comments/91635.aspx</wfw:comment>
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://geekswithblogs.net/opiesblog/comments/commentRss/91635.aspx</wfw:commentRss>
        <trackback:ping>http://geekswithblogs.net/opiesblog/services/trackbacks/91635.aspx</trackback:ping>
    </entry>
    <entry>
        <title>Patterns, voicings, and rudiments</title>
        <link rel="self" type="text/html" href="http://geekswithblogs.net/opiesblog/archive/2006/09/14/91224.aspx" />
        <id>http://geekswithblogs.net/opiesblog/archive/2006/09/14/91224.aspx</id>
        <published>2006-09-14T16:40:00-05:00:00</published>
        <updated>2006-09-14T16:40:00Z</updated>
        <content type="html">&lt;p&gt;For the first 14 years of my professional life, I was a touring musician with a Master's in Music Performance in percussion. By the grace of God, I've been moved along into a fun profession of Software Development. For the most, I've been a lone ranger and have had to learn everything on my own, which is fine since I enjoy problem solving. As I've matured (ok..I am still in Beta :)) in my 'skills' - not the numbchuck kind - I've seen many parallels to music composition/arrangement and development. This isn't a new idea I know, but one struck me tonight.&lt;/p&gt;
&lt;p&gt; I needed to add a new field to distinguish records on an object. Now, in the past I'd add the field int the Db and then have to think about ALL THE PLACES I HAVE TO ADD IT and any functionality to accomodate it. This simple requirement COULD break my whole dang domain if I had built spaghetti code. However, as I've built my domain, certain styles and patterns have emerged that let me ALMOST be mindless in solving problems like these. Since I had implemented solutions using certain software patterns, I could simply look into the domain and let IT tell me how to code. Kind of a pattern-of-patterns thing. &lt;/p&gt;
&lt;p&gt; A parallel to this in jazz piano is voicings on a keyboard. Pianists like Bill Evans, McCoy Tyner (tho I shudder to put them in the same sentence), Red Garland and so on voiced chords in their unique way, but did so usually from a common way of thinking about how a chord SHOULD be voiced. Voicings, by the way, are the notes you select to play a type of chord...so McCoy might leave the third  out to get a kind of earthy sound, but Evans might add upper partials to a chord to give more of a shimmer. The point is, IT'S THE SAME CHORD but they have a bag of tricks to drawn on so they don't have to freak out everytime a new chord comes along. &lt;/p&gt;
&lt;p&gt;Patterns in software are like that I think and actually make the process of development more fun. Not because you can use fancy terms .. they are just ways to solve problems. But in the end, I feel like I have expressed something in a way I WANTED to express it, as opposed to throwing datasets all over the place and then feeling lucky that I just got the data back and forth to the user. &lt;/p&gt;&lt;img src="http://geekswithblogs.net/opiesblog/aggbug/91224.aspx" width="1" height="1" /&gt;</content>
        <wfw:comment>http://geekswithblogs.net/opiesblog/comments/91224.aspx</wfw:comment>
        <slash:comments>2</slash:comments>
        <wfw:commentRss>http://geekswithblogs.net/opiesblog/comments/commentRss/91224.aspx</wfw:commentRss>
        <trackback:ping>http://geekswithblogs.net/opiesblog/services/trackbacks/91224.aspx</trackback:ping>
    </entry>
    <entry>
        <title>Builds that make my eyes bleed and the assemblies that cause them</title>
        <link rel="self" type="text/html" href="http://geekswithblogs.net/opiesblog/archive/2006/09/13/91092.aspx" />
        <id>http://geekswithblogs.net/opiesblog/archive/2006/09/13/91092.aspx</id>
        <published>2006-09-13T09:16:00-05:00:00</published>
        <updated>2006-09-13T09:16:00Z</updated>
        <content type="html">&lt;p&gt;Lately, my ASP.NET 2.0 app has been taking so long to build I have been going crazy. I came across this post at &lt;a href="http://weblogs.asp.net/scottgu/archive/2006/07/30/Common-Gotcha_3A00_-Slow-VS-2005-Web-Site-Build-Performance-Because-of-_1C20_Dueling-Assembly-References_1D20_.aspx"&gt;ScottGu's&lt;/a&gt; blog that had a possible cause for suddenly long build times. I have about 20 projects, but it's hardly a massive site. &lt;/p&gt;
&lt;p&gt;I had some problems that I just kind of put up with a while ago where an older version of Iesi.Collections.dll would appear in my /bin folder of my web root and I have been running the NHibernate alpha 9that uses version 1.0.0.2 of Iesi.Collections). Anyways, it didn't occur to me that this was cuasing the problems ScottGu is discussing in his blog. But I couldn't track down WHO was bringing in the wrong assembly. Finally, I remembered that some code was using Ayende's NHibernate.Generics ... AHA! This was built against the older Iesi collections assembly so that was the culprit.&lt;/p&gt;
&lt;p&gt;So since I am moving to the new NHibernate that supports generics anyways, I yanked all the references and code out that use the NHibernate.Generics library and my build times got back to normal and my sanity has slowly begun to be restored...&lt;/p&gt;&lt;img src="http://geekswithblogs.net/opiesblog/aggbug/91092.aspx" width="1" height="1" /&gt;</content>
        <wfw:comment>http://geekswithblogs.net/opiesblog/comments/91092.aspx</wfw:comment>
        <slash:comments>4</slash:comments>
        <wfw:commentRss>http://geekswithblogs.net/opiesblog/comments/commentRss/91092.aspx</wfw:commentRss>
        <trackback:ping>http://geekswithblogs.net/opiesblog/services/trackbacks/91092.aspx</trackback:ping>
    </entry>
    <entry>
        <title>Validation With Bows and Arrows or With Battle Axes and Swords?</title>
        <link rel="self" type="text/html" href="http://geekswithblogs.net/opiesblog/archive/2006/09/12/90992.aspx" />
        <id>http://geekswithblogs.net/opiesblog/archive/2006/09/12/90992.aspx</id>
        <published>2006-09-12T09:42:00-05:00:00</published>
        <updated>2006-09-12T09:42:00Z</updated>
        <content type="html">&lt;p&gt;One of the things that requires a realignment in thinking when moving away from RAD development tools as a means of solving business problems into a Domain Driven approach is where to put validation
and how to provide meaningful messages back to the user when something goes wrong. &lt;/p&gt;
&lt;p&gt;It seems to me that a good indicator of an anemic strategy for validating data is lots of work being done with validation controls and checks at the presentation (view) level. That doesn't
mean that careful validation and thoughtful strategies at this layer are useless, but rather we shouldn't DEPEND on this layer to guard our datastore from bad data. Personally, I love
using &lt;a href="http://www.peterblum.com/Home.aspx"&gt;Peter Blum's Validation Controls&lt;/a&gt; for my web pages because he has taken great pains to create a rich set of controls that do one thing VERY
well...validate at the client-side. Still, before I implemented a rich validation scheme across my layers in my app, I was spending TOO MUCH time with these controls to do work that 
belonged in the Domain Layer. &lt;/p&gt;
&lt;p&gt;A neat approach to validating entities in the Domain layer can be found on &lt;a href="http://www.jpboodhoo.com/blog/ValidationInTheDomainLayerTakeTwo.aspx"&gt;JP Boodhoos site&lt;/a&gt; where he has a 
thorough explanation of a kind of reactive validation scheme. It's simple and easy to implement as well as flixible, should you want to apply different rules on the same entities. &lt;/p&gt;
&lt;p&gt;After being careful in validating data and implementing strategies in the 'lower layers' I discovered that I had to do very little to guard my user's input from garbage data. All of a sudden, I didn't have
to have a ton of validation controls checking conditional comparisons or making sure data was complete before posting &lt;i&gt;because the thoughtfulness that was applied to the domain layer bubbled up
to how I designed my User Interface strategy&lt;/i&gt;. &lt;/p&gt;
&lt;p&gt;So for me, when I find myself having to accomodate complex rules in the User Interface, I need to take a step back and see if there is some insight in the Domain Layer that i haven't 
gotten yet...for example, 
&lt;ul&gt;&lt;li&gt;Is there &lt;a href="http://xp.c2.com/YouArentGonnaNeedIt.html"&gt;YAGNI&lt;/a&gt; lurking in my design that might simplify things vertically across the layers?&lt;/li&gt;
&lt;li&gt; Did I let my own business specs creep in, or are my requirements actually coming from the stakeholders?&lt;/li&gt;
&lt;li&gt; Am I building my User Interface TOO SOON? Maybe I need to understand my domain better if I am adding and deleting controls like crazy.&lt;/li&gt;
&lt;li&gt; Am I relying on textboxes with elaborate javascript do things that CODE should do in the layer beneath? &lt;/li&gt;
&lt;p&gt;These are good questions to ask when i am sticking a million validation controls on my page.&lt;/p&gt;
&lt;p&gt;I kind of think of clientside validation like the guys with the bows and arrows on top of the wall around the city when the Orcs are marching in with their bad typing skills. They can take out
quite a few of the bad guys, but really the heart of the protection is going to take place by the fellas in the Domain layer with their swords and magic wands. The women in my database are relying
more on the guy with the battle axe than the guy with the slingshot. &lt;/p&gt;&lt;img src="http://geekswithblogs.net/opiesblog/aggbug/90992.aspx" width="1" height="1" /&gt;</content>
        <wfw:comment>http://geekswithblogs.net/opiesblog/comments/90992.aspx</wfw:comment>
        <slash:comments>2</slash:comments>
        <wfw:commentRss>http://geekswithblogs.net/opiesblog/comments/commentRss/90992.aspx</wfw:commentRss>
        <trackback:ping>http://geekswithblogs.net/opiesblog/services/trackbacks/90992.aspx</trackback:ping>
    </entry>
    <entry>
        <title>I'm sure I don't get it about the ObjectDataSource control</title>
        <link rel="self" type="text/html" href="http://geekswithblogs.net/opiesblog/archive/2006/09/11/90906.aspx" />
        <id>http://geekswithblogs.net/opiesblog/archive/2006/09/11/90906.aspx</id>
        <published>2006-09-11T13:32:00-05:00:00</published>
        <updated>2006-09-11T13:32:00Z</updated>
        <content type="html">&lt;p&gt;I guess I'm confused about the ObjectDataSource control. the SqlDataSource control is a non-issue for me since I'll *never* build an app that puts a view dependency on my database schema, but I see alot about the ObjectDataSource control in the Nhibernate forum. &lt;/p&gt;
&lt;p&gt;It's been a while since I actually wrangled with the ObjectDataSource control since I didn't see what advantage trying to get it to wireup to my model this extra control would bring to the table. What is so different about simply binding to a Repeater control? Two-way binding I suppose is the answer, but typically I communicate with a service layer on top of my domain entities since I rather protect my domain entities from upper layers, so by the time i get done wiring up the CRUD events in these new ASP.NET 2.0 controls, did I save time from simply iterating over a repeater and passing the values to the appropriate service for processing?&lt;/p&gt;
&lt;p&gt;I'd love to see know what I'm missing since so many developers seem to be spending time extending these controls that, at least from what i can tell, expose an app's Domain layer to bad practices and creates rigid dependencies between the view and it's data source.&lt;/p&gt;
&lt;p&gt;What you tink sensei?&lt;/p&gt;&lt;img src="http://geekswithblogs.net/opiesblog/aggbug/90906.aspx" width="1" height="1" /&gt;</content>
        <wfw:comment>http://geekswithblogs.net/opiesblog/comments/90906.aspx</wfw:comment>
        <slash:comments>8</slash:comments>
        <wfw:commentRss>http://geekswithblogs.net/opiesblog/comments/commentRss/90906.aspx</wfw:commentRss>
        <trackback:ping>http://geekswithblogs.net/opiesblog/services/trackbacks/90906.aspx</trackback:ping>
    </entry>
    <entry>
        <title>Visitor Pattern For DataBinding ListControls with Model View Presenter </title>
        <link rel="self" type="text/html" href="http://geekswithblogs.net/opiesblog/archive/2006/09/09/90769.aspx" />
        <id>http://geekswithblogs.net/opiesblog/archive/2006/09/09/90769.aspx</id>
        <published>2006-09-09T22:30:00-05:00:00</published>
        <updated>2006-09-09T22:36:00Z</updated>
        <content type="html">&lt;p&gt;Implementing the Model-View-Presenter has been fun. I appreciate it's tendency to enforce discipline in keeping any business decisions out of the View layer. I was always bewildered when I would read that
the business logic should be separated from the 'code-behind' source and then see millions of DataSet examples where that was tons of business logic embedded in Web Pages.&lt;/p&gt;
&lt;p&gt;However, trying to separate the presentation logic away and keep the client as dumb as possible presents (forgive the pun) some new challenges. Keeping the presenter interacting with only 
the interfaces of both the IView and IFacade (or IService or whatever...IModel) is straightforward so long as basic property setters and getters on the view are the requirements. But when you get
into nested collections within collections AND want to keep the client dumb, then it is time to reach into the patterns hat for a solution.&lt;/p&gt;
&lt;p&gt;Specifically, I wasn't sure how to have the Presenter authoritative for logic decisions while still keeping the DataBind() calls in place on my DataSource controls (like a Repeater). My first reaction is 
to create a kind of 'placeholder' property for the DataItem and have that iteratively set during binding for processing in the Presenter layer. For example, perhaps a different list in a dropdown
list needs to appear BASED ON WHAT THE DATA ITEM IS. I want my presenter to inject the correct list, but how to do that during binding? &lt;/p&gt;
&lt;p&gt;A refactoring has emerged that I'll call &lt;b&gt;Replace Placeholder Property With Visitor&lt;/b&gt;. The &lt;a href="http://www.dofactory.com/Patterns/PatternVisitor.aspx"&gt;Visitor&lt;/a&gt; pattern is well-suited
to exactly this kind of databinding dilemma. No doubt, some will think it's heavyhanded, but I have found it elegant and keeps responsibilities between the view and presenter where they belong.&lt;/p&gt;
&lt;p&gt;To start, say we have Person we want to edit that has a collection of Addresses. We want to bind a Repeater control on a collection of Labels so that for each label, we have a blank Address
form. Within each address form, we have a drop down list of StreetTypes (Rd, St, Ln, etc). So it looks like &lt;a href="http://geekswithblogs.net/opiesblog/gallery/image/3096.aspx"&gt;this&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;To use the Visitor pattern to inject the list of StreetTypes into the DropDown list, we'll abstract away the contracts and have the actors only deal with those. First, the ISaveAddressViewItem interface
This will live in the Presentation project so the Presenter will interact with any implementation of it. Before creating that let's have it inherit from a more generic interface (explain later):&lt;/p&gt;
&lt;!--
{\rtf1\ansi\ansicpg\lang1024\noproof1252\uc1 \deff0{\fonttbl{\f0\fnil\fcharset0\fprq1 ProggyClean;}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0??;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;??\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;??\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;??\red192\green192\blue192;}??\fs24 \cb8\highlight8     \cf2 public\cf0  \cf2 interface\cf0  \cf10 IViewRepeaterItem\par ??\cf0     \{\par ??    \}}
--&gt;
&lt;div style="font-family: ProggyClean; font-size: 12pt; color: black; background: #e2e2e2;"&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;public&lt;/span&gt;&lt;span style="background: white;"&gt; &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;interface&lt;/span&gt;&lt;span style="background: white;"&gt; &lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;IViewRepeaterItem&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;

&lt;p&gt;Ok, now let's create the contract that has the property names we expect.&lt;/p&gt;
&lt;!--
{\rtf1\ansi\ansicpg\lang1024\noproof1252\uc1 \deff0{\fonttbl{\f0\fnil\fcharset0\fprq1 ProggyClean;}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0??;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;??\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;??\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;??\red192\green192\blue192;}??\fs24 \cb8\highlight8     \cf2 public\cf0  \cf2 interface\cf0  \cf10 ISaveAddressViewItem\cf0 :\cf10 IViewRepeaterItem\par ??\cf0     \{\par ??        \cf2 string\cf0  Label \{ \cf2 get\cf0 ;\}\par ??        \cf2 string\cf0  SuiteApartment \{ \cf2 get\cf0 ;\cf2 set\cf0 ;\}\par ??        \cf2 string\cf0  PostalCode \{ \cf2 get\cf0 ;\cf2 set\cf0 ;\}\par ??        \cf2 string\cf0  StreetField1Value \{ \cf2 get\cf0 ;\cf2 set\cf0 ;\}\par ??        \cf2 string\cf0  StreetField1StreetType \{ \cf2 get\cf0 ;\cf2 set\cf0 ;\}\par ??        \cf2 string\cf0  StreetField2Value \{ \cf2 get\cf0 ;\cf2 set\cf0 ;\}\par ??        \cf2 string\cf0  StreetField3Value \{ \cf2 get\cf0 ;\cf2 set\cf0 ;\}\par ??\par ??        \cf10 IList\cf0 &amp;lt;\cf10 StreetTypes\cf0 &amp;gt; StreetTypes \{ \cf2 set\cf0 ;\}\par ??\par ??\par ??    \}\par ??}
--&gt;
&lt;div style="font-family: ProggyClean; font-size: 12pt; color: black; background: #e2e2e2;"&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;public&lt;/span&gt;&lt;span style="background: white;"&gt; &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;interface&lt;/span&gt;&lt;span style="background: white;"&gt; &lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;ISaveAddressViewItem&lt;/span&gt;&lt;span style="background: white;"&gt;:&lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;IViewRepeaterItem&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;string&lt;/span&gt;&lt;span style="background: white;"&gt; Label { &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;get&lt;/span&gt;&lt;span style="background: white;"&gt;;}&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;string&lt;/span&gt;&lt;span style="background: white;"&gt; SuiteApartment { &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;get&lt;/span&gt;&lt;span style="background: white;"&gt;;&lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;set&lt;/span&gt;&lt;span style="background: white;"&gt;;}&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;string&lt;/span&gt;&lt;span style="background: white;"&gt; PostalCode { &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;get&lt;/span&gt;&lt;span style="background: white;"&gt;;&lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;set&lt;/span&gt;&lt;span style="background: white;"&gt;;}&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;string&lt;/span&gt;&lt;span style="background: white;"&gt; StreetField1Value { &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;get&lt;/span&gt;&lt;span style="background: white;"&gt;;&lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;set&lt;/span&gt;&lt;span style="background: white;"&gt;;}&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;string&lt;/span&gt;&lt;span style="background: white;"&gt; StreetField1StreetType { &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;get&lt;/span&gt;&lt;span style="background: white;"&gt;;&lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;set&lt;/span&gt;&lt;span style="background: white;"&gt;;}&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;string&lt;/span&gt;&lt;span style="background: white;"&gt; StreetField2Value { &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;get&lt;/span&gt;&lt;span style="background: white;"&gt;;&lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;set&lt;/span&gt;&lt;span style="background: white;"&gt;;}&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;string&lt;/span&gt;&lt;span style="background: white;"&gt; StreetField3Value { &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;get&lt;/span&gt;&lt;span style="background: white;"&gt;;&lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;set&lt;/span&gt;&lt;span style="background: white;"&gt;;}&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;IList&lt;/span&gt;&lt;span style="background: white;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;StreetTypes&lt;/span&gt;&lt;span style="background: white;"&gt;&amp;gt; StreetTypes { &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;set&lt;/span&gt;&lt;span style="background: white;"&gt;;}&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;

&lt;p&gt;Next, let's create a custom RepeaterItem that will implement this interface. We'll put this in its own project where we create our other custom controls (NOT App_Code!):&lt;/p&gt;
&lt;!--
{\rtf1\ansi\ansicpg\lang1024\noproof1252\uc1 \deff0{\fonttbl{\f0\fnil\fcharset0\fprq1 ProggyClean;}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0??;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;??\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;??\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;??\red192\green192\blue192;}??\fs24 \cb8\highlight8     \cf2 public\cf0  \cf2 class\cf0  \cf10 SaveAddressViewRepeaterItem\cf0  : \cf10 RepeaterItem\cf0 , \cf10 ISaveAddressViewItem\cf0 ,\cf10 IViewRepeaterItem\par ??\cf0     \{\par ??        \cf2 public\cf0  SaveAddressViewRepeaterItem(\cf2 int\cf0  itemIndex, \cf10 ListItemType\cf0  itemType) : \cf2 base\cf0 (itemIndex, itemType)\par ??        \{\par ??        \}\par ??\par ??        \cf2 public\cf0  \cf2 string\cf0  Label\par ??        \{\par ??            \cf2 get\cf0  \{ \cf2 return\cf0  \cf10 ControlUtil\cf0 .FindFirstControlById&amp;lt;System.Web.UI.WebControls.\cf10 Label\cf0 &amp;gt;(\cf2 this\cf0 , \cf13 "Label"\cf0 ).Text; \}\par ??        \}\par ??\par ??        \cf2 public\cf0  \cf2 string\cf0  SuiteApartment\par ??        \{\par ??            \cf2 get\cf0  \{ \cf2 return\cf0  \cf10 ControlUtil\cf0 .FindFirstControlById&amp;lt;\cf10 TextBox\cf0 &amp;gt;(\cf2 this\cf0 , \cf13 "SuiteApartment"\cf0 ).Text; \}\par ??            \cf2 set\cf0  \{ \cf10 ControlUtil\cf0 .FindFirstControlById&amp;lt;\cf10 TextBox\cf0 &amp;gt;(\cf2 this\cf0 , \cf13 "SuiteApartment"\cf0 ).Text = \cf2 value\cf0 ; \}\par ??        \}\par ??\par ??        \cf2 public\cf0  \cf2 string\cf0  PostalCode\par ??        \{\par ??            \cf2 get\cf0  \{ \cf2 return\cf0  \cf10 ControlUtil\cf0 .FindFirstControlById&amp;lt;\cf10 TextBox\cf0 &amp;gt;(\cf2 this\cf0 , \cf13 "PostalCode"\cf0 ).Text; \}\par ??            \cf2 set\cf0  \{ \cf10 ControlUtil\cf0 .FindFirstControlById&amp;lt;\cf10 TextBox\cf0 &amp;gt;(\cf2 this\cf0 , \cf13 "PostalCode"\cf0 ).Text = \cf2 value\cf0 ; \}\par ??        \}\par ??\par ??        \cf2 public\cf0  \cf2 string\cf0  StreetField1Value\par ??        \{\par ??            \cf2 get\cf0  \{\cf2 return\cf0  \cf10 ControlUtil\cf0 .FindFirstControlById&amp;lt;\cf10 TextBox\cf0 &amp;gt;(\cf2 this\cf0 ,\cf13 "StreetField1Value"\cf0 ).Text; \}\par ??            \cf2 set\cf0  \{\cf10 ControlUtil\cf0 .FindFirstControlById&amp;lt;\cf10 TextBox\cf0 &amp;gt;(\cf2 this\cf0 ,\cf13 "StreetField1Value"\cf0 ).Text = \cf2 value\cf0 ; \}\par ??        \}\par ??\par ??        \cf2 public\cf0  \cf2 string\cf0  StreetField1StreetType\par ??        \{\par ??            \cf2 get\cf0  \{ \cf2 return\cf0  \cf10 ControlUtil\cf0 .FindFirstControlById&amp;lt;\cf10 DropDownList\cf0 &amp;gt;(\cf2 this\cf0 , \cf13 "StreetField1StreetTypes"\cf0 ).SelectedValue; \}\par ??            \cf2 set\cf0  \{\par ??                \cf10 ControlUtil\cf0 .FindFirstControlById&amp;lt;\cf10 DropDownList\cf0 &amp;gt;(\cf2 this\cf0 , \cf13 "StreetField1StreetTypes"\cf0 ).SelectedValue = \cf2 value\cf0 ;\}\par ??        \}\par ??\par ??        \cf2 public\cf0  \cf2 string\cf0  StreetField2Value\par ??        \{\par ??            \cf2 get\cf0  \{ \cf2 return\cf0  \cf10 ControlUtil\cf0 .FindFirstControlById&amp;lt;\cf10 TextBox\cf0 &amp;gt;(\cf2 this\cf0 , \cf13 "StreetField2Value"\cf0 ).Text; \}\par ??            \cf2 set\cf0  \{ \cf10 ControlUtil\cf0 .FindFirstControlById&amp;lt;\cf10 TextBox\cf0 &amp;gt;(\cf2 this\cf0 , \cf13 "StreetField2Value"\cf0 ).Text = \cf2 value\cf0 ; \}\par ??        \}\par ??\par ??        \cf2 public\cf0  \cf2 string\cf0  StreetField3Value\par ??        \{\par ??            \cf2 get\cf0  \{ \cf2 return\cf0  \cf10 ControlUtil\cf0 .FindFirstControlById&amp;lt;\cf10 TextBox\cf0 &amp;gt;(\cf2 this\cf0 , \cf13 "StreetField3Value"\cf0 ).Text; \}\par ??            \cf2 set\cf0  \{ \cf10 ControlUtil\cf0 .FindFirstControlById&amp;lt;\cf10 TextBox\cf0 &amp;gt;(\cf2 this\cf0 , \cf13 "StreetField3Value"\cf0 ).Text = \cf2 value\cf0 ; \}\par ??        \}\par ??\par ??        \cf2 public\cf0  \cf10 IList\cf0 &amp;lt;\cf10 StreetTypes\cf0 &amp;gt; StreetTypes\par ??        \{\par ??            \cf2 set\par ??\cf0             \{\par ??                \cf10 DropDownList\cf0  list = \cf10 ControlUtil\cf0 .FindFirstControlById&amp;lt;\cf10 DropDownList\cf0 &amp;gt;(\cf2 this\cf0 , \cf13 "StreetField1StreetTypes"\cf0 );\par ??                \cf2 if\cf0  (list != \cf2 null\cf0 )\par ??                    list.DataSource = \cf2 value\cf0 ;\par ??            \}\par ??        \}\par ??        \par ??        \par ??    \}}
--&gt;
&lt;div style="font-family: ProggyClean; font-size: 12pt; color: black; background: #e2e2e2;"&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;public&lt;/span&gt;&lt;span style="background: white;"&gt; &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;class&lt;/span&gt;&lt;span style="background: white;"&gt; &lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;SaveAddressViewRepeaterItem&lt;/span&gt;&lt;span style="background: white;"&gt; : &lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;RepeaterItem&lt;/span&gt;&lt;span style="background: white;"&gt;, &lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;ISaveAddressViewItem&lt;/span&gt;&lt;span style="background: white;"&gt;,&lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;IViewRepeaterItem&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;public&lt;/span&gt;&lt;span style="background: white;"&gt; SaveAddressViewRepeaterItem(&lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;int&lt;/span&gt;&lt;span style="background: white;"&gt; itemIndex, &lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;ListItemType&lt;/span&gt;&lt;span style="background: white;"&gt; itemType) : &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;base&lt;/span&gt;&lt;span style="background: white;"&gt;(itemIndex, itemType)&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;public&lt;/span&gt;&lt;span style="background: white;"&gt; &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;string&lt;/span&gt;&lt;span style="background: white;"&gt; Label&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;get&lt;/span&gt;&lt;span style="background: white;"&gt; { &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;return&lt;/span&gt;&lt;span style="background: white;"&gt; &lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;ControlUtil&lt;/span&gt;&lt;span style="background: white;"&gt;.FindFirstControlById&amp;lt;System.Web.UI.WebControls.&lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;Label&lt;/span&gt;&lt;span style="background: white;"&gt;&amp;gt;(&lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;this&lt;/span&gt;&lt;span style="background: white;"&gt;, &lt;/span&gt;&lt;span style="color: maroon; background: white;"&gt;"Label"&lt;/span&gt;&lt;span style="background: white;"&gt;).Text; }&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;public&lt;/span&gt;&lt;span style="background: white;"&gt; &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;string&lt;/span&gt;&lt;span style="background: white;"&gt; SuiteApartment&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;get&lt;/span&gt;&lt;span style="background: white;"&gt; { &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;return&lt;/span&gt;&lt;span style="background: white;"&gt; &lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;ControlUtil&lt;/span&gt;&lt;span style="background: white;"&gt;.FindFirstControlById&amp;lt;&lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;TextBox&lt;/span&gt;&lt;span style="background: white;"&gt;&amp;gt;(&lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;this&lt;/span&gt;&lt;span style="background: white;"&gt;, &lt;/span&gt;&lt;span style="color: maroon; background: white;"&gt;"SuiteApartment"&lt;/span&gt;&lt;span style="background: white;"&gt;).Text; }&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;set&lt;/span&gt;&lt;span style="background: white;"&gt; { &lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;ControlUtil&lt;/span&gt;&lt;span style="background: white;"&gt;.FindFirstControlById&amp;lt;&lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;TextBox&lt;/span&gt;&lt;span style="background: white;"&gt;&amp;gt;(&lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;this&lt;/span&gt;&lt;span style="background: white;"&gt;, &lt;/span&gt;&lt;span style="color: maroon; background: white;"&gt;"SuiteApartment"&lt;/span&gt;&lt;span style="background: white;"&gt;).Text = &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;value&lt;/span&gt;&lt;span style="background: white;"&gt;; }&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;public&lt;/span&gt;&lt;span style="background: white;"&gt; &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;string&lt;/span&gt;&lt;span style="background: white;"&gt; PostalCode&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;get&lt;/span&gt;&lt;span style="background: white;"&gt; { &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;return&lt;/span&gt;&lt;span style="background: white;"&gt; &lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;ControlUtil&lt;/span&gt;&lt;span style="background: white;"&gt;.FindFirstControlById&amp;lt;&lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;TextBox&lt;/span&gt;&lt;span style="background: white;"&gt;&amp;gt;(&lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;this&lt;/span&gt;&lt;span style="background: white;"&gt;, &lt;/span&gt;&lt;span style="color: maroon; background: white;"&gt;"PostalCode"&lt;/span&gt;&lt;span style="background: white;"&gt;).Text; }&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;set&lt;/span&gt;&lt;span style="background: white;"&gt; { &lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;ControlUtil&lt;/span&gt;&lt;span style="background: white;"&gt;.FindFirstControlById&amp;lt;&lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;TextBox&lt;/span&gt;&lt;span style="background: white;"&gt;&amp;gt;(&lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;this&lt;/span&gt;&lt;span style="background: white;"&gt;, &lt;/span&gt;&lt;span style="color: maroon; background: white;"&gt;"PostalCode"&lt;/span&gt;&lt;span style="background: white;"&gt;).Text = &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;value&lt;/span&gt;&lt;span style="background: white;"&gt;; }&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;public&lt;/span&gt;&lt;span style="background: white;"&gt; &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;string&lt;/span&gt;&lt;span style="background: white;"&gt; StreetField1Value&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;get&lt;/span&gt;&lt;span style="background: white;"&gt; {&lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;return&lt;/span&gt;&lt;span style="background: white;"&gt; &lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;ControlUtil&lt;/span&gt;&lt;span style="background: white;"&gt;.FindFirstControlById&amp;lt;&lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;TextBox&lt;/span&gt;&lt;span style="background: white;"&gt;&amp;gt;(&lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;this&lt;/span&gt;&lt;span style="background: white;"&gt;,&lt;/span&gt;&lt;span style="color: maroon; background: white;"&gt;"StreetField1Value"&lt;/span&gt;&lt;span style="background: white;"&gt;).Text; }&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;set&lt;/span&gt;&lt;span style="background: white;"&gt; {&lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;ControlUtil&lt;/span&gt;&lt;span style="background: white;"&gt;.FindFirstControlById&amp;lt;&lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;TextBox&lt;/span&gt;&lt;span style="background: white;"&gt;&amp;gt;(&lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;this&lt;/span&gt;&lt;span style="background: white;"&gt;,&lt;/span&gt;&lt;span style="color: maroon; background: white;"&gt;"StreetField1Value"&lt;/span&gt;&lt;span style="background: white;"&gt;).Text = &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;value&lt;/span&gt;&lt;span style="background: white;"&gt;; }&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;public&lt;/span&gt;&lt;span style="background: white;"&gt; &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;string&lt;/span&gt;&lt;span style="background: white;"&gt; StreetField1StreetType&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;get&lt;/span&gt;&lt;span style="background: white;"&gt; { &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;return&lt;/span&gt;&lt;span style="background: white;"&gt; &lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;ControlUtil&lt;/span&gt;&lt;span style="background: white;"&gt;.FindFirstControlById&amp;lt;&lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;DropDownList&lt;/span&gt;&lt;span style="background: white;"&gt;&amp;gt;(&lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;this&lt;/span&gt;&lt;span style="background: white;"&gt;, &lt;/span&gt;&lt;span style="color: maroon; background: white;"&gt;"StreetField1StreetTypes"&lt;/span&gt;&lt;span style="background: white;"&gt;).SelectedValue; }&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;set&lt;/span&gt;&lt;span style="background: white;"&gt; {&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&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; &lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;ControlUtil&lt;/span&gt;&lt;span style="background: white;"&gt;.FindFirstControlById&amp;lt;&lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;DropDownList&lt;/span&gt;&lt;span style="background: white;"&gt;&amp;gt;(&lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;this&lt;/span&gt;&lt;span style="background: white;"&gt;, &lt;/span&gt;&lt;span style="color: maroon; background: white;"&gt;"StreetField1StreetTypes"&lt;/span&gt;&lt;span style="background: white;"&gt;).SelectedValue = &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;value&lt;/span&gt;&lt;span style="background: white;"&gt;;}&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;public&lt;/span&gt;&lt;span style="background: white;"&gt; &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;string&lt;/span&gt;&lt;span style="background: white;"&gt; StreetField2Value&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;get&lt;/span&gt;&lt;span style="background: white;"&gt; { &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;return&lt;/span&gt;&lt;span style="background: white;"&gt; &lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;ControlUtil&lt;/span&gt;&lt;span style="background: white;"&gt;.FindFirstControlById&amp;lt;&lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;TextBox&lt;/span&gt;&lt;span style="background: white;"&gt;&amp;gt;(&lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;this&lt;/span&gt;&lt;span style="background: white;"&gt;, &lt;/span&gt;&lt;span style="color: maroon; background: white;"&gt;"StreetField2Value"&lt;/span&gt;&lt;span style="background: white;"&gt;).Text; }&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;set&lt;/span&gt;&lt;span style="background: white;"&gt; { &lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;ControlUtil&lt;/span&gt;&lt;span style="background: white;"&gt;.FindFirstControlById&amp;lt;&lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;TextBox&lt;/span&gt;&lt;span style="background: white;"&gt;&amp;gt;(&lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;this&lt;/span&gt;&lt;span style="background: white;"&gt;, &lt;/span&gt;&lt;span style="color: maroon; background: white;"&gt;"StreetField2Value"&lt;/span&gt;&lt;span style="background: white;"&gt;).Text = &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;value&lt;/span&gt;&lt;span style="background: white;"&gt;; }&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;public&lt;/span&gt;&lt;span style="background: white;"&gt; &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;string&lt;/span&gt;&lt;span style="background: white;"&gt; StreetField3Value&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;get&lt;/span&gt;&lt;span style="background: white;"&gt; { &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;return&lt;/span&gt;&lt;span style="background: white;"&gt; &lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;ControlUtil&lt;/span&gt;&lt;span style="background: white;"&gt;.FindFirstControlById&amp;lt;&lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;TextBox&lt;/span&gt;&lt;span style="background: white;"&gt;&amp;gt;(&lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;this&lt;/span&gt;&lt;span style="background: white;"&gt;, &lt;/span&gt;&lt;span style="color: maroon; background: white;"&gt;"StreetField3Value"&lt;/span&gt;&lt;span style="background: white;"&gt;).Text; }&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;set&lt;/span&gt;&lt;span style="background: white;"&gt; { &lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;ControlUtil&lt;/span&gt;&lt;span style="background: white;"&gt;.FindFirstControlById&amp;lt;&lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;TextBox&lt;/span&gt;&lt;span style="background: white;"&gt;&amp;gt;(&lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;this&lt;/span&gt;&lt;span style="background: white;"&gt;, &lt;/span&gt;&lt;span style="color: maroon; background: white;"&gt;"StreetField3Value"&lt;/span&gt;&lt;span style="background: white;"&gt;).Text = &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;value&lt;/span&gt;&lt;span style="background: white;"&gt;; }&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;public&lt;/span&gt;&lt;span style="background: white;"&gt; &lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;IList&lt;/span&gt;&lt;span style="background: white;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;StreetTypes&lt;/span&gt;&lt;span style="background: white;"&gt;&amp;gt; StreetTypes&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;set&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&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; &lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;DropDownList&lt;/span&gt;&lt;span style="background: white;"&gt; list = &lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;ControlUtil&lt;/span&gt;&lt;span style="background: white;"&gt;.FindFirstControlById&amp;lt;&lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;DropDownList&lt;/span&gt;&lt;span style="background: white;"&gt;&amp;gt;(&lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;this&lt;/span&gt;&lt;span style="background: white;"&gt;, &lt;/span&gt;&lt;span style="color: maroon; background: white;"&gt;"StreetField1StreetTypes"&lt;/span&gt;&lt;span style="background: white;"&gt;);&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&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; &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;if&lt;/span&gt;&lt;span style="background: white;"&gt; (list != &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;null&lt;/span&gt;&lt;span style="background: white;"&gt;)&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&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; &amp;nbsp;&amp;nbsp;&amp;nbsp; list.DataSource = &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;value&lt;/span&gt;&lt;span style="background: white;"&gt;;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;

&lt;p&gt;Before we look at the Repeater that will consume this, let's look at the contract for the Presenter that the ISaveAddressViewItem's parent will interact with during databinding&lt;/p&gt;
&lt;!--
{\rtf1\ansi\ansicpg\lang1024\noproof1252\uc1 \deff0{\fonttbl{\f0\fnil\fcharset0\fprq1 ProggyClean;}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0??;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;??\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;??\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;??\red192\green192\blue192;}??\fs24 \cb8\highlight8     \cf2 public\cf0  \cf2 interface\cf0  \cf10 IPresenterVisitor\par ??\cf0     \{\par ??        \cf2 void\cf0  PostVisit(\cf10 IViewRepeaterItem\cf0  item);\par ??        \cf2 void\cf0  SetItemVisit(\cf10 IViewRepeaterItem\cf0  item);\par ??        \cf2 void\cf0  LoadItemVisit(\cf10 IViewRepeaterItem\cf0  item);\par ??    \}}
--&gt;
&lt;div style="font-family: ProggyClean; font-size: 12pt; color: black; background: #e2e2e2;"&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;public&lt;/span&gt;&lt;span style="background: white;"&gt; &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;interface&lt;/span&gt;&lt;span style="background: white;"&gt; &lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;IPresenterVisitor&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;void&lt;/span&gt;&lt;span style="background: white;"&gt; PostVisit(&lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;IViewRepeaterItem&lt;/span&gt;&lt;span style="background: white;"&gt; item);&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;void&lt;/span&gt;&lt;span style="background: white;"&gt; SetItemVisit(&lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;IViewRepeaterItem&lt;/span&gt;&lt;span style="background: white;"&gt; item);&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;void&lt;/span&gt;&lt;span style="background: white;"&gt; LoadItemVisit(&lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;IViewRepeaterItem&lt;/span&gt;&lt;span style="background: white;"&gt; item);&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;


&lt;p&gt;Now let's look at the Repeater control (also in the Class project, not in the Web folder) we create to bring the IViewRepeaterItem and IPresenterVisitor together. We need to tell this somewhat generic repeater control what kind of custom RepeaterItem
to instantiate in order to get our implementation, so quick and dirty I add a ItemType property that I can declare in the aspx form. We also need to tell the Repeater control who the 
Presenter is that implements IPresenterVisitor. Finally, we need to override certain events to wireup our
conversation between the View and Presenter during binding. This is where the visitor pattern shines. &lt;/p&gt;
&lt;!--
{\rtf1\ansi\ansicpg\lang1024\noproof1252\uc1 \deff0{\fonttbl{\f0\fnil\fcharset0\fprq1 ProggyClean;}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0??;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;??\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;??\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;??\red192\green192\blue192;}??\fs24 \cb8\highlight8     \cf2 public\cf0  \cf2 class\cf0  \cf10 ViewRepeater\cf0  : \cf10 Repeater\par ??\cf0     \{\par ??        \cf2 public\cf0  ViewRepeater()\par ??        \{\par ??            ItemDataBound += \cf2 new\cf0  \cf10 RepeaterItemEventHandler\cf0 (SetItem);\par ??        \}\par ??       \par ??        \cf2 private\cf0  \cf10 Type\cf0  _itemType;\par ??        [\cf10 Bindable\cf0 (\cf2 true\cf0 )]\par ??        \cf2 public\cf0  \cf10 Type\cf0  ItemType\par ??        \{\par ??            \cf2 get\cf0  \{ \cf2 return\cf0  (\cf10 Type\cf0 )ViewState[\cf13 "ItemType"\cf0 ]; \}\par ??            \cf2 set\par ??\cf0             \{\par ??                \cf2 if\cf0 (\cf2 value\cf0 .GetInterface(\cf2 typeof\cf0 (\cf10 IViewRepeaterItem\cf0 ).ToString())==\cf2 null\cf0 )\par ??                \{\par ??                    \cf2 throw\cf0  \cf2 new\cf0  \cf10 InvalidCastException\cf0 (\cf13 "The RepeaterItem must implement the IViewRepeaterItem interface"\cf0 );\par ??                \}\par ??                ViewState[\cf13 "ItemType"\cf0 ] = \cf2 value\cf0 ;\par ??            \}\par ??        \}\par ??        \par ??        \cf2 private\cf0  \cf10 IPresenterVisitor\cf0  _visitor;\par ??\par ??        \cf2 public\cf0  \cf10 IPresenterVisitor\cf0  Visitor\par ??        \{\par ??            \cf2 get\cf0  \{ \cf2 return\cf0  _visitor; \}\par ??            \cf2 set\cf0  \{ _visitor = \cf2 value\cf0 ; \}\par ??        \}\par ??        \par ??\par ??        \cf2 protected\cf0  \cf2 override\cf0  \cf10 RepeaterItem\cf0  CreateItem(\cf2 int\cf0  itemIndex, \cf10 ListItemType\cf0  itemType)\par ??        \{\par ??            \cf10 IViewRepeaterItem\cf0  item = \cf10 Activator\cf0 .CreateInstance(ItemType, itemIndex, itemType) \cf2 as\cf0  \cf10 IViewRepeaterItem\cf0 ;\par ??            ((\cf10 RepeaterItem\cf0 )item).DataBinding += \cf2 new\cf0  System.\cf10 EventHandler\cf0 (LoadItem);\par ??            \cf2 return\cf0  (\cf10 RepeaterItem\cf0 )item;\par ??        \}\par ??        \cf15 ///\cf14  \cf15 &amp;lt;summary&amp;gt;\par ??\cf0         \cf15 ///\cf14  Used to assign datasource to controls before binding.\par ??\cf0         \cf15 ///\cf14  \cf15 &amp;lt;/summary&amp;gt;\par ??\cf0         \cf15 ///\cf14  \cf15 &amp;lt;param name="sender"&amp;gt;&amp;lt;/param&amp;gt;\par ??\cf0         \cf15 ///\cf14  \cf15 &amp;lt;param name="e"&amp;gt;&amp;lt;/param&amp;gt;\par ??\cf0         \cf2 void\cf0  LoadItem(\cf2 object\cf0  sender, System.\cf10 EventArgs\cf0  e)\par ??        \{\par ??            Visitor.LoadItemVisit((\cf10 IViewRepeaterItem\cf0 )sender);\par ??        \}\par ??        \cf15 ///\cf14  \cf15 &amp;lt;summary&amp;gt;\par ??\cf0         \cf15 ///\cf14  Our controls have been bound, but now the presenter can set hte values to the model object's value.\par ??\cf0         \cf15 ///\cf14  \cf15 &amp;lt;/summary&amp;gt;\par ??\cf0         \cf15 ///\cf14  \cf15 &amp;lt;param name="sender"&amp;gt;&amp;lt;/param&amp;gt;\par ??\cf0         \cf15 ///\cf14  \cf15 &amp;lt;param name="e"&amp;gt;&amp;lt;/param&amp;gt;\par ??\cf0         \cf2 void\cf0  SetItem(\cf2 object\cf0  sender, \cf10 RepeaterItemEventArgs\cf0  e)\par ??        \{\par ??\par ??            \cf2 if\cf0  (e.Item.ItemType.Equals(\cf10 ListItemType\cf0 .Item) ||\par ??                e.Item.ItemType.Equals(\cf10 ListItemType\cf0 .AlternatingItem) ||\par ??                e.Item.ItemType.Equals(\cf10 ListItemType\cf0 .EditItem))\par ??            \{\par ??                Visitor.SetItemVisit((\cf10 IViewRepeaterItem\cf0 )e.Item);\par ??            \}\par ??        \}\par ??        \cf15 ///\cf14  \cf15 &amp;lt;summary&amp;gt;\par ??\cf0         \cf15 ///\cf14  This is used to iterate the items and allow the presenter to perform actions on each item such as during a Save operation.\par ??\cf0         \cf15 ///\cf14  \cf15 &amp;lt;/summary&amp;gt;\par ??\cf0         \cf2 public\cf0  \cf2 void\cf0  Post()\par ??        \{\par ??            \cf2 foreach\cf0 (\cf10 RepeaterItem\cf0  item \cf2 in\cf0  Items)\par ??            \{\par ??                \cf2 if\cf0  (item \cf2 is\cf0  \cf10 IViewRepeaterItem\cf0 )\par ??                \{\par ??                    Visitor.PostVisit((\cf10 IViewRepeaterItem\cf0 )item);\par ??                \}\par ??\par ??            \}\par ??        \}\par ??    \}}
--&gt;
&lt;div style="font-family: ProggyClean; font-size: 12pt; color: black; background: #e2e2e2;"&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;public&lt;/span&gt;&lt;span style="background: white;"&gt; &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;class&lt;/span&gt;&lt;span style="background: white;"&gt; &lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;ViewRepeater&lt;/span&gt;&lt;span style="background: white;"&gt; : &lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;Repeater&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;public&lt;/span&gt;&lt;span style="background: white;"&gt; ViewRepeater()&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; ItemDataBound += &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;new&lt;/span&gt;&lt;span style="background: white;"&gt; &lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;RepeaterItemEventHandler&lt;/span&gt;&lt;span style="background: white;"&gt;(SetItem);&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;private&lt;/span&gt;&lt;span style="background: white;"&gt; &lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;Type&lt;/span&gt;&lt;span style="background: white;"&gt; _itemType;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; [&lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;Bindable&lt;/span&gt;&lt;span style="background: white;"&gt;(&lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;true&lt;/span&gt;&lt;span style="background: white;"&gt;)]&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;public&lt;/span&gt;&lt;span style="background: white;"&gt; &lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;Type&lt;/span&gt;&lt;span style="background: white;"&gt; ItemType&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;get&lt;/span&gt;&lt;span style="background: white;"&gt; { &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;return&lt;/span&gt;&lt;span style="background: white;"&gt; (&lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;Type&lt;/span&gt;&lt;span style="background: white;"&gt;)ViewState[&lt;/span&gt;&lt;span style="color: maroon; background: white;"&gt;"ItemType"&lt;/span&gt;&lt;span style="background: white;"&gt;]; }&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;set&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&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; &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;if&lt;/span&gt;&lt;span style="background: white;"&gt;(&lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;value&lt;/span&gt;&lt;span style="background: white;"&gt;.GetInterface(&lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;typeof&lt;/span&gt;&lt;span style="background: white;"&gt;(&lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;IViewRepeaterItem&lt;/span&gt;&lt;span style="background: white;"&gt;).ToString())==&lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;null&lt;/span&gt;&lt;span style="background: white;"&gt;)&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&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; {&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&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; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;throw&lt;/span&gt;&lt;span style="background: white;"&gt; &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;new&lt;/span&gt;&lt;span style="background: white;"&gt; &lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;InvalidCastException&lt;/span&gt;&lt;span style="background: white;"&gt;(&lt;/span&gt;&lt;span style="color: maroon; background: white;"&gt;"The RepeaterItem must implement the IViewRepeaterItem interface"&lt;/span&gt;&lt;span style="background: white;"&gt;);&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&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; }&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&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; ViewState[&lt;/span&gt;&lt;span style="color: maroon; background: white;"&gt;"ItemType"&lt;/span&gt;&lt;span style="background: white;"&gt;] = &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;value&lt;/span&gt;&lt;span style="background: white;"&gt;;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;private&lt;/span&gt;&lt;span style="background: white;"&gt; &lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;IPresenterVisitor&lt;/span&gt;&lt;span style="background: white;"&gt; _visitor;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;public&lt;/span&gt;&lt;span style="background: white;"&gt; &lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;IPresenterVisitor&lt;/span&gt;&lt;span style="background: white;"&gt; Visitor&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;get&lt;/span&gt;&lt;span style="background: white;"&gt; { &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;return&lt;/span&gt;&lt;span style="background: white;"&gt; _visitor; }&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;set&lt;/span&gt;&lt;span style="background: white;"&gt; { _visitor = &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;value&lt;/span&gt;&lt;span style="background: white;"&gt;; }&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;protected&lt;/span&gt;&lt;span style="background: white;"&gt; &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;override&lt;/span&gt;&lt;span style="background: white;"&gt; &lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;RepeaterItem&lt;/span&gt;&lt;span style="background: white;"&gt; CreateItem(&lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;int&lt;/span&gt;&lt;span style="background: white;"&gt; itemIndex, &lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;ListItemType&lt;/span&gt;&lt;span style="background: white;"&gt; itemType)&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;IViewRepeaterItem&lt;/span&gt;&lt;span style="background: white;"&gt; item = &lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;Activator&lt;/span&gt;&lt;span style="background: white;"&gt;.CreateInstance(ItemType, itemIndex, itemType) &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;as&lt;/span&gt;&lt;span style="background: white;"&gt; &lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;IViewRepeaterItem&lt;/span&gt;&lt;span style="background: white;"&gt;;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; ((&lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;RepeaterItem&lt;/span&gt;&lt;span style="background: white;"&gt;)item).DataBinding += &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;new&lt;/span&gt;&lt;span style="background: white;"&gt; System.&lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;EventHandler&lt;/span&gt;&lt;span style="background: white;"&gt;(LoadItem);&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;return&lt;/span&gt;&lt;span style="background: white;"&gt; (&lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;RepeaterItem&lt;/span&gt;&lt;span style="background: white;"&gt;)item;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: gray; background: white;"&gt;///&lt;/span&gt;&lt;span style="color: olive; background: white;"&gt; &lt;/span&gt;&lt;span style="color: gray; background: white;"&gt;&amp;lt;summary&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: gray; background: white;"&gt;///&lt;/span&gt;&lt;span style="color: olive; background: white;"&gt; Used to assign datasource to controls before binding.&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: gray; background: white;"&gt;///&lt;/span&gt;&lt;span style="color: olive; background: white;"&gt; &lt;/span&gt;&lt;span style="color: gray; background: white;"&gt;&amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: gray; background: white;"&gt;///&lt;/span&gt;&lt;span style="color: olive; background: white;"&gt; &lt;/span&gt;&lt;span style="color: gray; background: white;"&gt;&amp;lt;param name="sender"&amp;gt;&amp;lt;/param&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: gray; background: white;"&gt;///&lt;/span&gt;&lt;span style="color: olive; background: white;"&gt; &lt;/span&gt;&lt;span style="color: gray; background: white;"&gt;&amp;lt;param name="e"&amp;gt;&amp;lt;/param&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;void&lt;/span&gt;&lt;span style="background: white;"&gt; LoadItem(&lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;object&lt;/span&gt;&lt;span style="background: white;"&gt; sender, System.&lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;EventArgs&lt;/span&gt;&lt;span style="background: white;"&gt; e)&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; Visitor.LoadItemVisit((&lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;IViewRepeaterItem&lt;/span&gt;&lt;span style="background: white;"&gt;)sender);&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: gray; background: white;"&gt;///&lt;/span&gt;&lt;span style="color: olive; background: white;"&gt; &lt;/span&gt;&lt;span style="color: gray; background: white;"&gt;&amp;lt;summary&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: gray; background: white;"&gt;///&lt;/span&gt;&lt;span style="color: olive; background: white;"&gt; Our controls have been bound, but now the presenter can set hte values to the model object's value.&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: gray; background: white;"&gt;///&lt;/span&gt;&lt;span style="color: olive; background: white;"&gt; &lt;/span&gt;&lt;span style="color: gray; background: white;"&gt;&amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: gray; background: white;"&gt;///&lt;/span&gt;&lt;span style="color: olive; background: white;"&gt; &lt;/span&gt;&lt;span style="color: gray; background: white;"&gt;&amp;lt;param name="sender"&amp;gt;&amp;lt;/param&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: gray; background: white;"&gt;///&lt;/span&gt;&lt;span style="color: olive; background: white;"&gt; &lt;/span&gt;&lt;span style="color: gray; background: white;"&gt;&amp;lt;param name="e"&amp;gt;&amp;lt;/param&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;void&lt;/span&gt;&lt;span style="background: white;"&gt; SetItem(&lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;object&lt;/span&gt;&lt;span style="background: white;"&gt; sender, &lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;RepeaterItemEventArgs&lt;/span&gt;&lt;span style="background: white;"&gt; e)&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;if&lt;/span&gt;&lt;span style="background: white;"&gt; (e.Item.ItemType.Equals(&lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;ListItemType&lt;/span&gt;&lt;span style="background: white;"&gt;.Item) ||&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&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; e.Item.ItemType.Equals(&lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;ListItemType&lt;/span&gt;&lt;span style="background: white;"&gt;.AlternatingItem) ||&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&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; e.Item.ItemType.Equals(&lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;ListItemType&lt;/span&gt;&lt;span style="background: white;"&gt;.EditItem))&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&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; Visitor.SetItemVisit((&lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;IViewRepeaterItem&lt;/span&gt;&lt;span style="background: white;"&gt;)e.Item);&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: gray; background: white;"&gt;///&lt;/span&gt;&lt;span style="color: olive; background: white;"&gt; &lt;/span&gt;&lt;span style="color: gray; background: white;"&gt;&amp;lt;summary&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: gray; background: white;"&gt;///&lt;/span&gt;&lt;span style="color: olive; background: white;"&gt; This is used to iterate the items and allow the presenter to perform actions on each item such as during a Save operation.&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: gray; background: white;"&gt;///&lt;/span&gt;&lt;span style="color: olive; background: white;"&gt; &lt;/span&gt;&lt;span style="color: gray; background: white;"&gt;&amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;public&lt;/span&gt;&lt;span style="background: white;"&gt; &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;void&lt;/span&gt;&lt;span style="background: white;"&gt; Post()&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;foreach&lt;/span&gt;&lt;span style="background: white;"&gt;(&lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;RepeaterItem&lt;/span&gt;&lt;span style="background: white;"&gt; item &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;in&lt;/span&gt;&lt;span style="background: white;"&gt; Items)&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&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; &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;if&lt;/span&gt;&lt;span style="background: white;"&gt; (item &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;is&lt;/span&gt;&lt;span style="background: white;"&gt; &lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;IViewRepeaterItem&lt;/span&gt;&lt;span style="background: white;"&gt;)&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&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; {&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&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; &amp;nbsp;&amp;nbsp;&amp;nbsp; Visitor.PostVisit((&lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;IViewRepeaterItem&lt;/span&gt;&lt;span style="background: white;"&gt;)item);&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&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; }&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;

&lt;p&gt;The Presenter can now interact with the View during databinding by implementing the three methods in IPresenterVisitor&lt;/p&gt;
&lt;!--
{\rtf1\ansi\ansicpg\lang1024\noproof1252\uc1 \deff0{\fonttbl{\f0\fnil\fcharset0\fprq1 ProggyClean;}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0??;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;??\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;??\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;??\red192\green192\blue192;}??\fs24 \cb8\highlight8         \cf2 public\cf0  \cf2 void\cf0  PostVisit(\cf10 IViewRepeaterItem\cf0  item)\par ??        \{\par ??            \cf10 ISaveAddressViewItem\cf0  viewItem = (\cf10 ISaveAddressViewItem\cf0 ) item;\par ??            \cf2 if\cf0  (\cf2 new\cf0  \cf10 NonEmptyStringSpecification\cf0 ().IsSatisfiedBy(viewItem.PostalCode) ||\par ??                \cf2 new\cf0  \cf10 NonEmptyStringSpecification\cf0 ().IsSatisfiedBy(viewItem.StreetField1Value))\par ??            \{\par ??                \cf10 ContactAddressDTO\cf0  dto = GetAddressByLabel(viewItem.Label);\par ??                \cf2 bool\cf0  isNull = !\cf2 new\cf0  \cf10 NonNullSpecification\cf0 &amp;lt;\cf10 ContactAddressDTO\cf0 &amp;gt;().IsSatisfiedBy(dto);\par ??                \cf2 if\cf0  ((!isNull &amp;amp;&amp;amp; dto.StateMarker.Equals(\cf10 DTOStateMarker\cf0 .DELETED) ||\par ??                    isNull))\par ??                \{\par ??                    \par ??                    \cf10 PostalCodeDTO\cf0  postalCode = \cf2 new\cf0  \cf10 PostalCodeDTO\cf0 (0, viewItem.PostalCode);\par ??                    \cf10 StreetAddressDTO\cf0  streetAddress = \cf2 new\cf0  \cf10 StreetAddressDTO\cf0 (0, postalCode, viewItem.SuiteApartment, \cf2 null\cf0 , \cf2 null\cf0 );\par ??                    \cf10 StreetTypes\cf0  type = \cf2 new\cf0  \cf10 ValueObjectFieldBrowser\cf0 &amp;lt;\cf10 StreetTypes\cf0 &amp;gt;().GetBy(\cf13 "Abbreviation"\cf0 , viewItem.StreetField1StreetType);\par ??                    streetAddress.StreetFields.Add(\cf2 new\cf0  \cf10 StreetFieldDTO\cf0 (0, 0, viewItem.StreetField1Value, type));\par ??                    \cf2 if\cf0  (\cf2 new\cf0  \cf10 NonEmptyStringSpecification\cf0 ().IsSatisfiedBy(viewItem.StreetField2Value))\par ??                    \{\par ??                        streetAddress.StreetFields.Add(\cf2 new\cf0  \cf10 StreetFieldDTO\cf0 (0, 1, viewItem.StreetField2Value, \cf10 StreetTypes\cf0 ._NONE));\par ??                    \}\par ??                    \cf2 if\cf0  (\cf2 new\cf0  \cf10 NonEmptyStringSpecification\cf0 ().IsSatisfiedBy(viewItem.StreetField3Value))\par ??                    \{\par ??                        streetAddress.StreetFields.Add(\cf2 new\cf0  \cf10 StreetFieldDTO\cf0 (0, 2, viewItem.StreetField3Value, \cf10 StreetTypes\cf0 ._NONE));\par ??                    \}\par ??                    \cf10 ContactAddressDTO\cf0  newAddress = \cf2 new\cf0  \cf10 ContactAddressDTO\cf0 (0, viewItem.Label, streetAddress);\par ??                    Contact.Addresses.Add(newAddress);\par ??                \}\par ??            \}\par ??\par ??        \}\par ??        \cf2 public\cf0  \cf2 void\cf0  LoadItemVisit(\cf10 IViewRepeaterItem\cf0  item)\par ??        \{\par ??            ((\cf10 ISaveAddressViewItem\cf0 ) item).StreetTypes = \cf10 StreetTypes\cf0 .LIST_ALL;\par ??           \par ??        \}\par ??        \cf2 public\cf0  \cf2 void\cf0  SetItemVisit(\cf10 IViewRepeaterItem\cf0  item)\par ??        \{\par ??            \cf10 ISaveAddressViewItem\cf0  viewItem = (\cf10 ISaveAddressViewItem\cf0 )item;\par ??            \cf15 /*//Check if Contact has addresses, \par ??             if so then search for an address matching item.Label then populate the fields as necessary\par ??             if not, then do nothin*/\par ??\cf0             \par ??            \cf2 if\cf0  (\cf2 new\cf0  \cf10 NonNullSpecification\cf0 &amp;lt;\cf10 ContactDTO\cf0 &amp;gt;().IsSatisfiedBy(Contact))\par ??            \{\par ??                \cf2 if\cf0  (Contact.Addresses.Count &amp;gt; 0)\par ??                \{\par ??                    \cf10 ContactAddressDTO\cf0  address = GetAddressByLabel(viewItem.Label);\par ??                    \cf2 if\cf0  (address != \cf2 null\cf0 )\par ??                    \{\par ??                        \cf2 bool\cf0  isDeleted = address.StateMarker.Equals(DTOS.\cf10 DTOStateMarker\cf0 .DELETED);\par ??                        viewItem.StreetField1Value = isDeleted?\cf13 ""\cf0 :address.StreetAddress.StreetFields[0].Value;\par ??                        viewItem.StreetField1StreetType = isDeleted ? \cf13 ""\cf0  : address.StreetAddress.StreetFields[0].StreetType.Abbreviation;\par ??                        \cf2 if\cf0  (address.StreetAddress.StreetFields.Count &amp;gt; 1)\par ??                        \{\par ??                            viewItem.StreetField2Value = isDeleted ? \cf13 ""\cf0  : address.StreetAddress.StreetFields[1].Value;\par ??                        \}\par ??                        \cf2 if\cf0  (address.StreetAddress.StreetFields.Count &amp;gt; 2)\par ??                        \{\par ??                            viewItem.StreetField3Value = isDeleted ? \cf13 ""\cf0  : address.StreetAddress.StreetFields[2].Value;\par ??                        \}\par ??                    \}\par ??                \}\par ??            \}\par ??        \}}
--&gt;
&lt;div style="font-family: ProggyClean; font-size: 12pt; color: black; background: #e2e2e2;"&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;public&lt;/span&gt;&lt;span style="background: white;"&gt; &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;void&lt;/span&gt;&lt;span style="background: white;"&gt; PostVisit(&lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;IViewRepeaterItem&lt;/span&gt;&lt;span style="background: white;"&gt; item)&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;ISaveAddressViewItem&lt;/span&gt;&lt;span style="background: white;"&gt; viewItem = (&lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;ISaveAddressViewItem&lt;/span&gt;&lt;span style="background: white;"&gt;) item;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;if&lt;/span&gt;&lt;span style="background: white;"&gt; (&lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;new&lt;/span&gt;&lt;span style="background: white;"&gt; &lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;NonEmptyStringSpecification&lt;/span&gt;&lt;span style="background: white;"&gt;().IsSatisfiedBy(viewItem.PostalCode) ||&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&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; &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;new&lt;/span&gt;&lt;span style="background: white;"&gt; &lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;NonEmptyStringSpecification&lt;/span&gt;&lt;span style="background: white;"&gt;().IsSatisfiedBy(viewItem.StreetField1Value))&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&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; &lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;ContactAddressDTO&lt;/span&gt;&lt;span style="background: white;"&gt; dto = GetAddressByLabel(viewItem.Label);&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&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; &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;bool&lt;/span&gt;&lt;span style="background: white;"&gt; isNull = !&lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;new&lt;/span&gt;&lt;span style="background: white;"&gt; &lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;NonNullSpecification&lt;/span&gt;&lt;span style="background: white;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;ContactAddressDTO&lt;/span&gt;&lt;span style="background: white;"&gt;&amp;gt;().IsSatisfiedBy(dto);&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&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; &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;if&lt;/span&gt;&lt;span style="background: white;"&gt; ((!isNull &amp;amp;&amp;amp; dto.StateMarker.Equals(&lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;DTOStateMarker&lt;/span&gt;&lt;span style="background: white;"&gt;.DELETED) ||&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&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; &amp;nbsp;&amp;nbsp;&amp;nbsp; isNull))&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&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; {&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&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; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;PostalCodeDTO&lt;/span&gt;&lt;span style="background: white;"&gt; postalCode = &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;new&lt;/span&gt;&lt;span style="background: white;"&gt; &lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;PostalCodeDTO&lt;/span&gt;&lt;span style="background: white;"&gt;(0, viewItem.PostalCode);&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&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; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;StreetAddressDTO&lt;/span&gt;&lt;span style="background: white;"&gt; streetAddress = &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;new&lt;/span&gt;&lt;span style="background: white;"&gt; &lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;StreetAddressDTO&lt;/span&gt;&lt;span style="background: white;"&gt;(0, postalCode, viewItem.SuiteApartment, &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;null&lt;/span&gt;&lt;span style="background: white;"&gt;, &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;null&lt;/span&gt;&lt;span style="background: white;"&gt;);&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&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; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;StreetTypes&lt;/span&gt;&lt;span style="background: white;"&gt; type = &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;new&lt;/span&gt;&lt;span style="background: white;"&gt; &lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;ValueObjectFieldBrowser&lt;/span&gt;&lt;span style="background: white;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;StreetTypes&lt;/span&gt;&lt;span style="background: white;"&gt;&amp;gt;().GetBy(&lt;/span&gt;&lt;span style="color: maroon; background: white;"&gt;"Abbreviation"&lt;/span&gt;&lt;span style="background: white;"&gt;, viewItem.StreetField1StreetType);&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&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; &amp;nbsp;&amp;nbsp;&amp;nbsp; streetAddress.StreetFields.Add(&lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;new&lt;/span&gt;&lt;span style="background: white;"&gt; &lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;StreetFieldDTO&lt;/span&gt;&lt;span style="background: white;"&gt;(0, 0, viewItem.StreetField1Value, type));&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&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; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;if&lt;/span&gt;&lt;span style="background: white;"&gt; (&lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;new&lt;/span&gt;&lt;span style="background: white;"&gt; &lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;NonEmptyStringSpecification&lt;/span&gt;&lt;span style="background: white;"&gt;().IsSatisfiedBy(viewItem.StreetField2Value))&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&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; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&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; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; streetAddress.StreetFields.Add(&lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;new&lt;/span&gt;&lt;span style="background: white;"&gt; &lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;StreetFieldDTO&lt;/span&gt;&lt;span style="background: white;"&gt;(0, 1, viewItem.StreetField2Value, &lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;StreetTypes&lt;/span&gt;&lt;span style="background: white;"&gt;._NONE));&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&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; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&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; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;if&lt;/span&gt;&lt;span style="background: white;"&gt; (&lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;new&lt;/span&gt;&lt;span style="background: white;"&gt; &lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;NonEmptyStringSpecification&lt;/span&gt;&lt;span style="background: white;"&gt;().IsSatisfiedBy(viewItem.StreetField3Value))&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&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; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&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; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; streetAddress.StreetFields.Add(&lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;new&lt;/span&gt;&lt;span style="background: white;"&gt; &lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;StreetFieldDTO&lt;/span&gt;&lt;span style="background: white;"&gt;(0, 2, viewItem.StreetField3Value, &lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;StreetTypes&lt;/span&gt;&lt;span style="background: white;"&gt;._NONE));&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&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; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&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; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;ContactAddressDTO&lt;/span&gt;&lt;span style="background: white;"&gt; newAddress = &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;new&lt;/span&gt;&lt;span style="background: white;"&gt; &lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;ContactAddressDTO&lt;/span&gt;&lt;span style="background: white;"&gt;(0, viewItem.Label, streetAddress);&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&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; &amp;nbsp;&amp;nbsp;&amp;nbsp; Contact.Addresses.Add(newAddress);&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&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; }&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;public&lt;/span&gt;&lt;span style="background: white;"&gt; &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;void&lt;/span&gt;&lt;span style="background: white;"&gt; LoadItemVisit(&lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;IViewRepeaterItem&lt;/span&gt;&lt;span style="background: white;"&gt; item)&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; ((&lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;ISaveAddressViewItem&lt;/span&gt;&lt;span style="background: white;"&gt;) item).StreetTypes = &lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;StreetTypes&lt;/span&gt;&lt;span style="background: white;"&gt;.LIST_ALL;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;public&lt;/span&gt;&lt;span style="background: white;"&gt; &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;void&lt;/span&gt;&lt;span style="background: white;"&gt; SetItemVisit(&lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;IViewRepeaterItem&lt;/span&gt;&lt;span style="background: white;"&gt; item)&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;ISaveAddressViewItem&lt;/span&gt;&lt;span style="background: white;"&gt; viewItem = (&lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;ISaveAddressViewItem&lt;/span&gt;&lt;span style="background: white;"&gt;)item;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: gray; background: white;"&gt;/*//Check if Contact has addresses, &lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: gray; background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;  if so then search for an address matching item.Label then populate the fields as necessary&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: gray; background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;  if not, then do nothin*/&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;if&lt;/span&gt;&lt;span style="background: white;"&gt; (&lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;new&lt;/span&gt;&lt;span style="background: white;"&gt; &lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;NonNullSpecification&lt;/span&gt;&lt;span style="background: white;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;ContactDTO&lt;/span&gt;&lt;span style="background: white;"&gt;&amp;gt;().IsSatisfiedBy(Contact))&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&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; &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;if&lt;/span&gt;&lt;span style="background: white;"&gt; (Contact.Addresses.Count &amp;gt; 0)&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&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; {&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&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; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;ContactAddressDTO&lt;/span&gt;&lt;span style="background: white;"&gt; address = GetAddressByLabel(viewItem.Label);&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&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; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;if&lt;/span&gt;&lt;span style="background: white;"&gt; (address != &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;null&lt;/span&gt;&lt;span style="background: white;"&gt;)&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&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; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&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; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;bool&lt;/span&gt;&lt;span style="background: white;"&gt; isDeleted = address.StateMarker.Equals(DTOS.&lt;/span&gt;&lt;span style="color: teal; background: white;"&gt;DTOStateMarker&lt;/span&gt;&lt;span style="background: white;"&gt;.DELETED);&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&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; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; viewItem.StreetField1Value = isDeleted?&lt;/span&gt;&lt;span style="color: maroon; background: white;"&gt;""&lt;/span&gt;&lt;span style="background: white;"&gt;:address.StreetAddress.StreetFields[0].Value;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&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; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; viewItem.StreetField1StreetType = isDeleted ? &lt;/span&gt;&lt;span style="color: maroon; background: white;"&gt;""&lt;/span&gt;&lt;span style="background: white;"&gt; : address.StreetAddress.StreetFields[0].StreetType.Abbreviation;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&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; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;if&lt;/span&gt;&lt;span style="background: white;"&gt; (address.StreetAddress.StreetFields.Count &amp;gt; 1)&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&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; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&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; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; viewItem.StreetField2Value = isDeleted ? &lt;/span&gt;&lt;span style="color: maroon; background: white;"&gt;""&lt;/span&gt;&lt;span style="background: white;"&gt; : address.StreetAddress.StreetFields[1].Value;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&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; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&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; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; background: white;"&gt;if&lt;/span&gt;&lt;span style="background: white;"&gt; (address.StreetAddress.StreetFields.Count &amp;gt; 2)&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&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; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&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; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; viewItem.StreetField3Value = isDeleted ? &lt;/span&gt;&lt;span style="color: maroon; background: white;"&gt;""&lt;/span&gt;&lt;span style="background: white;"&gt; : address.StreetAddress.StreetFields[2].Value;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&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; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&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; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&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; }&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;

&lt;p&gt;The details of the Presenter in relating to the underlying model and how the View is injected are left out...there's plenty on the web about how to do this. What is intersting here is the 
LoadItemVisit method...if we had complex logic such as presenting a different StreetTypes list based on some property in the ViewItem (I know, that's stupid), we could do it right here in our presenter...
just where it should be. The View remains dumb to logic and is relying on the Presenter to inject collections and values into its controls. &lt;/p&gt;

&lt;p&gt;Once you get used to the "dual-dispatch" of the Visitor pattern, it becomes a very useful way of getting rid of some properties that are temporal to hold values while processing collections.&lt;/p&gt;
&lt;h4&gt;Resources&lt;/h4&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href="http://www.butunclebob.com/ArticleS.UncleBob.IuseVisitor"&gt;Object Mentor&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;li&gt;&lt;a href="http://www.dofactory.com/Patterns/PatternVisitor.aspx"&gt;DoFactory&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;img src="http://geekswithblogs.net/opiesblog/aggbug/90769.aspx" width="1" height="1" /&gt;</content>
        <wfw:comment>http://geekswithblogs.net/opiesblog/comments/90769.aspx</wfw:comment>
        <slash:comments>4</slash:comments>
        <wfw:commentRss>http://geekswithblogs.net/opiesblog/comments/commentRss/90769.aspx</wfw:commentRss>
        <trackback:ping>http://geekswithblogs.net/opiesblog/services/trackbacks/90769.aspx</trackback:ping>
    </entry>
    <entry>
        <title>Messaging Pattern Encapsulating Exceptions From Domain</title>
        <link rel="self" type="text/html" href="http://geekswithblogs.net/opiesblog/archive/2006/09/06/90412.aspx" />
        <id>http://geekswithblogs.net/opiesblog/archive/2006/09/06/90412.aspx</id>
        <published>2006-09-06T05:43:00-05:00:00</published>
        <updated>2006-09-06T05:43:00Z</updated>
        <content type="html">&lt;P&gt;Sergio Bossa has a nifty proposition for handling Specification failures during the course of operations in the Domain layer and propogating those messages up the layers thru the Service layer at &lt;A href="http://sbtourist.blogspot.com/2006/03/notification-strategy-for-business.html"&gt;http://sbtourist.blogspot.com/2006/03/notification-strategy-for-business.html&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;The basic idea is to collect Specification errors into a collection within a Notification inside a custom exception. I had considered this, but was frankly trying to avoid throwing exceptions for these kinds of things. But since you can only return one object (without resorting to out parameters and so on), program flow kind of requires this kind of interruption to handle in upper layers.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://geekswithblogs.net/opiesblog/aggbug/90412.aspx" width="1" height="1" /&gt;</content>
        <wfw:comment>http://geekswithblogs.net/opiesblog/comments/90412.aspx</wfw:comment>
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://geekswithblogs.net/opiesblog/comments/commentRss/90412.aspx</wfw:commentRss>
        <trackback:ping>http://geekswithblogs.net/opiesblog/services/trackbacks/90412.aspx</trackback:ping>
    </entry>
    <entry>
        <title>Domain Validation Considerations</title>
        <link rel="self" type="text/html" href="http://geekswithblogs.net/opiesblog/archive/2006/09/05/90335.aspx" />
        <id>http://geekswithblogs.net/opiesblog/archive/2006/09/05/90335.aspx</id>
        <published>2006-09-05T12:59:00-05:00:00</published>
        <updated>2006-09-05T12:59:00Z</updated>
        <content type="html">&lt;p&gt;I have an Aggregate called &lt;b&gt;Person&lt;/b&gt; that has a method called &lt;b&gt;AddAddress&lt;/b&gt; which accepts an &lt;b&gt;IAddress&lt;/b&gt; invariant to (hopefully) be added to the Person.Addresses collection. Within the method body of AddAddress, I am invoking a Command object that goes down a list of Specifications and if all are passed, then the address is added to the collection. So far so good. &lt;/p&gt;
&lt;p&gt;Now, i am calling this method from my Service layer and am expecting an IAddress object in return. If it fails, what is the best way of communicating that back to the client-caller (Service)? I don't like using exceptions for this kind of granularity and it seems like Aspect Oriented Programming might be screaming at me to apply its paradigm. &lt;/p&gt;
&lt;p&gt;If I am applying a kind of 'lazy' validation on Domain entitiies (it doesn't know it is invalid until an object has been added to it to make it so), what is the best way or messaging back to my caller that the attempted action bombed and HERE'S WHY. I could return a Specification that wraps the return object and has the specs that were broken along the way in the Command pattern...but that seems stinky.&lt;/p&gt;
&lt;p&gt;What has been your experience with this?&lt;/p&gt;&lt;img src="http://geekswithblogs.net/opiesblog/aggbug/90335.aspx" width="1" height="1" /&gt;</content>
        <wfw:comment>http://geekswithblogs.net/opiesblog/comments/90335.aspx</wfw:comment>
        <slash:comments>2</slash:comments>
        <wfw:commentRss>http://geekswithblogs.net/opiesblog/comments/commentRss/90335.aspx</wfw:commentRss>
        <trackback:ping>http://geekswithblogs.net/opiesblog/services/trackbacks/90335.aspx</trackback:ping>
    </entry>
    <entry>
        <title>Wintellect's PowerCollections come thru again</title>
        <link rel="self" type="text/html" href="http://geekswithblogs.net/opiesblog/archive/2006/09/01/90046.aspx" />
        <id>http://geekswithblogs.net/opiesblog/archive/2006/09/01/90046.aspx</id>
        <published>2006-09-01T11:09:00-05:00:00</published>
        <updated>2006-09-01T11:09:00Z</updated>
        <content type="html">&lt;p&gt;While trying to tighten down access to invariants within an Aggregate, I'd like to make the exposed collections ReadOnly. Then I control the addition of child objects thru exposed methods, thus enforcing the Aggregate's role as gatekeeper for these objects. The problem is, I am mapping NHibernate to my fields which implement IList&lt;T&gt; which, of course, allow .Add(T entity) and casting to an ReadOnlyCollection in the exposed property isn't going to work. &lt;/p&gt;
&lt;p&gt;So I poked around the &lt;b&gt;Algorithms&lt;/b&gt; utility class from &lt;a href="http://www.wintellect.com/"&gt;Wintellect's Power Collections&lt;/a&gt; and saw they have a nifty little wrapper that returns an IList for exactly this application. So to lock down my Addresses property that returns an IList&lt;IAddress&gt;, I just have to &lt;b&gt;return Algorithms.ReadOnly(_addresses);&lt;/b&gt;.&lt;/p&gt;
&lt;p&gt;Now NHibernate is happy and my domain is locked down from dumb mistakes I might make trying to add a child to a collection without following biz rules.&lt;/p&gt;
&lt;p&gt;I love these little utilities the Wintellect guys put out there...real handy. They are fast and handy.&lt;/p&gt;
&lt;img src="http://geekswithblogs.net/opiesblog/aggbug/90046.aspx" width="1" height="1" /&gt;</content>
        <wfw:comment>http://geekswithblogs.net/opiesblog/comments/90046.aspx</wfw:comment>
        <slash:comments>5</slash:comments>
        <wfw:commentRss>http://geekswithblogs.net/opiesblog/comments/commentRss/90046.aspx</wfw:commentRss>
        <trackback:ping>http://geekswithblogs.net/opiesblog/services/trackbacks/90046.aspx</trackback:ping>
    </entry>
    <entry>
        <title>Colibri tool</title>
        <link rel="self" type="text/html" href="http://geekswithblogs.net/opiesblog/archive/2006/08/31/89894.aspx" />
        <id>http://geekswithblogs.net/opiesblog/archive/2006/08/31/89894.aspx</id>
        <published>2006-08-31T04:03:00-05:00:00</published>
        <updated>2006-08-31T04:03:00Z</updated>
        <content type="html">&lt;p&gt;I've been using the &lt;a href="http://colibri.leetspeak.org/"&gt;Colibri&lt;/a&gt; tool to open my apps and control panels for some time. A little summary of the tool is &lt;a href="http://www.venukb.com/blog/2006/07/12/colibri/"&gt;here&lt;/a&gt; with screenshots. Really, it's so simple there isn't much to say other than why you  may want to consider it if you use Google Desktop instead of the silly QUickLaunch icons next to the "Start" menu. With a quick Ctl+Space (or whatever you want it to be) and just three keys I open whatever application I want. Same thing if I want to change my display setting (Ctl+Space+Dis) and so on. The google desktop thing is great, but has so much junk I wanted a real quick simple tool to just open apps and this is it. Seems actively in development too.&lt;/p&gt;&lt;img src="http://geekswithblogs.net/opiesblog/aggbug/89894.aspx" width="1" height="1" /&gt;</content>
        <wfw:comment>http://geekswithblogs.net/opiesblog/comments/89894.aspx</wfw:comment>
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://geekswithblogs.net/opiesblog/comments/commentRss/89894.aspx</wfw:commentRss>
        <trackback:ping>http://geekswithblogs.net/opiesblog/services/trackbacks/89894.aspx</trackback:ping>
    </entry>
</feed>