public object EndInvoke(IAsyncResult result) { DelegateRequest request = (DelegateRequest)result; request.AsyncWaitHandle.WaitOne(); return(request.Response); }
public IAsyncResult BeginInvoke(Delegate method, object[] args) { DelegateRequest request = new DelegateRequest(method, args); DelegateQueue.Enqueue(request); return((IAsyncResult)request); }