<?xml version="1.0"?><?xml-stylesheet type="text/xsl" href="http://www.codeplex.com/rss.xsl"?><rss version="2.0"><channel><title>fadd Wiki &amp; Documentation Rss Feed</title><link>http://www.codeplex.com/fadd/Wiki/View.aspx?title=Home</link><description>fadd Wiki Rss Description</description><item><title>Updated Wiki: Home</title><link>http://fadd.codeplex.com/Wiki/View.aspx?title=Home&amp;version=10</link><description>&lt;div class="wikidoc"&gt;
A set of classes that makes the life easier for developers. Currently contains&amp;#58; IoC, DAL&amp;#47;ORM, Model validation, localization, logging, parsers, design by contract.&lt;br /&gt;Feel free to contribute.&lt;br /&gt; &lt;br /&gt;Parts of the framework is beta.&lt;br /&gt; &lt;br /&gt; &lt;br /&gt;This list is in no way complete, please check the code (which is quite well documented).&lt;br /&gt; &lt;br /&gt;&lt;ul&gt;
&lt;li&gt;&lt;a href="http://fadd.codeplex.com/Wiki/View.aspx?title=Commands&amp;amp;referringTitle=Home"&gt;Commands&lt;/a&gt; - Upgraded version of the &lt;a href="http://en.wikipedia.org/wiki/Command_pattern" class="externalLink"&gt;Command pattern&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&lt;li&gt;Components - Inversion of control / Dependency injection, &lt;a href="http://www.codeproject.com/KB/library/Components.aspx" class="externalLink"&gt;CodeProject article&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&lt;li&gt;Data - DAL/ORM layer. Doesn't mess with your models at all&lt;/li&gt;&lt;li&gt;&lt;a href="http://fadd.codeplex.com/Wiki/View.aspx?title=DesignByContract&amp;amp;referringTitle=Home"&gt;DesignByContract&lt;/a&gt; - A &lt;a href="http://www.wikipedia.org/wiki/Design_by_contract" class="externalLink"&gt;Design by contract&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt; implementation. (the 'Check' class in the framework)&lt;/li&gt;&lt;li&gt;&lt;a href="http://fadd.codeplex.com/Wiki/View.aspx?title=Globalization&amp;amp;referringTitle=Home"&gt;Globalization&lt;/a&gt; - Adding language support, Date/Time helpers etc.&lt;/li&gt;&lt;li&gt;Logging - A NLog similiar logging framework&lt;/li&gt;&lt;li&gt;Parser - A way to create parsers/tokenizer (that aren't fast but easy to understand/extend). SQL parser included.&lt;/li&gt;&lt;li&gt;&lt;a href="http://fadd.codeplex.com/Wiki/View.aspx?title=PluginHelpers&amp;amp;referringTitle=Home"&gt;PluginHelpers&lt;/a&gt; - Small plugin framework, &lt;a href="http://www.codeproject.com/KB/macros/pluginsystem.aspx" class="externalLink"&gt;CodeProject article&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://fadd.codeplex.com/Wiki/View.aspx?title=Property&amp;amp;referringTitle=Home"&gt;Property&lt;/a&gt; - Helper class used to get/set property values using property names as strings.&lt;/li&gt;&lt;li&gt;Validation - Validate your models with the help of attributes (which are excellent since attributes are documented in sandcastle generated help files)&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;</description><author>jgauffin</author><pubDate>Sun, 22 Mar 2009 11:50:00 GMT</pubDate><guid isPermaLink="false">Updated Wiki: Home 20090322115000A</guid></item><item><title>Updated Wiki: Home</title><link>http://fadd.codeplex.com/Wiki/View.aspx?title=Home&amp;version=9</link><description>&lt;div class="wikidoc"&gt;
A set of classes that makes the life easier for developers. Currently contains&amp;#58; IoC, DAL&amp;#47;ORM, Model validation, localization, logging, parsers, design by contract.&lt;br /&gt;Feel free to contribute.&lt;br /&gt; &lt;br /&gt;Parts of the framework is beta.&lt;br /&gt; &lt;br /&gt; &lt;br /&gt;This list is in no way complete, please check the code (which is quite well documented).&lt;br /&gt; &lt;br /&gt;&lt;ul&gt;
&lt;li&gt;&lt;a href="http://fadd.codeplex.com/Wiki/View.aspx?title=Commands&amp;amp;referringTitle=Home"&gt;Commands&lt;/a&gt; - Upgraded version of the &lt;a href="http://en.wikipedia.org/wiki/Command_pattern" class="externalLink"&gt;Command pattern&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&lt;li&gt;Components - Inversion of control / Dependency injection, &lt;a href="http://www.codeproject.com/KB/library/Components.aspx" class="externalLink"&gt;CodeProject article&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&lt;li&gt;Data - DAL/ORM layer. Doesn't mess with your models at all&lt;/li&gt;&lt;li&gt;&lt;a href="http://fadd.codeplex.com/Wiki/View.aspx?title=DesignByContract&amp;amp;referringTitle=Home"&gt;DesignByContract&lt;/a&gt; - A &lt;a href="http://www.wikipedia.org/wiki/Design_by_contract" class="externalLink"&gt;Design by contract&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt; implementation. (the 'Check' class in the framework)&lt;/li&gt;&lt;li&gt;&lt;a href="http://fadd.codeplex.com/Wiki/View.aspx?title=Globalization&amp;amp;referringTitle=Home"&gt;Globalization&lt;/a&gt; - Adding language support, Date/Time helpers etc.&lt;/li&gt;&lt;li&gt;Parser - A way to create parsers/tokenizer (that aren't fast but easy to understand/extend). SQL parser included.&lt;/li&gt;&lt;li&gt;&lt;a href="http://fadd.codeplex.com/Wiki/View.aspx?title=PluginHelpers&amp;amp;referringTitle=Home"&gt;PluginHelpers&lt;/a&gt; - Small plugin framework, &lt;a href="http://www.codeproject.com/KB/macros/pluginsystem.aspx" class="externalLink"&gt;CodeProject article&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://fadd.codeplex.com/Wiki/View.aspx?title=Property&amp;amp;referringTitle=Home"&gt;Property&lt;/a&gt; - Helper class used to get/set property values using property names as strings.&lt;/li&gt;&lt;li&gt;Validation - Validate your models with the help of attributes (which are excellent since attributes are documented in sandcastle generated help files)&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;</description><author>jgauffin</author><pubDate>Sun, 22 Mar 2009 11:49:00 GMT</pubDate><guid isPermaLink="false">Updated Wiki: Home 20090322114900A</guid></item><item><title>Updated Wiki: Home</title><link>http://fadd.codeplex.com/Wiki/View.aspx?title=Home&amp;version=8</link><description>&lt;div class="wikidoc"&gt;
A set of classes that makes the life easier for developers. Currently contains&amp;#58; IoC, DAL&amp;#47;ORM, Model validation, localization, logging, parsers, design by contract.&lt;br /&gt;Feel free to contribute.&lt;br /&gt; &lt;br /&gt;Parts of the framework is beta.&lt;br /&gt; &lt;br /&gt; &lt;br /&gt;This list is in no way complete, please check the code (which is quite well documented).&lt;br /&gt; &lt;br /&gt;&lt;ul&gt;
&lt;li&gt;&lt;a href="http://fadd.codeplex.com/Wiki/View.aspx?title=Commands&amp;amp;referringTitle=Home"&gt;Commands&lt;/a&gt; - Upgraded version of the &lt;a href="http://en.wikipedia.org/wiki/Command_pattern" class="externalLink"&gt;Command pattern&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&lt;li&gt;Components - Inversion of control / Dependency injection, &lt;a href="http://www.codeproject.com/KB/library/Components.aspx" class="externalLink"&gt;CodeProject article&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&lt;li&gt;Data - DAL/ORM layer. Doesn't mess with your models at all&lt;/li&gt;&lt;li&gt;&lt;a href="http://fadd.codeplex.com/Wiki/View.aspx?title=DesignByContract&amp;amp;referringTitle=Home"&gt;DesignByContract&lt;/a&gt; - A &lt;a href="http://www.wikipedia.org/wiki/Design_by_contract" class="externalLink"&gt;Design by contract&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt; implementation. (the 'Check' class in the framework)&lt;/li&gt;&lt;li&gt;&lt;a href="http://fadd.codeplex.com/Wiki/View.aspx?title=Globalization&amp;amp;referringTitle=Home"&gt;Globalization&lt;/a&gt; - Adding language support, Date/Time helpers etc.&lt;/li&gt;&lt;li&gt;Parser - A way to create parsers/tokenizer (that aren't fast but easy to understand/extend). SQL parser included.&lt;/li&gt;&lt;li&gt;&lt;a href="http://fadd.codeplex.com/Wiki/View.aspx?title=PluginHelpers&amp;amp;referringTitle=Home"&gt;PluginHelpers&lt;/a&gt; - Small plugin framework&lt;/li&gt;&lt;li&gt;&lt;a href="http://fadd.codeplex.com/Wiki/View.aspx?title=Property&amp;amp;referringTitle=Home"&gt;Property&lt;/a&gt; - Helper class used to get/set property values using property names as strings.&lt;/li&gt;&lt;li&gt;Validation - Validate your models with the help of attributes (which are excellent since attributes are documented in sandcastle generated help files)&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;</description><author>jgauffin</author><pubDate>Sun, 22 Mar 2009 11:48:08 GMT</pubDate><guid isPermaLink="false">Updated Wiki: Home 20090322114808A</guid></item><item><title>Updated Wiki: Home</title><link>http://www.codeplex.com/fadd/Wiki/View.aspx?title=Home&amp;version=7</link><description>&lt;div class="wikidoc"&gt;
A set of classes that makes the life easier for developers. Currently contains&amp;#58; IoC, DAL&amp;#47;ORM, Model validation, localization, logging, parsers, design by contract.&lt;br /&gt;Feel free to contribute.&lt;br /&gt; &lt;br /&gt;Parts of the framework is beta.&lt;br /&gt; &lt;br /&gt; &lt;br /&gt;This list is in no way complete, please check the code (which is quite well documented).&lt;br /&gt; &lt;br /&gt;&lt;ul&gt;
&lt;li&gt;&lt;a href="http://www.codeplex.com/fadd/Wiki/View.aspx?title=Commands&amp;amp;referringTitle=Home"&gt;Commands&lt;/a&gt; - Upgraded version of the &lt;a href="http://en.wikipedia.org/wiki/Command_pattern" class="externalLink"&gt;Command pattern&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&lt;li&gt;Components - Inversion of control&lt;/li&gt;&lt;li&gt;Data - DAL/ORM layer. Doesn't mess with your models at all&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.codeplex.com/fadd/Wiki/View.aspx?title=DesignByContract&amp;amp;referringTitle=Home"&gt;DesignByContract&lt;/a&gt; - A &lt;a href="http://www.wikipedia.org/wiki/Design_by_contract" class="externalLink"&gt;Design by contract&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt; implementation. (the 'Check' class in the framework)&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.codeplex.com/fadd/Wiki/View.aspx?title=Globalization&amp;amp;referringTitle=Home"&gt;Globalization&lt;/a&gt; - Adding language support, Date/Time helpers etc.&lt;/li&gt;&lt;li&gt;Parser - A way to create parsers/tokenizer (that aren't fast but easy to understand/extend). SQL parser included.&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.codeplex.com/fadd/Wiki/View.aspx?title=PluginHelpers&amp;amp;referringTitle=Home"&gt;PluginHelpers&lt;/a&gt; - Small plugin framework&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.codeplex.com/fadd/Wiki/View.aspx?title=Property&amp;amp;referringTitle=Home"&gt;Property&lt;/a&gt; - Helper class used to get/set property values using property names as strings.&lt;/li&gt;&lt;li&gt;Validation - Validate your models with the help of attributes (which are excellent since attributes are documented in sandcastle generated help files)&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;</description><author>jgauffin</author><pubDate>Wed, 10 Dec 2008 13:48:56 GMT</pubDate><guid isPermaLink="false">Updated Wiki: Home 20081210014856P</guid></item><item><title>Updated Wiki: PluginHelpers</title><link>http://www.codeplex.com/fadd/Wiki/View.aspx?title=PluginHelpers&amp;version=3</link><description>&lt;div class="wikidoc"&gt;
&lt;h1&gt;
Plugin system
&lt;/h1&gt; &lt;br /&gt;We've created a small plugin system. &lt;br /&gt; &lt;br /&gt;We are moving towards our component system in our applications, which means that we do not improve the system anymore. &lt;br /&gt;We will merge/include any contributions though.&lt;br /&gt; &lt;br /&gt;&lt;h2&gt;
CodeProject article
&lt;/h2&gt; &lt;br /&gt;I've written an article about the system:&lt;br /&gt;&lt;a href="http://www.codeproject.com/KB/macros/pluginsystem.aspx" class="externalLink"&gt;http://www.codeproject.com/KB/macros/pluginsystem.aspx&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;br /&gt; &lt;br /&gt;&lt;h2&gt;
Plugin helpers
&lt;/h2&gt; &lt;br /&gt;&lt;pre&gt;
        List&amp;lt;Type&amp;gt; types = new List&amp;lt;Type&amp;gt;();
        types.Add(typeof(IPlayer));
        types.Add(typeof(IViewer));
 
        PluginFinder finder = new PluginFinder();
        finder.Find(&amp;quot;C:\\myapp\\plugins\\plugin*.dll&amp;quot;, types);
 
        Console.WriteLine(&amp;quot;Found the following plugins: &amp;quot;);
        foreach (PluginInformation info in finder.Plugins)
          Console.WriteLine(&amp;quot;    &amp;quot; + info.Location);
&lt;/pre&gt; &lt;br /&gt;
&lt;/div&gt;</description><author>jgauffin</author><pubDate>Wed, 10 Dec 2008 13:15:16 GMT</pubDate><guid isPermaLink="false">Updated Wiki: PluginHelpers 20081210011516P</guid></item><item><title>Updated Wiki: PluginHelpers</title><link>http://www.codeplex.com/fadd/Wiki/View.aspx?title=PluginHelpers&amp;version=2</link><description>&lt;div class="wikidoc"&gt;
&lt;h1&gt;
Plugin helpers
&lt;/h1&gt; &lt;br /&gt;&lt;pre&gt;
        List&amp;lt;Type&amp;gt; types = new List&amp;lt;Type&amp;gt;();
        types.Add(typeof(IPlayer));
        types.Add(typeof(IViewer));
 
        PluginFinder finder = new PluginFinder();
        finder.Find(&amp;quot;C:\\myapp\\plugins\\plugin*.dll&amp;quot;, types);
 
        Console.WriteLine(&amp;quot;Found the following plugins: &amp;quot;);
        foreach (PluginInformation info in finder.Plugins)
          Console.WriteLine(&amp;quot;    &amp;quot; + info.Location);
&lt;/pre&gt; &lt;br /&gt; &lt;br /&gt;&lt;h1&gt;
CodeProject article
&lt;/h1&gt; &lt;br /&gt;I've written an article about the system:&lt;br /&gt;&lt;a href="http://www.codeproject.com/KB/macros/pluginsystem.aspx" class="externalLink"&gt;http://www.codeproject.com/KB/macros/pluginsystem.aspx&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;
&lt;/div&gt;</description><author>jgauffin</author><pubDate>Wed, 10 Dec 2008 13:12:45 GMT</pubDate><guid isPermaLink="false">Updated Wiki: PluginHelpers 20081210011245P</guid></item><item><title>Updated Wiki: Property</title><link>http://www.codeplex.com/fadd/Wiki/View.aspx?title=Property&amp;version=2</link><description>&lt;div class="wikidoc"&gt;
&lt;h1&gt;
Property class
&lt;/h1&gt; &lt;br /&gt;Let's say that you have the following class:&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
public class User
{
  public string UserName {get;set;}
  public int Age {get;set;}
  public AccountLevel Level {get;set;}
  public DateTime RegisteredAt {get;set;}
  public bool IsActive  {get;set;}
}
[Flags]
public enum AccountLevel
{
  User = 1,
  Admin = 1 + 2
}
&lt;/pre&gt; &lt;br /&gt; &lt;br /&gt;Then you can do all this:&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
  User user = new User();
  Property.Set(user, &amp;quot;UserName&amp;quot;, &amp;quot;Arne&amp;quot;);
  string firstName = Property.Get(user, &amp;quot;UserName&amp;quot;);
  
  // bool can be used in these ways
  Property.Set(user, &amp;quot;IsActive&amp;quot;, 1);
  Property.Set(user, &amp;quot;IsActive&amp;quot;, true);
  Property.Set(user, &amp;quot;IsActive&amp;quot;, &amp;quot;true&amp;quot;);
 
  // Enums are converted to the correct type:
  Property.Set(user, &amp;quot;Level&amp;quot;, 3); // &amp;lt;-- will be set to UserLevel.Admin
  Property.Set(user, &amp;quot;Level&amp;quot;, &amp;quot;User&amp;quot;); // &amp;lt;-- will be set to UserLevel.User
  Property.Set(user, &amp;quot;Level&amp;quot;, UserLevel.Admin);
 
  // ints are also converted from strings:
  Property.Set(user, &amp;quot;Age&amp;quot;, 19);
  Property.Set(user, &amp;quot;Age&amp;quot;, &amp;quot;10&amp;quot;);
&lt;/pre&gt; &lt;br /&gt; &lt;br /&gt;We created this class to make form processing a lot easier in our webserver (see &lt;a href="http://www.codeplex.com/webserver" class="externalLink"&gt;http://www.codeplex.com/webserver&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;). Consider having this html form:&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
&amp;lt;form method=&amp;quot;post&amp;quot; action=&amp;quot;/user/edit/1&amp;quot;&amp;gt;
&amp;lt;input name=&amp;quot;user[UserName]&amp;quot; /&amp;gt;
&amp;lt;input name=&amp;quot;user[Age]&amp;quot; /&amp;gt;
&amp;lt;input name=&amp;quot;user[Level]&amp;quot; /&amp;gt;
&amp;lt;/form&amp;gt;
&lt;/pre&gt; &lt;br /&gt; &lt;br /&gt;With our webserver we can assign all fields with to lines of code:&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
User user = _dataLayer.GetById&amp;lt;User&amp;gt;(Id);
foreach (HttpInput item in Request.Form[&amp;quot;user&amp;quot;])
  Property.Set(user, item.name, item.Value);
_dataLayer.Save(user);
&lt;/pre&gt; &lt;br /&gt; &lt;br /&gt;Easy, huh? The Data layer can be found in Fadd.Data namespace. No documentation yet though.&lt;br /&gt;
&lt;/div&gt;</description><author>jgauffin</author><pubDate>Wed, 10 Dec 2008 13:10:27 GMT</pubDate><guid isPermaLink="false">Updated Wiki: Property 20081210011027P</guid></item><item><title>Updated Wiki: Property</title><link>http://www.codeplex.com/fadd/Wiki/View.aspx?title=Property&amp;version=1</link><description>&lt;div class="wikidoc"&gt;
&lt;h1&gt;
Property class
&lt;/h1&gt; &lt;br /&gt;Let's say that you have the following class:&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
public class User
{
  public string UserName {get;set;}
  public int Age {get;set;}
  public AccountLevel Level {get;set;}
  public DateTime RegisteredAt {get;set;}
  public bool IsActive  {get;set;}
}
[Flags]
public enum AccountLevel
{
  User = 1,
  Admin = 1 + 2
}
&lt;/pre&gt; &lt;br /&gt; &lt;br /&gt;Then you can do all this:&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
  User user = new User();
  Property.Set(user, &amp;quot;UserName&amp;quot;, &amp;quot;Arne&amp;quot;);
  string firstName = Property.Get(user, &amp;quot;UserName&amp;quot;);
  
  // bool can be used in these ways
  Property.Set(user, &amp;quot;IsActive&amp;quot;, 1);
  Property.Set(user, &amp;quot;IsActive&amp;quot;, true);
  Property.Set(user, &amp;quot;IsActive&amp;quot;, &amp;quot;true&amp;quot;);
 
  // Enums are converted to the correct type:
  Property.Set(user, &amp;quot;Level&amp;quot;, 3); // &amp;lt;-- will be set to UserLevel.Admin
  Property.Set(user, &amp;quot;Level&amp;quot;, &amp;quot;User&amp;quot;); // &amp;lt;-- will be set to UserLevel.User
  Property.Set(user, &amp;quot;Level&amp;quot;, UserLevel.Admin);
 
  // ints are also converted from strings:
  Property.Set(user, &amp;quot;Age&amp;quot;, 19);
  Property.Set(user, &amp;quot;Age&amp;quot;, &amp;quot;10&amp;quot;);
&lt;/pre&gt; &lt;br /&gt; &lt;br /&gt;
&lt;/div&gt;</description><author>jgauffin</author><pubDate>Wed, 10 Dec 2008 13:05:37 GMT</pubDate><guid isPermaLink="false">Updated Wiki: Property 20081210010537P</guid></item><item><title>Updated Wiki: Home</title><link>http://www.codeplex.com/fadd/Wiki/View.aspx?title=Home&amp;version=6</link><description>&lt;div class="wikidoc"&gt;
A set of classes that makes the life easier for developers. Feel free to contribute.&lt;br /&gt; &lt;br /&gt;Parts of the framework is beta.&lt;br /&gt; &lt;br /&gt;&lt;ul&gt;
&lt;li&gt;&lt;a href="http://www.codeplex.com/fadd/Wiki/View.aspx?title=DesignByContract&amp;amp;referringTitle=Home"&gt;DesignByContract&lt;/a&gt; - A &lt;a href="http://www.wikipedia.org/wiki/Design_by_contract" class="externalLink"&gt;Design by contract&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt; implementation.&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.codeplex.com/fadd/Wiki/View.aspx?title=Globalization&amp;amp;referringTitle=Home"&gt;Globalization&lt;/a&gt; - Adding language support, Date/Time helpers etc.&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.codeplex.com/fadd/Wiki/View.aspx?title=Commands&amp;amp;referringTitle=Home"&gt;Commands&lt;/a&gt; - Upgraded version of the &lt;a href="http://en.wikipedia.org/wiki/Command_pattern" class="externalLink"&gt;Command pattern&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.codeplex.com/fadd/Wiki/View.aspx?title=PluginHelpers&amp;amp;referringTitle=Home"&gt;PluginHelpers&lt;/a&gt; - Helps you find plugins and their information without loading the plugin DLLs into the current appdomain.&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.codeplex.com/fadd/Wiki/View.aspx?title=Property&amp;amp;referringTitle=Home"&gt;Property&lt;/a&gt; - Helper class used to get/set property values using property names as strings.&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;</description><author>jgauffin</author><pubDate>Wed, 10 Dec 2008 12:59:12 GMT</pubDate><guid isPermaLink="false">Updated Wiki: Home 20081210125912P</guid></item><item><title>Updated Wiki: BreakingHandlerChain</title><link>http://www.codeplex.com/fadd/Wiki/View.aspx?title=BreakingHandlerChain&amp;version=3</link><description>&lt;div class="wikidoc"&gt;
&lt;h1&gt;
Breaking handler chain
&lt;/h1&gt; &lt;br /&gt;You can abort the command chain by setting the CancelPropagation property to true.&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
  Program.Commands.Add(typeof(YourCommand), OnYourCommand);
  Program.Commands.Add(typeof(YourCommand), OnYourCommand2);
 
  Program.Commands.Invoke(new YourCommand());
 
  public bool OnYourCommand(object source, Command command)
  {
    command.CancelPropagation = true;
    return true;
  }
 
  public bool OnYourCommand2(object source, Command command)
  {
    //will never be invoked.
  }
&lt;/pre&gt; &lt;br /&gt; &lt;br /&gt;You can also determine which handlers are allowed to break the chain, check the PropagationCancelled in the CommandManager.&lt;br /&gt;
&lt;/div&gt;</description><author>jgauffin</author><pubDate>Mon, 25 Aug 2008 17:01:09 GMT</pubDate><guid isPermaLink="false">Updated Wiki: BreakingHandlerChain 20080825050109P</guid></item><item><title>Updated Wiki: BreakingHandlerChain</title><link>http://www.codeplex.com/fadd/Wiki/View.aspx?title=BreakingHandlerChain&amp;version=2</link><description>&lt;div class="wikidoc"&gt;
&lt;h1&gt;
Breaking handler chain
&lt;/h1&gt; &lt;br /&gt;You can abort the command chain by setting the CancelPropagation property to true.&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
  Program.Commands.Add(typeof(YourCommand), OnYourCommand);
  Program.Commands.Add(typeof(YourCommand), OnYourCommand2);
 
  Program.Commands.Invoke(new YourCommand());
 
  public bool OnYourCommand(object source, Command command)
  {
    command.CancelPropagation = true;
    return true;
  }
 
  public bool OnYourCommand2(object source, Command command)
  {
    //will never be invoked.
  }
&lt;/pre&gt; &lt;br /&gt; &lt;br /&gt;You can also determine which handlers are allowed to break the change, check the PropagationCancelled in the CommandManager.&lt;br /&gt;
&lt;/div&gt;</description><author>jgauffin</author><pubDate>Mon, 25 Aug 2008 17:00:41 GMT</pubDate><guid isPermaLink="false">Updated Wiki: BreakingHandlerChain 20080825050041P</guid></item><item><title>Updated Wiki: BreakingHandlerChain</title><link>http://www.codeplex.com/fadd/Wiki/View.aspx?title=BreakingHandlerChain&amp;version=1</link><description>&lt;div class="wikidoc"&gt;
&lt;h1&gt;
Breaking handler chain
&lt;/h1&gt; &lt;br /&gt;You can abort the command chain by setting the CancelPropagation property to true.&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
  Program.Commands.Add(typeof(YourCommand), OnYourCommand);
  Program.Commands.Add(typeof(YourCommand), OnYourCommand2);
 
  Program.Commands.Invoke(new YourCommand());
 
  public bool OnYourCommand(object source, Command command)
  {
    command.CancelPropagation = true;
    return true;
  }
 
  public bool OnYourCommand2(object source, Command command)
  {
    //will never be invoked.
  }
&lt;/pre&gt; &lt;br /&gt;
&lt;/div&gt;</description><author>jgauffin</author><pubDate>Mon, 25 Aug 2008 16:59:22 GMT</pubDate><guid isPermaLink="false">Updated Wiki: BreakingHandlerChain 20080825045922P</guid></item><item><title>Updated Wiki: Commands</title><link>http://www.codeplex.com/fadd/Wiki/View.aspx?title=Commands&amp;version=2</link><description>&lt;div class="wikidoc"&gt;
&lt;h1&gt;
Commands
&lt;/h1&gt; &lt;br /&gt;&lt;a href="http://www.dofactory.com/patterns/patterncommand.aspx" class="externalLink"&gt;Commands&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt; are used to separate the caller and the handler, i.e to create &lt;a href="http://en.wikipedia.org/wiki/Loose_coupling" class="externalLink"&gt;louse coupling&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;.&lt;br /&gt; &lt;br /&gt;The problem with the regular command pattern is that the command is coupled with the invoker, which makes it hard to let multiple handlers to take care of the command. It's also hard to reroute the command to somewhere else.&lt;br /&gt; &lt;br /&gt;This implementation takes care of both problems.&lt;br /&gt; &lt;br /&gt;&lt;ul&gt;
&lt;li&gt;&lt;a href="http://www.codeplex.com/fadd/Wiki/View.aspx?title=BreakingHandlerChain&amp;amp;referringTitle=Commands"&gt;BreakingHandlerChain&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt; &lt;br /&gt;&lt;h2&gt;
Example
&lt;/h2&gt; &lt;br /&gt;Let's say that you want to send a message, but you don't want to know HOW the message is sent. It can be sent as a SMS or what ever.&lt;br /&gt; &lt;br /&gt;To begin with, we create a command class:&lt;br /&gt;&lt;pre&gt;
public SendMessageCmd : Command
{
  private User _to;
  private User _from;
  private string _subject;
  private string _body;
 
  public SendMessageCmd(User from, User to, string subject, string body)
  {
    Check.Require(from, &amp;quot;from&amp;quot;);
    Check.Require(to, &amp;quot;to&amp;quot;);
    Check.Require(subject, &amp;quot;subject&amp;quot;);
    Check.Require(body, &amp;quot;body&amp;quot;);
    // normally we use more validations, for instance subject length etc.
  
    _from = from; _to = to; _subject = subject; _body = body;
  }
 
  [....getters for the properties...]
}
&lt;/pre&gt; &lt;br /&gt; &lt;br /&gt;To invoke a command, we only need to call Invoke in the dispatcher:&lt;br /&gt;&lt;pre&gt;
  SendMessageCmd cmd =new SendMessageCmd(me, bengt, &amp;quot;Hello&amp;quot;, &amp;quot;Just testing the command implementation.&amp;quot;);
  Program.Dispatcher.Invoke(cmd);
  if (!cmd.IsHandled)
    Console.WriteLine(&amp;quot;No one handled our command :(&amp;quot;);
&lt;/pre&gt; &lt;br /&gt; &lt;br /&gt;Now we'll have to add some handlers too. We'll use a SMS gateway here...&lt;br /&gt;&lt;pre&gt;
public class SmsManager
{
  SmsGateway _gw;
 
  public SmsManager(CommandDispatcher dispatcher, SmsGateway gw)
  {
    _gw = gw;
    dispatcher.Add(typeof(SendMessageCmd), OnSendSms);
  }
 
  private bool OnSendSms(object source, CommandEventArgs args)
  {
    SendMessageCmd cmd = (SendMessageCmd)args.Command;
    _gw.Send(cmd.From.MobileNumber, cmd.To.MobileNumber, cmd.body);
  }
}
&lt;/pre&gt; &lt;br /&gt; &lt;br /&gt;All this logic is on the server. But now we want to add messaging support to our GUI application too. The problem is that we do not want to handle the SendMessage command at client side, but in the server.&lt;br /&gt;This is just as easy, we'll just have to use the CommandChannel.&lt;br /&gt; &lt;br /&gt;Server side:&lt;br /&gt;&lt;pre&gt;
public static class Program
{
  static CommandServer _commandServer;
  [.. some code ..]
 
  private static void SetupCommandServer()
  {
      _commandServer = new CommandServer(_dispatcher);
      _commandServer.Start(IPAddress.Any, CommandChannel.DefaultPort);
  }
}
&lt;/pre&gt; &lt;br /&gt; &lt;br /&gt;And client side:&lt;br /&gt;&lt;pre&gt;
public static class Program
{
    static CommandChannel _commandChannel;
 
  [..... some code. ...]
 
  
        private static void SetupCommandChannel()
        {
            _commandChannel = new CommandChannel();
            _commandChannel.Open(new IPEndPoint(IPAddress.Loopback, CommandChannel.DefaultPort));
            _commandChannel.AutoReconnect = true;
            _dispatcher.Unhandled += OnUnhandledCommand;
        }
 
        private static bool OnUnhandledCommand(object source, CommandEventArgs args)
        {
            _commandChannel.SendAndReply(args.Command);
            return args.Command.IsHandled;
        }
}
&lt;/pre&gt; &lt;br /&gt; &lt;br /&gt;That's it. The client can now use all commands that you've defined. All commands that are not handled in the client are handled by the server. The command result is automatically transported to the client.&lt;br /&gt;
&lt;/div&gt;</description><author>jgauffin</author><pubDate>Mon, 25 Aug 2008 16:58:42 GMT</pubDate><guid isPermaLink="false">Updated Wiki: Commands 20080825045842P</guid></item></channel></rss>