aboutsummaryrefslogtreecommitdiff
path: root/src/google/protobuf/compiler/csharp/csharp_message.cc
diff options
context:
space:
mode:
authorJon Skeet <jonskeet@google.com>2015-09-29 13:37:15 +0100
committerJon Skeet <jonskeet@google.com>2015-09-29 13:37:15 +0100
commit2212f56bcdfd5d830a18a3c4aaecb0a6ad564e54 (patch)
tree5b05d3a46db8d4ade5dfdd6b044b98e25f6262d7 /src/google/protobuf/compiler/csharp/csharp_message.cc
parent0e5686a70768a289782eb1e1aa86646e56897e4d (diff)
downloadprotobuf-2212f56bcdfd5d830a18a3c4aaecb0a6ad564e54.tar.gz
protobuf-2212f56bcdfd5d830a18a3c4aaecb0a6ad564e54.tar.bz2
protobuf-2212f56bcdfd5d830a18a3c4aaecb0a6ad564e54.zip
Added documentation to generated code.
There are now summaries for: - The Types nested class (which holds nested types) - The file descriptor class for each proto - The enum generated for each oneof (Also fixed two typos.) Generated code in next commit.
Diffstat (limited to 'src/google/protobuf/compiler/csharp/csharp_message.cc')
-rw-r--r--src/google/protobuf/compiler/csharp/csharp_message.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/google/protobuf/compiler/csharp/csharp_message.cc b/src/google/protobuf/compiler/csharp/csharp_message.cc
index a71a7909..a2c4fe57 100644
--- a/src/google/protobuf/compiler/csharp/csharp_message.cc
+++ b/src/google/protobuf/compiler/csharp/csharp_message.cc
@@ -169,6 +169,7 @@ void MessageGenerator::Generate(io::Printer* printer) {
printer->Print(
vars,
"private object $name$_;\n"
+ "/// <summary>Enum of possibly cases for the \"$original_name$\" oneof.</summary>\n"
"public enum $property_name$OneofCase {\n");
printer->Indent();
printer->Print("None = 0,\n");
@@ -202,7 +203,10 @@ void MessageGenerator::Generate(io::Printer* printer) {
printer->Print("#region Nested types\n"
"[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\n");
WriteGeneratedCodeAttributes(printer);
- printer->Print("public static partial class Types {\n");
+ printer->Print(
+ vars,
+ "/// <summary>Container for nested types declared in the $class_name$ message type.</summary>\n"
+ "public static partial class Types {\n");
printer->Indent();
for (int i = 0; i < descriptor_->enum_type_count(); i++) {
EnumGenerator enumGenerator(descriptor_->enum_type(i));