THRIFT-4558 normalize name in C# constructor
Client: csharp
Patch: Pierre Mignolet <p.mignolet@evs.com>
This closes #1546
diff --git a/compiler/cpp/src/thrift/generate/t_csharp_generator.cc b/compiler/cpp/src/thrift/generate/t_csharp_generator.cc
index b108c45..cc2567b 100644
--- a/compiler/cpp/src/thrift/generate/t_csharp_generator.cc
+++ b/compiler/cpp/src/thrift/generate/t_csharp_generator.cc
@@ -843,7 +843,7 @@
} else {
out << ", ";
}
- out << type_name((*m_iter)->get_type()) << " " << (*m_iter)->get_name();
+ out << type_name((*m_iter)->get_type()) << " " << normalize_name((*m_iter)->get_name());
}
}
out << ") : this() {" << endl;
@@ -851,7 +851,7 @@
for (m_iter = members.begin(); m_iter != members.end(); ++m_iter) {
if (field_is_required((*m_iter))) {
- indent(out) << "this." << prop_name((*m_iter)) << " = " << (*m_iter)->get_name() << ";"
+ indent(out) << "this." << prop_name((*m_iter)) << " = " << normalize_name((*m_iter)->get_name()) << ";"
<< endl;
}
}