Ejemplo n.º 1
0
 public IEnumerator <IGrouping <TKey, TElement> > GetEnumerator()
 {
     return(Lookup <TKey, TElement> .Create <TSource>(this.source, this.keySelector, this.elementSelector, this.comparer).GetEnumerator());
 }
Ejemplo n.º 2
0
        public IEnumerator <TResult> GetEnumerator()
        {
            Lookup <TKey, TElement> lookup = Lookup <TKey, TElement> .Create(_source, _keySelector, _elementSelector, _comparer);

            return(lookup.ApplyResultSelector(_resultSelector).GetEnumerator());
        }
Ejemplo n.º 3
0
 public static ILookup <TKey, TElement> ToLookup <TSource, TKey, TElement>(this IEnumerable <TSource> source, Func <TSource, TKey> keySelector, Func <TSource, TElement> elementSelector)
 {
     return(Lookup <TKey, TElement> .Create(source, keySelector, elementSelector, null));
 }
Ejemplo n.º 4
0
 public static ILookup <TKey, TElement> ToLookup <TSource, TKey, TElement>(this IEnumerable <TSource> source, Func <TSource, TKey> keySelector, Func <TSource, TElement> elementSelector, IEqualityComparer <TKey> comparer)
 {
     return(Lookup <TKey, TElement> .Create(source, keySelector, elementSelector, comparer));
 }
Ejemplo n.º 5
0
 public static ILookup <TKey, TSource> ToLookup <TSource, TKey>(this IEnumerable <TSource> source, Func <TSource, TKey> keySelector)
 {
     return(Lookup <TKey, TSource> .Create(source, keySelector, FuncHelper.GetIdentityFunc <TSource>(), null));
 }
Ejemplo n.º 6
0
 public static ILookup <TKey, TSource> ToLookup <TSource, TKey>(this IEnumerable <TSource> source, Func <TSource, TKey> keySelector, IEqualityComparer <TKey> comparer)
 {
     return(Lookup <TKey, TSource> .Create(source, keySelector, FuncHelper.GetIdentityFunc <TSource>(), comparer));
 }
Ejemplo n.º 7
0
        public List <IGrouping <TKey, TElement> > ToList()
        {
            IIListProvider <IGrouping <TKey, TElement> > lookup = Lookup <TKey, TElement> .Create(_source, _keySelector, _elementSelector, _comparer);

            return(lookup.ToList());
        }
Ejemplo n.º 8
0
 public int GetCount(bool onlyIfCheap)
 {
     return(onlyIfCheap ? -1 : Lookup <TKey, TElement> .Create(_source, _keySelector, _elementSelector, _comparer).Count);
 }
Ejemplo n.º 9
0
 public IEnumerator <IGrouping <TKey, TElement> > GetEnumerator()
 {
     return(Lookup <TKey, TElement> .Create(_source, _keySelector, _elementSelector, _comparer).GetEnumerator());
 }
Ejemplo n.º 10
0
 public List <TResult> ToList()
 {
     return(Lookup <TKey, TElement> .Create(_source, _keySelector, _elementSelector, _comparer).ToList(_resultSelector));
 }
Ejemplo n.º 11
0
 public TResult[] ToArray()
 {
     return(Lookup <TKey, TElement> .Create(_source, _keySelector, _elementSelector, _comparer).ToArray(_resultSelector));
 }
 public static ILookup <TKey, TSource> ToLookup <TSource, TKey>(this IEnumerable <TSource> source,
                                                                Func <TSource, TKey> keySelector)
 {
     return(Lookup <TKey, TSource> .Create(source, keySelector, x => x, null));
 }
Ejemplo n.º 13
0
 public SystemLinq_LookupDebugView(Lookup <TKey, TElement> lookup)
 {
     _lookup = lookup;
 }