Project Name File Name Usage Source Code Link
Orders InvocationExtentions.cs parent.ContinueWith(task => { if (task.IsFaulted) return task; return TaskEx.Run(action); }).Unwrap() Link To Source File
tdameritrade WebRequestExtensions.cs webRequest.GetRequestStreamAsync().ContinueWith(stream => { return stream.Result.WriteAsync(buffer, 0, buffer.Length); }).Unwrap() Link To Source File
SwarmIntelligence FileAsync.cs encoded.ContinueWith(t => WriteAllBytes(path, t.Result)).Unwrap() Link To Source File
nji NjiApi.cs DownloadAsync(package, TempDir, packageFilename, cancellationToken) .ContinueWith(downloadTask => { if (downloadTask.IsFaulted) throw downloadTask.Exception.GetBaseException(); var downloadFilePath = downloadTask.Result; return Extract(downloadFilePath, destinationDir); }).Unwrap() Link To Source File
nji NjiApi.cs GetInstalledPackagesAsync(cancellationToken) .ContinueWith(t => { if (t.IsFaulted) throw t.Exception.GetBaseException(); return UpdateAsync(t.Result.Values, cancellationToken); }).Unwrap() Link To Source File
nji NjiApi.cs task.ContinueWith(t => oneach(item_captured, t)).Unwrap() Link To Source File
ravendb AsyncServerClient.cs request.ExecuteRequestAsync() .ContinueWith(task => { var aggregateException = task.Exception; if (aggregateException == null) return task; var e = aggregateException.ExtractSingleInnerException() as WebException; if (e == null) return task; var httpWebResponse = e.Response as HttpWebResponse; if (httpWebResponse != null && httpWebResponse.StatusCode == HttpStatusCode.NotFound) throw new InvalidOperationException("There is no index named: " + indexName, e); return task; }).Unwrap() Link To Source File
ravendb AsyncServerClient.cs request.ExecuteRequest() .ContinueWith(task => { var aggregateException = task.Exception; if (aggregateException == null) return task; var e = aggregateException.ExtractSingleInnerException() as WebException; if (e == null) return task; var httpWebResponse = e.Response as HttpWebResponse; if (httpWebResponse != null && httpWebResponse.StatusCode == HttpStatusCode.NotFound) throw new InvalidOperationException("There is no index named: " + indexName, e); return task; }).Unwrap() Link To Source File
ravendb AsyncServerClient.cs request .WriteAsync(data) .ContinueWith(write => { if (write.Exception != null) throw new InvalidOperationException("Unable to write to server"); return request.ExecuteRequest(); }).Unwrap() Link To Source File
ravendb HttpJsonRequest.cs unauthorizedResponseAsync.ContinueWith(task => RecreateWebRequest(task.Result)).Unwrap() Link To Source File
ravendb HttpJsonRequest.cs WaitForTask.ContinueWith(_ => webRequest.GetRequestStreamAsync() .ContinueWith(task => { var dataStream = task.Result; var streamWriter = new StreamWriter(dataStream, Encoding.UTF8); return streamWriter.WriteAsync(data) .ContinueWith(writeTask => { streamWriter.Dispose(); dataStream.Dispose(); return writeTask; }).Unwrap(); }).Unwrap()) .Unwrap() Link To Source File
ravendb HttpJsonRequest.cs webRequest.GetRequestStreamAsync() .ContinueWith(task => { var dataStream = task.Result; var streamWriter = new StreamWriter(dataStream, Encoding.UTF8); return streamWriter.WriteAsync(data) .ContinueWith(writeTask => { streamWriter.Dispose(); dataStream.Dispose(); return writeTask; }).Unwrap(); }).Unwrap() Link To Source File
ravendb HttpJsonRequest.cs streamWriter.WriteAsync(data) .ContinueWith(writeTask => { streamWriter.Dispose(); dataStream.Dispose(); return writeTask; }).Unwrap() Link To Source File
ravendb InvocationExtensions.cs parent.ContinueWith(task => { if (task.IsFaulted) return task; return TaskEx.Run(action); }).Unwrap() Link To Source File
ravendb InvocationExtensions.cs parent.ContinueWith(task => { if (task.IsFaulted) return task; return action(); }).Unwrap() Link To Source File
ravendb InvocationExtensions.cs enumerator.Current .ContinueWith(task => { task.Wait(); // would throw on error if (enumerator.MoveNext() == false) { enumerator.Dispose(); return task; } return ProcessTasks(enumerator); }).Unwrap() Link To Source File