You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Carl Yeksigian (JIRA)" <ji...@apache.org> on 2012/12/16 18:44:13 UTC
[jira] [Created] (THRIFT-1793) C#: Use static read instead of
instance read
Carl Yeksigian created THRIFT-1793:
--------------------------------------
Summary: C#: Use static read instead of instance read
Key: THRIFT-1793
URL: https://issues.apache.org/jira/browse/THRIFT-1793
Project: Thrift
Issue Type: Improvement
Components: C# - Compiler
Affects Versions: 0.9
Reporter: Carl Yeksigian
Assignee: Carl Yeksigian
Fix For: 1.0
It would be better to have a static Read(TProtocol iprot) which returns the type rather than a non-static Read that needs a type.
I noticed this while working on THRIFT-1783, as well as THRIFT-1786.
For THRIFT-1783, a static Read would allow for the non parameter constructor to be private, while the other Reads that need the struct would still work.
For THRIFT-1786, you can't initialize the abstract type, and you don't know what the type is until after the field identifier is read.
A few ways to do this (the way that I have implemented already is the first):
- Remove Read() from TBase, and make all users use the static implementations
- Add a new TBase (TWriteBase) which only has the write as part of the interface, then add a command line option to create the new way of creating these static Read objects
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira