LinqToExcel icon indicating copy to clipboard operation
LinqToExcel copied to clipboard

Fixed case where UnmappedCells is null

Open bogdanbujdea opened this issue 4 years ago • 0 comments

There are two changes in this PR:

  1. If the class implements IContainsUnmappedCells, then initialize the collection UnmappedCells, so the user has to only implement the interface. Otherwise, the user would have to create a constructor and initialize the dictionary in there, which you realize you have to do only if you pull the source code and debug through it.
  2. Allow a setter on the UnmappedCells dictionary for situations where you would want to serialize the object but without the UnmappedCells. In this case, you can set UnmappedCells to null, and tell the serializer to ignore null values. If you think this is not such a common scenario, I can remove this change.

bogdanbujdea avatar Oct 01 '20 13:10 bogdanbujdea