Few weeks later than originally expected but here it is – Castle Windsor 3.0 (along with its facilities and Castle.Core) achieved release candidate status.
There is one major new feature in this release: registration API gained ability to specify properties to ignore/require. There are some scenarios where that’s useful, for example where integrating with some 3rd party framework that forces you to inherit from a base class which exposes its dependencies as properties. Creating pass-through constructors for each inherited class can be mundane. In those cases you can simply mark those base class properties as required, in which case Windsor will not allow them to be resolved unless all base property dependencies are satisfied. PropertyFilter enum supports several other most common scenarios, and for advanced cases there’s an overload that gives you more control.
Container.Register( Classes.FromThisAssembly() .BasedOn<ICommon>() .Configure(c => c.Properties(PropertyFilter.RequireBase)));
To address performance hit at startup Windsor no longer enables performance counters by default. Now, you have to do it explicitly:
var container = new WindsorContainer(); var diagnostic = LifecycledComponentsReleasePolicy.GetTrackedComponentsDiagnostic(container.Kernel); var counter = LifecycledComponentsReleasePolicy.GetTrackedComponentsPerformanceCounter(new PerformanceMetricsFactory()); container.Kernel.ReleasePolicy = new LifecycledComponentsReleasePolicy(diagnostic, counter);
Full changelog is included in the packages. Please, if possible, take the time to upgrade to this version and if you find any issues report them so that the final release is rock solid. If no major issues are found, the final release will be published in two weeks.
The binaries are available on Nuget right now, and soon on our website.