public static string Serialize(Wxr site, XmlWriterSettings settings) { if (site == null) { throw new ArgumentNullException(nameof(site)); } if (settings == null) { throw new ArgumentNullException(nameof(settings)); } var output = new StringBuilder(); using (var writer = XmlWriter.Create(output, settings)) { _serializer.Serialize(writer, site, _xmlNamespaces); } return(output.ToString()); }
public static string Serialize(Wxr site) => Serialize(site, new XmlWriterSettings { Indent = true, Encoding = Encoding.UTF8 });