示例#1
0
 /// <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>();
 }
示例#2
0
 private bool findPreviouslyBuiltFrame()
 {
     foreach (TemplateFrame htf in TemplateFrames.List)
     {
         if (htf.FilePath == this.FilePath)
         {
             this.Frame = htf;
             return(true);
         }
     }
     return(false);
 }