<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:copyright="http://blogs.law.harvard.edu/tech/rss" xmlns:image="http://purl.org/rss/1.0/modules/image/">
    <channel>
        <title>.NET General</title>
        <link>http://www.28061984.nl/category/10.aspx</link>
        <description>.NET General</description>
        <language>nl-NL</language>
        <copyright>Leon Meijer</copyright>
        <managingEditor>blog@leonmeijer.nl</managingEditor>
        <generator>Subtext Version 1.9.5.177</generator>
        <item>
            <title>CodeRush Intelligent Paste for a Property within a XAF Domain Object</title>
            <link>http://leonmeijer.nl/archive/2008/11/22/132.aspx</link>
            <description>&lt;p&gt;If you have installed Developer Express' &lt;a href="http://www.devexpress.com/CodeRush "&gt;CodeRush&lt;/a&gt; plugin within Visual Studio, you'd probably already know the &lt;a href="http://www.devexpress.com/Products/Visual_Studio_Add-in/Coding_Assistance/Clipboard.xml"&gt;Intelligent Paste&lt;/a&gt; feature. If you don't, let me briefly explain it to you.&lt;/p&gt;  &lt;p&gt;The Intelligent Paste let you auto generate the C#/VB.NET code for a property which accesses a member variable. For example, you type:&lt;/p&gt;  &lt;div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, 'Courier New', courier, monospace; background-color: #f4f4f4"&gt;   &lt;div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;     &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;private&lt;/span&gt; &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; _Name;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;p&gt; &lt;/p&gt;

&lt;p&gt;You select and copy the line to your clipboard and paste it wherever you like. Instead of pasting it 1:1, it replaces the text with the generated property. Like this:&lt;/p&gt;

&lt;div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, 'Courier New', courier, monospace; background-color: #f4f4f4"&gt;
  &lt;div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;
    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   1:&lt;/span&gt;         &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; Name&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   2:&lt;/span&gt;         {&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   3:&lt;/span&gt;             get { &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; _Name; }&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   4:&lt;/span&gt;             set { SetPropertyValue&amp;lt;&lt;span style="color: #0000ff"&gt;string&lt;/span&gt;&amp;gt;(&lt;span style="color: #006080"&gt;"Name"&lt;/span&gt;, &lt;span style="color: #0000ff"&gt;ref&lt;/span&gt; _Name, &lt;span style="color: #0000ff"&gt;value&lt;/span&gt;); }&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   5:&lt;/span&gt;         }&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;p&gt; &lt;/p&gt;

&lt;p&gt;Because I'm currently building an application on top of the &lt;a href="www.devexpress.com/Products/NET/Application_Framework/"&gt;eXpressAppFramework&lt;/a&gt;, I required a Intelligent Paste template that generates properties that will function with the framework's object-relational mapper &lt;a href="www.devexpress.com/Products/NET/ORM/"&gt;XPO&lt;/a&gt;. XPO requires a customized set-clause with a call to the SetPropertyValue method to flag that an object has been modified (and has to be updated in a DBMS).&lt;/p&gt;

&lt;p&gt;Ok, here are the steps:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;In &lt;strong&gt;Visual Studio&lt;/strong&gt;, go to the &lt;strong&gt;DevExpress&lt;/strong&gt; menu and choose &lt;strong&gt;Options...&lt;/strong&gt; &lt;/li&gt;

  &lt;li&gt;In the dropdown box next to the label &lt;strong&gt;Level, &lt;/strong&gt;select &lt;strong&gt;Advanced;&lt;/strong&gt; &lt;/li&gt;

  &lt;li&gt;In the tree, go to &lt;strong&gt;/Editor/Clipboard/Intelligent Paste&lt;/strong&gt; or type &lt;strong&gt;Intelligent Paste&lt;/strong&gt; in the search box; &lt;/li&gt;

  &lt;li&gt;Select &lt;strong&gt;Property (prefixed field)&lt;/strong&gt; from the list, right-click it and choose &lt;strong&gt;Duplicate;&lt;/strong&gt; &lt;/li&gt;

  &lt;li&gt;Give the new template a name, like &lt;strong&gt;XPO Property (prefixed field);&lt;/strong&gt; &lt;/li&gt;

  &lt;li&gt;In the &lt;strong&gt;Replacement&lt;/strong&gt; text box, type: &lt;/li&gt;
&lt;/ul&gt;

&lt;div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, 'Courier New', courier, monospace; background-color: #f4f4f4"&gt;
  &lt;div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;
    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #0000ff"&gt;public&lt;/span&gt; %StaticModifier1%%Type1% %PartialIdentifier1%&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;{ &lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;  get { &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; «Marker(60)»%FieldVarPrefix1%%PartialIdentifier1%; }&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;  set { SetPropertyValue&amp;lt;%Type1%&amp;gt;(&lt;span style="color: #006080"&gt;"«?PropertyNameFromField(%PartialIdentifier1%)»"&lt;/span&gt;, &lt;span style="color: #0000ff"&gt;ref&lt;/span&gt; %FieldVarPrefix1%%PartialIdentifier1%, &lt;span style="color: #0000ff"&gt;value&lt;/span&gt;); }&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;}&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;ul&gt;
  &lt;li&gt;In the list named &lt;strong&gt;Use:&lt;/strong&gt;, scroll down till &lt;strong&gt;XAF Business Class&lt;/strong&gt;. Click on the check box until it gets a &lt;strong&gt;green check mark;&lt;/strong&gt; &lt;/li&gt;

  &lt;li&gt;&lt;em&gt;See the screen shot below&lt;/em&gt; &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="http://leonmeijer.nl/images/leonmeijer_nl/WindowsLiveWriter/CodeRushIntelligentPasteforaPropertywith_FA0B/image_2.png"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="375" alt="image" src="http://leonmeijer.nl/images/leonmeijer_nl/WindowsLiveWriter/CodeRushIntelligentPasteforaPropertywith_FA0B/image_thumb.png" width="518" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Again select &lt;strong&gt;Property (prefixed field)&lt;/strong&gt; from the list; &lt;/li&gt;

  &lt;li&gt;In the list named &lt;strong&gt;Use:&lt;/strong&gt;, scroll down till &lt;strong&gt;XAF Business Class&lt;/strong&gt;. Click on the check box until it gets a &lt;strong&gt;red check mark;&lt;/strong&gt; &lt;/li&gt;

  &lt;li&gt;Do the same for the &lt;strong&gt;Property (prefixed readonly field)&lt;/strong&gt; &lt;/li&gt;

  &lt;li&gt;Click OK &lt;/li&gt;

  &lt;li&gt;&lt;em&gt;See the screen shot below&lt;/em&gt; &lt;/li&gt;

  &lt;li&gt;Press OK in the Options dialog&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="http://leonmeijer.nl/images/leonmeijer_nl/WindowsLiveWriter/CodeRushIntelligentPasteforaPropertywith_FA0B/image_6.png"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="375" alt="image" src="http://leonmeijer.nl/images/leonmeijer_nl/WindowsLiveWriter/CodeRushIntelligentPasteforaPropertywith_FA0B/image_thumb_2.png" width="518" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt; &lt;/p&gt;

&lt;p&gt;By selecting and excluding the &lt;strong&gt;XAF Business Class&lt;/strong&gt;, you create a new Intelligent Paste template that will function only in the XAF classes that require custom property implementations. If you don't use XAF and would like to implement the same trick for &lt;strong&gt;XPO&lt;/strong&gt;, select and exclude the &lt;strong&gt;In XPO Persistent Class&lt;/strong&gt; instead.&lt;/p&gt;

&lt;p&gt; &lt;/p&gt;

&lt;p&gt;Hope this helps,&lt;/p&gt;

&lt;p&gt;Leon&lt;/p&gt;&lt;img src="http://leonmeijer.nl/aggbug/132.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Leon Meijer</dc:creator>
            <guid>http://leonmeijer.nl/archive/2008/11/22/132.aspx</guid>
            <pubDate>Sat, 22 Nov 2008 16:54:59 GMT</pubDate>
            <comments>http://leonmeijer.nl/archive/2008/11/22/132.aspx#feedback</comments>
            <wfw:commentRss>http://leonmeijer.nl/comments/commentRss/132.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Visual Studio 2008 SP1 released</title>
            <link>http://leonmeijer.nl/archive/2008/08/13/124.aspx</link>
            <description>&lt;p&gt;Microsoft released SP1 of Visual Studio 2008 and the .NET Framework 3.5. You can download it as &lt;a href="http://www.microsoft.com/downloads/details.aspx?familyid=FBEE1648-7106-44A7-9649-6D9F6D58056E&amp;amp;displaylang=en"&gt;exe&lt;/a&gt; or &lt;a href="http://go.microsoft.com/fwlink/?LinkId=122095"&gt;iso&lt;/a&gt;. If you want to upgrade SQL Server 2005 to SQL Server 2008 (also just released!), you are required to upgrade VS 2008 to SP1.&lt;/p&gt;  &lt;p&gt;From the &lt;a href="http://msdn.microsoft.com/en-us/vstudio/products/cc533447.aspx"&gt;MSDN web site&lt;/a&gt;:&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Visual Studio 2008 SP1 delivers: &lt;/strong&gt;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Improved WPF designers &lt;/li&gt;    &lt;li&gt;SQL Server 2008 support &lt;/li&gt;    &lt;li&gt;ADO.NET Entity Designer &lt;/li&gt;    &lt;li&gt;Visual Basic and Visual C++ components and tools (including an MFC-based Office 2007 style ‘Ribbon’) &lt;/li&gt;    &lt;li&gt;Visual Studio Team System Team Foundation Server (TFS) addresses customer feedback on version control usability and performance, email integration with work item tracking and full support for hosting on SQL Server 2008 &lt;/li&gt;    &lt;li&gt;Richer JavaScript support, enhanced AJAX and data tools, and Web site deployment improvements&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;strong&gt;The .NET Framework 3.5 SP1 delivers:&lt;/strong&gt;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Performance increases between 20-45% for WPF-based applications – without having to change any code &lt;/li&gt;    &lt;li&gt;WCF improvements that give developers more control over the way they access data and services &lt;/li&gt;    &lt;li&gt;Streamlined installation experience for client applications &lt;/li&gt;    &lt;li&gt;Improvements in the area of data platform, such as the ADO.NET Entity Framework, ADO.NET Data Services and support for SQL Server 2008’s new features&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt; &lt;/p&gt;  &lt;p&gt;I installed the service packs on my machine. The version of Visual Studio 2008 is now 9.0.30729.1 SP and .NET is 3.5 SP1.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://leonmeijer.nl/images/leonmeijer_nl/WindowsLiveWriter/VisualStudio2008SP1released_EC25/image_2.png"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="190" alt="image" src="http://leonmeijer.nl/images/leonmeijer_nl/WindowsLiveWriter/VisualStudio2008SP1released_EC25/image_thumb.png" width="244" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://leonmeijer.nl/aggbug/124.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Leon Meijer</dc:creator>
            <guid>http://leonmeijer.nl/archive/2008/08/13/124.aspx</guid>
            <pubDate>Wed, 13 Aug 2008 14:47:47 GMT</pubDate>
            <comments>http://leonmeijer.nl/archive/2008/08/13/124.aspx#feedback</comments>
            <slash:comments>1</slash:comments>
            <wfw:commentRss>http://leonmeijer.nl/comments/commentRss/124.aspx</wfw:commentRss>
        </item>
        <item>
            <title>AssemblyVersion vs. AssemblyFileVersion</title>
            <link>http://leonmeijer.nl/archive/2008/03/14/87.aspx</link>
            <description>&lt;p&gt;Oops. I forgot the difference so I looked for it.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;AssemblyVersion&lt;/strong&gt;: Where other assemblies that reference your assembly will look at. If this number changes, your references have to be updated.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;AssemblyFileVersion:&lt;/strong&gt; Used for deployment. You can increase this number for every deployment. It is used by setup programs.&lt;/p&gt;&lt;img src="http://leonmeijer.nl/aggbug/87.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Leon Meijer</dc:creator>
            <guid>http://leonmeijer.nl/archive/2008/03/14/87.aspx</guid>
            <pubDate>Fri, 14 Mar 2008 12:07:16 GMT</pubDate>
            <comments>http://leonmeijer.nl/archive/2008/03/14/87.aspx#feedback</comments>
            <slash:comments>1</slash:comments>
            <wfw:commentRss>http://leonmeijer.nl/comments/commentRss/87.aspx</wfw:commentRss>
        </item>
    </channel>
</rss>
