public AbstractGenerator() { engine = new NVelocityTemplateEngine(); engine.AddResourceAssembly(System.Reflection.Assembly.GetExecutingAssembly().FullName); engine.BeginInit(); engine.EndInit(); }
private static void InitializeTemplateEngine() { if (templateEngine == null) { NVelocityTemplateEngine nvelTemplateEng = new NVelocityTemplateEngine(); #if USE_LOCAL_TEMPLATES nvelTemplateEng.TemplateDir = @"E:\dev\castle\trunk\MonoRail\Castle.MonoRail.ActiveRecordSupport.Scaffold\Templates\"; nvelTemplateEng.BeginInit(); nvelTemplateEng.EndInit(); #else nvelTemplateEng.AddResourceAssembly("Castle.MonoRail.ActiveRecordSupport"); nvelTemplateEng.BeginInit(); nvelTemplateEng.EndInit(); #endif templateEngine = nvelTemplateEng; } }