OmarElabd / ObjectExporter

Object Exporter lets you export out an object while debugging in Visual Studio, the object can be serialized in either C#, JSON or XML.
GNU General Public License v3.0
264 stars 82 forks source link

Public fields are not being exported, even when I uncheck the option in the UI. #63

Open fpintos opened 7 years ago

OmarElabd commented 7 years ago

The option in the UI was for private fields not public fields. Could you give an example of the object you are attempting to export and what the object exporter output was?

fpintos commented 7 years ago

Hi, thanks for looking at this.

One simple example I have is a data type that is generated by wsdl, like this:

    public partial class WorkTimeSlot {
        public int StartTimeInMinutes;
        public int EndTimeInMinutes;
    }

The output goes like this (with namespaces removed and the expression simplified):

var timeSlots = new WorkTimeSlot
{
};

In other types, public fields that are arrays do seem to be picked up.