public static WhereStatementType GetWhereComparisonType(NameMatchStyle matchStyle) { return(matchStyle == NameMatchStyle.Similar ? WhereStatementType.Like : matchStyle == NameMatchStyle.MixedCase ? WhereStatementType.Equals : WhereStatementType.BinaryEquals); }
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); }
public static async Task DisplayAlliesAsync(GameServiceClient client, IReadOnlyList <int> allyIds = null, string name = null, NameMatchStyle nameMatchStyle = NameMatchStyle.MixedCase) { foreach (var ally in await GetAlliesAsync(client, allyIds, name, nameMatchStyle)) { ConsoleUtility.WriteLine($"{ally}"); } }
public static async Task DisplayMastermindsAsync(GameServiceClient client, IReadOnlyList <int> mastermindIds = null, string name = null, NameMatchStyle nameMatchStyle = NameMatchStyle.MixedCase) { foreach (var mastermind in await GetMastermindsAsync(client, mastermindIds, name, nameMatchStyle)) { ConsoleUtility.WriteLine($"{mastermind}"); } }
public static async Task DisplaySchemesAsync(GameServiceClient client, IReadOnlyList <int> schemeIds = null, string name = null, NameMatchStyle nameMatchStyle = NameMatchStyle.MixedCase) { foreach (var scheme in await GetSchemesAsync(client, schemeIds, name, nameMatchStyle)) { ConsoleUtility.WriteLine($"{scheme}"); } }
public static async Task <IReadOnlyList <Henchman> > GetHenchmenAsync(GameServiceClient client, IReadOnlyList <int> henchmanIds = null, string name = null, NameMatchStyle nameMatchStyle = NameMatchStyle.MixedCase) { var request = new GetHenchmenRequest(); if (henchmanIds != null && henchmanIds.Count() != 0) { request.HenchmanIds.AddRange(henchmanIds); } else if (!string.IsNullOrWhiteSpace(name)) { request.Name = name; } request.NameMatchStyle = nameMatchStyle; return((await client.GetHenchmenAsync(request)).Henchmen); }
public static async Task DisplayHenchmenAsync(GameServiceClient client, IReadOnlyList <int> henchmanIds = null, string name = null, NameMatchStyle nameMatchStyle = NameMatchStyle.MixedCase) { foreach (var henchman in await GetHenchmenAsync(client, henchmanIds, name, nameMatchStyle)) { ConsoleUtility.WriteLine($"{henchman}"); } }
public static async Task DisplayTeamsAsync(GameServiceClient client, IReadOnlyList <int> teamIds = null, string name = null, NameMatchStyle nameMatchStyle = NameMatchStyle.MixedCase) { var request = new GetTeamsRequest(); if (teamIds != null && teamIds.Count() != 0) { request.TeamIds.AddRange(teamIds); } else if (!string.IsNullOrWhiteSpace(name)) { request.Name = name; } request.NameMatchStyle = nameMatchStyle; var teams = await client.GetTeamsAsync(request); foreach (var team in teams.Teams) { ConsoleUtility.WriteLine($"{team}"); } }
public static async Task DisplayNeutralsAsync(GameServiceClient client, IReadOnlyList <int> neutralIds = null, string name = null, NameMatchStyle nameMatchStyle = NameMatchStyle.MixedCase) { foreach (var neutral in await GetNeutralsAsync(client, neutralIds, name, nameMatchStyle)) { ConsoleUtility.WriteLine($"{neutral}"); } }
public static async Task DisplayClassesAsync(GameServiceClient client, IReadOnlyList <int> classIds = null, string name = null, NameMatchStyle nameMatchStyle = NameMatchStyle.MixedCase) { var request = new GetClassesRequest(); if (classIds != null && classIds.Count() != 0) { request.ClassIds.AddRange(classIds); } else if (!string.IsNullOrWhiteSpace(name)) { request.Name = name; } request.NameMatchStyle = nameMatchStyle; var classes = await client.GetClassesAsync(request); foreach (var @class in classes.Classes) { ConsoleUtility.WriteLine($"{@class}"); } }