private void ProcessRecord(IBedRecord record, TemplateEnviroment env, int index) { if (index > 0 && m_separ != null) { m_separ.Run(env); } m_engine.Globals["_row_"] = record; for (int fi = 0; fi < record.FieldCount; fi++) { m_engine.Globals["_" + record.GetName(fi).ToLower() + "_"] = record.GetValue(fi).SafeToString(); } m_body.Run(env); }
internal override void Run(TemplateEnviroment env) { bool was = false; foreach (object obj in (System.Collections.IEnumerable)m_container()) { if (was && m_separ != null) { m_separ.Run(env); } m_engine.DefaultModule.Globals[m_varname] = obj; m_body.Run(env); was = true; } }