diff options
Diffstat (limited to 'src')
5 files changed, 2 insertions, 13 deletions
diff --git a/src/google/protobuf/compiler/csharp/csharp_enum.cc b/src/google/protobuf/compiler/csharp/csharp_enum.cc index ba61c4c7..64381d0f 100644 --- a/src/google/protobuf/compiler/csharp/csharp_enum.cc +++ b/src/google/protobuf/compiler/csharp/csharp_enum.cc @@ -60,7 +60,6 @@ EnumGenerator::~EnumGenerator() { void EnumGenerator::Generate(io::Printer* printer) { WriteEnumDocComment(printer, descriptor_); - WriteGeneratedTypeAttributes(printer); printer->Print("$access_level$ enum $name$ {\n", "access_level", class_access_level(), "name", descriptor_->name()); diff --git a/src/google/protobuf/compiler/csharp/csharp_message.cc b/src/google/protobuf/compiler/csharp/csharp_message.cc index 4c3ec6bd..ed744854 100644 --- a/src/google/protobuf/compiler/csharp/csharp_message.cc +++ b/src/google/protobuf/compiler/csharp/csharp_message.cc @@ -104,7 +104,6 @@ void MessageGenerator::Generate(io::Printer* printer) { vars["access_level"] = class_access_level(); WriteMessageDocComment(printer, descriptor_); - WriteGeneratedTypeAttributes(printer); printer->Print( vars, "$access_level$ sealed partial class $class_name$ : pb::IMessage<$class_name$> {\n"); diff --git a/src/google/protobuf/compiler/csharp/csharp_reflection_class.cc b/src/google/protobuf/compiler/csharp/csharp_reflection_class.cc index df7ea11b..bac9aef7 100644 --- a/src/google/protobuf/compiler/csharp/csharp_reflection_class.cc +++ b/src/google/protobuf/compiler/csharp/csharp_reflection_class.cc @@ -122,12 +122,10 @@ void ReflectionClassGenerator::WriteIntroduction(io::Printer* printer) { } printer->Print( - "/// <summary>Holder for reflection information generated from $file_name$</summary>\n", - "file_name", file_->name()); - WriteGeneratedTypeAttributes(printer); - printer->Print( + "/// <summary>Holder for reflection information generated from $file_name$</summary>\n" "$access_level$ static partial class $reflection_class_name$ {\n" "\n", + "file_name", file_->name(), "access_level", class_access_level(), "reflection_class_name", reflectionClassname_); printer->Indent(); diff --git a/src/google/protobuf/compiler/csharp/csharp_source_generator_base.cc b/src/google/protobuf/compiler/csharp/csharp_source_generator_base.cc index d8ef2d2e..1fda7ddf 100644 --- a/src/google/protobuf/compiler/csharp/csharp_source_generator_base.cc +++ b/src/google/protobuf/compiler/csharp/csharp_source_generator_base.cc @@ -59,10 +59,6 @@ void SourceGeneratorBase::WriteGeneratedCodeAttributes(io::Printer* printer) { printer->Print("[global::System.Diagnostics.DebuggerNonUserCodeAttribute]\n"); } -void SourceGeneratorBase::WriteGeneratedTypeAttributes(io::Printer* printer) { - // This hook can be used to reintroduce generated code attributes in the future. -} - std::string SourceGeneratorBase::class_access_level() { return (IsDescriptorProto(descriptor_) || this->options()->internal_access) ? "internal" : "public"; } diff --git a/src/google/protobuf/compiler/csharp/csharp_source_generator_base.h b/src/google/protobuf/compiler/csharp/csharp_source_generator_base.h index 9cfe5c69..c741080e 100644 --- a/src/google/protobuf/compiler/csharp/csharp_source_generator_base.h +++ b/src/google/protobuf/compiler/csharp/csharp_source_generator_base.h @@ -53,9 +53,6 @@ class SourceGeneratorBase { // Write any attributes used to decorate generated function members (methods and properties). // Should not be used to decorate types. void WriteGeneratedCodeAttributes(io::Printer* printer); - // Write any attributes used to decorate generated types. - // Should not be used to decorate function members. - void WriteGeneratedTypeAttributes(io::Printer* printer); private: const FileDescriptor* descriptor_; |