public static async Task <IReadOnlyList <Ally> > GetAlliesAsync(GameServiceClient client, IReadOnlyList <int> allyIds = null, string name = null, NameMatchStyle nameMatchStyle = NameMatchStyle.MixedCase) { var request = new GetAlliesRequest(); if (allyIds != null && allyIds.Count() != 0) { request.AllyIds.AddRange(allyIds); } else if (!string.IsNullOrWhiteSpace(name)) { request.Name = name; } request.NameMatchStyle = nameMatchStyle; return((await client.GetAlliesAsync(request)).Allies); }