示例#1
0
        public static void TestComposing2()
        {
            Task <int> t =
                AsyncOpers.RemoteIncrement(1)
                .ThenCompose <int, int>((i) => AsyncOpers.RemoteIncrement(i));

            Console.WriteLine("Expected result is 3, result is {0}", t.Result);
        }
示例#2
0
        public static void TestComposing1()
        {
            var t =
                AsyncOpers.RemoteIncrement(1)
                .ContinueWith(ant => AsyncOpers.RemoteIncrement(ant.Result));

            Console.WriteLine("Expected result is 3, result is {0}", t.Result);
        }