thomasbruggink opened a new pull request #2364:
URL: https://github.com/apache/thrift/pull/2364


   Client netstd
   
   Prefix enums with the full namespace to allow default values in lists/sets 
to be set correctly.
   Generated code before:
   ```
   public RequestModel()    
   {      
     this._data_1 = new THashSet<global::Thriftxxxx.objs.FoobarEnum>();         
               
     this._data_1.Add(FoobarEnum.Val_1);
     this._data_1.Add(FoobarEnum.Val_2);
     this.__isset.data_1 = true;
     this._data_2 = new List<global::Thriftxxxx.objs.FoobarEnum>();
     this._data_2.Add(FoobarEnum.Val_1);
     this._data_2.Add(FoobarEnum.Val_2);
     this.__isset.data_2 = true;
     this._data_3 = global::Thriftxxxx.objs.FoobarEnum.Val_1; 
     this.__isset.data_3 = true;    
   }
   ```
   After:
   ```
   public RequestModel()
   {
     this._data_1 = new THashSet<global::Thrift5382.objs.FoobarEnum>();
     this._data_1.Add(global::Thrift5382.objs.FoobarEnum.Val_1);
     this._data_1.Add(global::Thrift5382.objs.FoobarEnum.Val_2);
     this.__isset.data_1 = true;
     this._data_2 = new List<global::Thrift5382.objs.FoobarEnum>();
     this._data_2.Add(global::Thrift5382.objs.FoobarEnum.Val_1);
     this._data_2.Add(global::Thrift5382.objs.FoobarEnum.Val_2);
     this.__isset.data_2 = true;
     this._data_3 = global::Thrift5382.objs.FoobarEnum.Val_1;
     this.__isset.data_3 = true;
   }
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to