예제 #1
0
        public virtual Task <TResponse> RequestAsync <TRequest, TResponse>(TRequest request)
            where TRequest : class
            where TResponse : class
        {
            Preconditions.CheckNotNull(request, "request");

            return(rpc.Request <TRequest, TResponse>(request, x => { }));
        }
예제 #2
0
        /// <summary>
        /// 메세지 요청
        /// </summary>
        /// <param name="request">요청 메세지</param>
        /// <param name="messageConfig">메세지 요청 설정</param>
        /// <returns>응답 메세지</returns>
        public byte[] Request(byte[] request, MessageConfiguration messageConfig)
        {
            Preconditions.CheckNotNull(request, "request");

            var task = rpc.Request(request, messageConfig);

            task.Wait();
            return(task.Result);
        }
예제 #3
0
 public static void Request <A0, A1, A2, A3, A4, A5>(this IRpc rpc, string method, A0 a0, A1 a1, A2 a2, A3 a3,
                                                     A4 a4, A5 a5)
 {
     rpc.Request(Utf8String.From(method), a0, a1, a2, a3, a4, a5);
 }
예제 #4
0
 public static void Request <A0, A1, A2, A3>(this IRpc rpc, string method, A0 a0, A1 a1, A2 a2, A3 a3)
 {
     rpc.Request(Utf8String.From(method), a0, a1, a2, a3);
 }
예제 #5
0
 public static void Request <A0, A1>(this IRpc rpc, string method, A0 a0, A1 a1)
 {
     rpc.Request(Utf8String.From(method), a0, a1);
 }
예제 #6
0
 public static void Request(this IRpc rpc, string method)
 {
     rpc.Request(Utf8String.From(method));
 }