Stashbox by Peter Csajtai

<PackageReference Include="Stashbox" Version="5.8.1-preview-793" />

 InvalidRegistrationException

Represents an exception the container throws when it detects an invalid registration.
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 InvalidRegistrationException : Exception { public Type Type { get; } public InvalidRegistrationException(Type type, [System.Runtime.CompilerServices.Nullable(1)] string message, Exception innerException = null) : base("Invalid registration with type '" + type?.FullName + "'. Details: " + message, innerException) { Type = type; } [System.Runtime.CompilerServices.NullableContext(1)] protected InvalidRegistrationException(SerializationInfo info, StreamingContext context) : base(info, context) { } } }