コード例 #1
0
        public MessageEnvelope CallRaw(byte[] data, string routingKey = "",
                                       IBasicProperties properties    = null,
                                       RpcSendOptions options         = null)
        {
            _sendRequestsRaw.Add(Tuple.Create(new MessageEnvelope(properties, data), routingKey, options));

            return(new MessageEnvelope(new BasicProperties(), new byte[0]));
        }
コード例 #2
0
        public TResponse Call <TRequest, TResponse>(TRequest request, string routingKey = "",
                                                    IBasicProperties properties         = null,
                                                    RpcSendOptions options = null)
            where TRequest : class where TResponse : class
        {
            var reply = _rpcFunc(request);

            _sendRequests.Add(Tuple.Create(new MessageEnvelope(properties, new byte[0]), routingKey, options));

            return((TResponse)reply);
        }