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); }
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); }