public async Task <Player[]> GetAll(int?size, int?score, string property, string tag) { //Assignment 5.1 if (score.HasValue == true) { return(await _processor.GetPlayersByMinScore((int)score)); } //Assignment 5.3 else if (string.IsNullOrEmpty(tag) == false) { return(await _processor.GetPlayersByTag(tag)); } //Assignment 5.4 else if (string.IsNullOrEmpty(property) == false) { return(await _processor.GetPlayersByProperty(property)); } //Assignment 5.5 else if (size.HasValue == true) { return(await _processor.GetAllBySize((int)size)); } else { return(await _processor.GetAll()); } }
public async Task <Player[]> GetAll(string username) { if (string.IsNullOrEmpty(username) == false) { return(await _processor.GetPlayersByName(username)); } else { return(await _processor.GetAll()); } }