public static IEnumerable <T> Oscillate <T>(this IEnumerable <T> enumerable, BaseOscillator oscillator) { var enumerator = enumerable.GetEnumerator(); while (enumerator.MoveNext()) { T current = enumerator.Current; oscillator.Test(); yield return(current); } }
public static bool Oscillate(this bool loopTest, BaseOscillator oscillator) { oscillator.Test(); return(loopTest); }