public IAsyncResult WaitForIAsyncResult(int sekunden, AsyncCallback callback, object state) { var res = new WaitAsyncResult(); Task.Delay(sekunden * 1000).ContinueWith(t => Fertig(callback, res)); return(res); }
private void Fertig(AsyncCallback callback, WaitAsyncResult res) { callback.Invoke(res); }