Commit e9a7fc83 authored by Jon Skeet's avatar Jon Skeet

Remove WriteGeneratedTypeAttributes which is a no-op

This does not affect the generated code.
If we decide we want to apply attributes to generated types, we should start by
just reverting this change.
parent c5348453
......@@ -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());
......
......@@ -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");
......
......@@ -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();
......
......@@ -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";
}
......
......@@ -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_;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment