<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>Andrés Villanueva</title>
    <link rel="self" type="application/atom+xml" href="http://www.softwarethinking.com/blogs/xal/Atom.aspx" />
    <subtitle type="html">.NET, CSLA, SQL, CodeGen</subtitle>
    <id>http://softwarethinking.com/blogs/xal/Default.aspx</id>
    <author>
        <name>Andrés Villanueva</name>
        <uri>http://softwarethinking.com/blogs/xal/Default.aspx</uri>
    </author>
    <generator uri="http://subtextproject.com" version="Subtext Version 2.1.2.2">Subtext</generator>
    <updated>2008-08-03T15:29:39Z</updated>
    <entry>
        <title>What's coming in CslaGenerator</title>
        <link rel="alternate" type="text/html" href="http://softwarethinking.com/blogs/xal/archive/2008/08/03/6.aspx" />
        <id>http://softwarethinking.com/blogs/xal/archive/2008/08/03/6.aspx</id>
        <published>2008-08-03T15:26:36Z</published>
        <updated>2008-08-03T15:29:39Z</updated>
        <content type="html">Hi everybody. It's been a while. A lot has been going on lately in CslaGenerator Land and I wanted to post about what's coming. For background on what's been going on you can read &lt;a href="http://groups.google.com/group/CslaGenerator/browse_thread/thread/8907781a00ef16b9"&gt;this&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
Let's start with something that has been needing some work for a while, rules:&lt;br /&gt;
&lt;br /&gt;
I've done a lot of work here, adding a lot of flexibility. Here's the list of new properties for the rules:&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
    &lt;li&gt;&lt;span style="font-weight: bold;"&gt;ArgumentType&lt;/span&gt;: You can choose between RuleArgs and DecoratedRuleArgs. (Csla 3.0 and beyond).&lt;/li&gt;
    &lt;li&gt;&lt;span style="font-weight: bold;"&gt;DecoratorArgs&lt;/span&gt;: This is a collection where you can define the decorator arguments. It has 3 properties: Name, Value and ValueType.&lt;/li&gt;
    &lt;li&gt;&lt;span style="font-weight: bold;"&gt;DescriptionType&lt;/span&gt;: String/Code. The difference here is that if you choose code, it doesn't output quotes for the description, allowing you to get the string from a function, resource or whatever.&lt;/li&gt;
    &lt;li&gt;&lt;span style="font-weight: bold;"&gt;Mode&lt;/span&gt;: Generated/Custom/CustomGeneric. Generated is the standard way and it's what we've always had so far. Custom only does the AddRule() call without generating an actual rule method so that you can code it by hand or call an external validation routine. CustomeGeneric is the same as custom, the difference is that Custom uses "object" as the target type and custom generic uses the business object's type as the target type.&lt;br /&gt;
    &lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
Other improvements to rules:&lt;br /&gt;
Description can now use a format string, where {0} will be passed the friendly name of the property.&lt;br /&gt;
Assert expression now also uses format strings, so you can use {0} for the field.&lt;br /&gt;
Also, for both assert expression and description, if you have decorator args, you'll get them as {1}...{n}.&lt;br /&gt;
&lt;br /&gt;
Example for a string max length rule.&lt;br /&gt;
&lt;br /&gt;
&lt;img src="http://www.softwarethinking.com/code/RuleDefinition1.png" alt="" /&gt;&lt;br /&gt;
&lt;br /&gt;
Here's the decorator args (only one argument here):&lt;br /&gt;
&lt;br /&gt;
&lt;img src="http://www.softwarethinking.com/code/RuleDefinition2.png" alt="" /&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The result looks like this (reformatted a bit so that it's a bit more readable):&lt;br /&gt;
&lt;br /&gt;
&lt;link href="file:///C:\DOCUME~1\Andres\CONFIG~1\Temp\msohtmlclip1\01\clip_filelist.xml" rel="File-List" /&gt;
&lt;link href="file:///C:\DOCUME~1\Andres\CONFIG~1\Temp\msohtmlclip1\01\clip_themedata.thmx" rel="themeData" /&gt;
&lt;link href="file:///C:\DOCUME~1\Andres\CONFIG~1\Temp\msohtmlclip1\01\clip_colorschememapping.xml" rel="colorSchemeMapping" /&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
&lt;w:WordDocument&gt;
&lt;w:View&gt;Normal&lt;/w:View&gt;
&lt;w:Zoom&gt;0&lt;/w:Zoom&gt;
&lt;w:TrackMoves /&gt;
&lt;w:TrackFormatting /&gt;
&lt;w:HyphenationZone&gt;21&lt;/w:HyphenationZone&gt;
&lt;w:PunctuationKerning /&gt;
&lt;w:ValidateAgainstSchemas /&gt;
&lt;w:SaveIfXMLInvalid&gt;false&lt;/w:SaveIfXMLInvalid&gt;
&lt;w:IgnoreMixedContent&gt;false&lt;/w:IgnoreMixedContent&gt;
&lt;w:AlwaysShowPlaceholderText&gt;false&lt;/w:AlwaysShowPlaceholderText&gt;
&lt;w:DoNotPromoteQF /&gt;
&lt;w:LidThemeOther&gt;ES&lt;/w:LidThemeOther&gt;
&lt;w:LidThemeAsian&gt;X-NONE&lt;/w:LidThemeAsian&gt;
&lt;w:LidThemeComplexScript&gt;X-NONE&lt;/w:LidThemeComplexScript&gt;
&lt;w:Compatibility&gt;
&lt;w:BreakWrappedTables /&gt;
&lt;w:SnapToGridInCell /&gt;
&lt;w:WrapTextWithPunct /&gt;
&lt;w:UseAsianBreakRules /&gt;
&lt;w:DontGrowAutofit /&gt;
&lt;w:SplitPgBreakAndParaMark /&gt;
&lt;w:DontVertAlignCellWithSp /&gt;
&lt;w:DontBreakConstrainedForcedTables /&gt;
&lt;w:DontVertAlignInTxbx /&gt;
&lt;w:Word11KerningPairs /&gt;
&lt;w:CachedColBalance /&gt;
&lt;/w:Compatibility&gt;
&lt;w:BrowserLevel&gt;MicrosoftInternetExplorer4&lt;/w:BrowserLevel&gt;
&lt;m:mathPr&gt;
&lt;m:mathFont m:val="Cambria Math" /&gt;
&lt;m:brkBin m:val="before" /&gt;
&lt;m:brkBinSub m:val="&amp;#45;-" /&gt;
&lt;m:smallFrac m:val="off" /&gt;
&lt;m:dispDef /&gt;
&lt;m:lMargin m:val="0" /&gt;
&lt;m:rMargin m:val="0" /&gt;
&lt;m:defJc m:val="centerGroup" /&gt;
&lt;m:wrapIndent m:val="1440" /&gt;
&lt;m:intLim m:val="subSup" /&gt;
&lt;m:naryLim m:val="undOvr" /&gt;
&lt;/m:mathPr&gt;&lt;/w:WordDocument&gt;
&lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
&lt;w:LatentStyles DefLockedState="false" DefUnhideWhenUsed="true"
DefSemiHidden="true" DefQFormat="false" DefPriority="99"
LatentStyleCount="267"&gt;
&lt;w:LsdException Locked="false" Priority="0" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Normal" /&gt;
&lt;w:LsdException Locked="false" Priority="9" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="heading 1" /&gt;
&lt;w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 2" /&gt;
&lt;w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 3" /&gt;
&lt;w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 4" /&gt;
&lt;w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 5" /&gt;
&lt;w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 6" /&gt;
&lt;w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 7" /&gt;
&lt;w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 8" /&gt;
&lt;w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 9" /&gt;
&lt;w:LsdException Locked="false" Priority="39" Name="toc 1" /&gt;
&lt;w:LsdException Locked="false" Priority="39" Name="toc 2" /&gt;
&lt;w:LsdException Locked="false" Priority="39" Name="toc 3" /&gt;
&lt;w:LsdException Locked="false" Priority="39" Name="toc 4" /&gt;
&lt;w:LsdException Locked="false" Priority="39" Name="toc 5" /&gt;
&lt;w:LsdException Locked="false" Priority="39" Name="toc 6" /&gt;
&lt;w:LsdException Locked="false" Priority="39" Name="toc 7" /&gt;
&lt;w:LsdException Locked="false" Priority="39" Name="toc 8" /&gt;
&lt;w:LsdException Locked="false" Priority="39" Name="toc 9" /&gt;
&lt;w:LsdException Locked="false" Priority="35" QFormat="true" Name="caption" /&gt;
&lt;w:LsdException Locked="false" Priority="10" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Title" /&gt;
&lt;w:LsdException Locked="false" Priority="1" Name="Default Paragraph Font" /&gt;
&lt;w:LsdException Locked="false" Priority="11" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtitle" /&gt;
&lt;w:LsdException Locked="false" Priority="22" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Strong" /&gt;
&lt;w:LsdException Locked="false" Priority="20" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Emphasis" /&gt;
&lt;w:LsdException Locked="false" Priority="59" SemiHidden="false"
UnhideWhenUsed="false" Name="Table Grid" /&gt;
&lt;w:LsdException Locked="false" UnhideWhenUsed="false" Name="Placeholder Text" /&gt;
&lt;w:LsdException Locked="false" Priority="1" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="No Spacing" /&gt;
&lt;w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading" /&gt;
&lt;w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List" /&gt;
&lt;w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid" /&gt;
&lt;w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1" /&gt;
&lt;w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2" /&gt;
&lt;w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1" /&gt;
&lt;w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2" /&gt;
&lt;w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1" /&gt;
&lt;w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2" /&gt;
&lt;w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3" /&gt;
&lt;w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List" /&gt;
&lt;w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading" /&gt;
&lt;w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List" /&gt;
&lt;w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid" /&gt;
&lt;w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 1" /&gt;
&lt;w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 1" /&gt;
&lt;w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 1" /&gt;
&lt;w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 1" /&gt;
&lt;w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 1" /&gt;
&lt;w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 1" /&gt;
&lt;w:LsdException Locked="false" UnhideWhenUsed="false" Name="Revision" /&gt;
&lt;w:LsdException Locked="false" Priority="34" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="List Paragraph" /&gt;
&lt;w:LsdException Locked="false" Priority="29" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Quote" /&gt;
&lt;w:LsdException Locked="false" Priority="30" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Quote" /&gt;
&lt;w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 1" /&gt;
&lt;w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 1" /&gt;
&lt;w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 1" /&gt;
&lt;w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 1" /&gt;
&lt;w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 1" /&gt;
&lt;w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 1" /&gt;
&lt;w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 1" /&gt;
&lt;w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 1" /&gt;
&lt;w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 2" /&gt;
&lt;w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 2" /&gt;
&lt;w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 2" /&gt;
&lt;w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 2" /&gt;
&lt;w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 2" /&gt;
&lt;w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 2" /&gt;
&lt;w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 2" /&gt;
&lt;w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 2" /&gt;
&lt;w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 2" /&gt;
&lt;w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 2" /&gt;
&lt;w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 2" /&gt;
&lt;w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 2" /&gt;
&lt;w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 2" /&gt;
&lt;w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 2" /&gt;
&lt;w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 3" /&gt;
&lt;w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 3" /&gt;
&lt;w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 3" /&gt;
&lt;w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 3" /&gt;
&lt;w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 3" /&gt;
&lt;w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 3" /&gt;
&lt;w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 3" /&gt;
&lt;w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 3" /&gt;
&lt;w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 3" /&gt;
&lt;w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 3" /&gt;
&lt;w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 3" /&gt;
&lt;w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 3" /&gt;
&lt;w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 3" /&gt;
&lt;w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 3" /&gt;
&lt;w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 4" /&gt;
&lt;w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 4" /&gt;
&lt;w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 4" /&gt;
&lt;w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 4" /&gt;
&lt;w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 4" /&gt;
&lt;w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 4" /&gt;
&lt;w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 4" /&gt;
&lt;w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 4" /&gt;
&lt;w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 4" /&gt;
&lt;w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 4" /&gt;
&lt;w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 4" /&gt;
&lt;w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 4" /&gt;
&lt;w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 4" /&gt;
&lt;w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 4" /&gt;
&lt;w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 5" /&gt;
&lt;w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 5" /&gt;
&lt;w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 5" /&gt;
&lt;w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 5" /&gt;
&lt;w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 5" /&gt;
&lt;w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 5" /&gt;
&lt;w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 5" /&gt;
&lt;w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 5" /&gt;
&lt;w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 5" /&gt;
&lt;w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 5" /&gt;
&lt;w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 5" /&gt;
&lt;w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 5" /&gt;
&lt;w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 5" /&gt;
&lt;w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 5" /&gt;
&lt;w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 6" /&gt;
&lt;w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 6" /&gt;
&lt;w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 6" /&gt;
&lt;w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 6" /&gt;
&lt;w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 6" /&gt;
&lt;w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 6" /&gt;
&lt;w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 6" /&gt;
&lt;w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 6" /&gt;
&lt;w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 6" /&gt;
&lt;w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 6" /&gt;
&lt;w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 6" /&gt;
&lt;w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 6" /&gt;
&lt;w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 6" /&gt;
&lt;w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 6" /&gt;
&lt;w:LsdException Locked="false" Priority="19" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtle Emphasis" /&gt;
&lt;w:LsdException Locked="false" Priority="21" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Emphasis" /&gt;
&lt;w:LsdException Locked="false" Priority="31" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtle Reference" /&gt;
&lt;w:LsdException Locked="false" Priority="32" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Reference" /&gt;
&lt;w:LsdException Locked="false" Priority="33" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Book Title" /&gt;
&lt;w:LsdException Locked="false" Priority="37" Name="Bibliography" /&gt;
&lt;w:LsdException Locked="false" Priority="39" QFormat="true" Name="TOC Heading" /&gt;
&lt;/w:LatentStyles&gt;
&lt;/xml&gt;&lt;![endif]--&gt;&lt;style type="text/css"&gt;&lt;!--
 /* Font Definitions */
 @font-face
	{font-family:"Cambria Math";
	panose-1:2 4 5 3 5 4 6 3 2 4;
	mso-font-charset:0;
	mso-generic-font-family:roman;
	mso-font-pitch:variable;
	mso-font-signature:-1610611985 1107304683 0 0 159 0;}
@font-face
	{font-family:Calibri;
	panose-1:2 15 5 2 2 2 4 3 2 4;
	mso-font-charset:0;
	mso-generic-font-family:swiss;
	mso-font-pitch:variable;
	mso-font-signature:-1610611985 1073750139 0 0 159 0;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
	{mso-style-unhide:no;
	mso-style-qformat:yes;
	mso-style-parent:"";
	margin-top:0cm;
	margin-right:0cm;
	margin-bottom:10.0pt;
	margin-left:0cm;
	line-height:115%;
	mso-pagination:widow-orphan;
	font-size:11.0pt;
	font-family:"Calibri","sans-serif";
	mso-ascii-font-family:Calibri;
	mso-ascii-theme-font:minor-latin;
	mso-fareast-font-family:Calibri;
	mso-fareast-theme-font:minor-latin;
	mso-hansi-font-family:Calibri;
	mso-hansi-theme-font:minor-latin;
	mso-bidi-font-family:"Times New Roman";
	mso-bidi-theme-font:minor-bidi;
	mso-fareast-language:EN-US;}
.MsoChpDefault
	{mso-style-type:export-only;
	mso-default-props:yes;
	mso-ascii-font-family:Calibri;
	mso-ascii-theme-font:minor-latin;
	mso-fareast-font-family:Calibri;
	mso-fareast-theme-font:minor-latin;
	mso-hansi-font-family:Calibri;
	mso-hansi-theme-font:minor-latin;
	mso-bidi-font-family:"Times New Roman";
	mso-bidi-theme-font:minor-bidi;
	mso-fareast-language:EN-US;}
.MsoPapDefault
	{mso-style-type:export-only;
	margin-bottom:10.0pt;
	line-height:115%;}
@page Section1
	{size:595.3pt 841.9pt;
	margin:70.85pt 3.0cm 70.85pt 3.0cm;
	mso-header-margin:35.4pt;
	mso-footer-margin:35.4pt;
	mso-paper-source:0;}
div.Section1
	{page:Section1;}
--&gt;&lt;/style&gt;&lt;!--[if gte mso 10]&gt;
&lt;style&gt;
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Tabla normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-qformat:yes;
mso-style-parent:"";
mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
mso-para-margin-top:0cm;
mso-para-margin-right:0cm;
mso-para-margin-bottom:10.0pt;
mso-para-margin-left:0cm;
line-height:115%;
mso-pagination:widow-orphan;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-fareast-font-family:"Times New Roman";
mso-fareast-theme-font:minor-fareast;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;}
&lt;/style&gt;
&lt;![endif]--&gt;
&lt;link href="file:///C:\DOCUME~1\Andres\CONFIG~1\Temp\msohtmlclip1\01\clip_filelist.xml" rel="File-List" /&gt;
&lt;link href="file:///C:\DOCUME~1\Andres\CONFIG~1\Temp\msohtmlclip1\01\clip_themedata.thmx" rel="themeData" /&gt;
&lt;link href="file:///C:\DOCUME~1\Andres\CONFIG~1\Temp\msohtmlclip1\01\clip_colorschememapping.xml" rel="colorSchemeMapping" /&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
&lt;w:WordDocument&gt;
&lt;w:View&gt;Normal&lt;/w:View&gt;
&lt;w:Zoom&gt;0&lt;/w:Zoom&gt;
&lt;w:TrackMoves /&gt;
&lt;w:TrackFormatting /&gt;
&lt;w:HyphenationZone&gt;21&lt;/w:HyphenationZone&gt;
&lt;w:PunctuationKerning /&gt;
&lt;w:ValidateAgainstSchemas /&gt;
&lt;w:SaveIfXMLInvalid&gt;false&lt;/w:SaveIfXMLInvalid&gt;
&lt;w:IgnoreMixedContent&gt;false&lt;/w:IgnoreMixedContent&gt;
&lt;w:AlwaysShowPlaceholderText&gt;false&lt;/w:AlwaysShowPlaceholderText&gt;
&lt;w:DoNotPromoteQF /&gt;
&lt;w:LidThemeOther&gt;ES&lt;/w:LidThemeOther&gt;
&lt;w:LidThemeAsian&gt;X-NONE&lt;/w:LidThemeAsian&gt;
&lt;w:LidThemeComplexScript&gt;X-NONE&lt;/w:LidThemeComplexScript&gt;
&lt;w:Compatibility&gt;
&lt;w:BreakWrappedTables /&gt;
&lt;w:SnapToGridInCell /&gt;
&lt;w:WrapTextWithPunct /&gt;
&lt;w:UseAsianBreakRules /&gt;
&lt;w:DontGrowAutofit /&gt;
&lt;w:SplitPgBreakAndParaMark /&gt;
&lt;w:DontVertAlignCellWithSp /&gt;
&lt;w:DontBreakConstrainedForcedTables /&gt;
&lt;w:DontVertAlignInTxbx /&gt;
&lt;w:Word11KerningPairs /&gt;
&lt;w:CachedColBalance /&gt;
&lt;/w:Compatibility&gt;
&lt;w:BrowserLevel&gt;MicrosoftInternetExplorer4&lt;/w:BrowserLevel&gt;
&lt;m:mathPr&gt;
&lt;m:mathFont m:val="Cambria Math" /&gt;
&lt;m:brkBin m:val="before" /&gt;
&lt;m:brkBinSub m:val="&amp;#45;-" /&gt;
&lt;m:smallFrac m:val="off" /&gt;
&lt;m:dispDef /&gt;
&lt;m:lMargin m:val="0" /&gt;
&lt;m:rMargin m:val="0" /&gt;
&lt;m:defJc m:val="centerGroup" /&gt;
&lt;m:wrapIndent m:val="1440" /&gt;
&lt;m:intLim m:val="subSup" /&gt;
&lt;m:naryLim m:val="undOvr" /&gt;
&lt;/m:mathPr&gt;&lt;/w:WordDocument&gt;
&lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
&lt;w:LatentStyles DefLockedState="false" DefUnhideWhenUsed="true"
DefSemiHidden="true" DefQFormat="false" DefPriority="99"
LatentStyleCount="267"&gt;
&lt;w:LsdException Locked="false" Priority="0" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Normal" /&gt;
&lt;w:LsdException Locked="false" Priority="9" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="heading 1" /&gt;
&lt;w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 2" /&gt;
&lt;w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 3" /&gt;
&lt;w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 4" /&gt;
&lt;w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 5" /&gt;
&lt;w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 6" /&gt;
&lt;w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 7" /&gt;
&lt;w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 8" /&gt;
&lt;w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 9" /&gt;
&lt;w:LsdException Locked="false" Priority="39" Name="toc 1" /&gt;
&lt;w:LsdException Locked="false" Priority="39" Name="toc 2" /&gt;
&lt;w:LsdException Locked="false" Priority="39" Name="toc 3" /&gt;
&lt;w:LsdException Locked="false" Priority="39" Name="toc 4" /&gt;
&lt;w:LsdException Locked="false" Priority="39" Name="toc 5" /&gt;
&lt;w:LsdException Locked="false" Priority="39" Name="toc 6" /&gt;
&lt;w:LsdException Locked="false" Priority="39" Name="toc 7" /&gt;
&lt;w:LsdException Locked="false" Priority="39" Name="toc 8" /&gt;
&lt;w:LsdException Locked="false" Priority="39" Name="toc 9" /&gt;
&lt;w:LsdException Locked="false" Priority="35" QFormat="true" Name="caption" /&gt;
&lt;w:LsdException Locked="false" Priority="10" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Title" /&gt;
&lt;w:LsdException Locked="false" Priority="1" Name="Default Paragraph Font" /&gt;
&lt;w:LsdException Locked="false" Priority="11" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtitle" /&gt;
&lt;w:LsdException Locked="false" Priority="22" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Strong" /&gt;
&lt;w:LsdException Locked="false" Priority="20" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Emphasis" /&gt;
&lt;w:LsdException Locked="false" Priority="59" SemiHidden="false"
UnhideWhenUsed="false" Name="Table Grid" /&gt;
&lt;w:LsdException Locked="false" UnhideWhenUsed="false" Name="Placeholder Text" /&gt;
&lt;w:LsdException Locked="false" Priority="1" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="No Spacing" /&gt;
&lt;w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading" /&gt;
&lt;w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List" /&gt;
&lt;w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid" /&gt;
&lt;w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1" /&gt;
&lt;w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2" /&gt;
&lt;w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1" /&gt;
&lt;w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2" /&gt;
&lt;w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1" /&gt;
&lt;w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2" /&gt;
&lt;w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3" /&gt;
&lt;w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List" /&gt;
&lt;w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading" /&gt;
&lt;w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List" /&gt;
&lt;w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid" /&gt;
&lt;w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 1" /&gt;
&lt;w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 1" /&gt;
&lt;w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 1" /&gt;
&lt;w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 1" /&gt;
&lt;w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 1" /&gt;
&lt;w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 1" /&gt;
&lt;w:LsdException Locked="false" UnhideWhenUsed="false" Name="Revision" /&gt;
&lt;w:LsdException Locked="false" Priority="34" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="List Paragraph" /&gt;
&lt;w:LsdException Locked="false" Priority="29" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Quote" /&gt;
&lt;w:LsdException Locked="false" Priority="30" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Quote" /&gt;
&lt;w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 1" /&gt;
&lt;w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 1" /&gt;
&lt;w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 1" /&gt;
&lt;w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 1" /&gt;
&lt;w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 1" /&gt;
&lt;w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 1" /&gt;
&lt;w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 1" /&gt;
&lt;w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 1" /&gt;
&lt;w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 2" /&gt;
&lt;w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 2" /&gt;
&lt;w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 2" /&gt;
&lt;w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 2" /&gt;
&lt;w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 2" /&gt;
&lt;w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 2" /&gt;
&lt;w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 2" /&gt;
&lt;w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 2" /&gt;
&lt;w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 2" /&gt;
&lt;w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 2" /&gt;
&lt;w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 2" /&gt;
&lt;w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 2" /&gt;
&lt;w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 2" /&gt;
&lt;w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 2" /&gt;
&lt;w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 3" /&gt;
&lt;w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 3" /&gt;
&lt;w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 3" /&gt;
&lt;w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 3" /&gt;
&lt;w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 3" /&gt;
&lt;w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 3" /&gt;
&lt;w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 3" /&gt;
&lt;w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 3" /&gt;
&lt;w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 3" /&gt;
&lt;w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 3" /&gt;
&lt;w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 3" /&gt;
&lt;w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 3" /&gt;
&lt;w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 3" /&gt;
&lt;w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 3" /&gt;
&lt;w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 4" /&gt;
&lt;w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 4" /&gt;
&lt;w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 4" /&gt;
&lt;w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 4" /&gt;
&lt;w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 4" /&gt;
&lt;w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 4" /&gt;
&lt;w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 4" /&gt;
&lt;w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 4" /&gt;
&lt;w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 4" /&gt;
&lt;w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 4" /&gt;
&lt;w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 4" /&gt;
&lt;w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 4" /&gt;
&lt;w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 4" /&gt;
&lt;w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 4" /&gt;
&lt;w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 5" /&gt;
&lt;w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 5" /&gt;
&lt;w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 5" /&gt;
&lt;w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 5" /&gt;
&lt;w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 5" /&gt;
&lt;w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 5" /&gt;
&lt;w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 5" /&gt;
&lt;w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 5" /&gt;
&lt;w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 5" /&gt;
&lt;w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 5" /&gt;
&lt;w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 5" /&gt;
&lt;w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 5" /&gt;
&lt;w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 5" /&gt;
&lt;w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 5" /&gt;
&lt;w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 6" /&gt;
&lt;w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 6" /&gt;
&lt;w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 6" /&gt;
&lt;w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 6" /&gt;
&lt;w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 6" /&gt;
&lt;w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 6" /&gt;
&lt;w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 6" /&gt;
&lt;w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 6" /&gt;
&lt;w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 6" /&gt;
&lt;w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 6" /&gt;
&lt;w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 6" /&gt;
&lt;w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 6" /&gt;
&lt;w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 6" /&gt;
&lt;w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 6" /&gt;
&lt;w:LsdException Locked="false" Priority="19" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtle Emphasis" /&gt;
&lt;w:LsdException Locked="false" Priority="21" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Emphasis" /&gt;
&lt;w:LsdException Locked="false" Priority="31" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtle Reference" /&gt;
&lt;w:LsdException Locked="false" Priority="32" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Reference" /&gt;
&lt;w:LsdException Locked="false" Priority="33" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Book Title" /&gt;
&lt;w:LsdException Locked="false" Priority="37" Name="Bibliography" /&gt;
&lt;w:LsdException Locked="false" Priority="39" QFormat="true" Name="TOC Heading" /&gt;
&lt;/w:LatentStyles&gt;
&lt;/xml&gt;&lt;![endif]--&gt;&lt;style type="text/css"&gt;&lt;!--
 /* Font Definitions */
 @font-face
	{font-family:"Cambria Math";
	panose-1:2 4 5 3 5 4 6 3 2 4;
	mso-font-charset:0;
	mso-generic-font-family:roman;
	mso-font-pitch:variable;
	mso-font-signature:-1610611985 1107304683 0 0 159 0;}
@font-face
	{font-family:Calibri;
	panose-1:2 15 5 2 2 2 4 3 2 4;
	mso-font-charset:0;
	mso-generic-font-family:swiss;
	mso-font-pitch:variable;
	mso-font-signature:-1610611985 1073750139 0 0 159 0;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
	{mso-style-unhide:no;
	mso-style-qformat:yes;
	mso-style-parent:"";
	margin-top:0cm;
	margin-right:0cm;
	margin-bottom:10.0pt;
	margin-left:0cm;
	line-height:115%;
	mso-pagination:widow-orphan;
	font-size:11.0pt;
	font-family:"Calibri","sans-serif";
	mso-ascii-font-family:Calibri;
	mso-ascii-theme-font:minor-latin;
	mso-fareast-font-family:Calibri;
	mso-fareast-theme-font:minor-latin;
	mso-hansi-font-family:Calibri;
	mso-hansi-theme-font:minor-latin;
	mso-bidi-font-family:"Times New Roman";
	mso-bidi-theme-font:minor-bidi;
	mso-fareast-language:EN-US;}
.MsoChpDefault
	{mso-style-type:export-only;
	mso-default-props:yes;
	mso-ascii-font-family:Calibri;
	mso-ascii-theme-font:minor-latin;
	mso-fareast-font-family:Calibri;
	mso-fareast-theme-font:minor-latin;
	mso-hansi-font-family:Calibri;
	mso-hansi-theme-font:minor-latin;
	mso-bidi-font-family:"Times New Roman";
	mso-bidi-theme-font:minor-bidi;
	mso-fareast-language:EN-US;}
.MsoPapDefault
	{mso-style-type:export-only;
	margin-bottom:10.0pt;
	line-height:115%;}
@page Section1
	{size:595.3pt 841.9pt;
	margin:70.85pt 3.0cm 70.85pt 3.0cm;
	mso-header-margin:35.4pt;
	mso-footer-margin:35.4pt;
	mso-paper-source:0;}
div.Section1
	{page:Section1;}
--&gt;&lt;/style&gt;&lt;!--[if gte mso 10]&gt;
&lt;style&gt;
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Tabla normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-qformat:yes;
mso-style-parent:"";
mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
mso-para-margin-top:0cm;
mso-para-margin-right:0cm;
mso-para-margin-bottom:10.0pt;
mso-para-margin-left:0cm;
line-height:115%;
mso-pagination:widow-orphan;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-fareast-font-family:"Times New Roman";
mso-fareast-theme-font:minor-fareast;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;}
&lt;/style&gt;
&lt;![endif]--&gt;
&lt;p style="margin-bottom: 0.0001pt; line-height: normal;" class="MsoNormal"&gt;&lt;span lang="EN-US" style="font-size: 8pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;    &lt;/span&gt;&lt;span style="color: blue;"&gt;Public&lt;/span&gt; &lt;span style="color: blue;"&gt;Shared&lt;/span&gt; &lt;span style="color: blue;"&gt;Function&lt;/span&gt; CustNameMaxLenth(&lt;span style="color: blue;"&gt;ByVal&lt;/span&gt; target &lt;span style="color: blue;"&gt;As&lt;/span&gt; Customer, _&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin-bottom: 0.0001pt; line-height: normal;" class="MsoNormal"&gt;&lt;span lang="EN-US" style="font-size: 8pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style="color: blue;"&gt;        ByVal&lt;/span&gt; e &lt;span style="color: blue;"&gt;As&lt;/span&gt; Csla.Validation.DecoratedRuleArgs) &lt;span style="color: blue;"&gt;As&lt;/span&gt; &lt;span style="color: blue;"&gt;Boolean&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin-bottom: 0.0001pt; line-height: normal;" class="MsoNormal"&gt;&lt;span lang="EN-US" style="font-size: 8pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;        &lt;/span&gt;&lt;span style="color: blue;"&gt;Dim&lt;/span&gt; result &lt;span style="color: blue;"&gt;As&lt;/span&gt; &lt;span style="color: blue;"&gt;Boolean&lt;/span&gt; = _&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin-bottom: 0.0001pt; line-height: normal;" class="MsoNormal"&gt;&lt;span lang="EN-US" style="font-size: 8pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;                target.m_customerName.Length &amp;lt; &lt;span style="color: blue;"&gt;DirectCast&lt;/span&gt;(e(&lt;span style="color: rgb(163, 21, 21);"&gt;"MaxLength"&lt;/span&gt;), Int32)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin-bottom: 0.0001pt; line-height: normal;" class="MsoNormal"&gt;&lt;span lang="EN-US" style="font-size: 8pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;        &lt;/span&gt;&lt;span style="color: blue;"&gt;If&lt;/span&gt; result = &lt;span style="color: blue;"&gt;False&lt;/span&gt; &lt;span style="color: blue;"&gt;Then&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin-bottom: 0.0001pt; line-height: normal;" class="MsoNormal"&gt;&lt;span lang="EN-US" style="font-size: 8pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;            &lt;/span&gt;e.Description = &lt;span style="color: blue;"&gt;String&lt;/span&gt;.Format(&lt;span style="color: rgb(163, 21, 21);"&gt; _&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin-bottom: 0.0001pt; line-height: normal;" class="MsoNormal"&gt;&lt;span lang="EN-US" style="font-size: 8pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style="color: rgb(163, 21, 21);"&gt;                  "{0} must be less than {1} characters."&lt;/span&gt;, _&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin-bottom: 0.0001pt; line-height: normal;" class="MsoNormal"&gt;&lt;span lang="EN-US" style="font-size: 8pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;                  &lt;span style="color: rgb(163, 21, 21);"&gt;"Customer Name"&lt;/span&gt;, e(&lt;span style="color: rgb(163, 21, 21);"&gt;"MaxLength"&lt;/span&gt;).ToString())&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin-bottom: 0.0001pt; line-height: normal;" class="MsoNormal"&gt;&lt;span lang="EN-US" style="font-size: 8pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;            &lt;/span&gt;e.Severity = Csla.Validation.RuleSeverity.Error&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin-bottom: 0.0001pt; line-height: normal;" class="MsoNormal"&gt;&lt;span lang="EN-US" style="font-size: 8pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;        &lt;/span&gt;&lt;span style="color: blue;"&gt;End&lt;/span&gt; &lt;span style="color: blue;"&gt;If&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin-bottom: 0.0001pt; line-height: normal;" class="MsoNormal"&gt;&lt;span lang="EN-US" style="font-size: 8pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;        &lt;/span&gt;&lt;span style="color: blue;"&gt;Return&lt;/span&gt; &lt;/span&gt;&lt;span lang="EN-US" style="font-size: 8pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;result &lt;span style="color: blue;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin-bottom: 0.0001pt; line-height: normal;" class="MsoNormal"&gt;&lt;span lang="EN-US" style="font-size: 8pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;    &lt;/span&gt;&lt;span style="color: blue;"&gt;End&lt;/span&gt; &lt;span style="color: blue;"&gt;Function&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin-bottom: 0.0001pt; line-height: normal;" class="MsoNormal"&gt;&lt;span lang="EN-US" style="font-size: 8pt; font-family: &amp;quot;Courier New&amp;quot;; color: blue;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin-bottom: 0.0001pt; line-height: normal;" class="MsoNormal"&gt;&lt;span lang="EN-US" style="font-size: 8pt; font-family: &amp;quot;Courier New&amp;quot;; color: blue;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin-bottom: 0.0001pt; line-height: normal;" class="MsoNormal"&gt;&lt;span lang="EN-US" style="font-size: 8pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;    &lt;/span&gt;&lt;span style="color: blue;"&gt;Protected&lt;/span&gt; &lt;span style="color: blue;"&gt;Overrides&lt;/span&gt; &lt;span style="color: blue;"&gt;Sub&lt;/span&gt; AddBusinessRules()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin-bottom: 0.0001pt; line-height: normal;" class="MsoNormal"&gt;&lt;span lang="EN-US" style="font-size: 8pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;        &lt;/span&gt;&lt;span style="color: green;"&gt;'Rules for "CustomerName"&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin-bottom: 0.0001pt; line-height: normal;" class="MsoNormal"&gt;&lt;span lang="EN-US" style="font-size: 8pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;        &lt;/span&gt;&lt;span style="color: blue;"&gt;Dim&lt;/span&gt; StrMaxLenthArgs &lt;span style="color: blue;"&gt;As&lt;/span&gt; &lt;span style="color: blue;"&gt;New&lt;/span&gt; DecoratedRuleArgs(&lt;span style="color: rgb(163, 21, 21);"&gt;"CustomerName"&lt;/span&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin-bottom: 0.0001pt; line-height: normal;" class="MsoNormal"&gt;&lt;span lang="EN-US" style="font-size: 8pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;        &lt;/span&gt;StrMaxLenthArgs(&lt;span style="color: rgb(163, 21, 21);"&gt;"MaxLength"&lt;/span&gt;) = 10&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin-bottom: 0.0001pt; line-height: normal;" class="MsoNormal"&gt;&lt;span lang="EN-US" style="font-size: 8pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;        &lt;/span&gt;ValidationRules.AddRule(&lt;span style="color: blue;"&gt;Of&lt;/span&gt; Customer, DecoratedRuleArgs)(&lt;span style="color: blue;"&gt; _&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin-bottom: 0.0001pt; line-height: normal;" class="MsoNormal"&gt;&lt;span lang="EN-US" style="font-size: 8pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style="color: blue;"&gt;           AddressOf&lt;/span&gt; CustomerRules.StrMaxLenth, StrMaxLenthArgs, 0)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span lang="EN-US" style="font-size: 8pt; line-height: 115%; font-family: &amp;quot;Courier New&amp;quot;;"&gt;&lt;span style=""&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 8pt; line-height: 115%; font-family: &amp;quot;Courier New&amp;quot;; color: blue;"&gt;End&lt;/span&gt;&lt;span style="font-size: 8pt; line-height: 115%; font-family: &amp;quot;Courier New&amp;quot;;"&gt; &lt;span style="color: blue;"&gt;Sub&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 8pt; line-height: 115%;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;br /&gt;
Now, while this introduces a lot of flexibility and power to rule definitions in CslaGenerator, I bet the question will arise:&lt;br /&gt;
"Does it create some default rules automatically now?"&lt;br /&gt;
&lt;br /&gt;
The short answer is NO. Rules are really very tied to your business, locale and other variables, and while the app could create string max length rules for example, you may not like the default message to name one thing.&lt;br /&gt;
&lt;br /&gt;
Instead, there will be other ways to define rules automatically that will be entirely under your control. I'll explain this in another post, since it doesn't apply to rules exclusively. I'll give you one hint: PLUGINS.&lt;br /&gt;
&lt;br /&gt;
Andrés&lt;img src="http://softwarethinking.com/blogs/xal/aggbug/6.aspx" width="1" height="1" /&gt;</content>
        <wfw:comment>http://softwarethinking.com/blogs/xal/comments/6.aspx</wfw:comment>
        <slash:comments>5</slash:comments>
        <wfw:commentRss>http://softwarethinking.com/blogs/xal/comments/commentRss/6.aspx</wfw:commentRss>
        <trackback:ping>http://softwarethinking.com/blogs/xal/services/trackbacks/6.aspx</trackback:ping>
    </entry>
    <entry>
        <title>Csla 3.0 released</title>
        <link rel="alternate" type="text/html" href="http://softwarethinking.com/blogs/xal/archive/2007/07/11/5.aspx" />
        <id>http://softwarethinking.com/blogs/xal/archive/2007/07/11/5.aspx</id>
        <published>2007-07-11T11:18:21Z</published>
        <updated>2007-07-11T11:18:21Z</updated>
        <content type="html">Rockford Lhotka has released version 3.0 of his awesome framework. Congratulations Rocky!!&lt;br /&gt;
Head over to &lt;a href="http://www.lhotka.net/weblog/CSLANET30AvailableForDownload.aspx"&gt;his site&lt;/a&gt; and read about all the new cool stuff.&lt;br /&gt;
&lt;br /&gt;
Hopefully, &lt;a href="http://groups.google.com/group/CslaGenerator"&gt;Cslagen&lt;/a&gt; will support this new stuff soon.&lt;img src="http://softwarethinking.com/blogs/xal/aggbug/5.aspx" width="1" height="1" /&gt;</content>
        <wfw:comment>http://softwarethinking.com/blogs/xal/comments/5.aspx</wfw:comment>
        <slash:comments>6</slash:comments>
        <wfw:commentRss>http://softwarethinking.com/blogs/xal/comments/commentRss/5.aspx</wfw:commentRss>
        <trackback:ping>http://softwarethinking.com/blogs/xal/services/trackbacks/5.aspx</trackback:ping>
    </entry>
    <entry>
        <title>Validating date ranges in a collection.</title>
        <link rel="alternate" type="text/html" href="http://softwarethinking.com/blogs/xal/archive/2007/05/03/4.aspx" />
        <id>http://softwarethinking.com/blogs/xal/archive/2007/05/03/4.aspx</id>
        <published>2007-05-03T20:13:22Z</published>
        <updated>2007-05-03T22:03:02Z</updated>
        <content type="html">Some time ago, I wrote some code to handle colliding date ranges inside a collection.&lt;br /&gt;
As simple as it may seem, it's not as straight forward as some may think.&lt;br /&gt;
At that time I used some active objects features and worked very well and contemplated many different scenarios.&lt;br /&gt;
Since then, I thought about doing the same for CSLA classes, this time in a  reusable way. So, here we go:&lt;br /&gt;
    &lt;br /&gt;
What cases does this cover?&lt;br /&gt;
-Two single items inside a collection can't have an overlapping date range (start/end dates).&lt;br /&gt;
-Items may or may nor be groupped (we'll come back to this later).&lt;br /&gt;
&lt;br /&gt;
What does this mean?&lt;br /&gt;
Well, for the dates themselves we have 3 basic scenarios (with their inverse variations):&lt;br /&gt;
&lt;img src="/Code/DateRanges.png" alt="" /&gt;&lt;br /&gt;
&lt;br /&gt;
That's pretty obvious. So far so good.&lt;br /&gt;
&lt;br /&gt;
Now, what are the "issues"? By issues I don't necessarily mean problematic issues, but more like things you need to take into account.&lt;br /&gt;
Issue #1 is that items inside a collection don't have references to each other.&lt;br /&gt;
Issue #2 is that you're adding items to the collection.&lt;br /&gt;
Issue #3 is that you're removing items from the collection.&lt;br /&gt;
Issue #4 is that the data in the items can and probably will change.&lt;br /&gt;
&lt;br /&gt;
Note: For issue #1, you could access the "Parent" property, do some casting and get a reference to every other item, but that's not ideal. In this demo, I'm splitting the responsability of the validation between the items and the collection. A good reason for that is that you don’t want to revalidate a child against all others every time the rules are checked, only when the items are inserted /removed or when they actually change, and not for instance, when you call ValidationRules.CheckRules.&lt;br /&gt;
&lt;br /&gt;
I’ll spare us all from the implementation details and leave that to those of you who are really interested and want to look at the code itself.&lt;br /&gt;
&lt;br /&gt;
It is worth noting that the child has a state variable that tells it whether it’s conflicting or not.&lt;br /&gt;
There are 2 props (StartDate and EndDate) that expose the text of both smartdates. Also, for the purposes of testing, you’ll notice that I’m exposing the smart dates as readonly properties too. This is only to make testing easier, and they should be removed. They should not be used directly. (Their main purpose is to make sorting in the sample grid easier)&lt;br /&gt;
&lt;br /&gt;
Now, a last feature that’s really important in all of this is grouping. Most of the times you don’t need to validate an item against every other item. Sometimes, there are categories. Let’s see a project tracker like example:&lt;br /&gt;
A project has resource assignments (let’s forget about roles for a sec). Resources may appear more than once in the project, as long as they don’t appear more than once in the same time frame. So, let’s say you assign “Joe” to a project from 2007-01-01 to 2007-02-28, and then from 2007-04-01 to 2007-05-31. That’s a perfectly valid scenario. You have a resource assigned to a project twice but with different start / end dates. The validation should only be run for Joe, and not against all resources.&lt;br /&gt;
&lt;br /&gt;
That’s where grouping comes into play.&lt;br /&gt;
The child item has function called “GetGroupIdValue()” that you can override and that returns a default value for all items in case you don’t need grouping.&lt;br /&gt;
&lt;br /&gt;
So, if you were to do this sort of validation by resource, you would override that function and return the assignment’s id in this scenario.&lt;br /&gt;
The function returns an object, so you can return anything there. In the case where you have more than one grouping key, you could create an object or structure that contains all the appropriate values and that overrides “Equals()” to correctly handle comparisons.&lt;br /&gt;
If your grouping key is subject to change, (For instance, you group by resource and role and the role may change in the child) there’s a delegate that takes care of it. You just need to trigger that delegate in order to notify the collection that the grouping for that item has changed. All you need to do is call “OnGrouppingKeyChanged()” in the base class from your property set and that’s it.&lt;br /&gt;
&lt;br /&gt;
The collection keeps a hashtable of these groups that uses the grouping key as key and contains a List(Of T) that contains all the items in that group. The hashtable is not serialized and is recreated upon deserialization.&lt;br /&gt;
&lt;br /&gt;
The sample code demoes all of these features, so if you’re interested, download the solution and try it out.&lt;br /&gt;
&lt;br /&gt;
Note that I rewrote this from scratch about a month ago, so I might have missed something, If you notice anything strange, let me know.&lt;br /&gt;
The demo app uses the error treeview to simplify the ui and to help you find the items with problems faster. All the references are included.&lt;br /&gt;
Again, remember that SDate and EDate are only there to simplify sorting, they’re not editable in the grid.&lt;br /&gt;
&lt;br /&gt;
Well, that’s it!! I hope I got you interested!&lt;br /&gt;
&lt;br /&gt;
You can get the code &lt;a href="http://www.softwarethinking.com/Code/DateRangeValidation.rar"&gt;here&lt;/a&gt;. &lt;br /&gt;
&lt;br /&gt;
Andrés&lt;img src="http://softwarethinking.com/blogs/xal/aggbug/4.aspx" width="1" height="1" /&gt;</content>
        <wfw:comment>http://softwarethinking.com/blogs/xal/comments/4.aspx</wfw:comment>
        <slash:comments>5</slash:comments>
        <wfw:commentRss>http://softwarethinking.com/blogs/xal/comments/commentRss/4.aspx</wfw:commentRss>
        <trackback:ping>http://softwarethinking.com/blogs/xal/services/trackbacks/4.aspx</trackback:ping>
    </entry>
    <entry>
        <title>Custom Remoting DataPortal with compression sequel</title>
        <link rel="alternate" type="text/html" href="http://softwarethinking.com/blogs/xal/archive/2007/04/23/3.aspx" />
        <id>http://softwarethinking.com/blogs/xal/archive/2007/04/23/3.aspx</id>
        <published>2007-04-23T01:57:36Z</published>
        <updated>2007-04-23T01:59:07Z</updated>
        <content type="html">Thanks to Rocky's feedback I reworked my initial solution to make it a little better.&lt;br /&gt;
This one doesn't involve reflection at all and it implements a custom interface that is used only between the proxy and the server component.&lt;br /&gt;
&lt;br /&gt;
Also, I see I created some confusion with an ill choice of namespace naming. I changed them to be more Csla like. The assembly name also changed. Sorry if you had trouble with that.&lt;br /&gt;
&lt;br /&gt;
Also, I separated the "dynamic proxy" part from the actual proxy that does compression so if you don't really need it, you can skip it. The new proxy is called "CompressedRemotingProxy" and the server component "CompressedRemotingPortal".&lt;br /&gt;
&lt;br /&gt;
Here's a sample for the relevant web.config section:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;!--
{\rtf1\ansi\ansicpg\lang1024\noproof65001\uc1 \deff0{\fonttbl{\f0\fnil\fcharset0\fprq1 Courier New;}}{\colortbl;??\red0\green0\blue255;\red255\green255\blue255;\red163\green21\blue21;\red255\green0\blue0;\red0\green0\blue0;}??\fs20 \cf1 \tab &amp;lt;\cf3 system.runtime.remoting\cf1 &amp;gt;\par ??\tab \tab &amp;lt;\cf3 application\cf1 &amp;gt;\par ??\tab \tab \tab &amp;lt;\cf3 service\cf1 &amp;gt;\par ??\tab \tab \tab \tab &amp;lt;\cf3 wellknown\cf1  \cf4 mode\cf1 =\cf0 "\cf1 SingleCall\cf0 "\cf1  \cf4 objectUri\cf1 =\cf0 "\cf1 RemotingPortal.rem\cf0 "\cf1  \cf4 type\cf1 =\cf0 "\cf1 Csla.Server.Hosts.RemotingPortal, Csla\cf0 "\cf1 /&amp;gt;\par ??\tab \tab \tab \tab &amp;lt;\cf3 wellknown\cf1  \cf4 mode\cf1 =\cf0 "\cf1 SingleCall\cf0 "\cf1  \cf4 objectUri\cf1 =\cf0 "\cf1 RemotingPortalCompressed.rem\cf0 "\cf1  \cf4 type\cf1 =\cf0 "\cf1 Csla.Server.CompressedRemotingPortal, Csla.Compression\cf0 "\cf1 /&amp;gt;\par ??\tab \tab \tab &amp;lt;/\cf3 service\cf1 &amp;gt;\par ??\tab \tab \tab &amp;lt;\cf3 channels\cf1 &amp;gt;\par ??\tab \tab \tab \tab &amp;lt;\cf3 channel\cf1  \cf4 ref\cf1 =\cf0 "\cf1 http\cf0 "\cf1 &amp;gt;\par ??\tab \tab \tab \tab \tab &amp;lt;\cf3 serverProviders\cf1 &amp;gt;\par ??\tab \tab \tab \tab \tab \tab &amp;lt;\cf3 provider\cf1  \cf4 ref\cf1 =\cf0 "\cf1 wsdl\cf0 "\cf1 /&amp;gt;\par ??\tab \tab \tab \tab \tab \tab &amp;lt;\cf3 formatter\cf1  \cf4 ref\cf1 =\cf0 "\cf1 soap\cf0 "\cf1  \cf4 typeFilterLevel\cf1 =\cf0 "\cf1 Full\cf0 "\cf1 /&amp;gt;\par ??\tab \tab \tab \tab \tab \tab &amp;lt;\cf3 formatter\cf1  \cf4 ref\cf1 =\cf0 "\cf1 binary\cf0 "\cf1  \cf4 typeFilterLevel\cf1 =\cf0 "\cf1 Full\cf0 "\cf1 /&amp;gt;\par ??\tab \tab \tab \tab \tab &amp;lt;/\cf3 serverProviders\cf1 &amp;gt;\par ??\tab \tab \tab \tab &amp;lt;/\cf3 channel\cf1 &amp;gt;\par ??\tab \tab \tab &amp;lt;/\cf3 channels\cf1 &amp;gt;\par ??\tab \tab &amp;lt;/\cf3 application\cf1 &amp;gt;\par ??\tab &amp;lt;/\cf3 system.runtime.remoting\cf1 &amp;gt;}
--&gt;
&lt;div style="background: white none repeat scroll 0% 50%; font-family: Courier New; font-size: 10pt; color: black; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: blue;"&gt;    &amp;lt;&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21);"&gt;system.runtime.remoting&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: blue;"&gt;        &amp;lt;&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21);"&gt;application&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: blue;"&gt;            &amp;lt;&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21);"&gt;service&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: blue;"&gt;                &amp;lt;&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21);"&gt;wellknown&lt;/span&gt;&lt;span style="color: blue;"&gt; &lt;/span&gt;&lt;span style="color: red;"&gt;mode&lt;/span&gt;&lt;span style="color: blue;"&gt;=&lt;/span&gt;"&lt;span style="color: blue;"&gt;SingleCall&lt;/span&gt;"&lt;span style="color: blue;"&gt; &lt;/span&gt;&lt;span style="color: red;"&gt;objectUri&lt;/span&gt;&lt;span style="color: blue;"&gt;=&lt;/span&gt;"&lt;span style="color: blue;"&gt;RemotingPortal.rem&lt;/span&gt;"&lt;span style="color: blue;"&gt; &lt;/span&gt;&lt;span style="color: red;"&gt;type&lt;/span&gt;&lt;span style="color: blue;"&gt;=&lt;/span&gt;"&lt;span style="color: blue;"&gt;Csla.Server.Hosts.RemotingPortal, Csla&lt;/span&gt;"&lt;span style="color: blue;"&gt;/&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: blue;"&gt;                &amp;lt;&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21);"&gt;wellknown&lt;/span&gt;&lt;span style="color: blue;"&gt; &lt;/span&gt;&lt;span style="color: red;"&gt;mode&lt;/span&gt;&lt;span style="color: blue;"&gt;=&lt;/span&gt;"&lt;span style="color: blue;"&gt;SingleCall&lt;/span&gt;"&lt;span style="color: blue;"&gt; &lt;/span&gt;&lt;span style="color: red;"&gt;objectUri&lt;/span&gt;&lt;span style="color: blue;"&gt;=&lt;/span&gt;"&lt;span style="color: blue;"&gt;RemotingPortalCompressed.rem&lt;/span&gt;"&lt;span style="color: blue;"&gt; &lt;/span&gt;&lt;span style="color: red;"&gt;type&lt;/span&gt;&lt;span style="color: blue;"&gt;=&lt;/span&gt;"&lt;span style="color: blue;"&gt;Csla.Server.CompressedRemotingPortal, Csla.Compression&lt;/span&gt;"&lt;span style="color: blue;"&gt;/&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: blue;"&gt;            &amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21);"&gt;service&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: blue;"&gt;            &amp;lt;&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21);"&gt;channels&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: blue;"&gt;                &amp;lt;&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21);"&gt;channel&lt;/span&gt;&lt;span style="color: blue;"&gt; &lt;/span&gt;&lt;span style="color: red;"&gt;ref&lt;/span&gt;&lt;span style="color: blue;"&gt;=&lt;/span&gt;"&lt;span style="color: blue;"&gt;http&lt;/span&gt;"&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: blue;"&gt;                    &amp;lt;&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21);"&gt;serverProviders&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: blue;"&gt;                        &amp;lt;&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21);"&gt;provider&lt;/span&gt;&lt;span style="color: blue;"&gt; &lt;/span&gt;&lt;span style="color: red;"&gt;ref&lt;/span&gt;&lt;span style="color: blue;"&gt;=&lt;/span&gt;"&lt;span style="color: blue;"&gt;wsdl&lt;/span&gt;"&lt;span style="color: blue;"&gt;/&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: blue;"&gt;                        &amp;lt;&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21);"&gt;formatter&lt;/span&gt;&lt;span style="color: blue;"&gt; &lt;/span&gt;&lt;span style="color: red;"&gt;ref&lt;/span&gt;&lt;span style="color: blue;"&gt;=&lt;/span&gt;"&lt;span style="color: blue;"&gt;soap&lt;/span&gt;"&lt;span style="color: blue;"&gt; &lt;/span&gt;&lt;span style="color: red;"&gt;typeFilterLevel&lt;/span&gt;&lt;span style="color: blue;"&gt;=&lt;/span&gt;"&lt;span style="color: blue;"&gt;Full&lt;/span&gt;"&lt;span style="color: blue;"&gt;/&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: blue;"&gt;                        &amp;lt;&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21);"&gt;formatter&lt;/span&gt;&lt;span style="color: blue;"&gt; &lt;/span&gt;&lt;span style="color: red;"&gt;ref&lt;/span&gt;&lt;span style="color: blue;"&gt;=&lt;/span&gt;"&lt;span style="color: blue;"&gt;binary&lt;/span&gt;"&lt;span style="color: blue;"&gt; &lt;/span&gt;&lt;span style="color: red;"&gt;typeFilterLevel&lt;/span&gt;&lt;span style="color: blue;"&gt;=&lt;/span&gt;"&lt;span style="color: blue;"&gt;Full&lt;/span&gt;"&lt;span style="color: blue;"&gt;/&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: blue;"&gt;                    &amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21);"&gt;serverProviders&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: blue;"&gt;                &amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21);"&gt;channel&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: blue;"&gt;            &amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21);"&gt;channels&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: blue;"&gt;        &amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21);"&gt;application&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: blue;"&gt;    &amp;lt;/&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21);"&gt;system.runtime.remoting&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
And here's the same for the client's app.config:&lt;br /&gt;
&lt;br /&gt;
&lt;!--
{\rtf1\ansi\ansicpg\lang1024\noproof65001\uc1 \deff0{\fonttbl{\f0\fnil\fcharset0\fprq1 Courier New;}}{\colortbl;??\red0\green0\blue255;\red255\green255\blue255;\red163\green21\blue21;\red255\green0\blue0;\red0\green0\blue0;}??\fs20 \cf1 \tab \tab &amp;lt;\cf3 add\cf1  \cf4 key\cf1 =\cf0 "\cf1 CslaDataPortalProxy\cf0 "\cf1  \cf4 value\cf1 =\cf0 "\cf1 Csla.DataPortalClient.CompressedRemotingProxy, Csla.Compression\cf0 "\cf1 /&amp;gt;\par ??\tab \tab &amp;lt;\cf3 add\cf1  \cf4 key\cf1 =\cf0 "\cf1 CslaAuthentication\cf0 "\cf1  \cf4 value\cf1 =\cf0 "\cf1 Csla\cf0 "\cf1 /&amp;gt;\par ??\tab \tab &amp;lt;\cf3 add\cf1  \cf4 key\cf1 =\cf0 "\cf1 CompressedDataPortalUrl\cf0 "\cf1  \cf4 value\cf1 =\cf0 "\cf1 http://localhost/CompressedPortal/RemotingPortalCompressed.rem\cf0 "\cf1 /&amp;gt;\par ??\tab \tab &amp;lt;\cf3 add\cf1  \cf4 key\cf1 =\cf0 "\cf1 CslaDataPortalUrl\cf0 "\cf1  \cf4 value\cf1 =\cf0 "\cf1 http://localhost/CompressedPortal/RemotingPortalCompressed.rem\cf0 "\cf1 /&amp;gt;}
--&gt;
&lt;div style="background: white none repeat scroll 0% 50%; font-family: Courier New; font-size: 10pt; color: black; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: blue;"&gt;        &amp;lt;&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21);"&gt;add&lt;/span&gt;&lt;span style="color: blue;"&gt; &lt;/span&gt;&lt;span style="color: red;"&gt;key&lt;/span&gt;&lt;span style="color: blue;"&gt;=&lt;/span&gt;"&lt;span style="color: blue;"&gt;CslaDataPortalProxy&lt;/span&gt;"&lt;span style="color: blue;"&gt; &lt;/span&gt;&lt;span style="color: red;"&gt;value&lt;/span&gt;&lt;span style="color: blue;"&gt;=&lt;/span&gt;"&lt;span style="color: blue;"&gt;Csla.DataPortalClient.CompressedRemotingProxy, Csla.Compression&lt;/span&gt;"&lt;span style="color: blue;"&gt;/&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: blue;"&gt;        &amp;lt;&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21);"&gt;add&lt;/span&gt;&lt;span style="color: blue;"&gt; &lt;/span&gt;&lt;span style="color: red;"&gt;key&lt;/span&gt;&lt;span style="color: blue;"&gt;=&lt;/span&gt;"&lt;span style="color: blue;"&gt;CslaAuthentication&lt;/span&gt;"&lt;span style="color: blue;"&gt; &lt;/span&gt;&lt;span style="color: red;"&gt;value&lt;/span&gt;&lt;span style="color: blue;"&gt;=&lt;/span&gt;"&lt;span style="color: blue;"&gt;Csla&lt;/span&gt;"&lt;span style="color: blue;"&gt;/&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: blue;"&gt;        &amp;lt;&lt;/span&gt;&lt;span style="color: rgb(163, 21, 21);"&gt;add&lt;/span&gt;&lt;span style="color: blue;"&gt; &lt;/span&gt;&lt;span style="color: red;"&gt;key&lt;/span&gt;&lt;span style="color: blue;"&gt;=&lt;/span&gt;"&lt;span style="color: blue;"&gt;CompressedDataPortalUrl&lt;/span&gt;"&lt;span style="color: blue;"&gt; &lt;/span&gt;&lt;span style="color: red;"&gt;value&lt;/span&gt;&lt;span style="color: blue;"&gt;=&lt;/span&gt;"&lt;span style="color: blue;"&gt;http://localhost/CompressedPortal/RemotingPortalCompressed.rem&lt;/span&gt;"&lt;span style="color: blue;"&gt;/&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: blue;"&gt; &lt;!--
{\rtf1\ansi\ansicpg\lang1024\noproof65001\uc1 \deff0{\fonttbl{\f0\fnil\fcharset0\fprq1 Courier New;}}{\colortbl;??\red0\green0\blue255;\red255\green255\blue255;\red0\green128\blue0;}??\fs20 \cf1 \tab \tab &amp;lt;-\cf3 &amp;lt;add key="CslaDataPortalUrl" value="http://localhost/CompressedPortal/RemotingPortalCompressed.rem"/&amp;gt;\cf1-&amp;gt;}
--&gt; &lt;/span&gt;&lt;/p&gt;
&lt;div style="background: white none repeat scroll 0% 50%; font-family: Courier New; font-size: 10pt; color: black; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: blue;"&gt;        &amp;lt;!--&lt;/span&gt;&lt;span style="color: green;"&gt;&amp;lt;add key="CslaDataPortalUrl" value="http://localhost/CompressedPortal/RemotingPortalCompressed.rem"/&amp;gt;&lt;/span&gt;&lt;span style="color: blue;"&gt;--&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
I created a new parameter for passing the url: CompressedDataPortalUrl. If the parameter is not found, it falls back to CslaDataPortalUrl (notice it's commented out in the snippet).&lt;br /&gt;
&lt;br /&gt;
Make sure you test the server component from the browser in case you have something wrong in your config. Paste this as the url in your browser:&lt;br /&gt;
http://localhost/CompressedPortal/RemotingPortalCompressed.rem?wsdl&lt;br /&gt;
&lt;br /&gt;
If you get an xml result then you're good to go.&lt;br /&gt;
&lt;br /&gt;
For those of you who are interested in using the dynamic changing of dataportal types, use "CustomDataPortalRemotingProxy" instead of CompressedRemotingProxy in your app.config.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can get the source code &lt;a href="http://www.softwarethinking.com/code/Csla.Compression.zip"&gt;here&lt;/a&gt;.&lt;br /&gt;
Well, that's it. Enjoy!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Andrés&lt;img src="http://softwarethinking.com/blogs/xal/aggbug/3.aspx" width="1" height="1" /&gt;</content>
        <wfw:comment>http://softwarethinking.com/blogs/xal/comments/3.aspx</wfw:comment>
        <slash:comments>51</slash:comments>
        <wfw:commentRss>http://softwarethinking.com/blogs/xal/comments/commentRss/3.aspx</wfw:commentRss>
        <trackback:ping>http://softwarethinking.com/blogs/xal/services/trackbacks/3.aspx</trackback:ping>
    </entry>
    <entry>
        <title>Custom Remoting DataPortal with compression</title>
        <link rel="alternate" type="text/html" href="http://softwarethinking.com/blogs/xal/archive/2007/04/03/2.aspx" />
        <id>http://softwarethinking.com/blogs/xal/archive/2007/04/03/2.aspx</id>
        <published>2007-04-03T13:22:11Z</published>
        <updated>2007-04-23T01:59:58Z</updated>
        <content type="html">To start things off, I thought of writing about something I've done very recently. Have you ever used csla's remoting portal over a slow network? Internet anyone? Not everybody has a super fast connection and even people that do have days where it seems like they're on 56k dialup...&lt;br /&gt;
I have a 1Mbps connection and even though it's pretty fast for download, it's upload speed sucks , so hosting a remoting portal here can get irritating!! (For the ones on the other side at least).&lt;br /&gt;
&lt;br /&gt;
Yes, there's a performance hit because it adds more processing to the overall process, but the size of the transfers are dramatically reduced so that makes up for the processing time. Another thing to take into account is that you don't _have_ to use this dataportal OR the other. You can create both portals in one site and use one or the other depending on your needs, you just need to change your app config, or you could change the url in code on the fly.&lt;br /&gt;
&lt;br /&gt;
So, let's dive into it.&lt;br /&gt;
&lt;br /&gt;
First, for the anxious, how to use it. Assuming you compiled it, added the appropriate dlls to the web site's bin folder, here's the configuration:&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;system.runtime.remoting&amp;gt;&lt;br /&gt;
        &amp;lt;application&amp;gt;&lt;br /&gt;
            &amp;lt;service&amp;gt;&lt;br /&gt;
                &amp;lt;wellknown mode="SingleCall" objectUri="RemotingPortal.rem" type="Csla.Server.Hosts.RemotingPortal, Csla"/&amp;gt;&lt;br /&gt;
                &lt;span style="font-weight: bold;"&gt;&amp;lt;wellknown mode="SingleCall" objectUri="RemotingPortalCompressed.rem" type="Csla.DataPortal.Compressed.Server.RemotingPortalCompressed, Csla.DataPortal.Compressed"/&amp;gt;&lt;/span&gt;&lt;br /&gt;
            &amp;lt;/service&amp;gt;&lt;br /&gt;
            &amp;lt;channels&amp;gt;&lt;br /&gt;
                &amp;lt;channel ref="http"&amp;gt;&lt;br /&gt;
                    &amp;lt;serverProviders&amp;gt;&lt;br /&gt;
                        &amp;lt;provider ref="wsdl"/&amp;gt;&lt;br /&gt;
                        &amp;lt;formatter ref="soap" typeFilterLevel="Full"/&amp;gt;&lt;br /&gt;
                        &amp;lt;formatter ref="binary" typeFilterLevel="Full"/&amp;gt;&lt;br /&gt;
                    &amp;lt;/serverProviders&amp;gt;&lt;br /&gt;
                &amp;lt;/channel&amp;gt;&lt;br /&gt;
            &amp;lt;/channels&amp;gt;&lt;br /&gt;
        &amp;lt;/application&amp;gt;&lt;br /&gt;
    &amp;lt;/system.runtime.remoting&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There isn't a single change from the regular config, other than the fact that I have 2 services a standard portal and a compressed one. You don't need both, so you can remove the first one if you don't plan to actually use it...&lt;br /&gt;
&lt;br /&gt;
Now to the client's app.config:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;appSettings&amp;gt;&lt;br /&gt;
    &amp;lt;add key="CslaDataPortalProxy"&lt;br /&gt;
    value="&lt;span style="font-weight: bold;"&gt;Csla.DataPortalCompressed.CustomDataPortalRemotingProxy, Csla.DataPortal.Compressed&lt;/span&gt;"/&amp;gt;&lt;br /&gt;
    &amp;lt;add key="CslaAuthentication" value="Csla" /&amp;gt;&lt;br /&gt;
    &amp;lt;add key="CslaDataPortalUrl"&lt;br /&gt;
    value="&lt;span style="font-weight: bold;"&gt;http://&amp;lt;portal's url&amp;gt;/RemotingPortalCompressed.rem&lt;/span&gt;"/&amp;gt;&lt;br /&gt;
&amp;lt;/appSettings&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Simple uh? For those used to setting up a remoting portal, I highlighted the differences with what you'd normally do.&lt;br /&gt;
With these simple changes, I have been able to use the portal succesfully in an application that's been working for a long time. No code changes were needed (only config files), just add a reference in the main app to the compressed dataportal and that's it.&lt;br /&gt;
&lt;br /&gt;
Now, how does it work?&lt;br /&gt;
&lt;br /&gt;
The dataportal has a server side object (the portal itself) and a client side proxy. The server side component is simply an object with 4 functions: Create, Fetch, Update and Delete. They all return a DataPortalResult object.&lt;br /&gt;
If you look at the remoting portal in rocky's code, all these methods do is redirect those calls to a simple dataportal. My implementation does this exact same thing, although it alters the resulting DataPortalResult in order to compress the object being transported. Here's the Fetch method to give you an idea:&lt;br /&gt;
&lt;br /&gt;
&lt;!--
{\rtf1\ansi\ansicpg\lang1024\noproof1252\uc1 \deff0{\fonttbl{\f0\fnil\fcharset0\fprq1 Courier New;}}{\colortbl;??\red0\green0\blue0;\red255\green255\blue255;\red0\green0\blue255;}??\fs20         \cf3 Public\cf0  \cf3 Function\cf0  Fetch(\cf3 ByVal\cf0  objectType \cf3 As\cf0  System.Type, \cf3 ByVal\cf0  criteria \cf3 As\cf0  \cf3 Object\cf0 , \cf3 ByVal\cf0  context \cf3 As\cf0  DataPortalContext) \cf3 As\cf0  DataPortalResult \cf3 Implements\cf0  IDataPortalServer.Fetch\par ??            \cf3 Dim\cf0  dp \cf3 As\cf0  \cf3 New\cf0  Csla.Server.DataPortal\par ??            \cf3 Return\cf0  Compression.GetCompressedResult(dp.Fetch(objectType, criteria, context))\par ??        \cf3 End\cf0  \cf3 Function}
--&gt;
&lt;div style="background: white none repeat scroll 0% 50%; font-family: Courier New; font-size: 10pt; color: black; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;
&lt;p style="margin: 0px;"&gt;  &lt;span style="color: blue;"&gt;Public&lt;/span&gt; &lt;span style="color: blue;"&gt;Function&lt;/span&gt; Fetch(&lt;span style="color: blue;"&gt;ByVal&lt;/span&gt; objectType &lt;span style="color: blue;"&gt;As&lt;/span&gt; System.Type, _&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: blue;"&gt;  ByVal&lt;/span&gt; criteria &lt;span style="color: blue;"&gt;As&lt;/span&gt; &lt;span style="color: blue;"&gt;Object&lt;/span&gt;, &lt;span style="color: blue;"&gt;ByVal&lt;/span&gt; context &lt;span style="color: blue;"&gt;As&lt;/span&gt; DataPortalContext) _&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: blue;"&gt;  As&lt;/span&gt; DataPortalResult &lt;span style="color: blue;"&gt;Implements&lt;/span&gt; IDataPortalServer.Fetch&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;      &lt;span style="color: blue;"&gt;Dim&lt;/span&gt; dp &lt;span style="color: blue;"&gt;As&lt;/span&gt; &lt;span style="color: blue;"&gt;New&lt;/span&gt; Csla.Server.DataPortal&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;      &lt;span style="color: blue;"&gt;Return&lt;/span&gt; Compression.GetCompressedResult( _&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;          dp.Fetch(objectType, criteria, context))&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;  &lt;span style="color: blue;"&gt;End&lt;/span&gt; &lt;span style="color: blue;"&gt;Function&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;br /&gt;
As you can see, the only thing that changes here from the default implementation is that I call a function that gets a new compressed dataportal result.&lt;br /&gt;
&lt;br /&gt;
The same process is used for create and update. Delete doesn't need it, since there is no object going back to the server.&lt;br /&gt;
Update has one more difference, since it's the only instance where you send an object to the dataportal, the client compresses the object before sending it, so it needs to be decompressed before calling dp.Update.&lt;br /&gt;
&lt;br /&gt;
The client proxy behaves similarly, with the difference that it needs to get an uncompressed result:&lt;br /&gt;
&lt;br /&gt;
&lt;!--
{\rtf1\ansi\ansicpg\lang1024\noproof1252\uc1 \deff0{\fonttbl{\f0\fnil\fcharset0\fprq1 Courier New;}}{\colortbl;??\red0\green0\blue0;\red255\green255\blue255;\red0\green0\blue255;}??\fs20     \cf3 Public\cf0  \cf3 Function\cf0  Fetch(\cf3 ByVal\cf0  objectType \cf3 As\cf0  System.Type, \cf3 ByVal\cf0  criteria \cf3 As\cf0  \cf3 Object\cf0 , \cf3 ByVal\cf0  context \cf3 As\cf0  Csla.Server.DataPortalContext) \cf3 As\cf0  Csla.Server.DataPortalResult \cf3 Implements\cf0  Csla.Server.IDataPortalServer.Fetch\par ??        \cf3 Return\cf0  Compression.GetUncompressedResult(GetProxy().Fetch(objectType, criteria, context))\par ??    \cf3 End\cf0  \cf3 Function}
--&gt;
&lt;div style="background: white none repeat scroll 0% 50%; font-family: Courier New; font-size: 10pt; color: black; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;
&lt;p style="margin: 0px;"&gt;    &lt;span style="color: blue;"&gt;Public&lt;/span&gt; &lt;span style="color: blue;"&gt;Function&lt;/span&gt; Fetch(&lt;span style="color: blue;"&gt;ByVal&lt;/span&gt; objectType &lt;span style="color: blue;"&gt;As&lt;/span&gt; System.Type, _&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: blue;"&gt;    ByVal&lt;/span&gt; criteria &lt;span style="color: blue;"&gt;As&lt;/span&gt; &lt;span style="color: blue;"&gt;Object&lt;/span&gt;, _&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: blue;"&gt;    ByVal&lt;/span&gt; context &lt;span style="color: blue;"&gt;As&lt;/span&gt; Csla.Server.DataPortalContext) _&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: blue;"&gt;    As&lt;/span&gt; Csla.Server.DataPortalResult _&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: blue;"&gt;    Implements&lt;/span&gt; Csla.Server.IDataPortalServer.Fetch&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;        &lt;span style="color: blue;"&gt;Return&lt;/span&gt; Compression.GetUncompressedResult(GetProxy().Fetch( _&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;        objectType, criteria, context))&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;    &lt;span style="color: blue;"&gt;End&lt;/span&gt; &lt;span style="color: blue;"&gt;Function&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
GetProxy only get's a cached instance of the proxy to be used.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You'll notice one more thing here. This proxy has a feature that let's you swap proxies on the fly.&lt;br /&gt;
You don't need to use it or even be aware that it exists. But if you're in a situation where you need to swap between a simple portal and a remoting portal on the fly, all you need to do is call:&lt;br /&gt;
Csla.DataPortalCompressed.CustomDataPortalRemotingProxy.DataPortalType = _&lt;br /&gt;
        Csla.DataPortalCompressed.DataPortalTypes.SimplePortal &lt;br /&gt;
&lt;br /&gt;
This allows you to switch back and forth between remoting and simple dataportal (and even enterprise services) in case you ever need to.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The portal uses BZip2 compression provided by icsharpcode's #ziplib (it's opensource). You can get that here:&lt;br /&gt;
http://www.icsharpcode.com/OpenSource/SharpZipLib/Default.aspx&lt;br /&gt;
&lt;br /&gt;
Well, I hope you enjoyed my first article and that you find it useful.&lt;br /&gt;
&lt;br /&gt;
&lt;s&gt;You can get the code for this article here.&lt;/s&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Update:&lt;/strong&gt;&lt;br /&gt;
The Code for this article has been updated. Take a look at &lt;a href="http://www.softwarethinking.com/blogs/xal/archive/2007/04/23/3.aspx"&gt;this post&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Andrés&lt;img src="http://softwarethinking.com/blogs/xal/aggbug/2.aspx" width="1" height="1" /&gt;</content>
        <wfw:comment>http://softwarethinking.com/blogs/xal/comments/2.aspx</wfw:comment>
        <slash:comments>9</slash:comments>
        <wfw:commentRss>http://softwarethinking.com/blogs/xal/comments/commentRss/2.aspx</wfw:commentRss>
        <trackback:ping>http://softwarethinking.com/blogs/xal/services/trackbacks/2.aspx</trackback:ping>
    </entry>
    <entry>
        <title>Yet another blogging attempt</title>
        <link rel="alternate" type="text/html" href="http://softwarethinking.com/blogs/xal/archive/2007/04/02/1.aspx" />
        <id>http://softwarethinking.com/blogs/xal/archive/2007/04/02/1.aspx</id>
        <published>2007-04-02T14:36:12Z</published>
        <updated>2007-04-02T14:36:12Z</updated>
        <content type="html">Well, having found a new "suitable" place to maintain a blog, here I go again...&lt;br /&gt;
I'll try to keep a consistent post rate this time and hopefully write some useful articles. As for the aim, there isn't any for now, so I'll post on a variety of subjects and time will tell.&lt;br /&gt;
&lt;br /&gt;
Stay tuned!&lt;img src="http://softwarethinking.com/blogs/xal/aggbug/1.aspx" width="1" height="1" /&gt;</content>
        <wfw:comment>http://softwarethinking.com/blogs/xal/comments/1.aspx</wfw:comment>
        <slash:comments>3</slash:comments>
        <wfw:commentRss>http://softwarethinking.com/blogs/xal/comments/commentRss/1.aspx</wfw:commentRss>
        <trackback:ping>http://softwarethinking.com/blogs/xal/services/trackbacks/1.aspx</trackback:ping>
    </entry>
</feed>
