コード例 #1
0
 public void Append(StringBuilder builder, EntityNamePart first)
 {
     if (builder.Length > 0)
     {
         builder.Append(" ");
     }
     builder.Append(StringUtils.TrimToEmpty(first.Value));
 }
コード例 #2
0
 private bool Equals(EntityNamePart that)
 {
     return(new EqualsBuilder()
            .Append(this.type, that.type)
            .Append(this.value_ren, that.value_ren)
            .Append(this.qualifier, that.qualifier)
            .Append(this.nullFlavor, that.nullFlavor)
            .IsEquals());
 }
コード例 #3
0
            /// <summary>
            /// Formats a PersonName into a string. Format of first name first, followed by all family names, all separated by a space.
            /// </summary>
            ///
            /// <param name="name">the PersonName to format</param>
            /// <returns>the formatted name</returns>
            public override String Format(PersonName name)
            {
                StringBuilder  builder = new StringBuilder();
                EntityNamePart first   = GetFirstGivenName(name);

                if (first != null)
                {
                    Append(builder, first);
                }
                /* foreach */
                foreach (EntityNamePart part  in  FilterParts(name, PersonNamePartType.FAMILY))
                {
                    Append(builder, part);
                }
                return(builder.ToString());
            }
コード例 #4
0
 public virtual void AddNamePart(EntityNamePart part)
 {
     this.parts.Add(part);
 }