LateBoundDecommissionConcerns
public class LateBoundDecommissionConcerns : LateBoundConcerns<IDecommissionConcern>, IDecommissionConcern
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);
});
}
}
}