/// <inheritdoc/>
        public string ToDelimitedString()
        {
            System.Globalization.CultureInfo culture = System.Globalization.CultureInfo.CurrentCulture;
            string separator = IsSubcomponent ? Configuration.SubcomponentSeparator : Configuration.ComponentSeparator;

            return string.Format(
                                culture,
                                StringHelper.StringFormatSequence(0, 15, separator),
                                FamilyName?.ToDelimitedString(),
                                GivenName,
                                SecondAndFurtherGivenNamesOrInitialsThereof,
                                Suffix,
                                Prefix,
                                Degree,
                                NameTypeCode,
                                NameRepresentationCode,
                                NameContext?.ToDelimitedString(),
                                NameValidityRange?.ToDelimitedString(),
                                NameAssemblyOrder,
                                EffectiveDate.HasValue ? EffectiveDate.Value.ToString(Consts.DateTimeFormatPrecisionSecond, culture) : null,
                                ExpirationDate.HasValue ? ExpirationDate.Value.ToString(Consts.DateTimeFormatPrecisionSecond, culture) : null,
                                ProfessionalSuffix,
                                CalledBy
                                ).TrimEnd(separator.ToCharArray());
        }
Exemplo n.º 2
0
        /// <inheritdoc/>
        public string ToDelimitedString()
        {
            System.Globalization.CultureInfo culture = System.Globalization.CultureInfo.CurrentCulture;
            string separator = IsSubcomponent ? Configuration.SubcomponentSeparator : Configuration.ComponentSeparator;

            return(string.Format(
                       culture,
                       StringHelper.StringFormatSequence(0, 25, separator),
                       PersonIdentifier,
                       FamilyName?.ToDelimitedString(),
                       GivenName,
                       SecondAndFurtherGivenNamesOrInitialsThereof,
                       Suffix,
                       Prefix,
                       Degree,
                       SourceTable?.ToDelimitedString(),
                       AssigningAuthority?.ToDelimitedString(),
                       NameTypeCode,
                       IdentifierCheckDigit,
                       CheckDigitScheme,
                       IdentifierTypeCode,
                       AssigningFacility?.ToDelimitedString(),
                       NameRepresentationCode,
                       NameContext?.ToDelimitedString(),
                       NameValidityRange?.ToDelimitedString(),
                       NameAssemblyOrder,
                       EffectiveDate.HasValue ? EffectiveDate.Value.ToString(Consts.DateTimeFormatPrecisionSecond, culture) : null,
                       ExpirationDate.HasValue ? ExpirationDate.Value.ToString(Consts.DateTimeFormatPrecisionSecond, culture) : null,
                       ProfessionalSuffix,
                       AssigningJurisdiction?.ToDelimitedString(),
                       AssigningAgencyOrDepartment?.ToDelimitedString(),
                       SecurityCheck,
                       SecurityCheckScheme
                       ).TrimEnd(separator.ToCharArray()));
        }