Import from internal git
This commit is contained in:
19
Core/Templates/MustacheTemplateFactory.cs
Normal file
19
Core/Templates/MustacheTemplateFactory.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
using Core.Helpers;
|
||||
|
||||
namespace Core.Templates;
|
||||
|
||||
public class MustacheTemplateFactory : ITemplateFactory
|
||||
{
|
||||
public MustacheTemplateFactory()
|
||||
{
|
||||
}
|
||||
|
||||
public ITemplate GetTemplate(string templatePath, IDictionary<string, object> data)
|
||||
{
|
||||
var text = PathHelper.TextFrom(templatePath);
|
||||
var template = new MustacheTemplate(text);
|
||||
template.AddProperties(data);
|
||||
|
||||
return template;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user