CMSParallel ForEach TSource  Method (IEnumerable TSource , Action TSource , ParallelOptions, Int32)Kentico 8.0 API Reference
Executes a for each operation on an System.Collections.IEnumerable{TSource} in which iterations may run in parallel. Wraps the operation into CMSThread to ensure proper context.

Namespace: CMS.Base
Assembly: CMS.Base (in CMS.Base.dll) Version: 8.0.0.0 (8.0.5239.26125)

Parameters

source
Type: OnlineSystem.Collections.Generic IEnumerable TSource 
Parallel sources
body
Type: OnlineSystem Action TSource 
Executing body
options (Optional)
Type: OnlineSystem.Threading.Tasks ParallelOptions
Options for executing
count (Optional)
Type: OnlineSystem Int32
Number of the items that will be executed. If set, optimizes the performance in case there is none or one items in the source.

Return Value

Type: OnlineParallelLoopResult
See Also