diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/google/protobuf/compiler/csharp/csharp_helpers.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/google/protobuf/compiler/csharp/csharp_helpers.cc b/src/google/protobuf/compiler/csharp/csharp_helpers.cc index ac258f04..55ce3285 100644 --- a/src/google/protobuf/compiler/csharp/csharp_helpers.cc +++ b/src/google/protobuf/compiler/csharp/csharp_helpers.cc @@ -253,7 +253,9 @@ std::string GetFieldConstantName(const FieldDescriptor* field) { } std::string GetPropertyName(const FieldDescriptor* descriptor) { - // TODO: fix this. + if (descriptor->options().has_csharp_property_name()) { + return descriptor->options().csharp_property_name(); + } std::string property_name = UnderscoresToPascalCase(GetFieldName(descriptor)); if (property_name == descriptor->containing_type()->name()) { property_name += "_"; |