Exemple #1
0
 public RpcClientFactory(ITcpClientChannelFactory channelFactory,
                         ITcpClientEventLoopGroupFactory clientEventLoopGroupFactory,
                         IEnumerable <IRpcResponseObserver> handlers)
 {
     _clientEventLoopGroupFactory = clientEventLoopGroupFactory;
     _channelFactory = channelFactory;
     _handlers       = handlers;
 }
 /// <summary>
 ///     Initialize a new instance of RPClient
 /// </summary>
 /// <param name="channelFactory"></param>
 /// <param name="certificate"></param>
 /// <param name="clientConfig">rpc node config</param>
 /// <param name="handlers"></param>
 /// <param name="clientEventLoopGroupFactory"></param>
 public RpcClient(ITcpClientChannelFactory channelFactory,
                  X509Certificate2 certificate,
                  IRpcClientConfig clientConfig,
                  IEnumerable <IRpcResponseObserver> handlers,
                  ITcpClientEventLoopGroupFactory clientEventLoopGroupFactory)
     : base(channelFactory, Log.Logger.ForContext(MethodBase.GetCurrentMethod().DeclaringType),
            clientEventLoopGroupFactory)
 {
     _channelFactory       = channelFactory;
     _rpcResponseObservers = handlers;
     _certificate          = certificate;
     _clientConfig         = clientConfig;
 }
Exemple #3
0
 public TestTcpClient(ITcpClientChannelFactory tcpClientChannelFactory,
                      ILogger logger,
                      ITcpClientEventLoopGroupFactory eventLoopGroupFactory) : base(tcpClientChannelFactory, logger, eventLoopGroupFactory)
 {
     Channel = Substitute.For <IChannel>();
 }
Exemple #4
0
 protected TcpClient(ITcpClientChannelFactory channelFactory, ILogger logger, ITcpClientEventLoopGroupFactory loopGroupFactory)
     : base(channelFactory, logger, loopGroupFactory)
 {
 }