/// <summary> /// Abstract constructor, which all derived classes should call. /// Sets the system source from the configuration file, the /// CreatedDate to today and the Formatter to a new instance of /// a DefaultFormatter. /// </summary> /// <param name="fileSource">A 3 letter code for the feeder source assigned by 1B1S Income section.</param> /// <param name="fileID">ID of the Ibis file.</param> /// <exception cref="ArgumentOutOfRangeException">Thrown if the fileID exceeds 99999.</exception> public IbisFile(string fileSource, ulong fileID) { if (fileSource == null || fileSource.Length != 3) { throw new ArgumentException("The file source must be exactly 3 characters."); } if (fileID > 99999) { throw new ArgumentOutOfRangeException("The file ID must be between 0 and 99999."); } FileSource = fileSource; FileID = fileID; RegionIdentifier = Region.NationalScheme; CreatedDate = DateTime.UtcNow.Date; Formatter = new DefaultFormatter(); }
/// <summary> /// Abstract constructor, which all derived classes should call. /// Sets the system source from the configuration file, the /// CreatedDate to today and the Formatter to a new instance of /// a DefaultFormatter. /// </summary> /// <param name="fileSource">A 3 letter code for the feeder source assigned by 1B1S Income section.</param> /// <param name="fileID">ID of the Ibis file.</param> /// <exception cref="ArgumentOutOfRangeException">Thrown if the fileID exceeds 99999.</exception> public IbisFile(string fileSource, ulong fileID) { if (fileSource == null || fileSource.Length != 3) { throw new ArgumentException("The file source must be exactly 3 characters."); } if (fileID > 99999) { throw new ArgumentOutOfRangeException("The file ID must be between 0 and 99999."); } FileSource = fileSource; FileID = fileID; RegionIdentifier = Region.NationalScheme; CreatedDate = DateTime.UtcNow.Date; Formatter = new DefaultFormatter(); }