Released Catel 3.8.0

Today we released Catel 3.8.0. This post describes the most important changes. For a detailed list, see the full release notes.

To get the latest bits of Catel, please update via NuGet or get the setup package at GitHub.

IoC components improvements

Several improvements were made to the IoC components in Catel. The IoC components are ServiceLocator, TypeFactory and DependencyResolver.

The first feature is that Catel now allows registration and resolving of generic types. This means that one can now register an open generic type like IDictionary<,> and resolve it as IDictionary<string, int>

The second change is that Catel internally uses the IDependencyResolver instead of ServiceLocator to resolve types from the container. The major advantage is that the IoC components can be easily replaced by any external component, as long as it implements the right interfaces and is registered in the IoCConfiguration class.

Last but not least the TypeFactory also got a few improvements. It now correctly picks normal constructors before using constructors that take base classes such as object or dynamic. The team also added the InjectionConstructor attribute which can be used to explicitly specify which constructor should be used to constructor a type using dependency injection. The team also added the support for property dependency injection so users can decorate properties with the Inject attribute.

Logging improvements

The logging on Catel got a few improvements as well. It is now possible to instantiate dynamic log listeners from the configuration. Below is an example how the listeners can be customized:

  <sectionGroup name="catel">
    <section name="logging" type="Catel.Logging.LoggingConfigurationSection, Catel.Core" />

      <listener type="Catel.Logging.FileLogListener" FilePath="CatelLogging.txt" IgnoreCatelLogging="true" IsDebugEnabled="false" IsInfoEnabled="true" IsWarningEnabled="true" IsErrorEnabled="true"/>

The team also added global properties to the LogManager to be able to enable / disable log levels on all registered listeners at once.

Performance improvements

As we try to do with every release, some improvements were made on performance.

The most important one is the improved ModelEqualityComparer for which new properties are introduced. The properties are CompareProperties, CompareValues and CompareCollections which are now defaulting to false. This means that it will now provide much better performance out of the box and follows the Microsoft standard (reference comparison only). It can be customized to check the properties to reproduce the previous behavior.

We also improved the instantiation of all classes deriving from ModelBase with approximately 25 %, which should be very noticeable when creating a lot of models at startup of an application.

Platform support updates

As we informed earlier, there are several platform support changes in this version of Catel:

  • Added support for Windows 8.1
  • Removed support for Silverlight 4
  • Removed support for Windows Phone 7.x