Commit 16a3e2b9 authored by Jan Tattermusch's avatar Jan Tattermusch

enable overriding of property name using csharp_property_name

parent 44664bb7
......@@ -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 += "_";
......
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