Analyzer Class

Simple Injector
Entry point for doing diagnostic analysis on Container instances.
Inheritance Hierarchy

SystemObject
  SimpleInjector.DiagnosticsAnalyzer

Namespace:  SimpleInjector.Diagnostics
Assembly:  SimpleInjector (in SimpleInjector.dll) Version: 5.3.0
Syntax

public static class Analyzer

The Analyzer type exposes the following members.

Methods

  NameDescription
Public methodStatic memberAnalyze
Analyzes the supplied container instance.
Top
Examples

The following example shows the usage of the Analyzer class:
C#
DiagnosticResult[] results = Analyzer.Analyze(container);

var typesWithAShortedLifetimeThanTheirDependencies =
    from result in results
    where result.DiagnosticType == DiagnosticType.LifestyleMismatch
    let mismatch = (LifestyleMismatchDiagnosticResult)result
    select mismatch.Relationship.ImplementationType;
See Also

Reference