예제 #1
0
        public virtual async Task <AgentMessage <TResp> > CallAsync <TResp>(AgentMessage <RpcRequest> msg, TimeSpan timeout) where TResp : class
        {
            var resp = await Transport.CallServiceAsync <AgentMessage <RpcRequest>, AgentMessage>(msg.MessageType.ToString(), msg, timeout);

            return(resp?.To <TResp>());
        }
예제 #2
0
 public virtual async Task <TResp> CallAsync <TResp>(AgentMessage msg, TimeSpan timeout)
 {
     return(await Transport.CallServiceAsync <AgentMessage, TResp>(msg.MessageType.ToString(), msg, timeout));
 }