Example #1
0
        /// <inheritdoc/>
        public string ToDelimitedString()
        {
            CultureInfo culture = CultureInfo.CurrentCulture;

            return(string.Format(
                       culture,
                       StringHelper.StringFormatSequence(0, 11, Configuration.FieldSeparator),
                       Id,
                       SetIdAis.HasValue ? SetIdAis.Value.ToString(culture) : null,
                       SegmentActionCode,
                       UniversalServiceIdentifier?.ToDelimitedString(),
                       StartDateTime.HasValue ? StartDateTime.Value.ToString(Consts.DateTimeFormatPrecisionSecond, culture) : null,
                       StartDateTimeOffset.HasValue ? StartDateTimeOffset.Value.ToString(Consts.NumericFormat, culture) : null,
                       StartDateTimeOffsetUnits?.ToDelimitedString(),
                       Duration.HasValue ? Duration.Value.ToString(Consts.NumericFormat, culture) : null,
                       DurationUnits?.ToDelimitedString(),
                       AllowSubstitutionCode,
                       FillerStatusCode?.ToDelimitedString()
                       ).TrimEnd(Configuration.FieldSeparator.ToCharArray()));
        }
Example #2
0
        /// <inheritdoc/>
        public string ToDelimitedString()
        {
            CultureInfo culture = CultureInfo.CurrentCulture;

            return(string.Format(
                       culture,
                       StringHelper.StringFormatSequence(0, 13, Configuration.FieldSeparator),
                       Id,
                       SetIdAil.HasValue ? SetIdAil.Value.ToString(culture) : null,
                       SegmentActionCode,
                       LocationResourceId != null ? string.Join(Configuration.FieldRepeatSeparator, LocationResourceId.Select(x => x.ToDelimitedString())) : null,
                       LocationTypeAil?.ToDelimitedString(),
                       LocationGroup?.ToDelimitedString(),
                       StartDateTime.HasValue ? StartDateTime.Value.ToString(Consts.DateTimeFormatPrecisionSecond, culture) : null,
                       StartDateTimeOffset.HasValue ? StartDateTimeOffset.Value.ToString(Consts.NumericFormat, culture) : null,
                       StartDateTimeOffsetUnits?.ToDelimitedString(),
                       Duration.HasValue ? Duration.Value.ToString(Consts.NumericFormat, culture) : null,
                       DurationUnits?.ToDelimitedString(),
                       AllowSubstitutionCode?.ToDelimitedString(),
                       FillerStatusCode?.ToDelimitedString()
                       ).TrimEnd(Configuration.FieldSeparator.ToCharArray()));
        }