示例#1
0
        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);
            }
        }
示例#2
0
        public static bool Oscillate(this bool loopTest, BaseOscillator oscillator)
        {
            oscillator.Test();

            return(loopTest);
        }