//todo: how about allowing min & max length to be differnt public FixedLengthField(int index, int length, FieldTruncate truncate = FieldTruncate.None, FieldPadding align = FieldPadding.Left) { _index = index; _length = length; _maximumLength = new MaximumLengthBehavior(length, truncate); _minimumLength = new MinimumLengthBehavior(length, align); }
// length public PositionedField(int position, int length, FieldTruncate truncate = FieldTruncate.None, FieldPadding align = FieldPadding.Left) { _position = position; _length = length; _maximumLength = new MaximumLengthBehavior(length, truncate); _minimumLength = new MinimumLengthBehavior(length, align); }
// max length public PositionedField(int position, int length, FieldTruncate truncate = FieldTruncate.None) { _position = position; _length = length; _maximumLength = new MaximumLengthBehavior(length, truncate); }