/// <summary> /// Passing debug = true in ensures template modifications are noticed. /// </summary> /// <param name="filePath"></param> /// <param name="debug"></param> public Template(string filePath, bool debug) { this.FilePath = filePath; if (this.Frame == null && this.findPreviouslyBuiltFrame() == false) { Frame = new TemplateFrame(filePath, debug); } Variables = new Dictionary <string, TemplateValue>(); }
private bool findPreviouslyBuiltFrame() { foreach (TemplateFrame htf in TemplateFrames.List) { if (htf.FilePath == this.FilePath) { this.Frame = htf; return(true); } } return(false); }