forcewake / FlatFile

FlatFile is a library to work with flat files
MIT License
106 stars 39 forks source link

Null Field #72

Open OpenSpacesAndPlaces opened 6 years ago

OpenSpacesAndPlaces commented 6 years ago

\Implementation\FixedLengthLineBuilder.cs

protected override string TransformFieldValue(IFixedFieldSettingsContainer field, string lineValue)

This doesn't check for null fields and instead pads the field no matter what.

I ended up needing to add the following before the padding output to the above function:

        if (field.IsNullable && lineValue == field.NullValue)
                return lineValue;