Click or drag to resize

CollectionExtensionsAllParallelTSource Method

Determines whether all elements of a sequence satisfy a condition with each item being tested in parallel.

Namespace: GSF.Collections
Assembly: GSF.Core (in GSF.Core.dll) Version: 2.4.207-beta+1781b796b2aa7a54013a031eb432fe4ccee31867
Syntax
public static bool AllParallel<TSource>(
	this IEnumerable<TSource> source,
	Func<TSource, bool> predicate,
	ParallelOptions options = null
)
View Source

Parameters

source  IEnumerableTSource
An IEnumerableT that contains the elements to apply the predicate to.
predicate  FuncTSource, Boolean
A function to test each element for a condition.
options  ParallelOptions  (Optional)
Any ParallelOptions to apply.

Type Parameters

TSource
The type of the elements of source.

Return Value

Boolean
true if every element of the source sequence passes the test in the specified predicate, or if the sequence is empty; otherwise, false.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IEnumerableTSource. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
Exceptions
ExceptionCondition
ArgumentNullExceptionsource or predicate is null.
See Also