private static string AnySimpleFullName(this IAnonymousData anon, bool male) { switch (anon.AnyInt32(0, 5)) { case 0: return($"{anon.AnyFirstName(male)} {anon.AnyFirstName(male).Substring(0, 1)}. {anon.AnySurname()}"); default: return($"{anon.AnyFirstName(male)} {anon.AnySurname()}"); } }
/// <summary> /// Creates a random <see langword="string"/> value representing a first name. /// </summary> /// <param name="anon">The anonymous data provider to use.</param> /// <returns>A random first name.</returns> /// <exception cref="ArgumentNullException"><paramref name="anon"/> is <c>null</c>.</exception> public static string AnyFirstName(this IAnonymousData anon) { Argument.NotNull(anon, nameof(anon)); return(anon.AnyFirstName(anon.AnyBool())); }