public void Empty_when_all_components_healthy() { Container.Register(Component.For <A>(), Component.For <B>(), Component.For <C>()); var handlers = diagnostic.Inspect(); Assert.IsEmpty(handlers); }
public static IHandler[] GetPotentiallyMisconfigured(IWindsorContainer container) { IDiagnosticsHost host = (IDiagnosticsHost)container.Kernel.GetSubSystem(SubSystemConstants.DiagnosticsKey); IPotentiallyMisconfiguredComponentsDiagnostic diagnostics = host.GetDiagnostic <IPotentiallyMisconfiguredComponentsDiagnostic>(); return(diagnostics.Inspect()); }
public override IEnumerable <DebuggerViewItem> Attach() { var handlers = diagnostic.Inspect(); if (handlers.Length == 0) { return(Enumerable.Empty <DebuggerViewItem>()); } var items = Array.ConvertAll(handlers, DefaultComponentView); return(new[] { new DebuggerViewItem(name, "Count = " + items.Length, items) }); }
public override IEnumerable <DebuggerViewItem> Attach() { var handlers = diagnostic.Inspect(); if (handlers.Length == 0) { return(Enumerable.Empty <DebuggerViewItem>()); } Array.Sort(handlers, (f, s) => f.ComponentModel.Name.CompareTo(s.ComponentModel.Name)); var items = handlers.ConvertAll(DefaultComponentView); return(new[] { new DebuggerViewItem(name, "Count = " + items.Length, items) }); }