It's a bit of a problem. One of our use cases is that we have an existing service contract with one of our embedded firmware products that is written in C. We'd like to use the Thrift IDL to specify the structures and services themselves. The data types in the firmware use lower case, underscored field names, so when we generate the C# classes, there is inherent incompatibility between the firmware and software.
Admittedly, this is an abbreviation of the purpose of Thrift in that we are not using RPC to transfer values, and we're exchanging more complex types rather than simple native types. But the issue with casing uncovers a related question: how do we customize the generated code to meet our corporate standards. Is hacking the Thrift generator source code the only way? Maybe some sort of simple class template file could do the trick. My thought was to start with command line switches for the generator, like the ones that are used when generating Java source. Thanks, Greg From: Jens Geyer <[email protected]> To: "[email protected]" <[email protected]> Date: 12/30/2014 03:35 AM Subject: AW: Camel Casing in C# Hi Gregor, no, unfortunately not. All available switches are listed on the thrift --help screen. Is that a problem with your use case? Have fun, JensG ________________________________ Von: [email protected] Gesendet: 30.12.2014 00:52 An: [email protected] Betreff: Camel Casing in C# Can anyone tell me if it is possible to turn on and off camel casing on property names when generating C#? Basically, if I have a field called "general" in my .thrift file, I want a property called, "general" in my C# file. Instead, I get a property called "General". Thanks, Greg Lusk
