public bool MoveNext() { if (_result == null) { Compile(); var qresult = _query.Execute(QueryContext); if (_isContent) { _result = (IEnumerable <T>)qresult.Hits.Select(Content.Load); } else { _result = (IEnumerable <T>)qresult.Hits.Select(Storage.Node.LoadNode); } _resultEnumerator = _result.GetEnumerator(); } return(_resultEnumerator.MoveNext()); }
public bool MoveNext() { if (_result == null) { Compile(); var qresult = _query.Execute(QueryContext); var nresult = new Storage.NodeList <Storage.Node>(qresult.Hits.ToArray()); if (_isContent) { _result = (IEnumerable <T>)nresult.Where(n => n != null).Select(Content.Create); } else { _result = nresult.Where(n => n != null).Cast <T>(); } _resultEnumerator = _result.GetEnumerator(); } return(_resultEnumerator.MoveNext()); }