public static List <BlockRenderer> RenderSearchOptions(SearchOptions searchOptions) { var blocks = new List <BlockRenderer>(); foreach (var item in searchOptions.GetParams()) { switch (item.ParamType) { case SearchOptionsParamType.Text: blocks.Add(RenderTextbox((TextSearchOptionsParam)item)); break; case SearchOptionsParamType.Checkbox: blocks.Add(RenderCheckbox((CheckboxSearchOptionsParam)item)); break; } } return(blocks); }