public T WithIdentity(object value) { if (_Aspect.IdentityOrdinal < 0) { throw new ArgumentException(_Aspect.ToString() + " has no identity"); } using (IEnumerator <T> items = _Engine.Select <T>( this._Aspect, new ClassFilterTerm(_Aspect, _Aspect.IdentityOrdinal, value), null, 0, 0).GetEnumerator()) { return(items.MoveNext() ? items.Current : default(T)); } }
/// <summary> /// Gets the enumerator. /// </summary> /// <returns>The enumerator.</returns> public IEnumerator <T> GetEnumerator() { return(_Storage.Select <T>(_Aspect, _WhereFirst, _OrderFirst, _PageSize, _PageOrdinal).GetEnumerator()); }