Пример #1
0
 private void TransactionCreated(RpcServerTransaction tx)
 {
     if (BeforeTransactionCreated != null)
     {
         BeforeTransactionCreated(tx);
     }
     _dispatcher.ProcessTransaction(tx);
 }
Пример #2
0
        public RpcDuplexClient(ServerUri serverUri)
        {
            _serverUri = serverUri;

            _channel = RpcProxyFactory.GetChannel(serverUri);
            _timeout = _channel.Timeout;

            _connection = _channel.CreateConnection(serverUri, RpcConnectionMode.Duplex);
            _connection.Disconnected += new Action <RpcConnection>(
                (c) =>
            {
                OnDisconnected();
            }
                );
            _connection.TransactionCreated += new Action <RpcConnection, RpcServerTransaction>(
                (c, tx) =>
            {
                _dispatcher.ProcessTransaction(tx);
            }
                );

            _dispatcher = new RpcServiceDispather("duplex");
        }