+ [MonoTODO]
+ public static ParallelLoopResult For (long fromInclusive, long toExclusive, Action<long, ParallelLoopState> body)
+ {
+ return For (fromInclusive, toExclusive, ParallelOptions.Default, body);
+ }
+
+ [MonoTODO]
+ public static ParallelLoopResult For (long fromInclusive, long toExclusive, ParallelOptions parallelOptions, Action<long> body)
+ {
+ return For (fromInclusive, toExclusive, parallelOptions, (index, state) => body (index));
+ }
+
+ [MonoTODO]
+ public static ParallelLoopResult For (long fromInclusive, long toExclusive, ParallelOptions parallelOptions, Action<long, ParallelLoopState> body)
+ {
+ return For<object> (fromInclusive, toExclusive, parallelOptions, () => null, (i, s, l) => { body (i, s); return null; }, _ => {});
+ }
+
+ [MonoTODO]
+ public static ParallelLoopResult For<TLocal> (long fromInclusive,
+ long toExclusive,
+ Func<TLocal> localInit,
+ Func<long, ParallelLoopState, TLocal, TLocal> body,
+ Action<TLocal> localFinally)
+ {
+ return For<TLocal> (fromInclusive, toExclusive, ParallelOptions.Default, localInit, body, localFinally);
+ }
+
+ [MonoTODO ("See how this can be refactored with the above For implementation")]
+ public static ParallelLoopResult For<TLocal> (long fromInclusive,
+ long toExclusive,
+ ParallelOptions parallelOptions,
+ Func<TLocal> localInit,
+ Func<long, ParallelLoopState, TLocal, TLocal> body,
+ Action<TLocal> localFinally)
+ {
+ if (body == null)
+ throw new ArgumentNullException ("body");
+ if (localInit == null)
+ throw new ArgumentNullException ("localInit");
+ if (localFinally == null)
+ throw new ArgumentNullException ("localFinally");
+ if (parallelOptions == null)
+ throw new ArgumentNullException ("options");
+ if (fromInclusive >= toExclusive)
+ return new ParallelLoopResult (null, true);
+
+ throw new NotImplementedException ();
+ }
+
+#endregion
+
+#region Foreach