/// <inheritdoc/> public string ToDelimitedString() { CultureInfo culture = CultureInfo.CurrentCulture; return(string.Format( culture, StringHelper.StringFormatSequence(0, 18, Configuration.FieldSeparator), Id, BatchFieldSeparator, BatchEncodingCharacters, BatchSendingApplication?.ToDelimitedString(), BatchSendingFacility?.ToDelimitedString(), BatchReceivingApplication?.ToDelimitedString(), BatchReceivingFacility?.ToDelimitedString(), BatchCreationDateTime.HasValue ? BatchCreationDateTime.Value.ToString(Consts.DateTimeFormatPrecisionSecond, culture) : null, BatchSecurity, BatchNameIdType, BatchComment, BatchControlId, ReferenceBatchControlId, BatchSendingNetworkAddress?.ToDelimitedString(), BatchReceivingNetworkAddress?.ToDelimitedString(), SecurityClassificationTag?.ToDelimitedString(), SecurityHandlingInstructions != null ? string.Join(Configuration.FieldRepeatSeparator, SecurityHandlingInstructions.Select(x => x.ToDelimitedString())) : null, SpecialAccessRestrictionInstructions != null ? string.Join(Configuration.FieldRepeatSeparator, SpecialAccessRestrictionInstructions) : null ).TrimEnd(Configuration.FieldSeparator.ToCharArray())); }
/// <inheritdoc/> public string ToDelimitedString() { CultureInfo culture = CultureInfo.CurrentCulture; return(string.Format( culture, StringHelper.StringFormatSequence(0, 15, Configuration.FieldSeparator), Id, BatchFieldSeparator, BatchEncodingCharacters, BatchSendingApplication?.ToDelimitedString(), BatchSendingFacility?.ToDelimitedString(), BatchReceivingApplication?.ToDelimitedString(), BatchReceivingFacility?.ToDelimitedString(), BatchCreationDateTime.HasValue ? BatchCreationDateTime.Value.ToString(Consts.DateTimeFormatPrecisionSecond, culture) : null, BatchSecurity, BatchNameIdType, BatchComment, BatchControlId, ReferenceBatchControlId, BatchSendingNetworkAddress?.ToDelimitedString(), BatchReceivingNetworkAddress?.ToDelimitedString() ).TrimEnd(Configuration.FieldSeparator.ToCharArray())); }