Skip to content
Merged
Prev Previous commit
Next Next commit
Update src/libraries/System.Private.Xml/src/System/Xml/Serialization/…
…XmlSerializer.cs

Co-authored-by: Stephen Toub <[email protected]>
  • Loading branch information
StephenMolloy and stephentoub authored Jul 11, 2021
commit 2f43131799aab4cf820bab352bb33d643a4de69b
Original file line number Diff line number Diff line change
Expand Up @@ -330,9 +330,6 @@ public void Serialize(Stream stream, object? o)
[RequiresUnreferencedCode(TrimSerializationWarning)]
public void Serialize(Stream stream, object? o, XmlSerializerNamespaces? namespaces)
{
//XmlTextWriter xmlWriter = new XmlTextWriter(stream, null);
//xmlWriter.Formatting = Formatting.Indented;
//xmlWriter.Indentation = 2;
XmlWriter xmlWriter = XmlWriter.Create(stream, new XmlWriterSettings() { CheckCharacters = true, IndentChars = " ", Indent = true });
Serialize(xmlWriter, o, namespaces);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same for this, skip setting values to the defaults.

}
Expand Down