Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-4684

Missing namespace and un-used private fields in WCF fault classes when enable WCF in C# code generation

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: 0.11.0
    • Fix Version/s: 0.13.0
    • Component/s: C# - Compiler
    • Labels:

      Description

      When WCF is enabled in C# code generation, a commented line is generated:

      //using System.ServiceModel;

      However, attributes like OperationContract still need this.

      Also when generating fields in fault classes, we should follow the same behavior in normal struct, otherwise we could generate unused private fields, when auto properties are also generated.

      Here is a draft fix for the potential bug: https://github.com/zsy056/thrift/commit/d00049d94887fb1bfda1efea5a3efe94ccbad472

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jking3 James E. King III
                Reporter:
                zsy056 Shaoyu Zhang
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m