public static void Write(this IScriptOutput scriptOutput, string text) { if (text == null) { throw new ArgumentNullException(nameof(text)); } scriptOutput.Write(text, 0, text.Length); }
public static void Write(this IScriptOutput scriptOutput, ScriptStringSlice text) { if (text.FullText == null) { throw new ArgumentNullException(nameof(text)); } if (text.Length == 0) { return; } scriptOutput.Write(text.FullText, text.Index, text.Length); }
protected override bool Loop(TemplateContext context, int index, int localIndex, bool isLast) { IScriptOutput output = context.Output; int columnIndex = localIndex % _columnsCount; context.SetValue(ScriptVariable.TableRowCol, columnIndex + 1); if (columnIndex == 0 && localIndex > 0) { output.Write("</tr>").WriteLine(); output.Write("<tr class=\"row").Write((localIndex / _columnsCount) + 1).Write("\">"); } output.Write("<td class=\"col").Write(columnIndex + 1).Write("\">"); bool result = base.Loop(context, index, localIndex, isLast); output.Write("</td>"); return(result); }
public TemplateRewriterContext Write(string text) { _previousHasSpace = text.Length > 0 && char.IsWhiteSpace(text[text.Length - 1]); _output.Write(text); return(this); }
public ScriptPrinter Write(string text) { _previousHasSpace = text.Length > 0 && char.IsWhiteSpace(text[text.Length - 1]); _output.Write(text); return(this); }