Early Preview
This is currently very much a preview. Please feel free to try things out,
but don't be upset if anything is not yet working. Feedback is welcome over on our
GitHub Dicussions page.
class System.​Threading.​Tasks.​TaskAsyncEnumerableExtensions
Assembly: System.Runtime
Inheritance: object → TaskAsyncEnumerableExtensions
Provides a set of static methods for configuring <see cref="T:System.Threading.Tasks.Task" /> -related behaviors on asynchronous enumerables and disposables.
Methods
ConfigureAwait​(IAsyncDisposable source,
bool continueOnCapturedContext)
Configures how awaits on the tasks returned from an async disposable will be performed.
Returns The configured async disposable.
source
The source async disposable.
continueOnCapturedContext
Whether to capture and marshal back to the current context.
public static
Runtime.​CompilerServices.​ConfiguredCancelableAsyncEnumerable<​T>
ConfigureAwait​(Collections.​Generic.​IAsyncEnumerable<​T> source,
bool continueOnCapturedContext)
Configures how awaits on the tasks returned from an async iteration will be performed.
Returns The configured enumerable.
source
The source enumerable being iterated.
continueOnCapturedContext
Whether to capture and marshal back to the current context.
public static
Collections.​Generic.​IEnumerable<​T>
ToBlockingEnumerable​(Collections.​Generic.​IAsyncEnumerable<​T> source,
CancellationToken cancellationToken = null)
Converts an <see cref="T:System.Collections.Generic.IAsyncEnumerable`1" /> instance into an <see cref="T:System.Collections.Generic.IEnumerable`1" /> that enumerates elements in a blocking manner.
Returns An <see cref="T:System.Collections.Generic.IEnumerable`1" /> instance that enumerates the source <see cref="T:System.Collections.Generic.IAsyncEnumerable`1" /> in a blocking manner.
source
The source enumerable being iterated.
cancellationToken
The <see cref="T:System.Threading.CancellationToken" /> to use.
public static
Runtime.​CompilerServices.​ConfiguredCancelableAsyncEnumerable<​T>
WithCancellation​(Collections.​Generic.​IAsyncEnumerable<​T> source,
CancellationToken cancellationToken)
Sets the <see cref="T:System.Threading.CancellationToken" /> to be passed to <see cref="M:System.Collections.Generic.IAsyncEnumerable`1.GetAsyncEnumerator(System.Threading.CancellationToken)" /> when iterating.
Returns The configured enumerable.
source
The source enumerable being iterated.
cancellationToken
The <see cref="T:System.Threading.CancellationToken" /> to use.
public
bool
Equals​(object obj)
Inherited from object
Determines whether the specified object is equal to the current object.
Returns <see langword="true" /> if the specified object is equal to the current object; otherwise, <see langword="false" /> .
obj
The object to compare with the current object.
protected
void
Finalize​()
Inherited from object
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
public
int
GetHashCode​()
Inherited from object
Serves as the default hash function.
Returns A hash code for the current object.
public
Type
GetType​()
Inherited from object
Gets the <see cref="T:System.Type" /> of the current instance.
Returns The exact runtime type of the current instance.
protected
object
MemberwiseClone​()
Inherited from object
Creates a shallow copy of the current <see cref="T:System.Object" /> .
Returns A shallow copy of the current <see cref="T:System.Object" /> .
public
string
ToString​()
Inherited from object
Returns a string that represents the current object.
Returns A string that represents the current object.