public void Append(StringBuilder builder, EntityNamePart first) { if (builder.Length > 0) { builder.Append(" "); } builder.Append(StringUtils.TrimToEmpty(first.Value)); }
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()); }
/// <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()); }
public virtual void AddNamePart(EntityNamePart part) { this.parts.Add(part); }