コード例 #1
0
 public override void Dispose()
 {
     if (TheChannel != null)
     {
         TheChannel.ShutdownAsync().Wait();
     }
 }
コード例 #2
0
 public override void Open()
 {
     if (TheChannel.State != ChannelState.Ready)
     {
         TheChannel.ConnectAsync().Wait(ClientTimeout / 2);
     }
     if (TheChannel.State != ChannelState.Ready)
     {
         throw new Grpc.Core.RpcException(Status.DefaultCancelled, "connect failed");
     }
 }