public static async Task DependendRequestsExample(Math.MathClient client) { var numbers = new List <Num> { new Num { Num_ = 1 }, new Num { Num_ = 2 }, new Num { Num_ = 3 } }; Num sum; using (var sumCall = client.Sum()) { await sumCall.RequestStream.WriteAllAsync(numbers); sum = await sumCall.ResponseAsync; } DivReply result = await client.DivAsync(new DivArgs { Dividend = sum.Num_, Divisor = numbers.Count }); Console.WriteLine("Avg Result: " + result); }
public static async Task SumExample(Math.MathClient client) { var numbers = new List <Num> { new Num { Num_ = 1 }, new Num { Num_ = 2 }, new Num { Num_ = 3 } }; using (var call = client.Sum()) { await call.RequestStream.WriteAllAsync(numbers); Console.WriteLine("Sum Result: " + await call.ResponseAsync); } }