AbstractFileSystemJobCancellableForEachT Method (CancellationToken, IEnumerableT, ActionT, Int32) |
Enumerates through collection checking cancellationToken
before each iteration and performing action on each item in the collection.
Namespace: CMS.ContinuousIntegration.InternalAssembly: CMS.ContinuousIntegration (in CMS.ContinuousIntegration.dll) Version: 12.0.0
Syntax protected void CancellableForEach<T>(
CancellationToken cancellationToken,
IEnumerable<T> collection,
Action<T, int> action
)
Parameters
- cancellationToken
- Type: System.ThreadingCancellationToken
Token providing cancellation functionality. - collection
- Type: System.Collections.GenericIEnumerableT
Collection of items the action should be performed on. - action
- Type: SystemActionT, Int32
Action that should be performed on each item of collection.
Type Parameters
- T
- Type of items in the collection.
Exceptions See Also