Family Tree as Markdown Files
This commit is contained in:
@ -62,12 +62,19 @@ internal abstract class PersonName
|
||||
internal static string GetFullName(Models.PersonName personName)
|
||||
{
|
||||
StringBuilder result = new();
|
||||
if (personName.First is not null)
|
||||
if (personName.First is not null && !string.IsNullOrEmpty(personName.First.Value))
|
||||
_ = result.Append(personName.First.Value);
|
||||
if (personName.Middle is not null)
|
||||
if (personName.Middle is not null && !string.IsNullOrEmpty(personName.Middle.Value))
|
||||
_ = result.Append(' ').Append(personName.Middle.Value);
|
||||
if (personName.Last is not null)
|
||||
if (personName.Last is not null && !string.IsNullOrEmpty(personName.Last.Value))
|
||||
_ = result.Append(' ').Append(personName.Last.Value);
|
||||
if (personName.Alias is not null && !string.IsNullOrEmpty(personName.Alias.Value))
|
||||
{
|
||||
if (personName.Alias.Value.Contains(" Jr"))
|
||||
_ = result.Append(" Jr");
|
||||
else if (personName.Alias.Value.Contains(" Sr"))
|
||||
_ = result.Append(" Sr");
|
||||
}
|
||||
return result.ToString();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user