CollectionExtensionsAllParallelTSource Method

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

Definition

Namespace: Gemstone.Collections.CollectionExtensions
Assembly: Gemstone.Common (in Gemstone.Common.dll) Version: 1.0.110 -- Release Build+3e0464f4461df4d3e1175b13966eb47ff832554d
public static bool AllParallel<TSource>(
	this IEnumerable<TSource>? source,
	Func<TSource, bool> predicate,
	ParallelOptions? options = null
)

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

ArgumentNullExceptionsource or predicate is null.

See Also