Implemented interface member:
property
IsCompleted
System.IAsyncResult.IsCompleted
103 references to IsCompleted
mscorlib (66)
system\io\stream.cs (1)
516if (asyncWaiter.IsCompleted)
system\io\streamreader.cs (1)
120if (t != null && !t.IsCompleted)
system\io\streamwriter.cs (1)
90if (t != null && !t.IsCompleted)
system\runtime\compilerservices\TaskAwaiter.cs (6)
82get { return m_task.IsCompleted; } 146if (!task.IsCompleted) 162Contract.Requires(task.IsCompleted, "Task must have been completed by now."); 319get { return m_task.IsCompleted; } 409get { return m_task.IsCompleted; } 497get { return m_task.IsCompleted; }
system\threading\Tasks\ConcurrentExclusiveSchedulerPair.cs (2)
219Contract.Assert(!localCs.Task.IsCompleted, "Completion should only happen once."); 723if (m_completionState != null && m_completionState.Task.IsCompleted) return ProcessingMode.Completed;
system\threading\Tasks\Future.cs (3)
463if (IsCompleted) return false; 504Contract.Assert(!IsCompleted, "The promise must not yet be completed."); 556if (!IsCompleted) InternalWait(Timeout.Infinite, default(CancellationToken)); // won't throw if task faulted or canceled; that's handled below
system\threading\Tasks\FutureFactory.cs (1)
1431Contract.Assert(!IsCompleted, "The task should not have been completed yet.");
system\threading\Tasks\Parallel.cs (4)
398if (tasks[i].IsCompleted) tasks[i].Dispose(); 1307if ((rootTask != null) && rootTask.IsCompleted) rootTask.Dispose(); 1620if ((rootTask != null) && rootTask.IsCompleted) rootTask.Dispose(); 3515if ((rootTask != null) && rootTask.IsCompleted) rootTask.Dispose();
system\threading\Tasks\Task.cs (31)
1227if (waitForCompletion && !IsCompleted) 1543/// <see cref="IsCompleted"/> will return true when the Task is in one of the three 1672bool wasCompleted = IsCompleted; 1679else if (!wasCompleted && IsCompleted) 1860if (!IsCompleted) 2147Contract.Requires(IsCompleted, "ThrowIfExceptional(): Expected IsCompleted == true"); 2371Contract.Requires(childTask.IsCompleted, "ProcessChildCompletion was called for an uncompleted task"); 2433Contract.Assert(task.IsCompleted, "Expected all tasks in list to be completed"); 2715if (!IsCompleted) 3237bool returnValue = IsCompleted; 3253WrappedTryRunInline() && IsCompleted) // TryRunInline doesn't guarantee completion, as there may be unfinished children. 3263Contract.Assert(IsCompleted || millisecondsTimeout != Timeout.Infinite); 3333if (!IsCompleted) RemoveContinuation(mres); 3350if (IsCompleted) return true; 3362if (IsCompleted) 3378return IsCompleted; 4638Contract.Requires(!continuationTask.IsCompleted, "Did not expect continuationTask to be completed"); 4646if (IsCompleted || cancellationToken.IsCancellationRequested) 4675if (!continuationTask.IsCompleted) 4797if (IsCompleted) return false; 5080bool taskIsCompleted = task.IsCompleted; 5093taskIsCompleted = task.WrappedTryRunInline() && task.IsCompleted; // A successful TryRunInline doesn't guarantee completion 5201if (!task.IsCompleted) task.RemoveContinuation(mres); 5253if (!tasks[i].IsCompleted) 5482if (signaledTaskIndex == -1 && task.IsCompleted) 6118if (task.IsCompleted) this.Invoke(task); // short-circuit the completion action, if possible 6362if (task.IsCompleted) this.Invoke(task); // short-circuit the completion action, if possible 7167if (outerTask.IsCompleted) 7238Contract.Requires(task != null && task.IsCompleted, "Expected non-null, completed outer task"); 7269Contract.Requires(task != null && task.IsCompleted, "TrySetFromTask: Expected task to have completed."); 7329else if (task.IsCompleted)
system\threading\Tasks\TaskCompletionSource.cs (6)
138while (!m_task.IsCompleted) 165if (!rval && !m_task.IsCompleted) SpinUntilCompleted(); 205if (!rval && !m_task.IsCompleted) SpinUntilCompleted(); 221if (!rval && !m_task.IsCompleted) SpinUntilCompleted(); 299if (!rval && !m_task.IsCompleted) SpinUntilCompleted(); 349if (!rval && !m_task.IsCompleted) SpinUntilCompleted();
system\threading\Tasks\TaskContinuation.cs (1)
325Contract.Assert(completedTask.IsCompleted, "ContinuationTask.Run(): completedTask not completed");
system\threading\Tasks\TaskFactory.cs (6)
1700if (tasksCopy[i].IsCompleted) promise.Invoke(tasksCopy[i]); // Short-circuit the completion action, if possible 1778if (tasksCopy[i].IsCompleted) promise.Invoke(tasksCopy[i]); // Short-circuit the completion action, if possible 2463!task.IsCompleted) task.RemoveContinuation(this); 2494if (promise.IsCompleted) 2499else if (task.IsCompleted) 2508if (promise.IsCompleted)
system\threading\Tasks\TaskToApm.cs (3)
52if (task.IsCompleted) 175Contract.Requires(!completedSynchronously || task.IsCompleted, "If completedSynchronously is true, the task must be completed."); 188bool IAsyncResult.IsCompleted { get { return this.Task.IsCompleted; } }
System.Data (26)
fx\src\data\System\Data\ProviderBase\DbConnectionClosed.cs (1)
115if (retry == null || !retry.Task.IsCompleted) {
fx\src\data\System\Data\ProviderBase\DbConnectionFactory.cs (1)
229else if (task.IsCompleted) {
fx\src\data\System\Data\ProviderBase\DbConnectionPool.cs (1)
1092if (next.Completion.Task.IsCompleted) {
fx\src\data\System\Data\SqlClient\SqlBulkCopy.cs (4)
1749if (reconnectTask != null && !reconnectTask.IsCompleted) { 2230Debug.Assert(source == null || !source.Task.IsCompleted, "Called into CopyBatchesAsync with a completed task!"); 2295Debug.Assert(source == null || !source.Task.IsCompleted, "Called into CopyBatchesAsync with a completed task!"); 2340Debug.Assert(source == null || !source.Task.IsCompleted, "Called into CopyBatchesAsync with a completed task!");
fx\src\data\System\Data\SqlClient\SqlCommand.cs (2)
3075if (completion.Task.IsCompleted) { 4361if (completion.Task.IsCompleted) {
fx\src\data\System\Data\SqlClient\SqlConnection.cs (8)
706if (reconnectTask != null && !reconnectTask.IsCompleted) { 733if (reconnectTask != null && !reconnectTask.IsCompleted) { 1090if (reconnectTask != null && !reconnectTask.IsCompleted) { 1277while (runningReconnect != null && runningReconnect.IsCompleted) { 1366if (reconnectTask != null && !reconnectTask.IsCompleted) { 1640if (reconnectTask != null && !reconnectTask.IsCompleted) { 1698if (!asyncWaitingForReconnection.IsCompleted) { 1707if (currentReconnectionTask != null && !currentReconnectionTask.IsCompleted) {
fx\src\data\System\Data\SqlClient\SqlDataReader.cs (2)
810if ((currentTask != null) && (!currentTask.IsCompleted)) { 4630if (task.IsCompleted) {
fx\src\data\System\Data\SqlClient\SqlUtil.cs (2)
162if (!task.IsCompleted) { 172if (!tsk.IsCanceled && !completion.Task.IsCompleted) {
fx\src\data\System\Data\SqlClient\TdsParserStateObject.cs (5)
2072if (!source.Task.IsCompleted) { 2078if ((pendingCallback == 3) && (!source.Task.IsCompleted)) { 2115Debug.Assert(_networkPacketTaskSource == null || ((_asyncReadWithoutSnapshot) && (_networkPacketTaskSource.Task.IsCompleted)), "Pending async call or failed to replay snapshot when calling ReadSni"); 2700if ((_asyncWriteCount == 0) && ((!task.IsCompleted) || (task.Exception == null))) { 2940if ((_asyncWriteCount == 0) && ((!task.IsCompleted) || (task.Exception == null))) {
System.ServiceModel (3)
System\ServiceModel\Channels\WebSocketTransportDuplexSessionChannel.cs (2)
573if (this.receiveTask.Task.IsCompleted) 834Fx.Assert(this.receiveTask == null || this.receiveTask.Task.IsCompleted, "this.receiveTask is not completed.");
System\ServiceModel\Dispatcher\TaskMethodInvoker.cs (1)
108Fx.Assert(invokeTask.IsCompleted, "Task.Result is expected to be completed");
System.Web (5)
Handlers\TransferRequestHandler.cs (1)
44if (releaseStateTask.IsCompleted) {
TaskAsyncHelper.cs (1)
38bool actuallyCompletedSynchronously = task.IsCompleted;
Util\SynchronizationHelper.cs (1)
91if (!lastTask.IsCompleted) { lastTask.ContinueWith(_ => { }, TaskContinuationOptions.ExecuteSynchronously).Wait(); }
Util\TaskExtensions.cs (1)
19Debug.Assert(task.IsCompleted, "The Task passed to this method must be marked as completed so that this method doesn't block.");
WebSockets\AspNetWebSocket.cs (1)
577if (!task.IsCompleted && cancellationToken.CanBeCanceled) {
System.Xml (3)
System\Xml\AsyncHelper.cs (1)
18return task.IsCompleted && task.Exception == null;
System\Xml\Core\XmlAsyncCheckReader.cs (1)
53if (!lastTask.IsCompleted) {
System\Xml\Core\XmlAsyncCheckWriter.cs (1)
26if (!lastTask.IsCompleted) {