Files
Check/MagicCarpetProject/MagicCarpetContracts/Exceptions/ElementExistsException.cs
2025-04-26 11:22:30 +04:00

18 lines
587 B
C#

using MagicCarpetContracts.Resources;
using Microsoft.Extensions.Localization;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace MagicCarpetContracts.Exceptions;
internal class ElementExistsException(string paramName, string paramValue, IStringLocalizer<Messages> localizer) :
Exception(string.Format(localizer["ElementExistsExceptionMessage"], paramValue, paramName))
{
public string ParamName { get; private set; } = paramName;
public string ParamValue { get; private set; } = paramValue;
}