Exemple #1
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()));
        }
Exemple #2
0
        /// <inheritdoc/>
        public string ToDelimitedString()
        {
            CultureInfo culture = CultureInfo.CurrentCulture;

            return(string.Format(
                       culture,
                       StringHelper.StringFormatSequence(0, 13, 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?.ToDelimitedString(),
                       FillerStatusCode?.ToDelimitedString(),
                       PlacerSupplementalServiceInformation != null ? string.Join(Configuration.FieldRepeatSeparator, PlacerSupplementalServiceInformation.Select(x => x.ToDelimitedString())) : null,
                       FillerSupplementalServiceInformation != null ? string.Join(Configuration.FieldRepeatSeparator, FillerSupplementalServiceInformation.Select(x => x.ToDelimitedString())) : null
                       ).TrimEnd(Configuration.FieldSeparator.ToCharArray()));
        }