Add Phoenix remote desktop, action connector, documentation engine, and gamification support. Refactor support-case processing and search/action UI, and update installer assets and dependencies.
42 lines
1.4 KiB
C#
42 lines
1.4 KiB
C#
using F4SD.DocuEngine.DocuEngineDataProvider;
|
|
using F4SD.DocuEngine.DocuEngineParser;
|
|
using F4SD.DocuEngine.DocuEngineParser.ContentBlock;
|
|
using F4SD.DocuEngine.DocuEngineParser.Exceptions;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Text;
|
|
|
|
namespace F4SD.DocuEngine
|
|
{
|
|
public class DocuEngine
|
|
{
|
|
public string DocuTemplate { get; private set; }
|
|
public IDocuEngineDataContainer Container { get; private set; }
|
|
private ParsingContext parsingContext;
|
|
|
|
public DocuEngine(string docuTemplate, IDocuEngineDataContainer container)
|
|
{
|
|
DocuTemplate = docuTemplate;
|
|
Container = container;
|
|
}
|
|
|
|
public string ParseTemplate()
|
|
{
|
|
var index = 0;
|
|
parsingContext = new ParsingContext();
|
|
ContentBlock contentBlock = new ContentBlock(DocuTemplate, Container);
|
|
try
|
|
{
|
|
parsingContext.Append(contentBlock.ParseContentBlock(ref index));
|
|
}
|
|
catch (DocuEngineParser.Exceptions.DocuEngineParserException parserException)
|
|
{
|
|
parsingContext.Append(parserException.CurrentText);
|
|
parsingContext.Append(parserException.PrintedErrorMessage);
|
|
return parsingContext.GetFinalText();
|
|
}
|
|
return parsingContext.GetFinalText();
|
|
}
|
|
}
|
|
}
|