public T EndSend <T>(IAsyncResult asyncResult) { BAsyncProgModel <T> amp = (BAsyncProgModel <T>)asyncResult; T ret = amp.Result; return(ret); }
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); }