Beispiel #1
0
        public Template(Process process, TflTemplate element, Contents contents)
        {
            Parameters  = new Parameters.Parameters(new DefaultFactory(process.Logger));
            Cache       = element.Cache;
            Enabled     = element.Enabled;
            Engine      = element.Engine;
            Name        = element.Name;
            ContentType = element.ContentType.Equals("raw") ? Encoding.Raw : Encoding.Html;
            Contents    = contents;

            _process = process;

            _renderedTemplateFile          = GetFileName(RENDERED_TEMPLATE_CACHE_FOLDER);
            _renderedTemplateContentExists = TryRead(_renderedTemplateFile, out _renderedTemplateContent);

            _templateFile          = GetFileName(TEMPLATE_CACHE_FOLDER);
            _templateContentExists = TryRead(_templateFile, out _templateContent);
        }
 public TemplateBuilder(ProcessBuilder processBuilder, TflTemplate template) {
     _processBuilder = processBuilder;
     _template = template;
 }
 public TemplateBuilder Template(string name) {
     var template = new TflTemplate().WithDefaults();
     template.Name = name;
     _process.Templates.Add(template);
     return new TemplateBuilder(this, template);
 }
Beispiel #4
0
 public TemplateBuilder(ProcessBuilder processBuilder, TflTemplate template)
 {
     _processBuilder = processBuilder;
     _template       = template;
 }