public void Write(XmlWriter writer, Stack stack) { if (!stack.Visible) { return; } writer.WriteStartElement("g"); var elementWriter = new ElementWriter { GenerationOptions = GenerationOptions }; var groupWriter = new GroupWriter { GenerationOptions = GenerationOptions }; elementWriter.WriteAttributes(writer, stack); groupWriter.WriteAttributes(writer, stack); WriteAttributes(writer, stack); elementWriter.WriteSubElements(writer, stack); groupWriter.WriteSubElements(writer, stack); WriteSubElements(writer, stack); writer.WriteEndElement(); }
private void WriteGroups(XmlWriter writer, Layer layer) { var groupWriter = new GroupWriter { GenerationOptions = GenerationOptions }; foreach (var group in layer.Groups) { groupWriter.Write(writer, group); } }