paulyoder/LinqToExcel — pull request #13 by justinsaraceno (2013-01-02 21:09:33+00:00)
Title: Changed StrictMapping to Enum

Updated the **StrictMapping** property from a Boolean to a nullable Enum to allow the consumer finer-grained control of mapping enforcement. This grew out from a need to enforce that a class had mappings for all properties, but to also disregard any other Excel worksheet columns. The StrictMapping Enum values have been defined as:

* 'WorksheetStrict' in order to enforce all worksheet columns are mapped to a class property.
* 'ClassStrict' to enforce all class properties are mapped to a to a worksheet column.
* 'Both' to enforce all worksheet columns map to a class property and vice versa. (this behaves exactly like the previous StrictMapping = true option)

The implied default StrictMapping value is 'None' which behaves as if the previous StrictMapping Boolean property was set to false or not set at all. Since this property is nullable, this will be a transparent change for consumers that didn't previously set the StrictMapping property.

Positive and negative unit tests were added to cover all four Enum values, plus additional tests covering the value not being set. The Readme.markdown was also updated to reflect the enhanced options for the StrictMapping property.