using System;
using System.Runtime.Serialization;
namespace Masuit.Tools.Mapping.Exceptions
{
///
/// 映射已存在时的异常
///
[Serializable]
public class MapperExistException : MapperExceptionBase
{
///
/// 构造函数
///
/// 源类型
/// 目标类型
public MapperExistException(Type source, Type dest) : base(ValideParameter($"对于源“{source.FullName}”的类型和目标类型“{dest.FullName}”的映射关系已经存在", source != null, dest != null))
{
}
///
/// 构造函数
///
public MapperExistException()
{
}
///
/// 构造函数
///
/// 异常信息
public MapperExistException(string exceptionMessage) : base(exceptionMessage)
{
}
///
/// 构造函数
///
/// 序列化信息
/// 上下文
protected MapperExistException(SerializationInfo serializer, StreamingContext context) : base(serializer, context)
{
}
///
/// 构造函数
///
/// 异常信息
/// 内部异常
public MapperExistException(string exceptionMessage, Exception innerException) : base(exceptionMessage, innerException)
{
}
}
}