Пример #1
0
 private IAsyncResult SyncTestInput(Action<int> resultHandler, Action<Exception> exceptionHandler)
 {
     resultHandler(MagicValue);
     var result = new DummyAsyncResult();
     result.MarkCompletedSync();
     return result;
 }
Пример #2
0
        private IAsyncResult SyncTestInput(Action <int> resultHandler, Action <Exception> exceptionHandler)
        {
            resultHandler(MagicValue);
            var result = new DummyAsyncResult();

            result.MarkCompletedSync();
            return(result);
        }
Пример #3
0
        private IAsyncResult AsyncTestInput(Action<int> resultHandle, Action<Exception> exceptionHandler)
        {
            var result = new DummyAsyncResult();

            Deployment.Current.Dispatcher.BeginInvoke(() =>
            {
                result.MarkCompletedAsync();
                resultHandle(MagicValue);
            });
            return result;
        }
Пример #4
0
        private IAsyncResult AsyncTestInput(Action <int> resultHandle, Action <Exception> exceptionHandler)
        {
            var result = new DummyAsyncResult();

            Deployment.Current.Dispatcher.BeginInvoke(() =>
            {
                result.MarkCompletedAsync();
                resultHandle(MagicValue);
            });
            return(result);
        }