diff options
author | Jon Skeet <skeet@pobox.com> | 2015-08-05 07:09:17 +0100 |
---|---|---|
committer | Jon Skeet <skeet@pobox.com> | 2015-08-05 07:09:17 +0100 |
commit | d77d70d227b648ac8c36183ac9d85cf39f782978 (patch) | |
tree | 7763ffd6be6c84baa68431035b1e87fbc4c1d986 /csharp/src/Google.Protobuf/JsonFormatter.cs | |
parent | 95910f1c7dfa95b329c0b25a1b9beedbdc133800 (diff) | |
parent | 30e8157550e02625bb4a4fa93153442d6e454709 (diff) | |
download | protobuf-d77d70d227b648ac8c36183ac9d85cf39f782978.tar.gz protobuf-d77d70d227b648ac8c36183ac9d85cf39f782978.tar.bz2 protobuf-d77d70d227b648ac8c36183ac9d85cf39f782978.zip |
Merge pull request #691 from jskeet/xml-documentation
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 223aa027..7c4894be 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"); @@ -767,6 +776,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; |