예제 #1
0
 static async Task <TResponse> Send <TRequest, TResponse>(TRequest request)
 {
     using (var channelFactory = ClientChannelBuilder.GetChannelFactory <TRequest, TResponse>(serverUrl))
         using (var client = channelFactory.CreateChannel())
         {
             return(await client.SendRequest(request)
                    .ConfigureAwait(false));
         }
 }
예제 #2
0
 static async Task <TResponse> Send <TRequest, TResponse>(TRequest request)
 {
     using (ChannelFactory <ICallbackService <TRequest, TResponse> > channelFactory = ClientChannelBuilder.GetChannelFactory <TRequest, TResponse>(serverUrl))
         using (ICallbackService <TRequest, TResponse> client = channelFactory.CreateChannel())
         {
             return(await client.SendRequest(request));
         }
 }