public override void BeforeTableExecute(FormatterTable.FormatterTableHelper helper) { var i = 0; //https://stackoverflow.com/questions/2245442/c-sharp-split-a-string-by-another-string FormatString = FormatString .Split(new string[] { VariableString }, StringSplitOptions.None) .Aggregate((x, y) => string.Format("{0}{{{1}}}{2}", x, i++, y)) //because string.format escape word is {{ }} .Replace("\\{", "{{").Replace("\\}", "}}"); //TODO don't copy Children.ForEach(x => x.BeforeTableExecute(helper)); }
public override void AfterTableExecute(FormatterTable.FormatterTableHelper helper) { //TODO don't copy Children.ForEach(x => x.AfterTableExecute(helper)); }
public override string FormatField(FormatterTable.FormatterTableHelper helper) { var formatArgs = Children.Select(x => helper.FormatField(x)).ToArray(); return(string.Format(FormatString, formatArgs)); }
public override void BeforeFieldExecute(FormatterTable.FormatterTableHelper helper) { //TODO don't copy Children.ForEach(x => x.BeforeFieldExecute(helper)); }