예제 #1
0
        public T EndSend <T>(IAsyncResult asyncResult)
        {
            BAsyncProgModel <T> amp = (BAsyncProgModel <T>)asyncResult;
            T ret = amp.Result;

            return(ret);
        }
예제 #2
0
        public IAsyncResult BeginSend <T>(BMethodRequest methodRequest, AsyncCallback callback, object state)
        {
            BAsyncProgModel <T>           asyncResult = new BAsyncProgModel <T>(callback, state);
            BAsyncResultReceiveMethod <T> outerResult = new BAsyncResultReceiveMethod <T>(asyncResult);

            assignSessionThenSendMethod(methodRequest, outerResult);
            return(asyncResult);
        }