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

generate DeepCopy methods

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 0.14.0
    • netstd - Compiler
    • None
    • Patch Available

    Description

      Frequently one runs into a need to create deep copies from Thrift data objects. Since the framework does not really offer support for such a function, it seems helpful to have the Thrift Comnpiler generate the code necessary to support this.

      Remarks:

      • Microsoft explicitly discourages developeres to use ICloneable for this as there is no reliable definition whether ICloneable creates shallow or deep copies, so we don't use it either.
      • Although there is no officially set standard, most common naming convention seems to be DeepCopy() for such a method, so we follow that model but leave room for future changes (i.e. different naming)

       

      Attachments

        Issue Links

          Activity

            People

              jensg Jens Geyer
              jensg Jens Geyer
              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