public static void ProcessSavedXMLExportFormats(XMLExportFormats xefs, XmlWriter xmlw) { xmlw.WriteStartElement("XmlExportFormats"); xmlw.WriteAttributeString("Count", xefs.Count.ToStringSafe()); xmlw.WriteAttributeString("DefaultExportSelection", xefs.DefaultExportSelection.ToStringSafe()); foreach (XMLExportFormat xef in xefs) { ProcessSavedXMLExportFormat(xef, xmlw); } xmlw.WriteEndElement(); }
public static void ProcessSavedXMLExportFormats(XMLExportFormats xefs, Utf8JsonWriter jsonw) { jsonw.WritePropertyName("XmlExportFormats"); jsonw.WriteStartObject(); jsonw.WriteString("Count", xefs.Count.ToStringSafe()); jsonw.WriteString("DefaultExportSelection", xefs.DefaultExportSelection.ToStringSafe()); jsonw.WritePropertyName("Items"); jsonw.WriteStartArray(); foreach (XMLExportFormat xef in xefs) { ProcessSavedXMLExportFormat(xef, jsonw); } jsonw.WriteEndArray(); jsonw.WriteEndObject(); }