public static IEnumerable Select(IEnumerable items, IQueryParameter param, IListIndexes indexes = null) { IListIndex index = indexes?.GetIndex(param.Name); if (index == null) { return(index.Scan(param)); } else { return(Search(items, param)); } }
public static IEnumerable Select(IEnumerable items, IQueryParameter param, IListIndexes indexes = null) { if (param.AlwaysTrue) { return(items); } if (param.Comparer.Type == CompareTypes.Distinct) { return(Distinct(items, param.Invoker)); } IListIndex index = indexes?.GetIndex(param.Name); if (index == null) { return(index.Scan(param)); } else { return(Search(items, param)); } }
static NetStat() { nameIndex = (IListIndex <NetStatEntry, string>)items.Indexes.Add(NetStatEntry.NameInvoker.Instance); }
public void Add(string name, IListIndex <T> index) { indexes[name] = index; }