using System;
using System.Collections.Generic;
namespace Timeline.Services
{
    /// 
    /// Thrown when an entity is already exists.
    /// 
    /// 
    /// For example, want to create a timeline but a timeline with the same name already exists.
    /// 
    [Serializable]
    public class EntityAlreadyExistException : EntityException
    {
        public EntityAlreadyExistException() : base() { }
        public EntityAlreadyExistException(string? message) : base(message) { }
        public EntityAlreadyExistException(string? message, Exception? inner) : base(message, inner) { }
        public EntityAlreadyExistException(EntityType entityType, IDictionary constraints, string? message = null, Exception? inner = null)
            : base(entityType, constraints, message ?? Resource.ExceptionEntityNotExist, inner)
        {
        }
        protected EntityAlreadyExistException(
          System.Runtime.Serialization.SerializationInfo info,
          System.Runtime.Serialization.StreamingContext context) : base(info, context) { }
    }
}