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