public Tuple <string, string> GetDescriptor() { PlayerDescriptorDTO desc; if (MembershipId == "-1") { return(new Tuple <string, string>(string.Empty, string.Empty)); } if (MembershipId.IsNullOrEmpty()) { return(new Tuple <string, string>(GetFullName(), string.Empty)); } if (staffDictionary.TryGetValue(MembershipId, out desc)) { var name = desc.Name; switch (desc.TagBehaviorEnum) { case TagBehavior.Append: name = GetFullName(); break; case TagBehavior.ReplaceLastName: name = $"{FirstName}{(DonatorLevel >= 2 && !Nickname.IsNullOrEmpty() ? $" '{Nickname}'" : "")}"; break; case TagBehavior.ReplaceLastNameAndNick: name = $"{FirstName}"; break; } return(new Tuple <string, string>(name, desc.PictureURL)); } return(new Tuple <string, string>(GetFullName(), string.Empty)); }
public string GetFullName() { return(DonatorLevel < 2 || Nickname.IsNullOrEmpty() ? $"{FirstName} {LastName}" : $"{FirstName} \'{Nickname}\' {LastName}"); }