Пример #1
0
 /// <summary>
 /// .ctor. Must be inherited.
 /// </summary>
 /// <param name="clone">The source <see cref="IFileField">field</see> to clone.</param>
 public FileFieldBase(IFileField clone)
 {
     Encoder       = clone.Encoder;
     Length        = clone.Length;
     Name          = clone.Name;
     Precision     = clone.Precision;
     StartPosition = clone.StartPosition;
     DataFormat    = clone.DataFormat;
     Type          = clone.Type;
     DataFormat    = clone.DataFormat;
     RightAlign    = clone.RightAlign;
     FillByte      = clone.FillByte;
     BoolAsString  = clone.BoolAsString;
 }
Пример #2
0
 /// <summary>
 /// .ctor. Create an instance of this object using the <see cref="IFileField">field</see> layout provided.
 /// </summary>
 /// <param name="field"></param>
 public SerializableField(IFileField field)
 {
     Name          = field.Name;
     Precision     = field.Precision;
     StartPosition = field.StartPosition;
     Length        = field.Length;
     BoolAsString  = field.BoolAsString;
     DataFormat    = field.DataFormat;
     RightAlign    = field.RightAlign;
     BoolAsString  = field.BoolAsString;
     FillByte      = field.FillByte;
     FillCharacter = field.FillCharacter;
     YearFirst     = field.YearFirst;
     Type          = field.Type.ToString();
 }
Пример #3
0
 /// <summary>
 /// .ctor. Must be inherited. User for <see cref="System.Boolean">boolean</see> types with a <see cref="System.String">string</see> output.
 /// </summary>
 /// <param name="encoder">The <see cref="IFileParserEncoder">IFileParserEncoder</see> instance to use for encoding.</param>
 /// <param name="name">The <see cref="System.String">name</see> of the field.</param>
 /// <param name="startPosition">The starting position of this field in the <see cref="IFileRecord">record</see> expressed as an
 /// <see cref="System.UInt32">unsigned integer</see>.</param>
 /// <param name="length">The field length expressed as an <see cref="System.UInt32">unsigned integer</see>.</param>
 /// <param name="showAs">
 /// Identifies how the <see cref="System.Boolean">boolean</see> value will be represented as a <see cref="System.String">string</see>.
 /// Length of 1 will only return the first <see cref="System.Char">character</see> of the expected <see cref="System.String">string</see>.
 /// </param>
 public FileField(IFileParserEncoder encoder, string name, uint startPosition, uint length, BooleanStringRepresentation showAs)
     : base(encoder, name, startPosition, length, showAs)
 {
 }
Пример #4
0
 /// <summary>
 /// .ctor. Must be inherited. User for <see cref="System.Boolean">boolean</see> types with a <see cref="System.String">string</see> output.
 /// </summary>
 /// <param name="encoder">The <see cref="IFileParserEncoder">IFileParserEncoder</see> instance to use for encoding.</param>
 /// <param name="name">The <see cref="System.String">name</see> of the field.</param>
 /// <param name="startPosition">The starting position of this field in the <see cref="IFileRecord">record</see> expressed as an
 /// <see cref="System.UInt32">unsigned integer</see>.</param>
 /// <param name="length">The field length expressed as an <see cref="System.UInt32">unsigned integer</see>.</param>
 /// <param name="showAs">
 /// Identifies how the <see cref="System.Boolean">boolean</see> value will be represented as a <see cref="System.String">string</see>.
 /// Length of 1 will only return the first <see cref="System.Char">character</see> of the expected <see cref="System.String">string</see>.
 /// </param>
 public FileFieldBase(IFileParserEncoder encoder, string name, uint startPosition, uint length, BooleanStringRepresentation showAs)
     : this(encoder, typeof(bool?), name, startPosition, length, FileFieldDataFormat.String)
 {
     BoolAsString = showAs;
 }