@@ -695,7 +695,7 @@ void t_csharp_generator::generate_csharp_struct_definition(ofstream& out,
695
695
<< endl; // do not make exception classes directly WCF serializable, we provide a
696
696
// separate "fault" for that
697
697
}
698
- bool is_final = ( tstruct->annotations_ . find (" final" ) != tstruct-> annotations_ . end () );
698
+ bool is_final = tstruct->has_legacy_annotation (" final" );
699
699
700
700
indent (out) << " public " << (is_final ? " sealed " : " " ) << " partial class "
701
701
<< normalize_name (tstruct->get_name ()) << " : " ;
@@ -881,7 +881,7 @@ void t_csharp_generator::generate_csharp_wcffault(ofstream& out, t_struct* tstru
881
881
indent (out) << " [Serializable]" << endl;
882
882
indent (out) << " #endif" << endl;
883
883
indent (out) << " [DataContract]" << endl;
884
- bool is_final = ( tstruct->annotations_ . find (" final" ) != tstruct-> annotations_ . end () );
884
+ bool is_final = tstruct->has_legacy_annotation (" final" );
885
885
886
886
indent (out) << " public " << (is_final ? " sealed " : " " ) << " partial class " << tstruct->get_name ()
887
887
<< " Fault" << endl;
@@ -2512,11 +2512,11 @@ void t_csharp_generator::prepare_member_name_mapping(void* scope,
2512
2512
// current C# generator policy:
2513
2513
// - prop names are always rendered with an Uppercase first letter
2514
2514
// - struct names are used as given
2515
-
2516
-
2515
+
2516
+
2517
2517
// prevent name conflicts with struct (CS0542 error)
2518
2518
used_member_names.insert (structname);
2519
-
2519
+
2520
2520
// prevent name conflicts with known methods (THRIFT-2942)
2521
2521
used_member_names.insert (" Read" );
2522
2522
used_member_names.insert (" Write" );
0 commit comments