feat(dal): В Work добавлена маска имени шаблонов, выполнена миграция БД.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
using PARR.Constants.Shortcode;
|
||||
using PARR.Constants.Shortcodes;
|
||||
using System.Text.Encodings.Web;
|
||||
using System.Text.Json;
|
||||
using System.Text.Unicode;
|
||||
@@ -43,12 +43,12 @@ namespace PARR.DAL.Extensions
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="sourceString">Исходная строка, включающая переменные части вида %ШАБЛОН%</param>
|
||||
/// <param name="shortcode">Код шаблона из PARR.Constants.Shortcode.Shortcodes</param>
|
||||
/// <param name="shortcode">Код шаблона из PARR.Constants.ShortcodeEnum.ShortcodeEnum</param>
|
||||
/// <param name="shortcodeValue">Итоговое строковое значение</param>
|
||||
/// <returns></returns>
|
||||
public static string ApplyShortcode(this string sourceString, Shortcodes shortcode, string shortcodeValue)
|
||||
public static string ApplyShortcode(this string sourceString, ShortcodeEnum shortcode, string shortcodeValue)
|
||||
{
|
||||
var shortcodeName = ShortcodeNames.GetShortcodeName(shortcode);
|
||||
var shortcodeName = Shortcodes.GetShortcodeName(shortcode);
|
||||
|
||||
return sourceString.Replace(shortcodeName, shortcodeValue);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user