Browse Source

Fixing name of TryGetElementAtAsync.

Bart De Smet 7 years ago
parent
commit
8d2882a48f

+ 1 - 1
Ix.NET/Source/System.Linq.Async/System/Linq/AsyncEnumerablePartition.cs

@@ -219,7 +219,7 @@ namespace System.Linq
             return new AsyncEnumerablePartition<TSource>(_source, _minIndexInclusive, maxIndex);
         }
 
-        public async ValueTask<Maybe<TSource>> TryGetElementAsync(int index, CancellationToken cancellationToken)
+        public async ValueTask<Maybe<TSource>> TryGetElementAtAsync(int index, CancellationToken cancellationToken)
         {
             // If the index is negative or >= our max count, return early.
             if (index >= 0 && (!HasLimit || index < Limit))

+ 1 - 1
Ix.NET/Source/System.Linq.Async/System/Linq/AsyncListPartition.cs

@@ -97,7 +97,7 @@ namespace System.Linq
             }
         }
 
-        public ValueTask<Maybe<TSource>> TryGetElementAsync(int index, CancellationToken cancellationToken)
+        public ValueTask<Maybe<TSource>> TryGetElementAtAsync(int index, CancellationToken cancellationToken)
         {
             if ((uint)index <= (uint)(_maxIndexInclusive - _minIndexInclusive) && index < _source.Count - _minIndexInclusive)
             {

+ 1 - 1
Ix.NET/Source/System.Linq.Async/System/Linq/IAsyncPartition.cs

@@ -32,7 +32,7 @@ namespace System.Linq
         /// <param name="index">The 0-based index to access.</param>
         /// <param name="cancellationToken">Token to observe for cancellation requests.</param>
         /// <returns>The element if found, otherwise, the default value of <see cref="Maybe{TElement}"/>.</returns>
-        ValueTask<Maybe<TElement>> TryGetElementAsync(int index, CancellationToken cancellationToken);
+        ValueTask<Maybe<TElement>> TryGetElementAtAsync(int index, CancellationToken cancellationToken);
 
         /// <summary>
         /// Gets the first item in this sequence.

+ 1 - 1
Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ElementAt.cs

@@ -30,7 +30,7 @@ namespace System.Linq
         {
             if (source is IAsyncPartition<TSource> p)
             {
-                Maybe<TSource> first = await p.TryGetElementAsync(index, cancellationToken).ConfigureAwait(false);
+                Maybe<TSource> first = await p.TryGetElementAtAsync(index, cancellationToken).ConfigureAwait(false);
 
                 if (first.HasValue)
                 {

+ 1 - 1
Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ElementAtOrDefault.cs

@@ -30,7 +30,7 @@ namespace System.Linq
         {
             if (source is IAsyncPartition<TSource> p)
             {
-                Maybe<TSource> first = await p.TryGetElementAsync(index, cancellationToken).ConfigureAwait(false);
+                Maybe<TSource> first = await p.TryGetElementAtAsync(index, cancellationToken).ConfigureAwait(false);
 
                 if (first.HasValue)
                 {

+ 1 - 1
Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Empty.cs

@@ -34,7 +34,7 @@ namespace System.Linq
 
             public ValueTask<List<TValue>> ToListAsync(CancellationToken cancellationToken) => new ValueTask<List<TValue>>(new List<TValue>());
 
-            public ValueTask<Maybe<TValue>> TryGetElementAsync(int index, CancellationToken cancellationToken) => new ValueTask<Maybe<TValue>>(new Maybe<TValue>());
+            public ValueTask<Maybe<TValue>> TryGetElementAtAsync(int index, CancellationToken cancellationToken) => new ValueTask<Maybe<TValue>>(new Maybe<TValue>());
 
             public ValueTask<Maybe<TValue>> TryGetFirstAsync(CancellationToken cancellationToken) => new ValueTask<Maybe<TValue>>(new Maybe<TValue>());
 

+ 1 - 1
Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Range.cs

@@ -93,7 +93,7 @@ namespace System.Linq
                 return new ValueTask<List<int>>(res);
             }
 
-            public ValueTask<Maybe<int>> TryGetElementAsync(int index, CancellationToken cancellationToken)
+            public ValueTask<Maybe<int>> TryGetElementAtAsync(int index, CancellationToken cancellationToken)
             {
                 if ((uint)index < (uint)(_end - _start))
                 {