using System;
namespace Swan.DependencyInjection {
///
/// Generic Constraint Registration Exception.
///
///
public class DependencyContainerRegistrationException : Exception {
private const String ConvertErrorText = "Cannot convert current registration of {0} to {1}";
private const String RegisterErrorText = "Cannot register type {0} - abstract classes or interfaces are not valid implementation types for {1}.";
///
/// Initializes a new instance of the class.
///
/// The type.
/// The method.
/// if set to true [is type factory].
public DependencyContainerRegistrationException(Type type, String method, Boolean isTypeFactory = false) : base(isTypeFactory ? String.Format(RegisterErrorText, type.FullName, method) : String.Format(ConvertErrorText, type.FullName, method)) {
}
}
}