private void WriteLegend(ClassDiagramLegend legend) { if (legend != null) { _buffer.AppendLine("legend {0}".FormatWith(legend.Position)); _buffer.AppendLine(" {0}".FormatWith(legend.Text)); _buffer.AppendLine("endlegend"); } }