public void AddSelectionQuery(string name, QuerySelectionType type, List <object> selection) { string itemFilter; switch (type) { case QuerySelectionType.AnyOf: itemFilter = "anyOf"; break; case QuerySelectionType.NoneOf: itemFilter = "noneOf"; break; case QuerySelectionType.AllOf: itemFilter = "allOf"; break; default: throw new NotSupportedException($"The type {type} does not exist within the QuerySelectionType enum."); } var value = string.Join(",", selection?.Select(c => c.ToString()) ?? new List <string>()); value = System.Net.WebUtility.UrlEncode(value); string item = $"{itemFilter}({value})"; SetParam(GetParamName(name), item); }
public void AddSelectionQuery(string name, QuerySelectionType type, object selection) => AddSelectionQuery(name, type, new List <object> { selection });