public static void ForEach <TItem, TParam1>( this TItem[] source, RefIteratorAction <TItem, TParam1> action, ref TParam1 param1) { _ = Requires.NotNull(source); _ = Requires.NotNull(action); for (var i = 0; i < source.Length; i++) { action(source[i], ref param1); } }
public static void ForEach <TItem, TParam1, TParam2, TParam3, TParam4, TParam5, TParam6>( this TItem[] source, RefIteratorAction <TItem, TParam1, TParam2, TParam3, TParam4, TParam5, TParam6> action, ref TParam1 param1, ref TParam2 param2, ref TParam3 param3, ref TParam4 param4, ref TParam5 param5, ref TParam6 param6) { _ = Requires.NotNull(source); _ = Requires.NotNull(action); for (var i = 0; i < source.Length; i++) { action(source[i], ref param1, ref param2, ref param3, ref param4, ref param5, ref param6); } }