Performs the given Action sequential for each element in the enumerable.

Namespace: UnityThreading
Assembly: UnityThreading (in UnityThreading.dll) Version: 1.0.0.0 (1.0.0.0)

Syntax

C#
public static IEnumerable<Task> SequentialForEach<T>(
	this IEnumerable<T> that,
	Action<T> action,
	TaskDistributor target
)
Visual Basic
<ExtensionAttribute> _
Public Shared Function SequentialForEach(Of T) ( _
	that As IEnumerable(Of T), _
	action As Action(Of T), _
	target As TaskDistributor _
) As IEnumerable(Of Task)
Visual C++
[ExtensionAttribute]
public:
generic<typename T>
static IEnumerable<Task^>^ SequentialForEach(
	IEnumerable<T>^ that, 
	Action<T>^ action, 
	TaskDistributor^ target
)

Parameters

that
Type: System.Collections.Generic..::..IEnumerable<(Of <(<'T>)>)>
action
Type: System..::..Action<(Of <(<'T>)>)>
The Action to perform for each element.
target
Type: UnityThreading..::..TaskDistributor
The TaskDistributor instance on which the operation should perform.

Type Parameters

T

Return Value

IEnumerable of created tasks.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IEnumerable<(Of <(<'T>)>)>. When you use instance method syntax to call this method, omit the first parameter. For more information, see or .

See Also