Example #1
0
        private GamMatrixAPI.ReplyResponse SendRequest(GamMatrixAPI.HandlerRequest request)
        {
            var msg = new GamMatrixAPI.CoreAPIMessageRequest
            {
                Type      = GamMatrixAPI.CoreAPIMessageType.SingleRequest,
                ClassName = new List <string> {
                    request.GetType().Name
                },
                SerializedRequest = new List <string> {
                    Encoding.UTF8.GetString(Serialize(request))
                }
            };

            return((GamMatrixAPI.ReplyResponse)
                   Deserialize(typeof(GamMatrixAPI.ReplyResponse),
                               Encoding.UTF8.GetBytes(Send(msg, _timeoutMs))));
        }
Example #2
0
 public GamMatrixAPI.ReplyResponse SingleRequest(GamMatrixAPI.HandlerRequest request)
 {
     return(SendRequest(request));
 }
Example #3
0
        public IAsyncResult BeginSingleRequest(GamMatrixAPI.HandlerRequest request, AsyncCallback callback, object asyncState)
        {
            AsyncSingleRequest caller = new AsyncSingleRequest(this.SingleRequest);

            return(caller.BeginInvoke(request, callback, new object[] { caller, asyncState }));
        }