Esempio n. 1
0
 private string ParseBody(string body)
 {
     return(_replaceRegex.Replace(body, match => {
         var sinkName = match.Groups[1].Value;
         return _sinkService.SerializeSink(sinkName);
     }));
 }
Esempio n. 2
0
        public override void Process(TagHelperContext context, TagHelperOutput output)
        {
            var sinkName = RequestedEntryModel.DEFAULT_SINK_NAME;

            if (context.AllAttributes.TryGetAttribute("name", out var name))
            {
                sinkName = name.Value.ToString();
            }

            var finalOutput = "";

            if (_settings.RewriteOutput)
            {
                finalOutput = $@"<sink name=""{sinkName}"" temp />";
            }
            else
            {
                finalOutput = _sinkService.SerializeSink(sinkName);
            }

            output.TagName = null;
            output.PostElement.AppendHtml(finalOutput);
        }