コード例 #1
0
ファイル: AsyncValueTests.cs プロジェクト: hanxianlong/bot
 private IAsyncResult SyncTestInput(Action<int> resultHandler, Action<Exception> exceptionHandler)
 {
     resultHandler(MagicValue);
     var result = new DummyAsyncResult();
     result.MarkCompletedSync();
     return result;
 }
コード例 #2
0
ファイル: AsyncValueTests.cs プロジェクト: hanxianlong/bot
        private IAsyncResult SyncTestInput(Action <int> resultHandler, Action <Exception> exceptionHandler)
        {
            resultHandler(MagicValue);
            var result = new DummyAsyncResult();

            result.MarkCompletedSync();
            return(result);
        }
コード例 #3
0
ファイル: AsyncValueTests.cs プロジェクト: hanxianlong/bot
        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
ファイル: AsyncValueTests.cs プロジェクト: hanxianlong/bot
        private IAsyncResult AsyncTestInput(Action <int> resultHandle, Action <Exception> exceptionHandler)
        {
            var result = new DummyAsyncResult();

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