Archive for 'Castle' Category
Castle windsor converter for Regex
4 June 2008In previous post I explained how to build a Converter for castle, to make possibile specify regular expression in configuration file. The example is simplicistic, let’s see how to extend to create a better converter for Regular Expression.
The main problem is that RegularExpression is not only defined by the pattern but also by regular expression [...]
Castle Windsor "No converter registered to handle the type"
4 June 2008If you have an object that has a property of some type that is not known by windsor (as example Regex), if you try to configure it with xml the error “No converter registered to handle the type” will occurs. This happens because the container read configuration as string, and then it has to convert [...]
Again on castle windsor and default component
27 May 2008In the last post I gave a solution to make possible to specify the default component in a dependency resolution with castle windsor. That solution is good for automatic dependency resolution, with respect to the previous post if you have a IPageDownloader that has a property of type ICache, if you do not set that [...]
Castle Windsor and default component
27 May 2008Castle windsor is a really good library of IoC, but has some issues that sometimes can lead to obscure configuration. One of the most important is the concept of a “default component” suppose I create an ICache interface and I want some objects to be “cache-enabled”. My approach is usually that of a NullObject pattern, [...]
Again and again on Castle and lifecycle.
13 March 2008You can find at this subversion repository ( http://nablasoft.googlecode.com/svn/trunk/Castle/TestIOC ) a simple project that contains a custom lifecycle that bound the lifecycle of objects to a context. This lifecycle was created to address the problem of disposing inner object, you can find the deails here. This new version support both singleton and transient objects, this [...]
>