Пример #1
0
        public void VisitSegment(ISegment segment)
        {
            if (ShouldSkip(segment)) { return; }

            VisitChildren(segment);

            ProcessTags();

            // Merge all adjacent IText
            ITextMerger merger = new ITextMerger();
            merger.VisitSegment(segment);
            merger.Merge();
        }
        public void VisitSegment(ISegment segment)
        {
            VisitChildren(segment);

            ProcessPlaceholderTags();

            ProcessTagPairs();

            // Merge all adjacent IText
            ITextMerger merger = new ITextMerger();

            merger.VisitSegment(segment);
            merger.Merge();
        }
        /// <summary>
        /// Processes the template.
        /// </summary>
        /// <param name="templateName">Name of the template.</param>
        /// <param name="mergers">The mergers.</param>
        /// <returns></returns>
        public string ProcessTemplate(string templateName, Dictionary <string, string> mergers)
        {
            string text = GetTemplate(templateName);

            return(_textMerger.Merge(text, mergers));
        }