From 97ffad806fffc646edc95eba3306f03e14de6ee7 Mon Sep 17 00:00:00 2001 From: boukeversteegh Date: Sat, 23 Jul 2022 21:55:21 +0200 Subject: [PATCH] Formatting --- csharp/src/Google.Protobuf/JsonFormatter.cs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/csharp/src/Google.Protobuf/JsonFormatter.cs b/csharp/src/Google.Protobuf/JsonFormatter.cs index 5f7ef94297fb..4482c8790be1 100644 --- a/csharp/src/Google.Protobuf/JsonFormatter.cs +++ b/csharp/src/Google.Protobuf/JsonFormatter.cs @@ -178,7 +178,7 @@ public string Format(IMessage message, int indentationLevel) public void Format(IMessage message, TextWriter writer) => Format(message, writer, indentationLevel: 0); /// - /// Forms the specified message as JSON. When is not null, start indenting at the specified . + /// Formats the specified message as JSON. When is not null, start indenting at the specified . /// /// The message to format. /// The TextWriter to write the formatted message to. @@ -278,7 +278,8 @@ private bool WriteMessageFields(TextWriter writer, IMessage message, bool assume private void MaybeWriteValueSeparator(TextWriter writer, bool first) { - if (first) { + if (first) + { return; } @@ -971,7 +972,11 @@ private Settings(bool formatDefaultValues, /// Creates a new object with the specified indentation and the current settings. /// /// The string to output for each level of indentation (nesting). The default is two spaces per level. Use null to disable indentation entirely. - /// A non-null value for will insert additional line-breaks to the JSON output. Each line will contain either a single value, or braces. The default line-break is determined by , which is "\n" on Unix platforms, and "\r\n" on Windows. If seems to produce empty lines, you need to pass a that uses a "\n" newline. See . + /// A non-null value for will insert additional line-breaks to the JSON output. + /// Each line will contain either a single value, or braces. The default line-break is determined by , + /// which is "\n" on Unix platforms, and "\r\n" on Windows. If seems to produce empty lines, + /// you need to pass a that uses a "\n" newline. See . + /// public Settings WithIndentation(string indentation = " ") => new Settings(FormatDefaultValues, TypeRegistry, FormatEnumsAsIntegers, PreserveProtoFieldNames, indentation); }