Stashbox by Peter Csajtai

<PackageReference Include="Stashbox" Version="5.16.0" />

 CircularDependencyException

Represents the exception the container throws when a circular dependency is found.
using System; using System.Runtime.CompilerServices; using System.Runtime.Serialization; namespace Stashbox.Exceptions { [Serializable] [System.Runtime.CompilerServices.NullableContext(2)] [System.Runtime.CompilerServices.Nullable(0)] public class CircularDependencyException : Exception { public Type Type { get; } public CircularDependencyException(Type type, Exception innerException = null) : base("Circular dependency detected during the resolution of '" + type?.FullName + "'.", innerException) { Type = type; } [System.Runtime.CompilerServices.NullableContext(1)] protected CircularDependencyException(SerializationInfo info, StreamingContext context) : base(info, context) { } } }