Project Name File Name Usage Source Code Link
hyperstack HttpApplicationProxy.cs taskCompletionSource.Task.ContinueWith(task => callback(task), TaskContinuationOptions.ExecuteSynchronously) Link To Source File
CouchDude CouchSession.cs databaseApi .BulkUpdate(bulk => unitOfWork.ApplyChanges(bulk)) .ContinueWith(HandleChangesSaveCompleted, TaskContinuationOptions.AttachedToParent) Link To Source File
coapp AsyncDownloader.cs Task.Factory.FromAsync(webRequest.BeginGetResponse, (Func)webRequest.BetterEndGetResponse, this). ContinueWith(asyncResult => { try { if (SingleStep.Cancelling) { return; } httpWebResponse = asyncResult.Result as HttpWebResponse; if (httpWebResponse.StatusCode == HttpStatusCode.OK) { contentLength = httpWebResponse.ContentLength; try { // open the file here, so that it's ready when we start the async read cycle. filestream = File.Open(Filename, FileMode.Create); tcs = new TaskCompletionSource(TaskCreationOptions.AttachedToParent); tcs.Iterate(AsyncReadImpl()); return; } catch (Exception e) { Logger.Warning(e); } } } catch (Exception e) { Logger.Warning(e); } }, TaskContinuationOptions.AttachedToParent) Link To Source File
PSClient CoAppClient.cs T.ContinueWith(antecedent => output.AddRange(antecedent.Result), TaskContinuationOptions.AttachedToParent) Link To Source File
PSClient CoAppClient.cs T.ContinueWith(antecedent => output.AddRange(antecedent.Result), TaskContinuationOptions.AttachedToParent) Link To Source File
PSClient CoAppClient.cs T.ContinueWith(antecedent => output.AddRange(antecedent.Result), TaskContinuationOptions.AttachedToParent) Link To Source File
PSClient CoAppClient.cs T.ContinueWith(antecedent => output.AddRange(antecedent.Result), TaskContinuationOptions.AttachedToParent) Link To Source File
PSClient CoAppClient.cs T.ContinueWith(antecedent => output.AddRange(antecedent.Result), TaskContinuationOptions.AttachedToParent) Link To Source File
PSClient CoAppClient.cs T.ContinueWith(antecedent => output.AddRange(antecedent.Result), TaskContinuationOptions.AttachedToParent) Link To Source File
PSClient CoAppClient.cs T.ContinueWith(antecedent => output.AddRange(antecedent.Result), TaskContinuationOptions.AttachedToParent) Link To Source File
PSClient CoAppClient.cs T.ContinueWith(antecedent => output.AddRange(antecedent.Result), TaskContinuationOptions.AttachedToParent) Link To Source File
PSClient CoAppClient.cs T.ContinueWith(antecedent => output.AddRange(antecedent.Result), TaskContinuationOptions.AttachedToParent) Link To Source File
PSClient CoAppClient.cs T.ContinueWith(antecedent => output.AddRange(antecedent.Result), TaskContinuationOptions.AttachedToParent) Link To Source File
PSClient CoAppClient.cs T.ContinueWith(antecedent => output.AddRange(antecedent.Result), TaskContinuationOptions.AttachedToParent) Link To Source File
PSClient CoAppClient.cs T.ContinueWith(antecedent => output.AddRange(antecedent.Result), TaskContinuationOptions.AttachedToParent) Link To Source File
PSClient CoAppClient.cs T.ContinueWith(antecedent => output.AddRange(antecedent.Result), TaskContinuationOptions.AttachedToParent) Link To Source File
PSClient CoAppClient.cs T.ContinueWith(antecedent => output.AddRange(antecedent.Result), TaskContinuationOptions.AttachedToParent) Link To Source File
_bootstrapperui_deprecated AsyncDownloader.cs Task.Factory.FromAsync(webRequest.BeginGetResponse, (Func)webRequest.BetterEndGetResponse, this). ContinueWith(asyncResult => { try { if (SingleStep.Cancelling) { return; } httpWebResponse = asyncResult.Result as HttpWebResponse; if (httpWebResponse.StatusCode == HttpStatusCode.OK) { contentLength = httpWebResponse.ContentLength; try { // open the file here, so that it's ready when we start the async read cycle. filestream = File.Open(Filename, FileMode.Create); tcs = new TaskCompletionSource(TaskCreationOptions.AttachedToParent); tcs.Iterate(AsyncReadImpl()); return; } catch (Exception e) { Logger.Warning(e); } } } catch (Exception e) { Logger.Warning(e); } }, TaskContinuationOptions.AttachedToParent) Link To Source File
fubumvc AsyncContinueWithBehavior.cs task.ContinueWith(x => { FubuRequest.Set(task.Result); behaviorAction(InsideBehavior); }, TaskContinuationOptions.NotOnFaulted | TaskContinuationOptions.AttachedToParent) Link To Source File
Footloose FootlooseConnection.cs task.ContinueWith(t => { try { if (callback == null) { OnMethodResponseReceived(new MethodResponseEventArgs(t.Result)); } else { callback.DynamicInvoke(t.Result); } } catch (Exception exception) { OnExceptionOccurred(new ExceptionEventArgs(exception)); } }, TaskContinuationOptions.OnlyOnRanToCompletion) Link To Source File
Footloose FootlooseConnection.cs task.ContinueWith(t => OnExceptionOccurred(new ExceptionEventArgs(t.Exception)), TaskContinuationOptions.NotOnRanToCompletion) Link To Source File
Filechronization ConnectionManager.cs readChunk.ContinueWith(ContinueRead, TaskContinuationOptions.NotOnFaulted) Link To Source File
Filechronization AsyncConnection.cs netStreamRead.ContinueWith(AfterStreamRead, TaskContinuationOptions.NotOnFaulted | TaskContinuationOptions.AttachedToParent ) Link To Source File
PicasaUploader WizardActionPage.cs // on success task.ContinueWith(t => { OnActionCompleted(new SuccessEventArgs(t.Result)); }, TaskContinuationOptions.OnlyOnRanToCompletion) Link To Source File
PicasaUploader WizardActionPage.cs task.ContinueWith(t => { OnActionCompleted(new SuccessEventArgs(t.Result)); }, TaskContinuationOptions.OnlyOnCanceled) Link To Source File
lokad-cloud AzureDiscoveryProvider.cs // Insert into HttpRuntime Cache once finished fetchTask.ContinueWith(discoveryInfo => HttpRuntime.Cache.Insert( "lokadcloud-DiscoveryInfo", discoveryInfo.Result, null, DateTime.UtcNow.AddMinutes(60), Cache.NoSlidingExpiration), TaskContinuationOptions.OnlyOnRanToCompletion) Link To Source File
lokad-cloud AzureDiscoveryProvider.cs fetchTask.ContinueWith(task => { // Ensure the Task doesn't throw at finalization var exception = task.Exception.GetBaseException(); // TODO (ruegg, 2011-05-19): report error to the user }, TaskContinuationOptions.OnlyOnFaulted) Link To Source File
lokad-cloud TaskExtensions.cs task.ContinueWith(t => { try { if (t.IsFaulted) { var baseException = t.Exception.GetBaseException(); if (cancellationToken.IsCancellationRequested && baseException is HttpException) { // If cancelled: HttpExceptions are assumed to be caused by the cancellation, hence we ignore them and cancel. completionSource.TrySetCanceled(); } else { completionSource.TrySetException(baseException); } return; } if (t.IsCanceled) { completionSource.TrySetCanceled(); return; } handleCompleted(t); } catch (Exception exception) { completionSource.TrySetException(exception); } }, TaskContinuationOptions.ExecuteSynchronously) Link To Source File
lokad-cloud CloudEnvironment.cs // TODO (ruegg, 2011-05-30): Replace with system events task.ContinueWith(t => { try { if (t.IsFaulted) { if (ProvisioningErrorHandling.IsTransientError(t.Exception)) { _log.DebugFormat(task.Exception.GetBaseException(), "Provisioning: Getting the current worker instance count failed with a transient error."); } else { _log.WarnFormat(task.Exception.GetBaseException(), "Provisioning: Getting the current worker instance count failed with a permanent error."); } } } catch (Exception) { // We don't really care, it's only logging that failed } }, TaskContinuationOptions.ExecuteSynchronously) Link To Source File
lokad-cloud-provisioning TaskExtensions.cs task.ContinueWith(t => { try { if (t.IsFaulted) { var baseException = t.Exception.GetBaseException(); if (cancellationToken.IsCancellationRequested && baseException is HttpException) { // If cancelled: HttpExceptions are assumed to be caused by the cancellation, hence we ignore them and cancel. completionSource.TrySetCanceled(); } else { completionSource.TrySetException(baseException); } return; } if (t.IsCanceled) { completionSource.TrySetCanceled(); return; } handleCompleted(t); } catch (Exception exception) { completionSource.TrySetException(exception); } }, TaskContinuationOptions.ExecuteSynchronously) Link To Source File
lokad-cloud-provisioning AzureCurrentDeployment.cs // We have already called but have not got the result yet. // In case there is already a task running (this is likely in our scenarios) wait for the result. // Retry once in case it will fail, or, more importantly, if it has already failed (the last time). previousTask.ContinueWith(task => { try { if (task.IsFaulted || (task.IsCanceled && !cancellationToken.IsCancellationRequested)) { discovery.DoDiscoverDeploymentAsync(client, _deploymentPrivateId, completionSource, cancellationToken); completionSource.Task.ContinueRaiseSystemEventOnFault(_observer, AzureDiscovery.EventForFailedOperation); return; } if (task.IsCanceled) { completionSource.TrySetCanceled(); return; } completionSource.TrySetResult(task.Result); } catch (Exception exception) { // this should never happen, so forward but do not try to handle/retry here. completionSource.TrySetException(exception); } }, TaskContinuationOptions.ExecuteSynchronously) Link To Source File
lokad-cqrs RepopulateView.cs task.ContinueWith(t => WriteLine("Exception {0}", t.Exception), TaskContinuationOptions.NotOnRanToCompletion) Link To Source File
LoreSoft.Shared TaskExtensions.cs task.ContinueWith(t => { timer.Dispose(); result.TrySetFromTask(t); }, TaskContinuationOptions.ExecuteSynchronously) Link To Source File
taco TaskExtensions.cs task.ContinueWith(t => continuation(t.Result), TaskContinuationOptions.AttachedToParent | TaskContinuationOptions.OnlyOnRanToCompletion | TaskContinuationOptions.ExecuteSynchronously) Link To Source File
taco TaskExtensions.cs task.ContinueWith(t => continuation(t.Result.Item1, t.Result.Item2, t.Result.Item3), TaskContinuationOptions.AttachedToParent | TaskContinuationOptions.OnlyOnRanToCompletion | TaskContinuationOptions.ExecuteSynchronously) Link To Source File
taco BodyStreaming2.cs task.ContinueWith(t => { if (t.IsCompleted) { completed(t.Result); } else if (t.IsFaulted) { faulted(t.Exception); } else if (t.IsCanceled) { canceled(); } }, TaskContinuationOptions.AttachedToParent | TaskContinuationOptions.ExecuteSynchronously) Link To Source File
nuget TaskExtensions.cs task.ContinueWith(innerTask => { if (innerTask.Status == TaskStatus.RanToCompletion && predicate(innerTask.Result)) { // success tcs.TrySetResult(innerTask.Result); } if (Interlocked.Decrement(ref numTasksRemaining) == 0) { tcs.TrySetResult(default(TResult)); } }, TaskContinuationOptions.ExecuteSynchronously) Link To Source File
SwarmIntelligence TaskExtensions.cs task.ContinueWith(t => { timer.Dispose(); result.TrySetFromTask(t); }, TaskContinuationOptions.ExecuteSynchronously) Link To Source File
NugetCracker TaskExtensions.cs task.ContinueWith(innerTask => { if (innerTask.Status == TaskStatus.RanToCompletion && predicate(innerTask.Result)) { // success tcs.TrySetResult(innerTask.Result); } if (Interlocked.Decrement(ref numTasksRemaining) == 0) { tcs.TrySetResult(default(TResult)); } }, TaskContinuationOptions.ExecuteSynchronously) Link To Source File
ODataLib ODataMessageWriter.cs asyncWriterTask.Result.FlushAsync() .ContinueWith( (asyncWriterTask2) => asyncWriterTask2.Result.Dispose(), TaskContinuationOptions.AttachedToParent | TaskContinuationOptions.ExecuteSynchronously) Link To Source File
WCFWeb HttpClient.cs ActualChannel.SendAsync(request, linkedCts.Token).ContinueWith(task => { try { // The request is completed. Dispose the request content. DisposeRequestContent(request); if (task.IsFaulted) { SetTaskFaulted(request, linkedCts, tcs, task.Exception.GetBaseException()); return; } if (task.IsCanceled) { SetTaskCanceled(request, linkedCts, tcs); return; } HttpResponseMessage response = task.Result; if (response == null) { SetTaskFaulted(request, linkedCts, tcs, new InvalidOperationException("Channel did not return a response message.")); return; } // If we don't have a response content, just return the response message. if ((response.Content == null) || (completionOption == HttpCompletionOption.ResponseHeadersRead)) { SetTaskCompleted(request, linkedCts, tcs, response); return; } Contract.Assert(completionOption == HttpCompletionOption.ResponseContentRead, "Unknown completion option."); // We have an assigned content. Start loading it into a buffer and return response message once // the whole content is buffered. StartContentBuffering(request, linkedCts, tcs, response); } catch (Exception e) { // Make sure we catch any exception, otherwise the task will catch it and throw in the finalizer. tcs.TrySetException(e); } }, TaskContinuationOptions.ExecuteSynchronously) Link To Source File
WCFWeb MessageProcessingChannel.cs // We schedule a continuation task once the inner channel completes in order to trigger the response // processing method. ProcessResponse() is only called if the task wasn't canceled before. sendAsyncTask.ContinueWith(task => { if (task.IsFaulted) { tcs.TrySetException(task.Exception.GetBaseException()); return; } if (task.IsCanceled) { tcs.TrySetCanceled(); return; } if (task.Result == null) { tcs.TrySetException(new InvalidOperationException("Channel did not return a response message.")); return; } try { HttpResponseMessage responseMessage = ProcessResponse(task.Result, cancellationToken); tcs.TrySetResult(responseMessage); } catch (OperationCanceledException e) { // If ProcessResponse() throws an OperationCanceledException check wheter it is related to // the cancellation token we received from the user. If so, cancel the Task. HandleCanceledOperations(cancellationToken, tcs, e); } catch (Exception e) { tcs.TrySetException(e); } // We don't pass the cancellation token to the continuation task, since we want to get called even // if the operation was canceled: We'll set the Task returned to the user to canceled. Passing the // cancellation token here would result in the continuation task to not be called at all. I.e. we // would never complete the task returned to the caller of SendAsync(). }, TaskContinuationOptions.ExecuteSynchronously) Link To Source File
ravenmq TaskExtensions.cs task.ContinueWith(c => GC.KeepAlive(c.Exception), TaskContinuationOptions.ExecuteSynchronously) Link To Source File
PROMPT11-07-ConcurrentProgramming.sandrapatfer MoviesAsyncController_old.cs taskFlickr.ContinueWith(ProcessFlickrResult, TaskContinuationOptions.AttachedToParent) Link To Source File
PROMPT11-07-ConcurrentProgramming.sandrapatfer MoviesAsyncController_old.cs taskNYTimes.ContinueWith(ProcessNYTimesResult, TaskContinuationOptions.AttachedToParent) Link To Source File
PROMPT11-07-ConcurrentProgramming.sandrapatfer MoviesAsyncController_old.cs taskBing.ContinueWith(ProcessBingResult, TaskContinuationOptions.AttachedToParent) Link To Source File
Fleck SocketWrapper.cs task.ContinueWith(t => callback(t.Result), TaskContinuationOptions.NotOnFaulted) Link To Source File
Fleck SocketWrapper.cs task.ContinueWith(t => error(t.Exception), TaskContinuationOptions.OnlyOnFaulted) Link To Source File
Fleck SocketWrapper.cs task.ContinueWith(t => callback(t.Result), TaskContinuationOptions.OnlyOnRanToCompletion) Link To Source File
Fleck SocketWrapper.cs task.ContinueWith(t => error(t.Exception), TaskContinuationOptions.OnlyOnFaulted) Link To Source File
WCell TaskExtensions.cs task.ContinueWith(t => { timer.Dispose(); result.TrySetFromTask(t); }, TaskContinuationOptions.ExecuteSynchronously) Link To Source File