public static IHandler[] GetPotentiallyMisconfigured(IWindsorContainer container) { IDiagnosticsHost host = (IDiagnosticsHost)container.Kernel.GetSubSystem(SubSystemConstants.DiagnosticsKey); IPotentiallyMisconfiguredComponentsDiagnostic diagnostics = host.GetDiagnostic <IPotentiallyMisconfiguredComponentsDiagnostic>(); return(diagnostics.Inspect()); }
public override void Init(IKernel kernel, IDiagnosticsHost diagnosticsHost) { var process = Process.GetCurrentProcess(); var name = string.Format("Instance {0} | process {1} (id:{2})", Interlocked.Increment(ref instanceId), process.ProcessName, process.Id); diagnostic = new TrackedComponentsDiagnostic(perfMetricsFactory.CreateInstancesTrackedByReleasePolicyCounter(name)); diagnosticsHost.AddDiagnostic<ITrackedComponentsDiagnostic>(diagnostic); }
private static void CheckForPotentiallyMisconfiguredComponents(IDiagnosticsHost host) { var diagnostics = host.GetDiagnostic <IPotentiallyMisconfiguredComponentsDiagnostic>(); var handlers = diagnostics.Inspect(); if (!handlers.Any()) { return; } var message = new StringBuilder(); var inspector = new DependencyInspector(message); foreach (var handler in handlers) { ((IExposeDependencyInfo)handler).ObtainDependencyDetails(inspector); } throw new MisconfiguredComponentException(message.ToString()); }
private static void CheckForMisconfiguredLifetimesForComponents(IDiagnosticsHost host) { var diagnostics = host.GetDiagnostic <IPotentialLifestyleMismatchesDiagnostic>(); var handlers = diagnostics.Inspect(); if (!handlers.Any()) { return; } var messages = handlers.ConvertAll(GetMismatchMessage); if (messages.Length == 0) { return; } var message = string.Join(Environment.NewLine, messages); throw new MisconfiguredComponentException(message); }
public abstract void Init(IKernel kernel, IDiagnosticsHost diagnosticsHost);
public override void Init(IKernel kernel, IDiagnosticsHost diagnosticsHost) { this.kernel = kernel; }
public override void Init(IKernel kernel, IDiagnosticsHost diagnosticsHost) { diagnostic = new TrackedComponentsDiagnostic(); diagnosticsHost.AddDiagnostic<ITrackedComponentsDiagnostic>(diagnostic); }
public override void Init(IKernel kernel, IDiagnosticsHost diagnosticsHost) { diagnostic = new TrackedComponentsDiagnostic(perfMetricsFactory.CreateInstancesTrackedByReleasePolicyCounter(name)); diagnosticsHost.AddDiagnostic <ITrackedComponentsDiagnostic>(diagnostic); }
public override void Init(IKernel kernel, IDiagnosticsHost diagnosticsHost) { diagnostic = new TrackedComponentsDiagnostic(); diagnosticsHost.AddDiagnostic <ITrackedComponentsDiagnostic>(diagnostic); }
public override void Init(IKernel kernel, IDiagnosticsHost diagnosticsHost) { diagnostic = new AllComponentsDiagnostic(kernel); diagnosticsHost.AddDiagnostic(diagnostic); }
public override void Init(IKernel kernel, IDiagnosticsHost diagnosticsHost) { diagnostic = new PotentialLifestyleMismatchesDiagnostic(kernel); diagnosticsHost.AddDiagnostic(diagnostic); }
public override void Init(IKernel kernel, IDiagnosticsHost diagnosticsHost) { diagnostic = new UsingContainerAsServiceLocatorDiagnostic(kernel); diagnosticsHost.AddDiagnostic(diagnostic); }
public override void Init(IKernel kernel, IDiagnosticsHost diagnosticsHost) { diagnostic = new PotentiallyMisconfiguredComponentsDiagnostic(kernel); diagnosticsHost.AddDiagnostic(diagnostic); }
public override void Init(IKernel kernel, IDiagnosticsHost diagnosticsHost) { diagnostic = new DuplicatedDependenciesDiagnostic(kernel); diagnosticsHost.AddDiagnostic<IDuplicatedDependenciesDiagnostic>(diagnostic); }
public override void Init(IKernel kernel, IDiagnosticsHost diagnosticsHost) { diagnostic = new DuplicatedDependenciesDiagnostic(kernel); diagnosticsHost.AddDiagnostic <IDuplicatedDependenciesDiagnostic>(diagnostic); }
public override void Init(IKernel kernel, IDiagnosticsHost diagnosticsHost) { diagnostic = new AllServicesDiagnostic(kernel); diagnosticsHost.AddDiagnostic(diagnostic); }
public override void Init(IKernel kernel, IDiagnosticsHost diagnosticsHost) { diagnostic = new TrackedComponentsDiagnostic(perfMetricsFactory.CreateInstancesTrackedByReleasePolicyCounter(name)); diagnosticsHost.AddDiagnostic<ITrackedComponentsDiagnostic>(diagnostic); }