public override void WriteComment(string comment) { currentSpan = null; var span = EnsureSpan(); span.Style = "cmt"; span.Text.Append(comment); currentSpan = null; }
public override void WriteHyperlink(string text, object href) { currentSpan = null; var span = EnsureSpan(); span.Style = "link"; span.Text.Append(text); span.Tag = href; currentSpan = null; }
private FixedTextSpan EnsureSpan() { if (currentLine == null) { currentLine = new List <TextSpan>(); this.textLines.Add(currentLine); } if (currentSpan == null) { currentSpan = new FixedTextSpan(); this.currentLine.Add(currentSpan); } return(currentSpan); }
public override void WriteKeyword(string keyword) { currentSpan = null; var span = EnsureSpan(); span.Style = "kw"; span.Text.Append(keyword); currentSpan = null; }
public override void Terminate() { currentSpan = null; currentLine = null; }
private FixedTextSpan EnsureSpan() { if (currentLine == null) { currentLine = new List<TextSpan>(); this.textLines.Add(currentLine); } if (currentSpan == null) { currentSpan = new FixedTextSpan(); this.currentLine.Add(currentSpan); } return currentSpan; }
public override void WriteLine(string format, params object[] arguments) { EnsureSpan().Text.AppendFormat(format, arguments); currentSpan = null; currentLine = null; }
public override void WriteLine(string s) { EnsureSpan().Text.Append(s); currentSpan = null; currentLine = null; }
public override void WriteLine() { currentSpan = null; currentLine = null; }
public override void WriteType(string typeName, DataType dt) { currentSpan = null; var span = EnsureSpan(); span.Style = "type"; span.Text.Append(typeName); span.Tag = dt; currentSpan = null; }