THRIFT-204. csharp: C# Partial Classes
authorBryan Duxbury <bryanduxbury@apache.org>
Thu, 2 Jul 2009 20:15:05 +0000 (20:15 +0000)
committerBryan Duxbury <bryanduxbury@apache.org>
Thu, 2 Jul 2009 20:15:05 +0000 (20:15 +0000)
C# structs are now generated as partial classes so they can be extended without wrapping.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@790730 13f79535-47bb-0310-9956-ffa450edef68

compiler/cpp/src/generate/t_csharp_generator.cc

index 5a910ea..96c0f6e 100644 (file)
@@ -410,7 +410,7 @@ void t_csharp_generator::generate_csharp_struct_definition(ofstream &out, t_stru
   indent(out) << "[Serializable]" << endl;
   bool is_final = (tstruct->annotations_.find("final") != tstruct->annotations_.end());
  
-  indent(out) << "public " << (is_final ? "sealed " : "") << "class " << tstruct->get_name() << " : ";
+  indent(out) << "public " << (is_final ? "sealed " : "") << "partial class " << tstruct->get_name() << " : ";
 
   if (is_exception) {
     out << "Exception, ";