| LinqExtensionsParallelForEachAsCurrentIdentityT Method |
Runs the action in parallel for each item in the list, as the identity in the context
This should be used instead of Parallel.ForEach, since Parallel.ForEach is not guaranteed to keep the impersonation context.
More on this can be found here: https://stackoverflow.com/questions/26065155/parallel-foreach-changes-impersonation-context
Namespace:
Omada.OE.Model.Extensions
Assembly:
Omada.OE.Model (in Omada.OE.Model.dll) Version: 15.0.0.0
Syntaxpublic static void ParallelForEachAsCurrentIdentity<T>(
this List<T> list,
ParallelOptions options,
Action<T, ParallelLoopState, long> action
)
Parameters
- list
- Type: System.Collections.GenericListT
- options
- Type: System.Threading.TasksParallelOptions
- action
- Type: SystemActionT, ParallelLoopState, Int64
Type Parameters
- T
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
ListT. 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).
See Also