Getting closer… Castle Windsor 3 RC 1

Few weeks later than orig­i­nally expected but here it is – Cas­tle Wind­sor 3.0 (along with its facil­i­ties and Castle.Core) achieved release can­di­date status.

There is one major new fea­ture in this release: reg­is­tra­tion API gained abil­ity to spec­ify prop­er­ties to ignore/require. There are some sce­nar­ios where that’s use­ful, for exam­ple where inte­grat­ing with some 3rd party frame­work that forces you to inherit from a base class which exposes its depen­den­cies as prop­er­ties. Cre­at­ing pass-through con­struc­tors for each inher­ited class can be mun­dane. In those cases you can sim­ply mark those base class prop­er­ties as required, in which case Wind­sor will not allow them to be resolved unless all base prop­erty depen­den­cies are sat­is­fied. Prop­er­ty­Fil­ter enum sup­ports sev­eral other most com­mon sce­nar­ios, and for advanced cases there’s an over­load that gives you more control.

Container.Register(
    Classes.FromThisAssembly()
        .BasedOn<ICommon>()
        .Configure(c => c.Properties(PropertyFilter.RequireBase)));

To address per­for­mance hit at startup Wind­sor no longer enables per­for­mance coun­ters 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 pack­ages. Please, if pos­si­ble, take the time to upgrade to this ver­sion 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 pub­lished in two weeks.

The bina­ries are avail­able on Nuget right now, and soon on our web­site.