<PackageReference Include="Castle.Windsor" Version="5.1.0-beta001" />

LateBoundDecommissionConcerns

Lifetime concern that works for components that don't have their actual type determined upfront
using Castle.Core; using System; namespace Castle.MicroKernel.LifecycleConcerns { [Serializable] public class LateBoundDecommissionConcerns : LateBoundConcerns<IDecommissionConcern>, IDecommissionConcern { public override void Apply(ComponentModel model, object component) { GetComponentConcerns(component.GetType()).ForEach(delegate(IDecommissionConcern c) { c.Apply(model, component); }); } } }