Пример #1
0
 public static Dictionary <TKey, TElement> ToDictionary <TSource, TKey, TElement>(this ImmutableStack <TSource> source, Selector <TSource, TKey> keySelector, Selector <TSource, TElement> elementSelector, IEqualityComparer <TKey>?comparer)
 => ValueEnumerable.ToDictionary <ValueWrapper <TSource>, ValueWrapper <TSource> .Enumerator, TSource, TKey, TElement>(new ValueWrapper <TSource>(source), keySelector, elementSelector, comparer);
Пример #2
0
 public static TSource[] ToArray <TSource>(this ImmutableStack <TSource> source)
 => ValueEnumerable.ToArray <ValueWrapper <TSource>, ValueWrapper <TSource> .Enumerator, TSource>(new ValueWrapper <TSource>(source));
Пример #3
0
 public static Dictionary <TKey, TSource> ToDictionary <TSource, TKey>(this ImmutableStack <TSource> source, Selector <TSource, TKey> keySelector)
 => ValueEnumerable.ToDictionary <ValueWrapper <TSource>, ValueWrapper <TSource> .Enumerator, TSource, TKey>(new ValueWrapper <TSource>(source), keySelector);
Пример #4
0
 public static ValueEnumerable.WhereIndexEnumerable <ValueWrapper <TSource>, ValueWrapper <TSource> .Enumerator, TSource> Where <TSource>(
     this ImmutableStack <TSource> source,
     PredicateAt <TSource> predicate)
 => ValueEnumerable.Where <ValueWrapper <TSource>, ValueWrapper <TSource> .Enumerator, TSource>(new ValueWrapper <TSource>(source), predicate);
 public ValueTask <List <TSource> > ToListAsync(CancellationToken cancellationToken = default)
 => new ValueTask <List <TSource> >(ValueEnumerable.ToList <TEnumerable, TEnumerator, TSource>(source));
Пример #6
0
 public static bool Any <TSource>(this ImmutableStack <TSource> source, PredicateAt <TSource> predicate)
 => ValueEnumerable.Any <ValueWrapper <TSource>, ValueWrapper <TSource> .Enumerator, TSource>(new ValueWrapper <TSource>(source), predicate);
Пример #7
0
 public static ValueEnumerable.SelectIndexEnumerable <ValueWrapper <TSource>, ValueWrapper <TSource> .Enumerator, TSource, TResult> Select <TSource, TResult>(
     this ImmutableStack <TSource> source,
     SelectorAt <TSource, TResult> selector)
 => ValueEnumerable.Select <ValueWrapper <TSource>, ValueWrapper <TSource> .Enumerator, TSource, TResult>(new ValueWrapper <TSource>(source), selector);
 public static ValueEnumerable.WhereIndexEnumerable <ValueWrapper <TKey, TValue>, SortedDictionary <TKey, TValue> .ValueCollection.Enumerator, TValue> Where <TKey, TValue>(
     this SortedDictionary <TKey, TValue> .ValueCollection source,
     PredicateAt <TValue> predicate)
 => ValueEnumerable.Where <ValueWrapper <TKey, TValue>, SortedDictionary <TKey, TValue> .ValueCollection.Enumerator, TValue>(new ValueWrapper <TKey, TValue>(source), predicate);
Пример #9
0
 public static ValueEnumerable.WhereEnumerable <ValueWrapper <TSource>, Queue <TSource> .Enumerator, TSource> Where <TSource>(
     this Queue <TSource> source,
     Predicate <TSource> predicate)
 => ValueEnumerable.Where <ValueWrapper <TSource>, Queue <TSource> .Enumerator, TSource>(new ValueWrapper <TSource>(source), predicate);
Пример #10
0
 public static void ForEach <TSource>(this ImmutableStack <TSource> source, ActionAt <TSource> action)
 => ValueEnumerable.ForEach <ValueWrapper <TSource>, ValueWrapper <TSource> .Enumerator, TSource>(new ValueWrapper <TSource>(source), action);
Пример #11
0
 public static ValueEnumerable.DistinctEnumerable <ValueWrapper <TKey, TValue>, Dictionary <TKey, TValue> .ValueCollection.Enumerator, TValue> Distinct <TKey, TValue>(this Dictionary <TKey, TValue> .ValueCollection source, IEqualityComparer <TValue>?comparer = null)
 => ValueEnumerable.Distinct <ValueWrapper <TKey, TValue>, Dictionary <TKey, TValue> .ValueCollection.Enumerator, TValue>(new ValueWrapper <TKey, TValue>(source), comparer);
Пример #12
0
 public static TSource SingleOrDefault <TSource>(this ImmutableStack <TSource> source)
 => ValueEnumerable.SingleOrDefault <ValueWrapper <TSource>, ValueWrapper <TSource> .Enumerator, TSource>(new ValueWrapper <TSource>(source));
 public static ValueEnumerable.WhereEnumerable <ValueWrapper <TKey, TValue>, Dictionary <TKey, TValue> .KeyCollection.Enumerator, TKey> Where <TKey, TValue>(
     this Dictionary <TKey, TValue> .KeyCollection source,
     Predicate <TKey> predicate)
 => ValueEnumerable.Where <ValueWrapper <TKey, TValue>, Dictionary <TKey, TValue> .KeyCollection.Enumerator, TKey>(new ValueWrapper <TKey, TValue>(source), predicate);
Пример #14
0
 public void GlobalSetup()
 {
     array = ValueEnumerable.Range(0, Size).ToArray();
     list  = ValueEnumerable.Range(0, Size).ToList();
 }
Пример #15
0
 public static int Count <TSource>(this ImmutableStack <TSource> source)
 => ValueEnumerable.Count <ValueWrapper <TSource>, ValueWrapper <TSource> .Enumerator, TSource>(new ValueWrapper <TSource>(source));
Пример #16
0
 public static ValueEnumerable.DistinctEnumerable <ValueWrapper <TSource>, Queue <TSource> .Enumerator, TSource> Distinct <TSource>(this Queue <TSource> source, IEqualityComparer <TSource>?comparer = null)
 => ValueEnumerable.Distinct <ValueWrapper <TSource>, Queue <TSource> .Enumerator, TSource>(new ValueWrapper <TSource>(source), comparer);
Пример #17
0
 public static ValueEnumerable.TakeEnumerable <ValueWrapper <TSource>, ValueWrapper <TSource> .Enumerator, TSource> Take <TSource>(this ImmutableStack <TSource> source, int count)
 => ValueEnumerable.Take <ValueWrapper <TSource>, ValueWrapper <TSource> .Enumerator, TSource>(new ValueWrapper <TSource>(source), count);
Пример #18
0
 public static ValueEnumerable.SelectManyEnumerable <ValueWrapper <TKey, TValue>, SortedDictionary <TKey, TValue> .Enumerator, KeyValuePair <TKey, TValue>, TSubEnumerable, TSubEnumerator, TResult> SelectMany <TKey, TValue, TSubEnumerable, TSubEnumerator, TResult>(
     this SortedDictionary <TKey, TValue> source,
     Selector <KeyValuePair <TKey, TValue>, TSubEnumerable> selector)
     where TSubEnumerable : notnull, IValueEnumerable <TResult, TSubEnumerator>
     where TSubEnumerator : struct, IEnumerator <TResult>
 => ValueEnumerable.SelectMany <ValueWrapper <TKey, TValue>, SortedDictionary <TKey, TValue> .Enumerator, KeyValuePair <TKey, TValue>, TSubEnumerable, TSubEnumerator, TResult>(new ValueWrapper <TKey, TValue>(source), selector);
Пример #19
0
 public static bool Contains <TSource>(this ImmutableStack <TSource> source, TSource value, IEqualityComparer <TSource>?comparer)
 => ValueEnumerable.Contains <ValueWrapper <TSource>, ValueWrapper <TSource> .Enumerator, TSource>(new ValueWrapper <TSource>(source), value, comparer);
Пример #20
0
 public static ValueEnumerable.WhereIndexEnumerable <ValueWrapper <TKey, TValue>, SortedDictionary <TKey, TValue> .Enumerator, KeyValuePair <TKey, TValue> > Where <TKey, TValue>(
     this SortedDictionary <TKey, TValue> source,
     PredicateAt <KeyValuePair <TKey, TValue> > predicate)
 => ValueEnumerable.Where <ValueWrapper <TKey, TValue>, SortedDictionary <TKey, TValue> .Enumerator, KeyValuePair <TKey, TValue> >(new ValueWrapper <TKey, TValue>(source), predicate);
Пример #21
0
 public static ValueEnumerable.SelectManyEnumerable <ValueWrapper <TSource>, ValueWrapper <TSource> .Enumerator, TSource, TSubEnumerable, TSubEnumerator, TResult> SelectMany <TSource, TSubEnumerable, TSubEnumerator, TResult>(
     this ImmutableStack <TSource> source,
     Selector <TSource, TSubEnumerable> selector)
     where TSubEnumerable : notnull, IValueEnumerable <TResult, TSubEnumerator>
     where TSubEnumerator : struct, IEnumerator <TResult>
 => ValueEnumerable.SelectMany <ValueWrapper <TSource>, ValueWrapper <TSource> .Enumerator, TSource, TSubEnumerable, TSubEnumerator, TResult>(new ValueWrapper <TSource>(source), selector);
Пример #22
0
 public static ValueEnumerable.DistinctEnumerable <ValueWrapper <TKey, TValue>, SortedDictionary <TKey, TValue> .Enumerator, KeyValuePair <TKey, TValue> > Distinct <TKey, TValue>(this SortedDictionary <TKey, TValue> source, IEqualityComparer <KeyValuePair <TKey, TValue> >?comparer = null)
 => ValueEnumerable.Distinct <ValueWrapper <TKey, TValue>, SortedDictionary <TKey, TValue> .Enumerator, KeyValuePair <TKey, TValue> >(new ValueWrapper <TKey, TValue>(source), comparer);
Пример #23
0
 public static Option <TSource> ElementAt <TSource>(this ImmutableStack <TSource> source, int index)
 => ValueEnumerable.ElementAt <ValueWrapper <TSource>, ValueWrapper <TSource> .Enumerator, TSource>(new ValueWrapper <TSource>(source), index);
 public               ValueTask <TSource[]> ToArrayAsync(CancellationToken cancellationToken = default)
 => new ValueTask <TSource[]>(ValueEnumerable.ToArray <TEnumerable, TEnumerator, TSource>(source));