private static void Custom(string path, TemplateSet template) { var context = template.context; foreach(var func in template.functions.FindAll(f => f.delegater != null)) { context = context.Replace(func.key, func.delegater(Functions, path)); } using(var writer = new StreamWriter(path, false, Encoding)) { writer.Write(context); } }
public void UpdateValues(TemplateSet origin) { this.validity = origin.validity; this.extension = origin.extension; this.context = origin.context; this.label = origin.label; this.ignores = new List<string>(origin.ignores); this.considers = new List<string>(origin.considers); this.functions = new List<ExecutorFunctionSet>(origin.functions); this.functions.ForEach(func => func.CheckMethod()); }
public TemplateSet(TemplateSet origin) { this.UpdateValues(origin); }