Логика создания шаблонов
This commit is contained in:
21
PARR.BLL/Helpers/TemplateHelpers.cs
Normal file
21
PARR.BLL/Helpers/TemplateHelpers.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
namespace PARR.BLL.Helpers
|
||||
{
|
||||
public static class TemplateHelpers
|
||||
{
|
||||
/// <summary>
|
||||
/// Генерация имени шаблона
|
||||
/// </summary>
|
||||
/// <param name="prefix"></param>
|
||||
/// <param name="ek"></param>
|
||||
/// <param name="work"></param>
|
||||
/// <returns></returns>
|
||||
public static string GenerateTemplateName(string prefix, string ek, string work)
|
||||
{
|
||||
if (string.IsNullOrEmpty(prefix))
|
||||
prefix = "ПАРР-PREFIX";
|
||||
|
||||
var splitter = "__";
|
||||
return prefix + splitter + ek + splitter + work.Replace(" ", "-").ToUpper();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user