예제 #1
0
        public void CollectAsyncTest()
        {
            var testAsync = EnumeratorUtility.CollectAsync(DoTest_2());

            Assert.IsNotNull(testAsync);

            var testEnum = EnumeratorUtility.Collect(testAsync,
                                                     state =>
            {
                if (state == null)
                {
                    return;
                }
                Console.WriteLine(state);
            },
                                                     () =>
            {
                Console.WriteLine("Conplete");
            });

            Assert.IsNotNull(testEnum);
            while (testEnum.MoveNext())
            {
            }
        }
예제 #2
0
        public void CollectTest1()
        {
            var testEnum = EnumeratorUtility.Collect(
                new IEnumerator[] { DoTest_0(), DoTest_1() },
                state =>
            {
                if (state == null)
                {
                    return;
                }
                Console.WriteLine(state);
            },
                () =>
            {
                Console.WriteLine("Conplete");
            });

            Assert.IsNotNull(testEnum);
            while (testEnum.MoveNext())
            {
            }
        }