public override string ToString() { var result = new StringWriter(); WriteTo(new TextSessionWriter(result)); return result.ToString(); }