50 lines
2.3 KiB
C#
50 lines
2.3 KiB
C#
using System.Collections.Generic;
|
||
|
||
// ReSharper disable MemberCanBePrivate.Global
|
||
|
||
namespace NodePipeline.Constants.Exceptions;
|
||
|
||
public static class PipelineRegistry
|
||
{
|
||
public static readonly Dictionary<string, string> MessagesEn = new()
|
||
{
|
||
{ Construction.PipelineNotFoundException, "Pipeline [{0}] is not registered." },
|
||
{ Registration.CycleFoundException, "Pipeline [{0}] has cycle." },
|
||
{ Registration.DuplicateNodeIdsException, "Duplicate node ids found in pipeline [{0}]:\r\n{1}." },
|
||
{ Registration.NullPipelineIdException, "Pipeline id must be non-empty." },
|
||
{ Registration.PipelineAlreadyRegistered, "Pipeline with id [{0}] has already registered." }
|
||
};
|
||
|
||
public static readonly Dictionary<string, string> MessagesRu = new()
|
||
{
|
||
{ Construction.PipelineNotFoundException, "Пайплайн [{0}] не зарегистрирован." },
|
||
{ Registration.CycleFoundException, "Обнаружен цикл в пайплайне [{0}]." },
|
||
{
|
||
Registration.DuplicateNodeIdsException,
|
||
"В пайплайне [{0}] обнаружены дубликаты идентификаторов нод:\r\n{1}."
|
||
},
|
||
{ Registration.NullPipelineIdException, "Идентификатор пайплайна не может быть пустым." },
|
||
{ Registration.PipelineAlreadyRegistered, "Пайплайн с идентификатором [{0}] уже зарегистрирован." }
|
||
};
|
||
|
||
public static class Construction
|
||
{
|
||
public const string PipelineNotFoundException =
|
||
"NodePipeline.Constants.Exceptions.Construction." + nameof(PipelineNotFoundException);
|
||
}
|
||
|
||
public static class Registration
|
||
{
|
||
public const string CycleFoundException =
|
||
"NodePipeline.Constants.Exceptions.Registration." + nameof(CycleFoundException);
|
||
|
||
public const string DuplicateNodeIdsException =
|
||
"NodePipeline.Constants.Exceptions.Registration." + nameof(DuplicateNodeIdsException);
|
||
|
||
public const string NullPipelineIdException =
|
||
"NodePipeline.Constants.Exceptions.Registration." + nameof(NullPipelineIdException);
|
||
|
||
public const string PipelineAlreadyRegistered =
|
||
"NodePipeline.Constants.Exceptions.Registration." + nameof(PipelineAlreadyRegistered);
|
||
}
|
||
} |