ConstructorNotFoundException
using System;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Runtime.Serialization;
namespace Stashbox.Exceptions
{
[Serializable]
[System.Runtime.CompilerServices.NullableContext(1)]
[System.Runtime.CompilerServices.Nullable(0)]
public class ConstructorNotFoundException : Exception
{
public ConstructorNotFoundException(Type type, Type[] argumentTypes, [System.Runtime.CompilerServices.Nullable(2)] Exception innerException = null)
: base("Constructor not found for '" + type.FullName + "' with the given argument types: " + (from t in argumentTypes
select t.FullName).Aggregate((string t1, string t2) => t1 + ", " + t2) + ".", innerException)
{
}
public ConstructorNotFoundException(Type type, [System.Runtime.CompilerServices.Nullable(2)] Exception innerException = null)
: base("Constructor not found for '" + type.FullName + "' with no arguments.", innerException)
{
}
public ConstructorNotFoundException(Type type, Type argument, [System.Runtime.CompilerServices.Nullable(2)] Exception innerException = null)
: base("Constructor not found for '" + type.FullName + "' with the argument type: " + argument.FullName + ".", innerException)
{
}
protected ConstructorNotFoundException(SerializationInfo info, StreamingContext context)
: base(info, context)
{
}
}
}