diff --git a/Ix.NET/Source/System.Interactive.Async/System/Linq/AsyncEnumerableEx.cs b/Ix.NET/Source/System.Interactive.Async/System/Linq/AsyncEnumerableEx.cs
index 91355fcaec..197b233b06 100644
--- a/Ix.NET/Source/System.Interactive.Async/System/Linq/AsyncEnumerableEx.cs
+++ b/Ix.NET/Source/System.Interactive.Async/System/Linq/AsyncEnumerableEx.cs
@@ -4,6 +4,10 @@
namespace System.Linq
{
+ ///
+ /// Provides an additional set of extension methods for writing in-memory queries, transformations of async-enumerable sequences.
+ ///
+ ///
public static partial class AsyncEnumerableEx
{
}
diff --git a/Ix.NET/Source/System.Interactive.Async/System/Linq/Operators/Amb.cs b/Ix.NET/Source/System.Interactive.Async/System/Linq/Operators/Amb.cs
index 6274d8a8ad..17c6fddbcb 100644
--- a/Ix.NET/Source/System.Interactive.Async/System/Linq/Operators/Amb.cs
+++ b/Ix.NET/Source/System.Interactive.Async/System/Linq/Operators/Amb.cs
@@ -10,6 +10,14 @@ namespace System.Linq
{
public static partial class AsyncEnumerableEx
{
+ ///
+ /// Propagates the async-enumerable sequence that reacts first.
+ ///
+ /// The type of the elements in the source sequences.
+ /// First async-enumerable sequence.
+ /// Second async-enumerable sequence.
+ /// An async-enumerable sequence that surfaces either of the given sequences, whichever reacted first.
+ /// or is null.
public static IAsyncEnumerable Amb(this IAsyncEnumerable first, IAsyncEnumerable second)
{
if (first == null)
@@ -140,6 +148,13 @@ await using (winner.ConfigureAwait(false))
}
}
+ ///
+ /// Propagates the async-enumerable sequence that reacts first.
+ ///
+ /// The type of the elements in the source sequences.
+ /// Observable sources competing to react first.
+ /// An async-enumerable sequence that surfaces any of the given sequences, whichever reacted first.
+ /// is null.
public static IAsyncEnumerable Amb(params IAsyncEnumerable[] sources)
{
if (sources == null)
@@ -243,6 +258,13 @@ await using (winner.ConfigureAwait(false))
}
}
+ ///
+ /// Propagates the async-enumerable sequence that reacts first.
+ ///
+ /// The type of the elements in the source sequences.
+ /// Observable sources competing to react first.
+ /// An async-enumerable sequence that surfaces any of the given sequences, whichever reacted first.
+ /// is null.
public static IAsyncEnumerable Amb(this IEnumerable> sources)
{
if (sources == null)
diff --git a/Ix.NET/Source/System.Interactive.Async/System/Linq/Operators/Buffer.cs b/Ix.NET/Source/System.Interactive.Async/System/Linq/Operators/Buffer.cs
index 3289ac45e7..65f15287b7 100644
--- a/Ix.NET/Source/System.Interactive.Async/System/Linq/Operators/Buffer.cs
+++ b/Ix.NET/Source/System.Interactive.Async/System/Linq/Operators/Buffer.cs
@@ -10,6 +10,15 @@ namespace System.Linq
{
public static partial class AsyncEnumerableEx
{
+ ///
+ /// Projects each element of an async-enumerable sequence into consecutive non-overlapping buffers which are produced based on element count information.
+ ///
+ /// The type of the elements in the source sequence, and in the lists in the result sequence.
+ /// Source sequence to produce buffers over.
+ /// Length of each buffer.
+ /// An async-enumerable sequence of buffers.
+ /// is null.
+ /// is less than or equal to zero.
public static IAsyncEnumerable> Buffer(this IAsyncEnumerable source, int count)
{
if (source == null)
@@ -42,6 +51,16 @@ await foreach (var item in source.WithCancellation(cancellationToken).ConfigureA
}
}
+ ///
+ /// Projects each element of an async-enumerable sequence into zero or more buffers which are produced based on element count information.
+ ///
+ /// The type of the elements in the source sequence, and in the lists in the result sequence.
+ /// Source sequence to produce buffers over.
+ /// Length of each buffer.
+ /// Number of elements to skip between creation of consecutive buffers.
+ /// An async-enumerable sequence of buffers.
+ /// is null.
+ /// or is less than or equal to zero.
public static IAsyncEnumerable> Buffer(this IAsyncEnumerable source, int count, int skip)
{
if (source == null)
diff --git a/Ix.NET/Source/System.Interactive.Async/System/Linq/Operators/Catch.cs b/Ix.NET/Source/System.Interactive.Async/System/Linq/Operators/Catch.cs
index f0637eb557..2beb882dee 100644
--- a/Ix.NET/Source/System.Interactive.Async/System/Linq/Operators/Catch.cs
+++ b/Ix.NET/Source/System.Interactive.Async/System/Linq/Operators/Catch.cs
@@ -16,6 +16,15 @@ public static partial class AsyncEnumerableEx
//
// catch (TException ex) when(!(ex is OperationCanceledException oce && oce.CancellationToken == cancellationToken))
+ ///
+ /// Continues an async-enumerable sequence that is terminated by an exception of the specified type with the async-enumerable sequence produced by the handler.
+ ///
+ /// The type of the elements in the source sequence and sequences returned by the exception handler function.
+ /// The type of the exception to catch and handle. Needs to derive from .
+ /// Source sequence.
+ /// Exception handler function, producing another async-enumerable sequence.
+ /// An async-enumerable sequence containing the source sequence's elements, followed by the elements produced by the handler's resulting async-enumerable sequence in case an exception occurred.
+ /// or is null.
public static IAsyncEnumerable Catch(this IAsyncEnumerable source, Func> handler)
where TException : Exception
{
@@ -70,6 +79,15 @@ await foreach (var item in err.WithCancellation(cancellationToken).ConfigureAwai
}
}
+ ///
+ /// Continues an async-enumerable sequence that is terminated by an exception of the specified type with the async-enumerable sequence produced asynchronously by the handler.
+ ///
+ /// The type of the elements in the source sequence and sequences returned by the exception handler function.
+ /// The type of the exception to catch and handle. Needs to derive from .
+ /// Source sequence.
+ /// Exception handler function, producing another async-enumerable sequence asynchronously.
+ /// An async-enumerable sequence containing the source sequence's elements, followed by the elements produced by the handler's resulting async-enumerable sequence in case an exception occurred.
+ /// or is null.
public static IAsyncEnumerable Catch(this IAsyncEnumerable source, Func>> handler)
where TException : Exception
{
@@ -125,6 +143,15 @@ await foreach (var item in err.WithCancellation(cancellationToken).ConfigureAwai
}
#if !NO_DEEP_CANCELLATION
+ ///
+ /// Continues an async-enumerable sequence that is terminated by an exception of the specified type with the async-enumerable sequence produced asynchronously (cancellable) by the handler.
+ ///
+ /// The type of the elements in the source sequence and sequences returned by the exception handler function.
+ /// The type of the exception to catch and handle. Needs to derive from .
+ /// Source sequence.
+ /// Exception handler function, producing another async-enumerable sequence asynchronously while supporting cancellation.
+ /// An async-enumerable sequence containing the source sequence's elements, followed by the elements produced by the handler's resulting async-enumerable sequence in case an exception occurred.
+ /// or is null.
public static IAsyncEnumerable Catch(this IAsyncEnumerable source, Func>> handler)
where TException : Exception
{
@@ -180,6 +207,13 @@ await foreach (var item in err.WithCancellation(cancellationToken).ConfigureAwai
}
#endif
+ ///
+ /// Continues an async-enumerable sequence that is terminated by an exception with the next async-enumerable sequence.
+ ///
+ /// The type of the elements in the source and handler sequences.
+ /// Observable sequences to catch exceptions for.
+ /// An async-enumerable sequence containing elements from consecutive source sequences until a source sequence terminates successfully.
+ /// is null.
public static IAsyncEnumerable Catch(this IEnumerable> sources)
{
if (sources == null)
@@ -188,6 +222,13 @@ public static IAsyncEnumerable Catch(this IEnumerable
+ /// Continues an async-enumerable sequence that is terminated by an exception with the next async-enumerable sequence.
+ ///
+ /// The type of the elements in the source and handler sequences.
+ /// Observable sequences to catch exceptions for.
+ /// An async-enumerable sequence containing elements from consecutive source sequences until a source sequence terminates successfully.
+ /// is null.
public static IAsyncEnumerable Catch(params IAsyncEnumerable[] sources)
{
if (sources == null)
@@ -196,6 +237,14 @@ public static IAsyncEnumerable Catch(params IAsyncEnumerable
+ /// Continues an async-enumerable sequence that is terminated by an exception with the next async-enumerable sequence.
+ ///
+ /// The type of the elements in the source sequence and handler sequence.
+ /// First async-enumerable sequence whose exception (if any) is caught.
+ /// Second async-enumerable sequence used to produce results when an error occurred in the first sequence.
+ /// An async-enumerable sequence containing the first sequence's elements, followed by the elements of the second sequence in case an exception occurred.
+ /// or is null.
public static IAsyncEnumerable Catch(this IAsyncEnumerable first, IAsyncEnumerable second)
{
if (first == null)
diff --git a/Ix.NET/Source/System.Interactive.Async/System/Linq/Operators/Concat.cs b/Ix.NET/Source/System.Interactive.Async/System/Linq/Operators/Concat.cs
index db5b6bb003..589f5b3906 100644
--- a/Ix.NET/Source/System.Interactive.Async/System/Linq/Operators/Concat.cs
+++ b/Ix.NET/Source/System.Interactive.Async/System/Linq/Operators/Concat.cs
@@ -10,6 +10,13 @@ namespace System.Linq
{
public static partial class AsyncEnumerableEx
{
+ ///
+ /// Concatenates all inner async-enumerable sequences, as long as the previous async-enumerable sequence terminated successfully.
+ ///
+ /// The type of the elements in the source sequences.
+ /// Observable sequence of inner async-enumerable sequences.
+ /// An async-enumerable sequence that contains the elements of each observed inner sequence, in sequential order.
+ /// is null.
public static IAsyncEnumerable Concat(this IAsyncEnumerable> sources)
{
if (sources == null)
@@ -29,6 +36,13 @@ await foreach (var item in source.WithCancellation(cancellationToken).ConfigureA
}
}
+ ///
+ /// Concatenates all async-enumerable sequences in the given enumerable sequence, as long as the previous async-enumerable sequence terminated successfully.
+ ///
+ /// The type of the elements in the source sequences.
+ /// Observable sequences to concatenate.
+ /// An async-enumerable sequence that contains the elements of each given sequence, in sequential order.
+ /// is null.
public static IAsyncEnumerable Concat(this IEnumerable> sources)
{
if (sources == null)
@@ -48,6 +62,13 @@ await foreach (var item in source.WithCancellation(cancellationToken).ConfigureA
}
}
+ ///
+ /// Concatenates all of the specified async-enumerable sequences, as long as the previous async-enumerable sequence terminated successfully.
+ ///
+ /// The type of the elements in the source sequences.
+ /// Observable sequences to concatenate.
+ /// An async-enumerable sequence that contains the elements of each given sequence, in sequential order.
+ /// is null.
public static IAsyncEnumerable Concat(params IAsyncEnumerable[] sources)
{
if (sources == null)
diff --git a/Ix.NET/Source/System.Interactive.Async/System/Linq/Operators/Defer.cs b/Ix.NET/Source/System.Interactive.Async/System/Linq/Operators/Defer.cs
index 06b45ad609..266bff062c 100644
--- a/Ix.NET/Source/System.Interactive.Async/System/Linq/Operators/Defer.cs
+++ b/Ix.NET/Source/System.Interactive.Async/System/Linq/Operators/Defer.cs
@@ -10,6 +10,13 @@ namespace System.Linq
{
public static partial class AsyncEnumerableEx
{
+ ///
+ /// Returns an async-enumerable sequence that invokes the specified factory function whenever a new observer subscribes.
+ ///
+ /// The type of the elements in the sequence returned by the factory function, and in the resulting sequence.
+ /// The async-enumerable factory function to invoke for each consumer that starts enumerating the resulting asynchronous sequence.
+ /// An async-enumerable sequence whose observers trigger an invocation of the given async-enumerable factory function.
+ /// is null.
public static IAsyncEnumerable Defer(Func> factory)
{
if (factory == null)
@@ -26,6 +33,14 @@ await foreach (var item in factory().WithCancellation(cancellationToken).Configu
}
}
+ ///
+ /// Returns an async-enumerable sequence that starts the specified asynchronous factory function whenever a new observer subscribes.
+ ///
+ /// The type of the elements in the sequence returned by the factory function, and in the resulting sequence.
+ /// Asynchronous factory function to start for each consumer that starts enumerating the resulting asynchronous sequence.
+ /// An async-enumerable sequence whose observers trigger the given asynchronous async-enumerable factory function to be started.
+ /// is null.
+ /// This operator is especially useful in conjunction with the asynchronous programming features introduced in C# 5.0 and Visual Basic 11.
public static IAsyncEnumerable Defer(Func>> factory)
{
if (factory == null)
@@ -43,6 +58,16 @@ await foreach (var item in (await factory().ConfigureAwait(false)).WithCancellat
}
#if !NO_DEEP_CANCELLATION
+ ///
+ /// Returns an async-enumerable sequence that starts the specified cancellable asynchronous factory function whenever a new observer subscribes.
+ /// The CancellationToken passed to the asynchronous factory function is tied to the returned disposable subscription, allowing best-effort cancellation.
+ ///
+ /// The type of the elements in the sequence returned by the factory function, and in the resulting sequence.
+ /// Asynchronous factory function, supporting cancellation, to start for each consumer that starts enumerating the resulting asynchronous sequence.
+ /// An async-enumerable sequence whose observers trigger the given asynchronous async-enumerable factory function to be started.
+ /// is null.
+ /// This operator is especially useful in conjunction with the asynchronous programming features introduced in C# 5.0 and Visual Basic 11.
+ /// When a subscription to the resulting sequence is disposed, the CancellationToken that was fed to the asynchronous async-enumerable factory function will be signaled.
public static IAsyncEnumerable Defer(Func>> factory)
{
if (factory == null)
diff --git a/Ix.NET/Source/System.Interactive.Async/System/Linq/Operators/Distinct.cs b/Ix.NET/Source/System.Interactive.Async/System/Linq/Operators/Distinct.cs
index 28f623481a..59b14d1597 100644
--- a/Ix.NET/Source/System.Interactive.Async/System/Linq/Operators/Distinct.cs
+++ b/Ix.NET/Source/System.Interactive.Async/System/Linq/Operators/Distinct.cs
@@ -10,6 +10,16 @@ namespace System.Linq
{
public static partial class AsyncEnumerableEx
{
+ ///
+ /// Returns an async-enumerable sequence that contains only distinct elements according to the keySelector.
+ ///
+ /// The type of the elements in the source sequence.
+ /// The type of the discriminator key computed for each element in the source sequence.
+ /// An async-enumerable sequence to retain distinct elements for.
+ /// A function to compute the comparison key for each element.
+ /// An async-enumerable sequence only containing the distinct elements, based on a computed key value, from the source sequence.
+ /// or is null.
+ /// Usage of this operator should be considered carefully due to the maintenance of an internal lookup structure which can grow large.
public static IAsyncEnumerable Distinct(this IAsyncEnumerable source, Func keySelector)
{
if (source == null)
@@ -20,6 +30,17 @@ public static partial class AsyncEnumerableEx
return DistinctCore(source, keySelector, comparer: null);
}
+ ///
+ /// Returns an async-enumerable sequence that contains only distinct elements according to the keySelector and the comparer.
+ ///
+ /// The type of the elements in the source sequence.
+ /// The type of the discriminator key computed for each element in the source sequence.
+ /// An async-enumerable sequence to retain distinct elements for.
+ /// A function to compute the comparison key for each element.
+ /// Equality comparer for source elements.
+ /// An async-enumerable sequence only containing the distinct elements, based on a computed key value, from the source sequence.
+ /// or or is null.
+ /// Usage of this operator should be considered carefully due to the maintenance of an internal lookup structure which can grow large.
public static IAsyncEnumerable Distinct(this IAsyncEnumerable source, Func keySelector, IEqualityComparer? comparer)
{
if (source == null)
@@ -30,6 +51,16 @@ public static partial class AsyncEnumerableEx
return DistinctCore(source, keySelector, comparer);
}
+ ///
+ /// Returns an async-enumerable sequence that contains only distinct elements according to the asynchronous keySelector.
+ ///
+ /// The type of the elements in the source sequence.
+ /// The type of the discriminator key computed for each element in the source sequence.
+ /// An async-enumerable sequence to retain distinct elements for.
+ /// An asynchronous function to compute the comparison key for each element.
+ /// An async-enumerable sequence only containing the distinct elements, based on a computed key value, from the source sequence.
+ /// or is null.
+ /// Usage of this operator should be considered carefully due to the maintenance of an internal lookup structure which can grow large.
public static IAsyncEnumerable Distinct(this IAsyncEnumerable source, Func> keySelector)
{
if (source == null)
@@ -41,6 +72,16 @@ public static partial class AsyncEnumerableEx
}
#if !NO_DEEP_CANCELLATION
+ ///
+ /// Returns an async-enumerable sequence that contains only distinct elements according to the asynchronous (cancellable) keySelector.
+ ///
+ /// The type of the elements in the source sequence.
+ /// The type of the discriminator key computed for each element in the source sequence.
+ /// An async-enumerable sequence to retain distinct elements for.
+ /// An asynchronous (cancellable) function to compute the comparison key for each element.
+ /// An async-enumerable sequence only containing the distinct elements, based on a computed key value, from the source sequence.
+ /// or is null.
+ /// Usage of this operator should be considered carefully due to the maintenance of an internal lookup structure which can grow large.
public static IAsyncEnumerable Distinct(this IAsyncEnumerable source, Func> keySelector)
{
if (source == null)
@@ -52,6 +93,17 @@ public static partial class AsyncEnumerableEx
}
#endif
+ ///
+ /// Returns an async-enumerable sequence that contains only distinct elements according to the asynchronous keySelector and the comparer.
+ ///
+ /// The type of the elements in the source sequence.
+ /// The type of the discriminator key computed for each element in the source sequence.
+ /// An async-enumerable sequence to retain distinct elements for.
+ /// An asynchronous function to compute the comparison key for each element.
+ /// Equality comparer for source elements.
+ /// An async-enumerable sequence only containing the distinct elements, based on a computed key value, from the source sequence.
+ /// or or is null.
+ /// Usage of this operator should be considered carefully due to the maintenance of an internal lookup structure which can grow large.
public static IAsyncEnumerable Distinct(this IAsyncEnumerable source, Func> keySelector, IEqualityComparer? comparer)
{
if (source == null)
@@ -63,6 +115,17 @@ public static partial class AsyncEnumerableEx
}
#if !NO_DEEP_CANCELLATION
+ ///
+ /// Returns an async-enumerable sequence that contains only distinct elements according to the asynchronous (cancellable) keySelector and the comparer.
+ ///
+ /// The type of the elements in the source sequence.
+ /// The type of the discriminator key computed for each element in the source sequence.
+ /// An async-enumerable sequence to retain distinct elements for.
+ /// An asynchronous (cancellable) function to compute the comparison key for each element.
+ /// Equality comparer for source elements.
+ /// An async-enumerable sequence only containing the distinct elements, based on a computed key value, from the source sequence.
+ /// or or is null.
+ /// Usage of this operator should be considered carefully due to the maintenance of an internal lookup structure which can grow large.
public static IAsyncEnumerable Distinct(this IAsyncEnumerable source, Func> keySelector, IEqualityComparer? comparer)
{
if (source == null)
diff --git a/Ix.NET/Source/System.Interactive.Async/System/Linq/Operators/DistinctUntilChanged.cs b/Ix.NET/Source/System.Interactive.Async/System/Linq/Operators/DistinctUntilChanged.cs
index 020f5b9aaa..7eb215450c 100644
--- a/Ix.NET/Source/System.Interactive.Async/System/Linq/Operators/DistinctUntilChanged.cs
+++ b/Ix.NET/Source/System.Interactive.Async/System/Linq/Operators/DistinctUntilChanged.cs
@@ -10,6 +10,13 @@ namespace System.Linq
{
public static partial class AsyncEnumerableEx
{
+ ///
+ /// Returns an async-enumerable sequence that contains only distinct contiguous elements.
+ ///
+ /// The type of the elements in the source sequence.
+ /// An async-enumerable sequence to retain distinct contiguous elements for.
+ /// An async-enumerable sequence only containing the distinct contiguous elements from the source sequence.
+ /// is null.
public static IAsyncEnumerable DistinctUntilChanged(this IAsyncEnumerable source)
{
if (source == null)
@@ -18,6 +25,14 @@ public static IAsyncEnumerable DistinctUntilChanged(this IAsyn
return DistinctUntilChangedCore(source, comparer: null);
}
+ ///
+ /// Returns an async-enumerable sequence that contains only distinct contiguous elements according to the comparer.
+ ///
+ /// The type of the elements in the source sequence.
+ /// An async-enumerable sequence to retain distinct contiguous elements for.
+ /// Equality comparer for source elements.
+ /// An async-enumerable sequence only containing the distinct contiguous elements from the source sequence.
+ /// or is null.
public static IAsyncEnumerable DistinctUntilChanged(this IAsyncEnumerable source, IEqualityComparer? comparer)
{
if (source == null)
@@ -26,6 +41,15 @@ public static IAsyncEnumerable DistinctUntilChanged(this IAsyn
return DistinctUntilChangedCore(source, comparer);
}
+ ///
+ /// Returns an async-enumerable sequence that contains only distinct contiguous elements according to the keySelector.
+ ///
+ /// The type of the elements in the source sequence.
+ /// The type of the discriminator key computed for each element in the source sequence.
+ /// An async-enumerable sequence to retain distinct contiguous elements for, based on a computed key value.
+ /// A function to compute the comparison key for each element.
+ /// An async-enumerable sequence only containing the distinct contiguous elements, based on a computed key value, from the source sequence.
+ /// or is null.
public static IAsyncEnumerable DistinctUntilChanged(this IAsyncEnumerable source, Func keySelector)
{
if (source == null)
@@ -36,6 +60,16 @@ public static IAsyncEnumerable DistinctUntilChanged(this IAsyn
return DistinctUntilChangedCore(source, keySelector, comparer: null);
}
+ ///
+ /// Returns an async-enumerable sequence that contains only distinct contiguous elements according to the keySelector and the comparer.
+ ///
+ /// The type of the elements in the source sequence.
+ /// The type of the discriminator key computed for each element in the source sequence.
+ /// An async-enumerable sequence to retain distinct contiguous elements for, based on a computed key value.
+ /// A function to compute the comparison key for each element.
+ /// Equality comparer for computed key values.
+ /// An async-enumerable sequence only containing the distinct contiguous elements, based on a computed key value, from the source sequence.
+ /// or or is null.
public static IAsyncEnumerable DistinctUntilChanged(this IAsyncEnumerable source, Func keySelector, IEqualityComparer? comparer)
{
if (source == null)
@@ -46,6 +80,15 @@ public static IAsyncEnumerable DistinctUntilChanged(this IAsyn
return DistinctUntilChangedCore(source, keySelector, comparer);
}
+ ///
+ /// Returns an async-enumerable sequence that contains only distinct contiguous elements according to the asynchronous keySelector.
+ ///
+ /// The type of the elements in the source sequence.
+ /// The type of the discriminator key computed for each element in the source sequence.
+ /// An async-enumerable sequence to retain distinct contiguous elements for, based on a computed key value.
+ /// A function to compute the comparison key for each element asynchronously.
+ /// An async-enumerable sequence only containing the distinct contiguous elements, based on a computed key value, from the source sequence.
+ /// or is null.
public static IAsyncEnumerable DistinctUntilChanged(this IAsyncEnumerable source, Func> keySelector)
{
if (source == null)
@@ -57,6 +100,15 @@ public static IAsyncEnumerable DistinctUntilChanged(this IAsyn
}
#if !NO_DEEP_CANCELLATION
+ ///
+ /// Returns an async-enumerable sequence that contains only distinct contiguous elements according to the asynchronous and cancellable keySelector.
+ ///
+ /// The type of the elements in the source sequence.
+ /// The type of the discriminator key computed for each element in the source sequence.
+ /// An async-enumerable sequence to retain distinct contiguous elements for, based on a computed key value.
+ /// A function to compute the comparison key for each element asynchronously while supporting cancellation.
+ /// An async-enumerable sequence only containing the distinct contiguous elements, based on a computed key value, from the source sequence.
+ /// or is null.
public static IAsyncEnumerable DistinctUntilChanged(this IAsyncEnumerable source, Func> keySelector)
{
if (source == null)
@@ -68,6 +120,16 @@ public static IAsyncEnumerable DistinctUntilChanged(this IAsyn
}
#endif
+ ///
+ /// Returns an async-enumerable sequence that contains only distinct contiguous elements according to the asynchronous keySelector and the comparer.
+ ///
+ /// The type of the elements in the source sequence.
+ /// The type of the discriminator key computed for each element in the source sequence.
+ /// An async-enumerable sequence to retain distinct contiguous elements for, based on a computed key value.
+ /// A function to compute the comparison key for each element asynchronously.
+ /// Equality comparer for computed key values.
+ /// An async-enumerable sequence only containing the distinct contiguous elements, based on a computed key value, from the source sequence.
+ /// or or is null.
public static IAsyncEnumerable DistinctUntilChanged(this IAsyncEnumerable source, Func> keySelector, IEqualityComparer? comparer)
{
if (source == null)
@@ -79,6 +141,16 @@ public static IAsyncEnumerable DistinctUntilChanged(this IAsyn
}
#if !NO_DEEP_CANCELLATION
+ ///
+ /// Returns an async-enumerable sequence that contains only distinct contiguous elements according to the asynchronous and cancellable keySelector and the comparer.
+ ///
+ /// The type of the elements in the source sequence.
+ /// The type of the discriminator key computed for each element in the source sequence.
+ /// An async-enumerable sequence to retain distinct contiguous elements for, based on a computed key value.
+ /// A function to compute the comparison key for each element asynchronously while supporting cancellation.
+ /// Equality comparer for computed key values.
+ /// An async-enumerable sequence only containing the distinct contiguous elements, based on a computed key value, from the source sequence.
+ /// or or is null.
public static IAsyncEnumerable DistinctUntilChanged(this IAsyncEnumerable source, Func> keySelector, IEqualityComparer comparer)
{
if (source == null)
diff --git a/Ix.NET/Source/System.Interactive.Async/System/Linq/Operators/Do.cs b/Ix.NET/Source/System.Interactive.Async/System/Linq/Operators/Do.cs
index a13ad38ec8..b97c8f38f8 100644
--- a/Ix.NET/Source/System.Interactive.Async/System/Linq/Operators/Do.cs
+++ b/Ix.NET/Source/System.Interactive.Async/System/Linq/Operators/Do.cs
@@ -12,6 +12,15 @@ public static partial class AsyncEnumerableEx
{
// REVIEW: Should we convert Task-based overloads to ValueTask?
+ ///
+ /// Invokes an action for each element in the async-enumerable sequence, and propagates all observer messages through the result sequence.
+ /// This method can be used for debugging, logging, etc. of query behavior by intercepting the message stream to run arbitrary actions for messages on the pipeline.
+ ///
+ /// The type of the elements in the source sequence.
+ /// Source sequence.
+ /// Action to invoke for each element in the async-enumerable sequence.
+ /// The source sequence with the side-effecting behavior applied.
+ /// or is null.
public static IAsyncEnumerable Do(this IAsyncEnumerable source, Action onNext)
{
if (source == null)
@@ -22,6 +31,16 @@ public static IAsyncEnumerable Do(this IAsyncEnumerable
+ /// Invokes an action for each element in the async-enumerable sequence and invokes an action upon graceful termination of the async-enumerable sequence.
+ /// This method can be used for debugging, logging, etc. of query behavior by intercepting the message stream to run arbitrary actions for messages on the pipeline.
+ ///
+ /// The type of the elements in the source sequence.
+ /// Source sequence.
+ /// Action to invoke for each element in the async-enumerable sequence.
+ /// Action to invoke upon graceful termination of the async-enumerable sequence.
+ /// The source sequence with the side-effecting behavior applied.
+ /// or or is null.
public static IAsyncEnumerable Do(this IAsyncEnumerable source, Action onNext, Action onCompleted)
{
if (source == null)
@@ -34,6 +53,16 @@ public static IAsyncEnumerable Do(this IAsyncEnumerable
+ /// Invokes an action for each element in the async-enumerable sequence and invokes an action upon exceptional termination of the async-enumerable sequence.
+ /// This method can be used for debugging, logging, etc. of query behavior by intercepting the message stream to run arbitrary actions for messages on the pipeline.
+ ///
+ /// The type of the elements in the source sequence.
+ /// Source sequence.
+ /// Action to invoke for each element in the async-enumerable sequence.
+ /// Action to invoke upon exceptional termination of the async-enumerable sequence.
+ /// The source sequence with the side-effecting behavior applied.
+ /// or or is null.
public static IAsyncEnumerable Do(this IAsyncEnumerable source, Action onNext, Action onError)
{
if (source == null)
@@ -46,6 +75,17 @@ public static IAsyncEnumerable Do(this IAsyncEnumerable
+ /// Invokes an action for each element in the async-enumerable sequence and invokes an action upon graceful or exceptional termination of the async-enumerable sequence.
+ /// This method can be used for debugging, logging, etc. of query behavior by intercepting the message stream to run arbitrary actions for messages on the pipeline.
+ ///
+ /// The type of the elements in the source sequence.
+ /// Source sequence.
+ /// Action to invoke for each element in the async-enumerable sequence.
+ /// Action to invoke upon exceptional termination of the async-enumerable sequence.
+ /// Action to invoke upon graceful termination of the async-enumerable sequence.
+ /// The source sequence with the side-effecting behavior applied.
+ /// or or or is null.
public static IAsyncEnumerable Do(this IAsyncEnumerable source, Action onNext, Action onError, Action onCompleted)
{
if (source == null)
@@ -60,6 +100,15 @@ public static IAsyncEnumerable Do(this IAsyncEnumerable
+ /// Invokes and awaits an asynchronous action for each element in the async-enumerable sequence, and propagates all observer messages through the result sequence.
+ /// This method can be used for debugging, logging, etc. of query behavior by intercepting the message stream to run arbitrary actions for messages on the pipeline.
+ ///
+ /// The type of the elements in the source sequence.
+ /// Source sequence.
+ /// Action to invoke and await for each element in the async-enumerable sequence.
+ /// The source sequence with the side-effecting behavior applied.
+ /// or is null.
public static IAsyncEnumerable Do(this IAsyncEnumerable source, Func onNext)
{
if (source == null)
@@ -70,6 +119,16 @@ public static IAsyncEnumerable Do(this IAsyncEnumerable
+ /// Invokes and awaits an asynchronous action for each element in the async-enumerable sequence, then invokes and awaits an asynchronous an action upon graceful termination of the async-enumerable sequence.
+ /// This method can be used for debugging, logging, etc. of query behavior by intercepting the message stream to run arbitrary actions for messages on the pipeline.
+ ///
+ /// The type of the elements in the source sequence.
+ /// Source sequence.
+ /// Action to invoke and await for each element in the async-enumerable sequence.
+ /// Action to invoke and await upon graceful termination of the async-enumerable sequence.
+ /// The source sequence with the side-effecting behavior applied.
+ /// or or is null.
public static IAsyncEnumerable Do(this IAsyncEnumerable source, Func onNext, Func onCompleted)
{
if (source == null)
@@ -82,6 +141,16 @@ public static IAsyncEnumerable Do(this IAsyncEnumerable
+ /// Invokes and awaits an asynchronous action for each element in the async-enumerable sequence, then invokes and awaits an asynchronous action upon exceptional termination of the async-enumerable sequence.
+ /// This method can be used for debugging, logging, etc. of query behavior by intercepting the message stream to run arbitrary actions for messages on the pipeline.
+ ///
+ /// The type of the elements in the source sequence.
+ /// Source sequence.
+ /// Action to invoke and await for each element in the async-enumerable sequence.
+ /// Action to invoke and await upon exceptional termination of the async-enumerable sequence.
+ /// The source sequence with the side-effecting behavior applied.
+ /// or or is null.
public static IAsyncEnumerable Do(this IAsyncEnumerable source, Func onNext, Func onError)
{
if (source == null)
@@ -94,6 +163,17 @@ public static IAsyncEnumerable Do(this IAsyncEnumerable
+ /// Invokes and awaits an asynchronous action for each element in the async-enumerable sequence, then invokes and awaits an asynchronous action upon graceful or exceptional termination of the async-enumerable sequence.
+ /// This method can be used for debugging, logging, etc. of query behavior by intercepting the message stream to run arbitrary actions for messages on the pipeline.
+ ///
+ /// The type of the elements in the source sequence.
+ /// Source sequence.
+ /// Action to invoke and await for each element in the async-enumerable sequence.
+ /// Action to invoke and await upon exceptional termination of the async-enumerable sequence.
+ /// Action to invoke and await upon graceful termination of the async-enumerable sequence.
+ /// The source sequence with the side-effecting behavior applied.
+ /// or or or is null.
public static IAsyncEnumerable Do(this IAsyncEnumerable source, Func onNext, Func onError, Func onCompleted)
{
if (source == null)
@@ -109,6 +189,15 @@ public static IAsyncEnumerable Do(this IAsyncEnumerable
+ /// Invokes and awaits an asynchronous (cancellable) action for each element in the async-enumerable sequence, and propagates all observer messages through the result sequence.
+ /// This method can be used for debugging, logging, etc. of query behavior by intercepting the message stream to run arbitrary actions for messages on the pipeline.
+ ///
+ /// The type of the elements in the source sequence.
+ /// Source sequence.
+ /// Action to invoke and await for each element in the async-enumerable sequence while supporting cancellation.
+ /// The source sequence with the side-effecting behavior applied.
+ /// or is null.
public static IAsyncEnumerable Do(this IAsyncEnumerable source, Func onNext)
{
if (source == null)
@@ -119,6 +208,16 @@ public static IAsyncEnumerable Do(this IAsyncEnumerable
+ /// Invokes and awaits an asynchronous (cancellable) action for each element in the async-enumerable sequence, then invokes and awaits an asynchronous (cancellable) an action upon graceful termination of the async-enumerable sequence.
+ /// This method can be used for debugging, logging, etc. of query behavior by intercepting the message stream to run arbitrary actions for messages on the pipeline.
+ ///
+ /// The type of the elements in the source sequence.
+ /// Source sequence.
+ /// Action to invoke and await for each element in the async-enumerable sequence while supporting cancellation.
+ /// Action to invoke and await upon graceful termination of the async-enumerable sequence while supporting cancellation.
+ /// The source sequence with the side-effecting behavior applied.
+ /// or or is null.
public static IAsyncEnumerable Do(this IAsyncEnumerable source, Func onNext, Func onCompleted)
{
if (source == null)
@@ -131,6 +230,16 @@ public static IAsyncEnumerable Do(this IAsyncEnumerable
+ /// Invokes and awaits an asynchronous (cancellable) action for each element in the async-enumerable sequence, then invokes and awaits an asynchronous (cancellable) action upon exceptional termination of the async-enumerable sequence.
+ /// This method can be used for debugging, logging, etc. of query behavior by intercepting the message stream to run arbitrary actions for messages on the pipeline.
+ ///
+ /// The type of the elements in the source sequence.
+ /// Source sequence.
+ /// Action to invoke and await for each element in the async-enumerable sequence while supporting cancellation.
+ /// Action to invoke and await upon exceptional termination of the async-enumerable sequence while supporting cancellation.
+ /// The source sequence with the side-effecting behavior applied.
+ /// or or is null.
public static IAsyncEnumerable Do(this IAsyncEnumerable source, Func onNext, Func onError)
{
if (source == null)
@@ -143,6 +252,17 @@ public static IAsyncEnumerable Do(this IAsyncEnumerable
+ /// Invokes and awaits an asynchronous (cancellable) action for each element in the async-enumerable sequence, then invokes and awaits an asynchronous (cancellable) action upon graceful or exceptional termination of the async-enumerable sequence.
+ /// This method can be used for debugging, logging, etc. of query behavior by intercepting the message stream to run arbitrary actions for messages on the pipeline.
+ ///
+ /// The type of the elements in the source sequence.
+ /// Source sequence.
+ /// Action to invoke and await for each element in the async-enumerable sequence while supporting cancellation.
+ /// Action to invoke and await upon exceptional termination of the async-enumerable sequence while supporting cancellation.
+ /// Action to invoke and await upon graceful termination of the async-enumerable sequence while supporting cancellation.
+ /// The source sequence with the side-effecting behavior applied.
+ /// or or or is null.
public static IAsyncEnumerable Do(this IAsyncEnumerable source, Func onNext, Func onError, Func onCompleted)
{
if (source == null)
@@ -158,6 +278,15 @@ public static IAsyncEnumerable Do(this IAsyncEnumerable
+ /// Invokes the observer's methods for each message in the source async-enumerable sequence.
+ /// This method can be used for debugging, logging, etc. of query behavior by intercepting the message stream to run arbitrary actions for messages on the pipeline.
+ ///
+ /// The type of the elements in the source sequence.
+ /// Source sequence.
+ /// Observer whose methods to invoke as part of the source sequence's observation.
+ /// The source sequence with the side-effecting behavior applied.
+ /// or is null.
public static IAsyncEnumerable Do(this IAsyncEnumerable source, IObserver observer)
{
if (source == null)
diff --git a/Ix.NET/Source/System.Interactive.Async/System/Linq/Operators/Expand.cs b/Ix.NET/Source/System.Interactive.Async/System/Linq/Operators/Expand.cs
index 3574a7396e..361db62806 100644
--- a/Ix.NET/Source/System.Interactive.Async/System/Linq/Operators/Expand.cs
+++ b/Ix.NET/Source/System.Interactive.Async/System/Linq/Operators/Expand.cs
@@ -10,6 +10,13 @@ namespace System.Linq
{
public static partial class AsyncEnumerableEx
{
+ ///
+ /// Expands (breadth first) the async-enumerable sequence by recursively applying a selector function to generate more sequences at each recursion level.
+ ///
+ /// Source sequence element type.
+ /// Source async-enumerable sequence.
+ /// Selector function to retrieve the next sequence to expand.
+ /// Sequence with results from the recursive expansion of the source sequence.
public static IAsyncEnumerable Expand(this IAsyncEnumerable source, Func> selector)
{
if (source == null)
@@ -37,6 +44,13 @@ await foreach (var item in queue.Dequeue().WithCancellation(cancellationToken).C
}
}
+ ///
+ /// Expands (breadth first) the async-enumerable sequence by recursively applying an asynchronous selector function to generate more sequences at each recursion level.
+ ///
+ /// Source sequence element type.
+ /// Source async-enumerable sequence.
+ /// Asynchronous selector function to retrieve the next sequence to expand.
+ /// Sequence with results from the recursive expansion of the source sequence.
public static IAsyncEnumerable Expand(this IAsyncEnumerable source, Func>> selector)
{
if (source == null)
@@ -65,6 +79,13 @@ await foreach (var item in queue.Dequeue().WithCancellation(cancellationToken).C
}
#if !NO_DEEP_CANCELLATION
+ ///
+ /// Expands (breadth first) the async-enumerable sequence by recursively applying an asynchronous (cancellable) selector function to generate more sequences at each recursion level.
+ ///
+ /// Source sequence element type.
+ /// Source async-enumerable sequence.
+ /// Asynchronous (cancellable) selector function to retrieve the next sequence to expand.
+ /// Sequence with results from the recursive expansion of the source sequence.
public static IAsyncEnumerable Expand(this IAsyncEnumerable source, Func>> selector)
{
if (source == null)
diff --git a/Ix.NET/Source/System.Interactive.Async/System/Linq/Operators/Finally.cs b/Ix.NET/Source/System.Interactive.Async/System/Linq/Operators/Finally.cs
index 46ed242765..11862c28c3 100644
--- a/Ix.NET/Source/System.Interactive.Async/System/Linq/Operators/Finally.cs
+++ b/Ix.NET/Source/System.Interactive.Async/System/Linq/Operators/Finally.cs
@@ -10,6 +10,14 @@ namespace System.Linq
{
public static partial class AsyncEnumerableEx
{
+ ///
+ /// Invokes a specified action after the source async-enumerable sequence terminates gracefully or exceptionally.
+ ///
+ /// The type of the elements in the source sequence.
+ /// Source sequence.
+ /// Action to invoke after the source async-enumerable sequence terminates.
+ /// Source sequence with the action-invoking termination behavior applied.
+ /// or is null.
public static IAsyncEnumerable Finally(this IAsyncEnumerable source, Action finallyAction)
{
if (source == null)
@@ -35,6 +43,14 @@ await foreach (var item in source.WithCancellation(cancellationToken).ConfigureA
}
}
+ ///
+ /// Invokes a specified asynchronous action after the source async-enumerable sequence terminates gracefully or exceptionally.
+ ///
+ /// The type of the elements in the source sequence.
+ /// Source sequence.
+ /// Action to invoke and await asynchronously after the source async-enumerable sequence terminates.
+ /// Source sequence with the action-invoking termination behavior applied.
+ /// or is null.
public static IAsyncEnumerable Finally(this IAsyncEnumerable source, Func finallyAction)
{
if (source == null)
diff --git a/Ix.NET/Source/System.Interactive.Async/System/Linq/Operators/Generate.cs b/Ix.NET/Source/System.Interactive.Async/System/Linq/Operators/Generate.cs
index 2ac8feea91..ba62685463 100644
--- a/Ix.NET/Source/System.Interactive.Async/System/Linq/Operators/Generate.cs
+++ b/Ix.NET/Source/System.Interactive.Async/System/Linq/Operators/Generate.cs
@@ -11,6 +11,17 @@ public static partial class AsyncEnumerableEx
{
// REVIEW: Add async variant?
+ ///