Exemplo n.º 1
0
        public static IEnumerator AddAsync(int a, int b, float delaySeconds)
        {
            IAsyncResult ar = TestApi.Begin_AddAsync(Coroutines.AsyncCallback, a, b, delaySeconds);

            yield return(ar);

            yield return(Result.New(TestApi.End_AddAsync(ar)));
        }
Exemplo n.º 2
0
        IEnumerator TestTooFastCallback()
        {
            IAsyncResult ar = TestApi.Begin_TooFastCallback(Coroutines.AsyncCallback, 10);

            yield return(ar);

            int res = TestApi.End_TooFastCallback(ar);

            TestUtil.AssertEq(10, res);
        }
Exemplo n.º 3
0
        IEnumerator TestAsyncApi(float delaySeconds)
        {
            IAsyncResult ar = TestApi.Begin_AddAsync(Coroutines.AsyncCallback, 3, 5, delaySeconds);

            yield return(ar);

            int res = TestApi.End_AddAsync(ar);

            TestUtil.AssertEq(8, res);
        }