OLD | NEW |
1 // Protocol Buffers - Google's data interchange format | 1 // Protocol Buffers - Google's data interchange format |
2 // Copyright 2008 Google Inc. All rights reserved. | 2 // Copyright 2008 Google Inc. All rights reserved. |
3 // https://developers.google.com/protocol-buffers/ | 3 // https://developers.google.com/protocol-buffers/ |
4 // | 4 // |
5 // Redistribution and use in source and binary forms, with or without | 5 // Redistribution and use in source and binary forms, with or without |
6 // modification, are permitted provided that the following conditions are | 6 // modification, are permitted provided that the following conditions are |
7 // met: | 7 // met: |
8 // | 8 // |
9 // * Redistributions of source code must retain the above copyright | 9 // * Redistributions of source code must retain the above copyright |
10 // notice, this list of conditions and the following disclaimer. | 10 // notice, this list of conditions and the following disclaimer. |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 "file_name", file_->name()); | 116 "file_name", file_->name()); |
117 | 117 |
118 if (!namespace_.empty()) { | 118 if (!namespace_.empty()) { |
119 printer->Print("namespace $namespace$ {\n", "namespace", namespace_); | 119 printer->Print("namespace $namespace$ {\n", "namespace", namespace_); |
120 printer->Indent(); | 120 printer->Indent(); |
121 printer->Print("\n"); | 121 printer->Print("\n"); |
122 } | 122 } |
123 | 123 |
124 printer->Print( | 124 printer->Print( |
125 "/// <summary>Holder for reflection information generated from $file_name$</
summary>\n" | 125 "/// <summary>Holder for reflection information generated from $file_name$</
summary>\n" |
| 126 "[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\n", |
| 127 "file_name", file_->name()); |
| 128 WriteGeneratedCodeAttributes(printer); |
| 129 printer->Print( |
126 "$access_level$ static partial class $reflection_class_name$ {\n" | 130 "$access_level$ static partial class $reflection_class_name$ {\n" |
127 "\n", | 131 "\n", |
128 "file_name", file_->name(), | |
129 "access_level", class_access_level(), | 132 "access_level", class_access_level(), |
130 "reflection_class_name", reflectionClassname_); | 133 "reflection_class_name", reflectionClassname_); |
131 printer->Indent(); | 134 printer->Indent(); |
132 } | 135 } |
133 | 136 |
134 void ReflectionClassGenerator::WriteDescriptor(io::Printer* printer) { | 137 void ReflectionClassGenerator::WriteDescriptor(io::Printer* printer) { |
135 printer->Print( | 138 printer->Print( |
136 "#region Descriptor\n" | 139 "#region Descriptor\n" |
137 "/// <summary>File descriptor for $file_name$</summary>\n" | 140 "/// <summary>File descriptor for $file_name$</summary>\n" |
138 "public static pbr::FileDescriptor Descriptor {\n" | 141 "public static pbr::FileDescriptor Descriptor {\n" |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
281 else { | 284 else { |
282 printer->Print("null"); | 285 printer->Print("null"); |
283 } | 286 } |
284 printer->Print(last ? ")" : "),\n"); | 287 printer->Print(last ? ")" : "),\n"); |
285 } | 288 } |
286 | 289 |
287 } // namespace csharp | 290 } // namespace csharp |
288 } // namespace compiler | 291 } // namespace compiler |
289 } // namespace protobuf | 292 } // namespace protobuf |
290 } // namespace google | 293 } // namespace google |
OLD | NEW |