//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);
 }
Beispiel #2
0
 // 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);
 }
        public MaximumLengthBehavior(int maxLength, FieldTruncate truncate = FieldTruncate.None)
        {
            // todo: maxlength must be greater than 0

            _maxLength = maxLength;
            _truncate  = truncate;
        }
        //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);
        }
        public MaximumLengthBehavior(int maxLength, FieldTruncate truncate = FieldTruncate.None)
        {
            // todo: maxlength must be greater than 0

            _maxLength = maxLength;
            _truncate = truncate;
        }
Beispiel #6
0
 // 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);
 }
Beispiel #7
0
 // max length
 public PositionedField(int position, int length, FieldTruncate truncate = FieldTruncate.None)
 {
     _position = position;
     _length = length;
     _maximumLength = new MaximumLengthBehavior(length, truncate);
 }
Beispiel #8
0
 // max length
 public PositionedField(int position, int length, FieldTruncate truncate = FieldTruncate.None)
 {
     _position      = position;
     _length        = length;
     _maximumLength = new MaximumLengthBehavior(length, truncate);
 }