Пример #1
0
        public object EndInvoke(IAsyncResult result)
        {
            DelegateRequest request = (DelegateRequest)result;

            request.AsyncWaitHandle.WaitOne();
            return(request.Response);
        }
Пример #2
0
        public IAsyncResult BeginInvoke(Delegate method, object[] args)
        {
            DelegateRequest request = new DelegateRequest(method, args);

            DelegateQueue.Enqueue(request);
            return((IAsyncResult)request);
        }