diff options
author | Jon Skeet <jonskeet@google.com> | 2016-07-01 13:19:00 +0100 |
---|---|---|
committer | Jon Skeet <jonskeet@google.com> | 2016-07-04 08:22:18 +0100 |
commit | ada0a81a74afdc472f019ba142cfc101ca7b3543 (patch) | |
tree | edb8c4dc9c80e6c8966dd910531e4a5ee43a21f3 /src/google/protobuf/compiler/csharp/csharp_field_base.cc | |
parent | cae3b0cbb689d0ed1e5da73942a5a9705f3411b0 (diff) |
Move DebuggerNonUserCodeAttribute to function members
I think this has caught everything.
I've left a stub for attributes to be applied to the types themselves, but we don't currently need anything.
Follow-up commit will include the changes to generated code itself.
Fixes #1671.
Diffstat (limited to 'src/google/protobuf/compiler/csharp/csharp_field_base.cc')
-rw-r--r-- | src/google/protobuf/compiler/csharp/csharp_field_base.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/google/protobuf/compiler/csharp/csharp_field_base.cc b/src/google/protobuf/compiler/csharp/csharp_field_base.cc index e3c34040..e2011b76 100644 --- a/src/google/protobuf/compiler/csharp/csharp_field_base.cc +++ b/src/google/protobuf/compiler/csharp/csharp_field_base.cc @@ -124,12 +124,13 @@ void FieldGeneratorBase::GenerateCodecCode(io::Printer* printer) { void FieldGeneratorBase::AddDeprecatedFlag(io::Printer* printer) { if (descriptor_->options().deprecated()) { - printer->Print("[global::System.ObsoleteAttribute()]\n"); + printer->Print("[global::System.ObsoleteAttribute]\n"); } } void FieldGeneratorBase::AddPublicMemberAttributes(io::Printer* printer) { AddDeprecatedFlag(printer); + WriteGeneratedCodeAttributes(printer); } std::string FieldGeneratorBase::oneof_property_name() { |