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

PotentiallyMisconfiguredComponentsDiagnostic

using Castle.Core.Internal; using Castle.MicroKernel; namespace Castle.Windsor.Diagnostics { public class PotentiallyMisconfiguredComponentsDiagnostic : IPotentiallyMisconfiguredComponentsDiagnostic, IDiagnostic<IHandler[]> { private readonly IKernel kernel; public PotentiallyMisconfiguredComponentsDiagnostic(IKernel kernel) { this.kernel = kernel; } public IHandler[] Inspect() { return kernel.GetAssignableHandlers(typeof(object)).FindAll(IsWaitingForDependencies); } private bool IsWaitingForDependencies(IHandler handler) { return handler.CurrentState == HandlerState.WaitingDependency; } } }