diff options
author | Jon Skeet <jonskeet@google.com> | 2015-08-04 15:58:39 +0100 |
---|---|---|
committer | Jon Skeet <jonskeet@google.com> | 2015-08-04 15:58:39 +0100 |
commit | 811fc89f0eb036d95653f5fed4b0ffea292ce791 (patch) | |
tree | e1e724bda1b599c036f7326974829d1bf79a6951 /csharp/src/Google.Protobuf/JsonFormatter.cs | |
parent | dc80689af3951d078cb556588eece89dd6860c91 (diff) | |
download | protobuf-811fc89f0eb036d95653f5fed4b0ffea292ce791.tar.gz protobuf-811fc89f0eb036d95653f5fed4b0ffea292ce791.tar.bz2 protobuf-811fc89f0eb036d95653f5fed4b0ffea292ce791.zip |
Document everything, and turn on errors if we fail to document anything in the future.
Diffstat (limited to 'csharp/src/Google.Protobuf/JsonFormatter.cs')
-rw-r--r-- | csharp/src/Google.Protobuf/JsonFormatter.cs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/csharp/src/Google.Protobuf/JsonFormatter.cs b/csharp/src/Google.Protobuf/JsonFormatter.cs index 999e106c..edc47186 100644 --- a/csharp/src/Google.Protobuf/JsonFormatter.cs +++ b/csharp/src/Google.Protobuf/JsonFormatter.cs @@ -114,11 +114,20 @@ namespace Google.Protobuf private readonly Settings settings; + /// <summary> + /// Creates a new formatted with the given settings. + /// </summary> + /// <param name="settings">The settings.</param> public JsonFormatter(Settings settings) { this.settings = settings; } + /// <summary> + /// Formats the specified message as JSON. + /// </summary> + /// <param name="message">The message to format.</param> + /// <returns>The formatted message.</returns> public string Format(IMessage message) { Preconditions.CheckNotNull(message, "message"); @@ -768,6 +777,10 @@ namespace Google.Protobuf /// </summary> public bool FormatDefaultValues { get { return formatDefaultValues; } } + /// <summary> + /// Creates a new <see cref="Settings"/> object with the specified formatting of default values. + /// </summary> + /// <param name="formatDefaultValues"><c>true</c> if default values (0, empty strings etc) should be formatted; <c>false</c> otherwise.</param> public Settings(bool formatDefaultValues) { this.formatDefaultValues = formatDefaultValues; |