private static async Task ThriftHello(RpcContractThrift.IHelloService helloServiceThrift, string helloword = "world") { Console.WriteLine("ThriftHello---------------------------------------------------------------------------"); var callNameVoid = await helloServiceThrift.CallNameVoidAsync(); Console.WriteLine(callNameVoid); await helloServiceThrift.CallNameAsync(helloword); Console.WriteLine("CallName called"); await helloServiceThrift.CallVoidAsync(); Console.WriteLine("CallVoid called"); var hello = await helloServiceThrift.HelloAsync(helloword); Console.WriteLine(hello); var helloResult = await helloServiceThrift.SayHelloAsync(helloword + "perfect world"); Console.WriteLine($"{helloResult.Name},{helloResult.Gender},{helloResult.Head}"); helloResult.Name = helloword + "show perfect world"; var showResult = await helloServiceThrift.ShowHelloAsync(helloResult); Console.WriteLine(showResult); ThriftHelloCall(helloServiceThrift, helloword); }
private static void ThriftHello(RpcContractThrift.IHelloService helloServiceThrift, string helloword = "world") { var token = CancellationToken.None; var callNameVoid = helloServiceThrift.CallNameVoid(); Console.WriteLine(callNameVoid); helloServiceThrift.CallName(helloword); Console.WriteLine("CallName called"); helloServiceThrift.CallVoid(); Console.WriteLine("CallVoid called"); var hello = helloServiceThrift.Hello(helloword); Console.WriteLine(hello); var helloResult = helloServiceThrift.SayHello(helloword + "perfect world"); Console.WriteLine($"{helloResult.Name},{helloResult.Gender},{helloResult.Head}", token); helloResult.Name = helloword + "show perfect world"; var showResult = helloServiceThrift.ShowHello(helloResult); Console.WriteLine(showResult); }