filter out SegmentTerminator and ElementSeparator instead of throw exception

Aug 20, 2014 at 6:55 PM

In DetachedSegments.cs, the SetElement(string) method throws an exception if the input string contains either of the two edi delimiters. Is there a way to just filter out the delimiter characters from the value before they are set in the element instead of throwing an error? Obviously I could run every value through a filter before I set properties on the x12 model classes, but that would be hundreds of updates to my code, and very repetitive. I could also modify the DetachedSegment class to do this, but I'd prefer not to modify the library so I can maintain an upgrade path.

Has anyone found a way to do this through other means?

Aug 22, 2014 at 3:26 PM
FYI - we ended up forking our own version of the library and adding the functionality we needed. I've submitted a patch to this project with the new functionality in case you would like to include it. It's patch id 16720.