예제 #1
0
        private IEnumerator <T> GetResultEnumerator()
        {
            if (_types.Length > 1)
            {
                return(new ModelGraphEnumerator(this));
            }

            var type = typeof(T);

            if (type == typeof(IDictionary <string, object>) || type == typeof(Dictionary <string, object>))
            {
                return(new DictionaryEnumerator(this));
            }

            var tuple = TupleAccessor.Get(type);

            if (tuple != null)
            {
                return(new TupleEnumerator(this, tuple));
            }

            return(new ModelEnumerator(this));
        }
예제 #2
0
 public TupleEnumerator(QueryResult <T> result, TupleAccessor tuple)
     : base(result)
 {
     _tuple = tuple;
 }