thrift-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gregory_l...@selinc.com
Subject Re: AW: Camel Casing in C#
Date Tue, 30 Dec 2014 14:55:38 GMT
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 <jensgeyer@hotmail.com>
To:     "user@thrift.apache.org" <user@thrift.apache.org>
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: gregory_lusk@selinc.com
Gesendet: 30.12.2014 00:52
An: user@thrift.apache.org
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







Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message