Exemplo n.º 1
0
        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));
            }
        }
Exemplo n.º 2
0
 /// <summary>
 /// Gets the enumerator.
 /// </summary>
 /// <returns>The enumerator.</returns>
 public IEnumerator <T> GetEnumerator()
 {
     return(_Storage.Select <T>(_Aspect, _WhereFirst, _OrderFirst, _PageSize, _PageOrdinal).GetEnumerator());
 }