Esempio n. 1
0
 public virtual void Write( StringTemplate code, string fileName )
 {
     Stopwatch watch = Stopwatch.StartNew();
     TextWriter w = tool.GetOutputFile( grammar, fileName );
     // Write the output to a StringWriter
     IStringTemplateWriter wr = templates.GetStringTemplateWriter( w );
     wr.SetLineWidth( lineWidth );
     code.Write( wr );
     w.Close();
     TimeSpan duration = watch.Elapsed;
     //[email protected]("render time for "+fileName+": "+(int)(stop-start)+"ms");
 }