<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.oosterkamp.nl/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title /><link>http://blogs.oosterkamp.nl/blogs/</link><description>Dé specialist in .NET trainingen en consultancy</description><dc:language>en-US</dc:language><generator>CommunityServer 2007.1 (Build: 20917.1142)</generator><item><title>Precompile ASP.NET MVC views</title><link>http://blogs.oosterkamp.nl/blogs/erik/archive/2012/01/25/precompile-asp-net-mvc-views.aspx</link><pubDate>Wed, 25 Jan 2012 07:08:05 GMT</pubDate><guid isPermaLink="false">6da500ce-fa22-46ef-b417-4864733669f6:338</guid><dc:creator>Erik</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Views in an ASP.NET MVC project will not be compiled by default. Syntax errors made in views will only show up as runtime errors in the browser.&lt;/p&gt;  &lt;p&gt;There is a small hack to include the views in your compile process:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Unload your project file (.csproj or .vbproj)&lt;/li&gt;    &lt;li&gt;Edit this file and look for the line: &amp;lt;MvcBuildViews&amp;gt;false&amp;lt;/MvcBuildViews&amp;gt;&lt;/li&gt;    &lt;li&gt;Change false to … true, indeed you know what you are doing.&lt;/li&gt;    &lt;li&gt;Save the projectfile and you are good to go.&lt;/li&gt; &lt;/ul&gt;&lt;img src="http://blogs.oosterkamp.nl/aggbug.aspx?PostID=338" width="1" height="1"&gt;</description></item><item><title>Code productivity tools</title><link>http://blogs.oosterkamp.nl/blogs/erik/archive/2011/12/14/code-productivity-tools.aspx</link><pubDate>Wed, 14 Dec 2011 07:09:14 GMT</pubDate><guid isPermaLink="false">6da500ce-fa22-46ef-b417-4864733669f6:337</guid><dc:creator>Erik</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;The excellent Visual Studio Toolbox series on Channel 9 published three videos on the most popular code productivity tools for Visual Studio:&lt;/p&gt;  &lt;p&gt;DevExpress CodeRush:    &lt;br /&gt;&lt;a href="http://channel9.msdn.com/Shows/Visual-Studio-Toolbox/Visual-Studio-Toolbox-DevExpress-CodeRush"&gt;http://channel9.msdn.com/Shows/Visual-Studio-Toolbox/Visual-Studio-Toolbox-DevExpress-CodeRush&lt;/a&gt;    &lt;br /&gt;    &lt;br /&gt;JetBrains ReSharper:     &lt;br /&gt;&lt;a href="http://channel9.msdn.com/Shows/Visual-Studio-Toolbox/Visual-Studio-Toolbox-JetBrains-ReSharper"&gt;http://channel9.msdn.com/Shows/Visual-Studio-Toolbox/Visual-Studio-Toolbox-JetBrains-ReSharper&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Telerik JustCode:    &lt;br /&gt;&lt;a href="http://channel9.msdn.com/Shows/Visual-Studio-Toolbox/Visual-Studio-Toolbox-Telerik-JustCode"&gt;http://channel9.msdn.com/Shows/Visual-Studio-Toolbox/Visual-Studio-Toolbox-Telerik-JustCode&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Code productivity tools add new refactoring options, code snippets, keyboard short-cuts, navigation windows, renaming functionality etc. to Visual Studio and when used to it it will certainly speed up your coding.&lt;/p&gt;  &lt;p&gt;If you’re new to coding productivity tools you should really check these videos out. If you’re already using one, great but take some time to watch the other videos to see if you’re weapon of choice is still the best weapon for you. &lt;/p&gt;&lt;img src="http://blogs.oosterkamp.nl/aggbug.aspx?PostID=337" width="1" height="1"&gt;</description></item><item><title>Silverlight 5 released</title><link>http://blogs.oosterkamp.nl/blogs/erik/archive/2011/12/13/silverlight-5-released.aspx</link><pubDate>Tue, 13 Dec 2011 10:09:48 GMT</pubDate><guid isPermaLink="false">6da500ce-fa22-46ef-b417-4864733669f6:336</guid><dc:creator>Erik</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;At 9 December 2012 a new version of MS RIA development platform Silverlight 5 has been released. New features include: GPU accelerated video decoding, 3D graphics, playback speed controls, remote control and 64-bit support.&lt;/p&gt;  &lt;p&gt;To start developing with Silverlight you’ll need Visual Studio 2010 and the Silverlight 5 for Visual Studio 2010 SDK &lt;/p&gt;  &lt;p&gt;To get you started, some helpful resources:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.silverlight.net/"&gt;http://www.silverlight.net/&lt;/a&gt;    &lt;br /&gt;&lt;a href="http://www.microsoft.com/silverlight/"&gt;http://www.microsoft.com/silverlight/&lt;/a&gt;&lt;a href="http://blogs.msdn.com/b/silverlight_sdk/archive/2011/12/09/silverlight-5-has-released-the-docs-are-up-and-a-chm-is-available.aspx"&gt;http://blogs.msdn.com/b/silverlight_sdk/archive/2011/12/09/silverlight-5-has-released-the-docs-are-up-and-a-chm-is-available.aspx&lt;/a&gt;    &lt;br /&gt;&lt;a href="http://mtaulty.com/CommunityServer/blogs/mike_taultys_blog/archive/2011/12/10/silverlight-5-released.aspx"&gt;http://mtaulty.com/CommunityServer/blogs/mike_taultys_blog/archive/2011/12/10/silverlight-5-released.aspx&lt;/a&gt;    &lt;br /&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/gg986857(VS.95).aspx"&gt;http://msdn.microsoft.com/en-us/library/gg986857(VS.95).aspx&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;This year Microsoft started MCTS certification for Silverlight, for more info about the Silverlight 4 exam (70-506)   &lt;br /&gt;&lt;a href="http://www.microsoft.com/learning/en/us/exam.aspx?ID=70-506"&gt;http://www.microsoft.com/learning/en/us/exam.aspx?ID=70-506&lt;/a&gt;    &lt;br /&gt;&lt;/p&gt;  &lt;p&gt;Oosterkamp has some high quality Silverlight courses available. Next month a 3 day Silverlight 4.0 jumpstart training has been scheduled: &lt;a href="http://www.oosterkamp.nl/Training/DetailByName/silverlight4.0"&gt;http://www.oosterkamp.nl/Training/DetailByName/silverlight4.0&lt;/a&gt; (dutch only).&lt;/p&gt;&lt;img src="http://blogs.oosterkamp.nl/aggbug.aspx?PostID=336" width="1" height="1"&gt;</description></item><item><title>Intellisense not working in SQL Server Management Studio</title><link>http://blogs.oosterkamp.nl/blogs/erik/archive/2011/10/06/intellisense-not-working-in-sql-server-management-studio.aspx</link><pubDate>Thu, 06 Oct 2011 09:15:16 GMT</pubDate><guid isPermaLink="false">6da500ce-fa22-46ef-b417-4864733669f6:335</guid><dc:creator>Erik</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;This week I noticed that SMSS intellisense didn’t work anymore on my machine. After some googling I found out his issue was related to the Visual Studio 2010 SP1 update. It seems SQL Server 2008 R2 and the VS2010 SP1 update don’t like each other too much. Installing the SQL Server 2008 R2 SP1 update solved the problem for me.&lt;/p&gt;&lt;img src="http://blogs.oosterkamp.nl/aggbug.aspx?PostID=335" width="1" height="1"&gt;</description><category domain="http://blogs.oosterkamp.nl/blogs/erik/archive/tags/Visual+Studio/default.aspx">Visual Studio</category><category domain="http://blogs.oosterkamp.nl/blogs/erik/archive/tags/SQL/default.aspx">SQL</category></item><item><title>WCF and LINQ: beware of deferred execution</title><link>http://blogs.oosterkamp.nl/blogs/thomas/archive/2011/09/08/wcf-and-linq-beware-of-deferred-execution.aspx</link><pubDate>Thu, 08 Sep 2011 14:07:10 GMT</pubDate><guid isPermaLink="false">6da500ce-fa22-46ef-b417-4864733669f6:334</guid><dc:creator>Thomas</dc:creator><slash:comments>0</slash:comments><description>&lt;pre&gt;&lt;font size="3" face="Calibri"&gt;When I was teaching WCF in Oslo this week, a student got an Exception from the client when calling this method on the server:&lt;/font&gt;&lt;/pre&gt;

&lt;pre&gt;&amp;#160;&lt;/pre&gt;

&lt;pre style="background:white;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:18pt;"&gt;&lt;font size="4"&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;public&lt;/font&gt;&lt;/span&gt;&amp;#160;&lt;span&gt;&lt;font color="#2b91af"&gt;IEnumerable&lt;/font&gt;&lt;/span&gt;&amp;lt;&lt;span&gt;&lt;font color="#2b91af"&gt;Product&lt;/font&gt;&lt;/span&gt;&amp;gt; GetProductsForProductModel(&lt;span&gt;&lt;font color="#0000ff"&gt;int&lt;/font&gt;&lt;/span&gt; productModelID)&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/pre&gt;

&lt;pre style="background:white;"&gt;&lt;font style="font-size:18pt;"&gt;&lt;font face="Consolas"&gt;&lt;font size="4"&gt;{&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/pre&gt;

&lt;pre style="background:white;"&gt;&lt;font style="font-size:18pt;"&gt;&lt;font face="Consolas"&gt;&lt;font size="4"&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;&lt;font color="#000000"&gt;  &lt;/font&gt;using&lt;/font&gt;&lt;/span&gt; (&lt;span&gt;&lt;font color="#2b91af"&gt;AdventureWorks2008R2Entities&lt;/font&gt;&lt;/span&gt; context = &lt;span&gt;&lt;font color="#0000ff"&gt;new&lt;/font&gt;&lt;/span&gt;&amp;#160;&lt;span&gt;&lt;font color="#2b91af"&gt;AdventureWorks2008R2Entities&lt;/font&gt;&lt;/span&gt;())&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/pre&gt;

&lt;pre style="background:white;"&gt;&lt;font style="font-size:18pt;"&gt;&lt;font face="Consolas"&gt;&lt;font size="4"&gt;  {&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/pre&gt;

&lt;pre style="background:white;"&gt;&lt;font style="font-size:18pt;"&gt;&lt;font face="Consolas"&gt;&lt;font size="4"&gt;    &lt;span&gt;&lt;font color="#0000ff"&gt;return&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/pre&gt;

&lt;pre style="background:white;"&gt;&lt;font style="font-size:18pt;"&gt;&lt;font face="Consolas"&gt;&lt;font size="4"&gt;      &lt;span&gt;&lt;font color="#0000ff"&gt;from&lt;/font&gt;&lt;/span&gt;&amp;#160;&lt;span&gt;&lt;font color="#2b91af"&gt;Product&lt;/font&gt;&lt;/span&gt; p &lt;span&gt;&lt;font color="#0000ff"&gt;in&lt;/font&gt;&lt;/span&gt; context.Product&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/pre&gt;

&lt;pre style="background:white;"&gt;&lt;font style="font-size:18pt;"&gt;&lt;font face="Consolas"&gt;&lt;font size="4"&gt;      &lt;span&gt;&lt;font color="#0000ff"&gt;where&lt;/font&gt;&lt;/span&gt; p.ProductModel.ProductModelID == productModelID&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/pre&gt;

&lt;pre style="background:white;"&gt;&lt;font style="font-size:18pt;"&gt;&lt;font face="Consolas"&gt;&lt;font size="4"&gt;      &lt;span&gt;&lt;font color="#0000ff"&gt;select&lt;/font&gt;&lt;/span&gt; p;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/pre&gt;

&lt;pre style="background:white;"&gt;&lt;font style="font-size:18pt;"&gt;&lt;font face="Consolas"&gt;&lt;font size="4"&gt;  }&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/pre&gt;

&lt;pre style="background:white;"&gt;&lt;font style="font-size:18pt;"&gt;&lt;font face="Consolas"&gt;&lt;font size="4"&gt;}&lt;/font&gt;
&lt;/font&gt;&lt;/font&gt;&lt;/pre&gt;

&lt;p&gt;&lt;font size="3"&gt;At first there seemed nothing wrong with the code and I assmumed it was caused by the &lt;a href="http://msdn.microsoft.com/en-us/library/system.servicemodel.basichttpbinding.maxreceivedmessagesize.aspx" target="_blank"&gt;maxReceivedMessageSize&lt;/a&gt; setting. But increasing that didn’t help. Then it struck me…we are returning a query and not a resultset. So when the &lt;a href="http://msdn.microsoft.com/en-us/library/system.runtime.serialization.datacontractserializer.aspx" target="_blank"&gt;DataContractSerializer&lt;/a&gt; started to fetch the results from the query (when it was serializing our result), the used &lt;a href="http://msdn.microsoft.com/en-us/library/system.data.objects.objectcontext.aspx" target="_blank"&gt;ObjectContext&lt;/a&gt; was already disposed. When we enabled &lt;a href="http://msdn.microsoft.com/en-us/library/aa751795.aspx" target="_blank"&gt;Tracing and MessageLogging&lt;/a&gt; we found out that this was indeed the case: we got an ObjectDisposedException from the ObjectContext. The fix was easy, calling ToList() on the query before returning did the trick…&lt;/font&gt;&lt;/p&gt;

&lt;p&gt;&lt;font size="3"&gt;Deferred execution is a great feature…sometimes it just bites you.&lt;/font&gt;&lt;/p&gt;&lt;img src="http://blogs.oosterkamp.nl/aggbug.aspx?PostID=334" width="1" height="1"&gt;</description></item><item><title>WCF Service in PreCompiled ASP.NET web application</title><link>http://blogs.oosterkamp.nl/blogs/thomas/archive/2011/09/06/wcf-service-in-precompiled-asp-net-web-application.aspx</link><pubDate>Tue, 06 Sep 2011 07:34:17 GMT</pubDate><guid isPermaLink="false">6da500ce-fa22-46ef-b417-4864733669f6:333</guid><dc:creator>Thomas</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;I got an email from a customer that reported a bugin the Web Deployment Tool 2010. Maybe it saves you some time if you ever encounter this. This is the translated text:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;When we deploy our webapplication, we precompile it first using the Web Deployment Tool 2010. While testing, we found out that the service could not be located. After some digging it turned out the problem was in the .compiled file of the service. &lt;/p&gt;  &lt;p&gt;&lt;i&gt;See this post fromTom Fuller&lt;/i&gt; : &lt;a href="http://social.msdn.microsoft.com/forums/en-US/wcf/thread/8c897f8e-2143-450e-a9f4-97d1f8702da7"&gt;http://social.msdn.microsoft.com/forums/en-US/wcf/thread/8c897f8e-2143-450e-a9f4-97d1f8702da7&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;We solved it by using MSBuildTasks in the Web Deployment project (&lt;a href="http://msbuildtasks.tigris.org/"&gt;http://msbuildtasks.tigris.org/&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;With that, we replacing the absolute location of the file with the “~” sign.&lt;/p&gt;  &lt;p&gt;&amp;lt;FileUpdate Files=&amp;quot;..\..\Output\Web\Deployment\bin\documentservice.svc.989dc2fb.compiled&amp;quot; Regex=&amp;quot;/Donau Web.csproj&amp;quot; ReplacementText=&amp;quot;~&amp;quot; /&amp;gt;&lt;/p&gt;  &lt;p&gt;We also remove all references to the ASP.NET folders like “App_”:&lt;/p&gt;  &lt;p&gt;&amp;lt;FileUpdate Files=&amp;quot;..\..\Output\Web\Deployment\bin\documentservice.svc.989dc2fb.compiled&amp;quot; Regex=&amp;quot;\|App_global.asax, Version=0\.0\.0\.0, Culture=neutral, PublicKeyToken=417399dd0d17e25b\|&amp;quot; ReplacementText=&amp;quot;|&amp;quot; /&amp;gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;FileUpdate Files=&amp;quot;..\..\Output\Web\Deployment\bin\documentservice.svc.989dc2fb.compiled&amp;quot; Regex=&amp;quot;\|App_GlobalResources, Version=0\.0\.0\.0, Culture=neutral, PublicKeyToken=417399dd0d17e25b\|&amp;quot; ReplacementText=&amp;quot;|&amp;quot; /&amp;gt;&lt;/p&gt;&lt;img src="http://blogs.oosterkamp.nl/aggbug.aspx?PostID=333" width="1" height="1"&gt;</description><category domain="http://blogs.oosterkamp.nl/blogs/thomas/archive/tags/asp.net/default.aspx">asp.net</category><category domain="http://blogs.oosterkamp.nl/blogs/thomas/archive/tags/Visual+Studio+2010/default.aspx">Visual Studio 2010</category><category domain="http://blogs.oosterkamp.nl/blogs/thomas/archive/tags/WCF/default.aspx">WCF</category></item><item><title>Personal Top 10 Visual Studio 2010 native short-cuts</title><link>http://blogs.oosterkamp.nl/blogs/erik/archive/2011/05/26/personal-top-10-visual-studio-2010-native-short-cuts.aspx</link><pubDate>Thu, 26 May 2011 18:39:31 GMT</pubDate><guid isPermaLink="false">6da500ce-fa22-46ef-b417-4864733669f6:331</guid><dc:creator>Erik</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;A personal Top 10. No CodeRush/Resharper involved, just plain old VS short-cuts. If you think your favourite short-cut is missing let me know, it can be worth another post.&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;1. F5 / Control-F5&amp;#160; : How does this ‘meisterwerk’ looks like when I run it, absolutely number one.&lt;/p&gt;    &lt;p&gt;2. Control-Shift-B :&amp;#160;&amp;#160; Please, please praying it still compiles.&lt;/p&gt;    &lt;p&gt;3. Control-Shift-L :&amp;#160;&amp;#160; Delete Line. I like deleting code. The best code is no code.&lt;/p&gt;    &lt;p&gt;4. Control- , : Navigate To dialog. New in VS2010 and very helpful.&lt;/p&gt;    &lt;p&gt;5. Control –. Get that context menu up, so VS can add a using statement automatically.&lt;/p&gt;    &lt;p&gt;6. Control-Space : Intellisense up and running again, when it’s gone.&lt;/p&gt;    &lt;p&gt;7. Control+K, Control+D: Fresh formatting again.&lt;/p&gt;    &lt;p&gt;8. Control+Shift+V: Cycle through the clipboard&lt;/p&gt;    &lt;p&gt;9. Control+Shift+A: Add new item… &lt;/p&gt;    &lt;p&gt;10. ALt-F4: Close Visual Studio and have a cool Belgium Beer.&lt;/p&gt;&lt;/blockquote&gt;&lt;img src="http://blogs.oosterkamp.nl/aggbug.aspx?PostID=331" width="1" height="1"&gt;</description></item><item><title>Improving Legacy Code session at the DevDays 2011</title><link>http://blogs.oosterkamp.nl/blogs/thomas/archive/2011/05/19/improving-legacy-code-session-at-the-devdays-2011.aspx</link><pubDate>Thu, 19 May 2011 13:21:05 GMT</pubDate><guid isPermaLink="false">6da500ce-fa22-46ef-b417-4864733669f6:330</guid><dc:creator>Thomas</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Demo&amp;#39;s from my Improving Legacy Code session at the DevDays 2011 are available here: &lt;a href="http://bit.ly/mNMJac"&gt;http://bit.ly/mNMJac&lt;/a&gt;    &lt;br /&gt;PowerPoint-slides are here: &lt;a href="http://bit.ly/lQuNCH"&gt;http://bit.ly/lQuNCH&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Let me know if you have any questions at &lt;a href="mailto:thomas@oosterkamp.nl"&gt;thomas@oosterkamp.nl&lt;/a&gt;&lt;/p&gt;&lt;img src="http://blogs.oosterkamp.nl/aggbug.aspx?PostID=330" width="1" height="1"&gt;</description><category domain="http://blogs.oosterkamp.nl/blogs/thomas/archive/tags/.NET+Framework/default.aspx">.NET Framework</category><category domain="http://blogs.oosterkamp.nl/blogs/thomas/archive/tags/C_2300_/default.aspx">C#</category><category domain="http://blogs.oosterkamp.nl/blogs/thomas/archive/tags/Trick/default.aspx">Trick</category><category domain="http://blogs.oosterkamp.nl/blogs/thomas/archive/tags/DevDays/default.aspx">DevDays</category><category domain="http://blogs.oosterkamp.nl/blogs/thomas/archive/tags/Legacy/default.aspx">Legacy</category></item><item><title>Caliburn Micro events without having to implement IHandle</title><link>http://blogs.oosterkamp.nl/blogs/thomas/archive/2011/03/28/caliburn-micro-events-without-having-to-implement-ihandle.aspx</link><pubDate>Mon, 28 Mar 2011 19:42:27 GMT</pubDate><guid isPermaLink="false">6da500ce-fa22-46ef-b417-4864733669f6:329</guid><dc:creator>Thomas</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;I like Caliburn.Micro. I like it a lot. I love the way it’s so small and compact and yet so powerful. Right now we’re using it in a Silverlight 4 project and I have yet to encounter something I really don’t like. Nonetheless….there’s something I felt was a bit more work than I liked: the way the EventAggregator works. Publishing an event is plain and simple: you just call Publish on the EventAggregator and pass it an instance of your event class:&lt;/p&gt;&lt;pre style="list-style-type:disc;background:white;"&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size:12pt;"&gt;eventAggregator.Publish(&lt;/font&gt;&lt;/font&gt;&lt;font style="font-size:12pt;"&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;new&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;nbsp;&lt;/font&gt;&lt;span&gt;&lt;font color="#2b91af"&gt;SendStringEvent&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;() { Value = &lt;/font&gt;&lt;span&gt;&lt;font color="#a31515"&gt;&amp;quot;Hi!&amp;quot;&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt; });
&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/pre&gt;
&lt;p&gt;If you want to subscribe to an event, you basically you have to implement IHandle&amp;lt;T&amp;gt; where T is the class that represents your event. This is how it’s usually done:&lt;/p&gt;&lt;pre style="list-style-type:disc;background:white;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:12pt;"&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;public&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;nbsp;&lt;/font&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;class&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;nbsp;&lt;/font&gt;&lt;span&gt;&lt;font color="#2b91af"&gt;MainPageViewModel&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt; : &lt;/font&gt;&lt;span&gt;&lt;font color="#2b91af"&gt;IHandle&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;lt;&lt;/font&gt;&lt;span&gt;&lt;font color="#2b91af"&gt;SendStringEvent&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;font style="font-size:12pt;"&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;&amp;gt;
{&amp;nbsp;&amp;nbsp; &lt;br /&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font style="font-size:12pt;"&gt;&lt;font face="Consolas"&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;  public&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;nbsp;&lt;/font&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;void&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt; Handle(&lt;/font&gt;&lt;span&gt;&lt;font color="#2b91af"&gt;SendStringEvent&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:12pt;"&gt;&lt;font color="#000000"&gt; message)&amp;nbsp;&amp;nbsp; &lt;br /&gt;  {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;font color="#000000"&gt;StringValue = &lt;/font&gt;&lt;span&gt;&lt;font color="#a31515"&gt;&amp;quot;Received: &amp;quot;&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt; + ev.Value;&lt;/font&gt;
&lt;font color="#000000"&gt;&amp;nbsp; }
&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/pre&gt;
&lt;p&gt;Not too bad if you have just one or a few eventhandlers in your ViewModel. But your class declaration gets more cluttered with all IHandle&amp;lt;T&amp;gt; declarations if you have more than a few. I didn’t like that. I wanted to be able to add a lambda expression in the Subscribe method like this:&lt;/p&gt;
&lt;blockquote&gt;&lt;pre style="list-style-type:disc;background:white;"&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size:12pt;"&gt;eventAggregator.Subscribe&amp;lt;&lt;/font&gt;&lt;/font&gt;&lt;font style="font-size:12pt;"&gt;&lt;span&gt;&lt;font color="#2b91af"&gt;SendStringEvent&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;gt;(&lt;br /&gt;       ev =&amp;gt; StringValue = &lt;/font&gt;&lt;span&gt;&lt;font color="#a31515"&gt;&amp;quot;Received: &amp;quot;&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt; + ev.Value);&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/pre&gt;&lt;/blockquote&gt;
&lt;p&gt;The good news is is that I have found a real easy way to do that. Just three very simple classes are needed. First, I created a MessageHandler&amp;lt;T&amp;gt; that implements IHandle&amp;lt;T&amp;gt;. The constructor of MessageHandler&amp;lt;T&amp;gt; takes an Action&amp;lt;T&amp;gt; as an argument:&lt;/p&gt;&lt;pre style="list-style-type:disc;background:white;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:12pt;"&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;public&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;nbsp;&lt;/font&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;class&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;nbsp;&lt;/font&gt;&lt;span&gt;&lt;font color="#2b91af"&gt;MessageHandler&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;lt;T&amp;gt;: &lt;/font&gt;&lt;span&gt;&lt;font color="#2b91af"&gt;IHandle&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;font style="font-size:12pt;"&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;&amp;lt;T&amp;gt;
{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;private&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;nbsp;&lt;/font&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;readonly&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;nbsp;&lt;/font&gt;&lt;span&gt;&lt;font color="#2b91af"&gt;Action&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;&amp;lt;T&amp;gt; _messageHandler;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;public&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt; MessageHandler( &lt;/font&gt;&lt;span&gt;&lt;font color="#2b91af"&gt;Action&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;&amp;lt;T&amp;gt; messageHandler )&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _messageHandler = messageHandler;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/pre&gt;&lt;pre style="list-style-type:disc;background:white;"&gt;&lt;font style="font-size:12pt;"&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;public&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;nbsp;&lt;/font&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;void&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:12pt;"&gt;&lt;font color="#000000"&gt; Handle(T message)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;if&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt; (_messageHandler != &lt;/font&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;null&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _messageHandler(message);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }
}&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/pre&gt;
&lt;p&gt;So, now I’m able to Subscribe to the event like this:&lt;/p&gt;&lt;pre style="list-style-type:disc;background:white;"&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size:12pt;"&gt;eventAggregator.Subscribe&amp;lt;&lt;/font&gt;&lt;/font&gt;&lt;font style="font-size:12pt;"&gt;&lt;span&gt;&lt;font color="#2b91af"&gt;SendStringEvent&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:12pt;"&gt;&lt;font color="#000000"&gt;&amp;gt;(&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;new&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;nbsp;&lt;/font&gt;&lt;span&gt;&lt;font color="#2b91af"&gt;MessageHandler&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;lt;&lt;/font&gt;&lt;span&gt;&lt;font color="#2b91af"&gt;SendStringEvent&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;gt;( &lt;br /&gt;                 ev =&amp;gt; StringValue = &lt;/font&gt;&lt;span&gt;&lt;font color="#a31515"&gt;&amp;quot;Received: &amp;quot;&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt; + ev.Value) );
&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/pre&gt;
&lt;p&gt;Already better because I don’t have to implement IHandle&amp;lt;T&amp;gt; in my ViewModel anymore. But a bit more awkward to use than the original implementation. So I created a extension method on EventAggregator that made subscribing easier.&lt;/p&gt;&lt;pre style="list-style-type:disc;background:white;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:12pt;"&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;public&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;nbsp;&lt;/font&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;static&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;nbsp;&lt;/font&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;class&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;nbsp;&lt;/font&gt;&lt;span&gt;&lt;font color="#2b91af"&gt;EventAggregatorExtension&lt;/font&gt;&lt;/span&gt;
&lt;/font&gt;&lt;/font&gt;&lt;font style="font-size:12pt;"&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;public&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;nbsp;&lt;/font&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;static&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;nbsp;&lt;/font&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;void&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt; Subscribe&amp;lt;T&amp;gt;( &lt;/font&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;this&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;nbsp;&lt;/font&gt;&lt;span&gt;&lt;font color="#2b91af"&gt;EventAggregator&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt; eventAggregator, &lt;br /&gt;&lt;/font&gt;&lt;span&gt;&lt;font color="#2b91af"&gt;                                                        Action&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:12pt;"&gt;&lt;font color="#000000"&gt;&amp;lt;T&amp;gt; eventHandler )&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; eventAggregator.Subscribe(&lt;/font&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;new&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;nbsp;&lt;/font&gt;&lt;span&gt;&lt;font color="#2b91af"&gt;MessageHandler&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;lt;T&amp;gt;(eventHandler));&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;}&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/pre&gt;&lt;pre style="list-style-type:disc;background:white;"&gt;&lt;font color="#000000" size="3" face="Consolas"&gt;&lt;/font&gt;&lt;/pre&gt;
&lt;p&gt;And we’re done! Now we can subscribe to events like this:&lt;/p&gt;
&lt;p&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;&lt;font style="font-size:12pt;"&gt;eventAggregator.Subscribe&amp;lt;&lt;/font&gt;&lt;/font&gt;&lt;font style="font-size:12pt;"&gt;&lt;span&gt;&lt;font color="#2b91af"&gt;SendStringEvent&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;gt;( &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ev =&amp;gt; StringValue = &lt;/font&gt;&lt;span&gt;&lt;font color="#a31515"&gt;&amp;quot;Received: &amp;quot;&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt; + ev.Value); &lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;But wait…we’re not done. Because Caliburn Micro is using a list of WeakRefereces, the Garbage Collector will collect our MessageHandler objects! So message handlers will no longer be called after a garbage collection. So the ViewModel needs to maintain references to every MessageHandler&amp;lt;T&amp;gt; that it creates. In order to do that I created a MessageHandlerList. The ViewModel holds a reference to the MessageHandlerList and that holds references to each MessageHandler&amp;lt;T&amp;gt; that is created:&lt;/p&gt;&lt;pre style="list-style-type:disc;background:white;"&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:12pt;"&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;public&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;nbsp;&lt;/font&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;class&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;nbsp;&lt;/font&gt;&lt;span&gt;&lt;font color="#2b91af"&gt;MessageHandlerList&lt;br /&gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;font style="font-size:12pt;"&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;private&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;nbsp;&lt;/font&gt;&lt;span&gt;&lt;font color="#2b91af"&gt;List&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;lt;&lt;/font&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;object&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;gt; list = &lt;/font&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;new&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;nbsp;&lt;/font&gt;&lt;span&gt;&lt;font color="#2b91af"&gt;List&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;lt;&lt;/font&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;object&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;&amp;gt;();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;private&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;nbsp;&lt;/font&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;readonly&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;nbsp;&lt;/font&gt;&lt;span&gt;&lt;font color="#2b91af"&gt;EventAggregator&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt; _aggregator;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;public&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt; MessageHandlerList(&lt;/font&gt;&lt;span&gt;&lt;font color="#2b91af"&gt;EventAggregator&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt; aggregator)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _aggregator = aggregator;&lt;br /&gt;    }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;public&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;nbsp;&lt;/font&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;void&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt; Subscribe&amp;lt;T&amp;gt;(&lt;/font&gt;&lt;span&gt;&lt;font color="#2b91af"&gt;Action&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:12pt;"&gt;&lt;font color="#000000"&gt;&amp;lt;T&amp;gt; eventHandler)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; list.Add(_aggregator.Subscribe&amp;lt;T&amp;gt;(eventHandler));&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;public&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;nbsp;&lt;/font&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;void&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt; Publish&amp;lt;T&amp;gt;(T message)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _aggregator.Publish&amp;lt;T&amp;gt;(message);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;}&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/pre&gt;
&lt;p&gt;So when we want to subscribe to multiple Messages, you first create a new MessageHandlerList and pass it an existing (or new) EventAggregator in the constructor. And then call Subscribe and Publish on the MessageHandlerList. Subscribing to Messages should be done through the MessageHandlerList, but Publishing messages can be done through the MessageHandlerList or the normal way using the EventAggregator directly:&lt;/p&gt;
&lt;p&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:12pt;"&gt;&lt;span&gt;&lt;font color="#2b91af"&gt;MessageHandlerList&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt; events = &lt;/font&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;new&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;nbsp;&lt;/font&gt;&lt;span&gt;&lt;font color="#2b91af"&gt;MessageHandlerList&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;(&lt;/font&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;new&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;nbsp;&lt;/font&gt;&lt;span&gt;&lt;font color="#2b91af"&gt;EventAggregator&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;font style="font-size:12pt;"&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;());&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;pre style="list-style-type:disc;background:white;"&gt;&lt;font style="font-size:12pt;"&gt;&lt;font face="Consolas"&gt;&lt;font color="#000000"&gt;events.Subscribe&amp;lt;&lt;/font&gt;&lt;span&gt;&lt;font color="#2b91af"&gt;SendStringEvent&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;font face="Consolas"&gt;&lt;font style="font-size:12pt;"&gt;&lt;font color="#000000"&gt;&amp;gt;(ev =&amp;gt; button2.Content += ev.Value);&lt;br /&gt;events.Publish(&lt;/font&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;new&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;&amp;nbsp;&lt;/font&gt;&lt;span&gt;&lt;font color="#2b91af"&gt;SendStringEvent&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt;() { Value = &lt;/font&gt;&lt;span&gt;&lt;font color="#a31515"&gt;&amp;quot;Hi!&amp;quot;&lt;/font&gt;&lt;/span&gt;&lt;font color="#000000"&gt; });&lt;/pre&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;img src="http://blogs.oosterkamp.nl/aggbug.aspx?PostID=329" width="1" height="1"&gt;</description></item><item><title>Entity Framework 4.1 Update (RC)</title><link>http://blogs.oosterkamp.nl/blogs/ronald/archive/2011/03/28/entity-framework-4-1-update-rc.aspx</link><pubDate>Mon, 28 Mar 2011 18:45:00 GMT</pubDate><guid isPermaLink="false">6da500ce-fa22-46ef-b417-4864733669f6:328</guid><dc:creator>Ronald</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Scott Guthrie heeft op zijn blog een update van het Entity Framework aangekondigd, deze is nu te downloaden en bevat o.a. een aantal updates op het gebied van de zogenaamde &amp;#39;code first&amp;#39; approach&lt;/p&gt;&lt;p&gt;&lt;a href="http://weblogs.asp.net/scottgu/archive/2011/03/19/rc-of-entity-framework-4-1-which-includes-ef-code-first.aspx"&gt;http://weblogs.asp.net/scottgu/archive/2011/03/19/rc-of-entity-framework-4-1-which-includes-ef-code-first.aspx&lt;/a&gt;&lt;/p&gt;&lt;img src="http://blogs.oosterkamp.nl/aggbug.aspx?PostID=328" width="1" height="1"&gt;</description><category domain="http://blogs.oosterkamp.nl/blogs/ronald/archive/tags/.NET/default.aspx">.NET</category><category domain="http://blogs.oosterkamp.nl/blogs/ronald/archive/tags/EF/default.aspx">EF</category></item><item><title>ASP.NET 4 op IIS 6</title><link>http://blogs.oosterkamp.nl/blogs/ronald/archive/2011/03/28/asp-net-4-op-iis-6.aspx</link><pubDate>Mon, 28 Mar 2011 13:37:00 GMT</pubDate><guid isPermaLink="false">6da500ce-fa22-46ef-b417-4864733669f6:327</guid><dc:creator>Ronald</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Voor een klant wilde ik vandaag de nieuwe webapplicatie op hun testomgeving plaatsen. De webapplicatie is is gebouwd met ASP.NET 4.0 en de testomgeving draait op Windows 2000 met IIS6.&lt;/p&gt;&lt;p&gt;Nadat ik .NET 4.0 had geinstalleerd, een nieuwe webapplicatie en applicationpool gemaakt, leek het erop dat ik het zou gaan werken. Bij het openen van de url kreeg ik echter een melding dat de pagina niet kon worden geopend. Zelfs na het expliciet opgeven van de default.aspx kreeg ik dezelfde melding.&lt;/p&gt;&lt;p&gt;Alle onderdelen die door IIS zelf worden geserviced waren wel beschikbaar, plaatjes en een test.html pagina. De webapplicatie was dus wel aanwezig op de IIS server en de configuratie leek te kloppen.&lt;/p&gt;&lt;p&gt;Vervolgens nogmaals alles settings nagelopen, MIME-types gecontroleerd, nogmaals iisreg gedraaid etc., maar helaas met hetzelfde resultaat.&lt;/p&gt;&lt;p&gt;Met enig zoekwerk bleek dat de .NET 4.0 isapi wel geregistreerd was bij IIS, maar nog niet geactiveerd.&lt;/p&gt;&lt;p&gt;Na activering werkte de webapllicatie zoals bedoeld.&lt;/p&gt;&lt;p&gt;De uiteindelijke oplossing heb ik hier gevonden: &lt;a href="http://johan.driessen.se/posts/getting-an-asp.net-4-application-to-work-on-iis6"&gt;http://johan.driessen.se/posts/getting-an-asp.net-4-application-to-work-on-iis6&lt;/a&gt;&lt;/p&gt;&lt;img src="http://blogs.oosterkamp.nl/aggbug.aspx?PostID=327" width="1" height="1"&gt;</description></item><item><title>Ben jij een professional of ontwikkel je software? </title><link>http://blogs.oosterkamp.nl/blogs/ronald/archive/2011/03/28/ben-jij-een-professional-of-ontwikkel-je-software.aspx</link><pubDate>Mon, 28 Mar 2011 13:33:00 GMT</pubDate><guid isPermaLink="false">6da500ce-fa22-46ef-b417-4864733669f6:326</guid><dc:creator>Ronald</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;
Gisteravond heb ik deze webcast &lt;a href="http://www.parleys.com/#st=5&amp;amp;sl=5&amp;amp;id=1491"&gt;http://www.parleys.com/#st=5&amp;amp;sl=5&amp;amp;id=1491&lt;/a&gt; van 
een sessie van Robert C. Martin bekeken. Hij heeft een aantal boeken op zijn 
naam staan waaronder het boek&lt;a href="http://blog.objectmentor.com/articles/2008/04/08/clean-code-whew"&gt;&amp;#39;Clean 
code&amp;#39; &lt;/a&gt;wat iedere professionele ontwikkelaar gelezen moet hebben.&lt;br /&gt;&lt;br /&gt;In 
deze sessie legt hij uit hoe wij (ontwikkelaars) al jaren software bouwen en hoe 
elk project kennelijk mislukt, ook al lijkt het systeem dat we bouwen te werken. 
Met als resultaat dat de ontwikkelaars boos zijn op de managers vanwege de 
tijdsdruk en onrealistische planningen. En de managers zijn boos op de 
ontwikkelaars omdat ze het systeem niet op tijd of niet werkend 
opleveren.&lt;br /&gt;&lt;br /&gt;Vervolgens neemt hij ons mee door de afgelopen decennia en 
vertelt wat ons vakgebied zoal aan &amp;#39;silver bullets&amp;#39; heeft bedacht. De overstap 
van assembly naar C en OS-en, OO, Agile, Scrum etc. etc.&lt;br /&gt;&lt;br /&gt;Het 
belangrijkste wat daarbij wordt vergeten, is onze houding als software 
ontwikkelaar. Gedragen we ons als een professional, zoals bijvoorbeeld een arts 
of een advocaat? Of bouwen we software, die misschien wel werkt, maar dát kunnen 
we niet bewijzen? &lt;br /&gt;Herken je jezelf in het volgende? &amp;quot;We hebben hier wat 
smerige shortcuts genomen, die eigenlijk niet goed te onderhouden zijn. Maar we 
moesten wel, gezien de tijdsdruk&amp;quot;. Wel eens een chirurg horen zeggen: &amp;quot;We hebben 
de wond maar niet gesloten, want de operatie tijd zat erop&amp;quot; ?&lt;br /&gt;&lt;br /&gt;De 
conclusie is dat als je software kunt ontwikkelen, je niet automatisch een 
professional bent. Hiervoor zijn een aantal gedragsregels en een bepaalde 
instelling nodig. Een mooie start is het &lt;a href="http://manifesto.softwarecraftsmanship.org/"&gt;&amp;#39;Manifesto for software 
craftsmenship&amp;#39;&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;In het kort zijn dat de dingen waar mijn collega&amp;#39;s 
bij &lt;a href="http://www.oosterkamp.nl/"&gt;Oosterkamp&lt;/a&gt; en ik ons voor inzetten. 
Hoe bouw je samen met je opdrachtgever, werkende software (inclusief het bewijs 
dat het werkt), die goed in elkaar zit (en dus onderhoudbaar is) én waarbij 
continu waarde voor de eindgebruiker wordt toegevoegd.&lt;/p&gt;&lt;img src="http://blogs.oosterkamp.nl/aggbug.aspx?PostID=326" width="1" height="1"&gt;</description><category domain="http://blogs.oosterkamp.nl/blogs/ronald/archive/tags/professional+agile+craftsmenship/default.aspx">professional agile craftsmenship</category></item><item><title>View.ViewCode keyboard mapping in VS2010</title><link>http://blogs.oosterkamp.nl/blogs/erik/archive/2011/02/28/view-viewcode-keyboard-mapping-in-vs2010.aspx</link><pubDate>Mon, 28 Feb 2011 12:29:59 GMT</pubDate><guid isPermaLink="false">6da500ce-fa22-46ef-b417-4864733669f6:323</guid><dc:creator>Erik</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;For all keyboard lovers: There is a command available in VS2010 to get the cursor in the editor window: View.ViewCode. I’m using the default scheme in VS2010 and found out by default there is no shortcut key defined for this command. But it is easy to add new shortcut bindings:&lt;/p&gt;  &lt;p&gt;Go to Tool | Options | Environment Keyboard and search for the View.ViewCode command. Select the command and assign a new shortcut key.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.oosterkamp.nl/blogs/erik/View.ViewCode_44EA8A1D.png"&gt;&lt;img style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" title="View.ViewCode" border="0" alt="View.ViewCode" src="http://blogs.oosterkamp.nl/blogs/erik/View.ViewCode_thumb_2B8286E3.png" width="456" height="302" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://blogs.oosterkamp.nl/aggbug.aspx?PostID=323" width="1" height="1"&gt;</description><category domain="http://blogs.oosterkamp.nl/blogs/erik/archive/tags/Visual+Studio/default.aspx">Visual Studio</category></item><item><title>Entity Framework Code-First</title><link>http://blogs.oosterkamp.nl/blogs/erik/archive/2011/01/31/entity-framework-code-first.aspx</link><pubDate>Mon, 31 Jan 2011 14:57:41 GMT</pubDate><guid isPermaLink="false">6da500ce-fa22-46ef-b417-4864733669f6:322</guid><dc:creator>Erik</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;EF Code-First is a new flavour in the Entity Framework 4.0. Ice Cream Bar. Instead of creating a model (model-first) or reverse engineering a database (database-first) you just start writing code, isn’t that sweet?&lt;/p&gt; &lt;p&gt;Actually it’s quite simple and straight forward:&lt;/p&gt; &lt;p&gt;Your entities are pure POCO classes, no need to derive from a base class or implement any interfaces.&lt;/p&gt; &lt;p&gt;Navigation properties can be defined by using the ICollection&amp;lt;T&amp;gt; interface.&lt;/p&gt; &lt;div&gt;&lt;pre&gt;public class FAQCategory&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public int Id { get; set; }&lt;br /&gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public string Description { get; set; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public virtual ICollection&amp;lt;FAQItem&amp;gt; FAQItems { get; set; }&lt;br /&gt;}&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;A context can be created by deriving from the DbContext class:&lt;/p&gt;&lt;pre&gt;public class CustomContext : DbContext&lt;br /&gt;{&lt;br /&gt;    public DbSet&amp;lt;FAQCategory&amp;gt; FAQCategories { get; set; }&lt;br /&gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public DbSet&amp;lt;FAQItem&amp;gt; FAQItems { get; set; }&lt;br /&gt;}&lt;/pre&gt;&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;
&lt;p&gt;In EF Code-First there is no visual model (.edmx), all we have is code&lt;br /&gt;&lt;br /&gt;EF Code-First can create the database for you, or you can map to an existing database. &lt;br /&gt;&lt;br /&gt;Validation is supported by using Data annotation attributes.&lt;br /&gt;&lt;br /&gt;To download EF Code-First (CTP-5) click &lt;a href="http://www.microsoft.com/downloads/en/details.aspx?FamilyID=35adb688-f8a7-4d28-86b1-b6235385389d"&gt;here&lt;/a&gt;. For more details: read &lt;a href="http://weblogs.asp.net/scottgu/archive/2010/12/08/announcing-entity-framework-code-first-ctp5-release.aspx"&gt;Scott Guthrie BLOG&lt;/a&gt;&lt;/p&gt;&lt;img src="http://blogs.oosterkamp.nl/aggbug.aspx?PostID=322" width="1" height="1"&gt;</description><category domain="http://blogs.oosterkamp.nl/blogs/erik/archive/tags/Entity+Framework/default.aspx">Entity Framework</category></item><item><title>Using additional fonts in Silverlight</title><link>http://blogs.oosterkamp.nl/blogs/erik/archive/2010/10/12/using-additional-fonts-in-silverlight.aspx</link><pubDate>Tue, 12 Oct 2010 14:10:22 GMT</pubDate><guid isPermaLink="false">6da500ce-fa22-46ef-b417-4864733669f6:321</guid><dc:creator>Erik</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Today I wanted to use a font other than the default ones for a TextBlock element in a Silverlight 4 application.&amp;#160; To accomplish this using Visual Studio 2010 I had to:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Add the font file (.ttf) to the project&lt;/li&gt;    &lt;li&gt;Set the Build action of this file to resource so it will be included in the assembly &lt;/li&gt;    &lt;li&gt;Add a reference &amp;lt;font file name&amp;gt;#&amp;lt;font name&amp;gt; for the FontFamily attribute of the TextBlock element.&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;For more information about these actions take a look &lt;a href="http://www.silverlight.net/learn/videos/all/using-custom-fonts-in-silverlight/"&gt;here&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;Although this process is ok, doing the same in Expression Blend 4 is just a breeze. &lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Select the required font using the Properties tab of the TextBlock control&lt;/li&gt;    &lt;li&gt;Make sure the Embed flag is checked and you are done&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;a href="http://blogs.oosterkamp.nl/blogs/erik/BlendFontSelection_3A56FB44.png"&gt;&lt;img style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" title="BlendFontSelection" border="0" alt="BlendFontSelection" src="http://blogs.oosterkamp.nl/blogs/erik/BlendFontSelection_thumb_32CB8BD7.png" width="230" height="489" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://blogs.oosterkamp.nl/aggbug.aspx?PostID=321" width="1" height="1"&gt;</description><category domain="http://blogs.oosterkamp.nl/blogs/erik/archive/tags/Silverlight+WPF_2F00_E/default.aspx">Silverlight WPF/E</category><category domain="http://blogs.oosterkamp.nl/blogs/erik/archive/tags/Visual+Studio/default.aspx">Visual Studio</category></item><item><title>Looking for a MVVM framework</title><link>http://blogs.oosterkamp.nl/blogs/erik/archive/2010/09/13/looking-for-a-mvvm-framework.aspx</link><pubDate>Mon, 13 Sep 2010 13:59:30 GMT</pubDate><guid isPermaLink="false">6da500ce-fa22-46ef-b417-4864733669f6:319</guid><dc:creator>Erik</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;I am looking for a MVVM Framework that could help me implement the MVVM design pattern for a Silverlight 4 application. During a dotned meeting Gill Cleeren showed the MVVM Light Toolkit from Galasoft. It comes with Visual Studio templates, documentation and demo’s.&lt;/p&gt;  &lt;p&gt;I played around with The MVVM Light Toolkit and found it easy to learn, well, at least when you are familiar with the MVVM concepts of course.&lt;/p&gt;  &lt;p&gt;Download: &lt;a href="http://mvvmlight.codeplex.com/"&gt;http://mvvmlight.codeplex.com/&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;I also downloaded Caliburn.Micro. MVVM in Caliburn is heavily based on naming conventions which makes it maybe even easier to use. It also comes with some advanced concepts like ActionMessages and Coroutines, I didn’t found the time yet to do a deep dive but like the MVVM Light Toolkit it seems Caliburn.Micro can serve me as well.&lt;/p&gt;  &lt;p&gt;Download: &lt;a href="http://caliburnmicro.codeplex.com/"&gt;http://caliburnmicro.codeplex.com/&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;I haven’t decided yet, so mail me (&lt;a href="mailto:erik@oosterkamp.nl"&gt;erik@oosterkamp.nl&lt;/a&gt;) if, in your humble opinion, I should use one of these or another framework. Looking forward to the reactions.&lt;/p&gt;&lt;img src="http://blogs.oosterkamp.nl/aggbug.aspx?PostID=319" width="1" height="1"&gt;</description></item><item><title>Reporting Services 2008 without IIS</title><link>http://blogs.oosterkamp.nl/blogs/thomas/archive/2010/09/07/reporting-services-2008-without-iis.aspx</link><pubDate>Tue, 07 Sep 2010 18:48:05 GMT</pubDate><guid isPermaLink="false">6da500ce-fa22-46ef-b417-4864733669f6:318</guid><dc:creator>Thomas</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;When teaching a Reporting Services course today, I was told by an attendee that Reporting Services 2008 could be installed without the need for IIS. I read about that, but assumed that it had an internal webserver or something similar that you could activate if you didn’t have IIS (I guess I didn’t really read the documentation, I just made some assumptions). But the attendee pointed me to a webpage that showed how Reporting Services work without IIS. Instead of an internal webserver, Microsoft implemented Reporting Services 2008 as an extension to &lt;a href="http://learn.iis.net/page.aspx/101/#Hypertext" target="_blank"&gt;HTTP.SYS&lt;/a&gt;, called an HTTP Listener. That means that Reporting Services gets passed requests for it and IIS never gets those requests. This means that you actually have two processes reacting to requests on port 80. And that’s possible because HTTP.SYS is the process that actually listens on port 80 and hands those requests to either Reporting Services or IIS. &lt;/p&gt;  &lt;p&gt;Read more about it &lt;a href="http://msdn.microsoft.com/en-us/library/bb630409.aspx" target="_blank"&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://blogs.oosterkamp.nl/aggbug.aspx?PostID=318" width="1" height="1"&gt;</description><category domain="http://blogs.oosterkamp.nl/blogs/thomas/archive/tags/Reporting+Services/default.aspx">Reporting Services</category><category domain="http://blogs.oosterkamp.nl/blogs/thomas/archive/tags/SQL+Server/default.aspx">SQL Server</category><category domain="http://blogs.oosterkamp.nl/blogs/thomas/archive/tags/IIS/default.aspx">IIS</category></item><item><title>VS2010 web deployment: publishing profiles</title><link>http://blogs.oosterkamp.nl/blogs/erik/archive/2010/06/28/vs2010-web-deployment-publishing-profiles.aspx</link><pubDate>Mon, 28 Jun 2010 11:43:08 GMT</pubDate><guid isPermaLink="false">6da500ce-fa22-46ef-b417-4864733669f6:317</guid><dc:creator>Erik</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;A lot of developers still use external FTP clients or even copy/paste to deploy their ASP.NET or Silverlight web project on the production server. It’s good to know Visual Studio can do this job for you. Just right-click your Web application project in the solution explorer and select the Publish… menu-item.&lt;/p&gt;  &lt;p&gt;Publish… will pre-build your project and copy the necessary files to the destination server in one go. In Visual Studio 2010 it’s now possible to save your publishing options using a profile.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.oosterkamp.nl/blogs/erik/PublishingWeb_1F9A03FD.png"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="PublishingWeb" border="0" alt="PublishingWeb" src="http://blogs.oosterkamp.nl/blogs/erik/PublishingWeb_thumb_310A64D5.png" width="317" height="423" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;The profile will be saved as a XML file in the root directory of your web application. The name of the file follows the format [ProjectName].Publish.XML. And no panic, the password will be saved encrypted. If you are still using Visual Studio 2008, you don’t have this profile feature and you’ll have to fill in your credentials manually during each deployment action.&lt;/p&gt;  &lt;p&gt;For more complex deployment scenarios, including database deployment, altering IIS settings etc.. you should take a look into the new webpackage deployment option in VS2010. For more infomation on this subject take a look &lt;a href="http://blogs.msdn.com/b/webdevtools/archive/2009/02/09/web-packaging-creating-a-web-package-using-vs-2010.aspx"&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://blogs.oosterkamp.nl/aggbug.aspx?PostID=317" width="1" height="1"&gt;</description></item><item><title>Modifying the generated code from RIA Services</title><link>http://blogs.oosterkamp.nl/blogs/thomas/archive/2010/06/22/modifying-the-generated-code-from-ria-services.aspx</link><pubDate>Tue, 22 Jun 2010 10:27:37 GMT</pubDate><guid isPermaLink="false">6da500ce-fa22-46ef-b417-4864733669f6:316</guid><dc:creator>Thomas</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Today at a client I had the need to modify the code that RIA Services generates. It is certainly possible, but not as easy as modifying a &lt;a href="http://msdn.microsoft.com/en-us/library/bb126445.aspx" target="_blank"&gt;T4 template&lt;/a&gt;. It turns out you have to derive a class from System.ServiceModel.DomainServices.Server.CodeProcessor. If you put the DomainIdentifierAttribute on your DomainService class, you can specify your own CodeProcessor.&lt;/p&gt;  &lt;p&gt;The CodeProcessor gets an tree with the CodeDOM of the code that is going to be generated. The MSBuild task responsible for generating the code, hands that to your CodeProcessor so you can add, remove or change anything you want. See an example of a CodeProcessor &lt;a href="http://weblogs.thinktecture.com/ingo/2010/06/fixing-ria-servicess-an-entitykey-value-cannot-be-null-with-a-codeprocessor.html" target="_blank"&gt;here&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;I’ve read somewhere that the next version of RIA Services is going to support T4 Templates, but for now I can live with it.&lt;/p&gt;&lt;img src="http://blogs.oosterkamp.nl/aggbug.aspx?PostID=316" width="1" height="1"&gt;</description></item><item><title>Delphi 2009 resources</title><link>http://blogs.oosterkamp.nl/blogs/erik/archive/2010/04/26/delphi-2009-resources.aspx</link><pubDate>Mon, 26 Apr 2010 07:06:26 GMT</pubDate><guid isPermaLink="false">6da500ce-fa22-46ef-b417-4864733669f6:300</guid><dc:creator>Erik</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Last week I did a Embarcadero Delphi 2009 course. While preparing this course I came to a number of resources on the web. If you need info about Delphi I would recommend the following sites:&lt;/p&gt;  &lt;p&gt;1. Delphi basics. A language reference guide to the OO Delphi language. &lt;a href="http://www.delphibasics.co.uk/"&gt;http://www.delphibasics.co.uk/&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;2. To download a Delphi Quick Reference Card look here: &lt;a href="http://www.explainth.at/en/qr/dqr.shtml"&gt;http://www.explainth.at/en/qr/dqr.shtml&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;3. New Delphi language features since Delphi 7. &lt;a href="http://edn.embarcadero.com/article/34324"&gt;http://edn.embarcadero.com/article/34324&lt;/a&gt;&lt;/p&gt;&lt;img src="http://blogs.oosterkamp.nl/aggbug.aspx?PostID=300" width="1" height="1"&gt;</description><category domain="http://blogs.oosterkamp.nl/blogs/erik/archive/tags/Delphi/default.aspx">Delphi</category><category domain="http://blogs.oosterkamp.nl/blogs/erik/archive/tags/Embarcadero/default.aspx">Embarcadero</category></item><item><title>Configure Windows to Log in to TFS Automatically</title><link>http://blogs.oosterkamp.nl/blogs/thomas/archive/2010/04/08/configure-windows-to-log-in-to-tfs-automatically.aspx</link><pubDate>Thu, 08 Apr 2010 19:48:45 GMT</pubDate><guid isPermaLink="false">6da500ce-fa22-46ef-b417-4864733669f6:299</guid><dc:creator>Thomas</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;After typing my TFS credentials about a million times, today I finally took the time to figure out how to log on to TFS automatically if the PC that I’m working on is not part of a (or not the same) Active Directory than the TFS server is. Turns out it’s pretty simple: &lt;a href="http://blog.benday.com/archive/2007/10/10/23162.aspx"&gt;http://blog.benday.com/archive/2007/10/10/23162.aspx&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Why haven’t I searched for that before?&lt;/p&gt;&lt;img src="http://blogs.oosterkamp.nl/aggbug.aspx?PostID=299" width="1" height="1"&gt;</description></item><item><title>Custom ASP.NET MVC2 Data Annotations</title><link>http://blogs.oosterkamp.nl/blogs/erik/archive/2010/04/07/custom-asp-net-mvc2-data-annotations.aspx</link><pubDate>Wed, 07 Apr 2010 14:43:28 GMT</pubDate><guid isPermaLink="false">6da500ce-fa22-46ef-b417-4864733669f6:298</guid><dc:creator>Erik</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;This afternoon we did some work to update our corporate site to MVC 2. We are using the new System.ComponentModel.DataAnnotations attributes to decorate our domain entities and by doing so you‘ll get some nice validation for free.&amp;#160; &lt;/p&gt;  &lt;p&gt;Introducing your own Data Annotation attribute for MVC2 is just a matter of creating a derived Class from ValidationAttribute and override the IsValid method.&amp;#160; By default this will be a server-side validator. To change that into a client-side validator takes some effort. The main steps are:&lt;/p&gt;  &lt;p&gt;- Create a new validator Class derived from the generic DataAnnotationsModelValidator&amp;lt;--your custom attribute Class goes in here—&amp;gt; Class.&amp;#160; &lt;br /&gt;- Register the validator and Custom attribute in global.asax.     &lt;br /&gt;- Write a custom JavaScript validation function.&lt;/p&gt;  &lt;p&gt;For all the details I would recommend reading this excellent &lt;a href="http://haacked.com/archive/2009/11/19/aspnetmvc2-custom-validation.aspx"&gt;article&lt;/a&gt; about ASP.NET MVC 2 Custom validation.&lt;/p&gt;&lt;img src="http://blogs.oosterkamp.nl/aggbug.aspx?PostID=298" width="1" height="1"&gt;</description></item><item><title>Custom Dictionary for Code Analysis</title><link>http://blogs.oosterkamp.nl/blogs/thomas/archive/2010/04/06/custom-dictionary-for-code-analysis.aspx</link><pubDate>Tue, 06 Apr 2010 13:42:39 GMT</pubDate><guid isPermaLink="false">6da500ce-fa22-46ef-b417-4864733669f6:297</guid><dc:creator>Thomas</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;At the DevDays 2010 in my session on Building Maintainable Applications, a question came up how to add custom words to Code Analysis. I’ve done that a couple of times, but couldn’t remember it from the top of my had. So, this is just a note-to-self.&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Add a XML file (e.g. CustomDictionary.xml) to your project&lt;/li&gt;    &lt;li&gt;Set the Build Action to &lt;strong&gt;CodeAnalysisDictionary&lt;/strong&gt;&lt;/li&gt;    &lt;li&gt;Set Copy to Output Directory to &lt;strong&gt;Do not copy&lt;/strong&gt;&lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;If you put the xml file in the root install folder of Visual Studio, it’ll be applied to all projects. Alternatively, you could share a dictionary file using the Add as Link when adding files to a project.&lt;/p&gt;&lt;img src="http://blogs.oosterkamp.nl/aggbug.aspx?PostID=297" width="1" height="1"&gt;</description></item><item><title>Software Quality: External versus Internal</title><link>http://blogs.oosterkamp.nl/blogs/thomas/archive/2010/04/06/software-quality-external-versus-internal.aspx</link><pubDate>Tue, 06 Apr 2010 10:01:05 GMT</pubDate><guid isPermaLink="false">6da500ce-fa22-46ef-b417-4864733669f6:296</guid><dc:creator>Thomas</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;I’m doing quite a lot of software quality audits lately. Some customers want to know what the quality is of a product that was developed off-shore. Some just want to know how long they should keep developing the current version or if they should start developing a new version in a new environment. Often products that have been around for long have architectures that are not kept into shape. Or new requirements that just won’t fit into the current architecture. Of requirements that are just too hard to do in the current environment, for example communicating with advanced webservices that require certificates, SSL, custom authentication or reliable sessions. For products developed with for example VB6, this is just extremely time-consuming to develop. While this is plain easy in WCF.&lt;/p&gt;  &lt;p&gt;Anyway, whatever the reason is that customers have to request an quality audit, I always first explain to them the difference between what I call the external and internal quality of a software product.&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;External quality      &lt;br /&gt;This is the quality of the product that is perceived by the users of the product. This includes the stability of the product, the ease of use of it, the interaction design and the way it conforms to the requirements &lt;/li&gt;    &lt;li&gt;Internal quality     &lt;br /&gt;This is the quality of the source code, the quality of the architecture, the quality of the development process around the product, etc. Anything that is not perceivable by the users of the software.&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;We at &lt;a href="http://www.oosterkamp.nl/Home.mvc/Index" target="_blank"&gt;Oosterkamp training | consultancy&lt;/a&gt; are specialized in auditing the internal quality of software. We have developed our own techniques for quickly and accurately determining the internal quality of software. For example, we look at how &lt;a href="http://www.amazon.co.uk/Clean-Code-Handbook-Software-Craftsmanship/dp/0132350882" target="_blank"&gt;clean the code&lt;/a&gt; is. We also inspect software for possible defects in software using &lt;a href="http://www.ifsq.nl/" target="_blank"&gt;IfSQ&lt;/a&gt;. We look at the architecture of the software, the consistency of used solutions, etc., etc.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.oosterkamp.nl/Info.mvc/Contact" target="_blank"&gt;Call us&lt;/a&gt; if you’re interested in an audit or are interested in reviews of audits we did for our customers.&lt;/p&gt;&lt;img src="http://blogs.oosterkamp.nl/aggbug.aspx?PostID=296" width="1" height="1"&gt;</description></item><item><title>Silverlight 4: WebBrowser control</title><link>http://blogs.oosterkamp.nl/blogs/erik/archive/2010/03/04/silverlight-4-webbrowser-control.aspx</link><pubDate>Thu, 04 Mar 2010 08:06:54 GMT</pubDate><guid isPermaLink="false">6da500ce-fa22-46ef-b417-4864733669f6:295</guid><dc:creator>Erik</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;The new WebBrowser control in Silverlight 4 is capable of showing HTML content based on a URI or string within your Silverlight application. There are just 2 gotcha’s:&lt;/p&gt;  &lt;p&gt;1. At this moment the WebBrowser control will only work if the application runs in Out of the Browser mode. Like you suspect by the name, in this mode the application doesn’t run in the browser anymore but will run locally like a normal desktop app. You have to enable OOTB mode explicitly in Visual Studio. You’ll find this option in the Silverlight project properties pages.&lt;/p&gt;  &lt;p&gt;2.&amp;#160; During the install the client needs to give the Silverlight application permissions to travel over the web. So there is an extra option you have to set to get this control working. Check the Require elevated trust when running outside the browser option in the Out-of-Browser Settings dialog.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.oosterkamp.nl/blogs/erik/Silverlight4WebBrowser_1D235820.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="Silverlight4WebBrowser" border="0" alt="Silverlight4WebBrowser" src="http://blogs.oosterkamp.nl/blogs/erik/Silverlight4WebBrowser_thumb_10490202.png" width="377" height="463" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://blogs.oosterkamp.nl/aggbug.aspx?PostID=295" width="1" height="1"&gt;</description><category domain="http://blogs.oosterkamp.nl/blogs/erik/archive/tags/Silverlight+WPF_2F00_E/default.aspx">Silverlight WPF/E</category><category domain="http://blogs.oosterkamp.nl/blogs/erik/archive/tags/Visual+Studio/default.aspx">Visual Studio</category></item></channel></rss>
