protected override FilterResults PerformFiltering(ICharSequence constraint) { // throw new NotImplementedException(); long magazinId = Long.ParseLong(constraint.ToString()); FilterResults results = new FilterResults(); if (magazinId > 0) { JavaList <Product> filterList = new JavaList <Product>(); for (int i = 0; i < productFilterList.Count; i++) { if ((productFilterList.ElementAt <Product>(i).magazinId) == magazinId) { Product product = productFilterList.ElementAt <Product>(i); filterList.Add(product); } } results.Count = filterList.Count; results.Values = filterList; } else { results.Count = productFilterList.Count; results.Values = productFilterList; } return(results); }