private static bool AcceptChoice(PickListChoice choice, IEnumerable <string> searches) { if (searches != null) { // Make sure all search strings are in the label string label = choice.Label; foreach (string search in searches) { if (string.IsNullOrEmpty(search)) { continue; } if (!label.Contains(search)) { return(false); } } } return(true); }
private static bool AcceptChoice(PickListChoice choice, IEnumerable<string> searches) { if (searches != null) { // Make sure all search strings are in the label string label = choice.Label; foreach (string search in searches) { if (string.IsNullOrEmpty(search)) continue; if (!label.Contains(search)) return false; } } return true; }