13 types derived from Task
mscorlib (13)
system\io\filestream.cs (1)
2706
private sealed class FileStreamReadWriteTask<T> :
Task
<T>
system\io\stream.cs (1)
612
private sealed class ReadWriteTask :
Task
<int>, ITaskCompletionAction
system\threading\SemaphoreSlim.cs (1)
87
private sealed class TaskNode :
Task
<bool>, IThreadPoolWorkItem
system\threading\Tasks\FutureFactory.cs (1)
1364
private sealed class FromAsyncTrimPromise<TInstance> :
Task
<TResult> where TInstance : class
system\threading\Tasks\Task.cs (4)
5905
private sealed class DelayPromise :
Task
<VoidTaskResult>
6089
private sealed class WhenAllPromise :
Task
<VoidTaskResult>, ITaskCompletionAction
6333
private sealed class WhenAllPromise<T> :
Task
<T[]>, ITaskCompletionAction
7135
internal sealed class UnwrapPromise<TResult> :
Task
<TResult>, ITaskCompletionAction
system\threading\Tasks\TaskContinuation.cs (2)
77
internal sealed class ContinuationResultTaskFromTask<TResult> :
Task
<TResult>
173
internal sealed class ContinuationResultTaskFromResultTask<TAntecedentResult, TResult> :
Task
<TResult>
system\threading\Tasks\TaskFactory.cs (3)
1634
private sealed class CompleteOnCountdownPromise :
Task
<Task[]>, ITaskCompletionAction
1712
private sealed class CompleteOnCountdownPromise<T> :
Task
<Task<T>[]>, ITaskCompletionAction
2415
internal sealed class CompleteOnInvokePromise :
Task
<Task>, ITaskCompletionAction
21 instantiations of Task
mscorlib (21)
system\io\stream.cs (1)
950
s_nullReadTask = nullReadTask = new
Task
<int>(false, 0, (TaskCreationOptions)InternalTaskOptions.DoNotDispose, CancellationToken.None); // benign ----
system\runtime\compilerservices\AsyncMethodBuilder.cs (3)
575
if (task == null) { m_task = task = new
Task
<TResult>(); }
795
return new
Task
<TResult>(result);
833
return new
Task
<TResult>(false, result, (TaskCreationOptions)InternalTaskOptions.DoNotDispose, default(CancellationToken));
system\threading\SemaphoreSlim.cs (1)
81
new
Task
<bool>(false, true, (TaskCreationOptions)InternalTaskOptions.DoNotDispose, default(CancellationToken));
system\threading\Tasks\ConcurrentExclusiveSchedulerPair.cs (1)
626
var t = new
Task
<bool>(s_tryExecuteTaskShim, Tuple.Create(this, task));
system\threading\Tasks\Future.cs (2)
410
Task<TResult> f = new
Task
<TResult>(function, parent, cancellationToken, creationOptions, internalOptions | InternalTaskOptions.QueuedByRuntime, scheduler, ref stackMark);
434
Task<TResult> f = new
Task
<TResult>(function, state, parent, cancellationToken, creationOptions, internalOptions | InternalTaskOptions.QueuedByRuntime, scheduler, ref stackMark);
system\threading\Tasks\FutureFactory.cs (6)
707
Task<TResult> promise = new
Task
<TResult>((object)null, creationOptions);
826
Task<TResult> promise = new
Task
<TResult>(state, creationOptions);
963
Task<TResult> promise = new
Task
<TResult>(state, creationOptions);
1108
Task<TResult> promise = new
Task
<TResult>(state, creationOptions);
1260
Task<TResult> promise = new
Task
<TResult>(state, creationOptions);
1471
return new
Task
<TResult>(true, default(TResult), tco, ct);
system\threading\Tasks\Task.cs (5)
5519
return new
Task
<TResult>(result);
5540
var task = new
Task
<TResult>();
5574
return new
Task
<TResult>(true, default(TResult), TaskCreationOptions.None, cancellationToken);
5595
var task = new
Task
<TResult>();
6324
new
Task
<TResult[]>(false, new TResult[0], TaskCreationOptions.None, default(CancellationToken)) :
system\threading\Tasks\TaskCompletionSource.cs (2)
63
m_task = new
Task
<TResult>();
111
m_task = new
Task
<TResult>(state, creationOptions);
1095 references to Task
mscorlib (574)
system\io\bufferedstream.cs (6)
84
private
Task
<Int32> _lastSyncCompletedReadTask; // The last successful Task returned from ReadAsync
631
Task
<Int32> readOp = ReadFromUnderlyingStreamAsync(buffer, offset, count, CancellationToken.None,
651
private
Task
<Int32> LastSyncCompletedReadTask(Int32 val) {
653
Task
<Int32> t = _lastSyncCompletedReadTask;
665
public override
Task
<Int32> ReadAsync(Byte[] buffer, Int32 offset, Int32 count, CancellationToken cancellationToken) {
731
private async
Task
<Int32> ReadFromUnderlyingStreamAsync(Byte[] array, Int32 offset, Int32 count,
system\io\filestream.cs (1)
2603
public override
Task
<int> ReadAsync(Byte[] buffer, int offset, int count, CancellationToken cancellationToken)
system\io\memorystream.cs (3)
59
private
Task
<int> _lastReadTask; // The last successful task returned from ReadAsync
375
public override
Task
<int> ReadAsync(Byte[] buffer, int offset, int count, CancellationToken cancellationToken)
394
var
t = _lastReadTask;
system\io\stream.cs (6)
410
public
Task
<int> ReadAsync(Byte[] buffer, int offset, int count)
417
public virtual
Task
<int> ReadAsync(Byte[] buffer, int offset, int count, CancellationToken cancellationToken)
426
private
Task
<Int32> BeginEndReadAsync(Byte[] buffer, Int32 offset, Int32 count)
946
public override
Task
<int> ReadAsync(Byte[] buffer, int offset, int count, CancellationToken cancellationToken)
948
var
nullReadTask = s_nullReadTask;
953
private static
Task
<int> s_nullReadTask;
system\io\streamreader.cs (12)
786
public override
Task
<String> ReadLineAsync()
800
Task
<String> task = ReadLineAsyncInternal();
806
private async
Task
<String> ReadLineAsyncInternal()
867
public override
Task
<String> ReadToEndAsync()
881
Task
<String> task = ReadToEndAsyncInternal();
887
private async
Task
<String> ReadToEndAsyncInternal()
904
public override
Task
<int> ReadAsync(char[] buffer, int index, int count)
926
Task
<int> task = ReadAsyncInternal(buffer, index, count);
932
internal override async
Task
<int> ReadAsyncInternal(char[] buffer, int index, int count)
1092
public override
Task
<int> ReadBlockAsync(char[] buffer, int index, int count)
1114
Task
<int> task = base.ReadBlockAsync(buffer, index, count);
1185
private async
Task
<int> ReadBufferAsync()
system\io\stringreader.cs (4)
151
public override
Task
<String> ReadLineAsync()
157
public override
Task
<String> ReadToEndAsync()
163
public override
Task
<int> ReadBlockAsync(char[] buffer, int index, int count)
178
public override
Task
<int> ReadAsync(char[] buffer, int index, int count)
system\io\textreader.cs (12)
198
public virtual
Task
<String> ReadLineAsync()
200
return
Task
<String>.Factory.StartNew(_ReadLineDelegate, this, CancellationToken.None, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default);
205
public async virtual
Task
<String> ReadToEndAsync()
219
public virtual
Task
<int> ReadAsync(char[] buffer, int index, int count)
232
internal virtual
Task
<int> ReadAsyncInternal(char[] buffer, int index, int count)
240
return
Task
<int>.Factory.StartNew(_ReadDelegate, tuple, CancellationToken.None, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default);
245
public virtual
Task
<int> ReadBlockAsync(char[] buffer, int index, int count)
260
private async
Task
<int> ReadBlockAsyncInternal(char[] buffer, int index, int count)
379
public override
Task
<String> ReadLineAsync()
386
public override
Task
<String> ReadToEndAsync()
393
public override
Task
<int> ReadBlockAsync(char[] buffer, int index, int count)
409
public override
Task
<int> ReadAsync(char[] buffer, int index, int count)
system\io\unmanagedmemorystream.cs (3)
107
private
Task
<Int32> _lastReadTask; // The last successful task returned from ReadAsync
448
public override
Task
<Int32> ReadAsync(Byte[] buffer, Int32 offset, Int32 count, CancellationToken cancellationToken) {
465
Task
<Int32> t = _lastReadTask;
system\io\unmanagedmemorystreamwrapper.cs (1)
186
public override
Task
<Int32> ReadAsync(Byte[] buffer, Int32 offset, Int32 count, CancellationToken cancellationToken) {
system\runtime\compilerservices\AsyncMethodBuilder.cs (28)
280
private readonly static
Task
<VoidTaskResult> s_cachedCompleted = AsyncTaskMethodBuilder<VoidTaskResult>.s_defaultResultTask;
415
/// Provides a builder for asynchronous methods that return <see cref="System.Threading.Tasks.
Task
{TResult}"/>.
427
internal readonly static
Task
<TResult> s_defaultResultTask = AsyncTaskCache.CreateCacheableTask(default(TResult));
438
private
Task
<TResult> m_task; // lazily-initialized: must not be readonly
511
var
builtTask = this.Task;
551
var
builtTask = this.Task;
567
/// <summary>Gets the <see cref="System.Threading.Tasks.
Task
{TResult}"/> for this builder.</summary>
568
/// <returns>The <see cref="System.Threading.Tasks.
Task
{TResult}"/> representing the builder's asynchronous operation.</returns>
569
public
Task
<TResult> Task
574
var
task = m_task;
581
/// Completes the <see cref="System.Threading.Tasks.
Task
{TResult}"/> in the
590
var
task = m_task;
621
internal void SetResult(
Task
<TResult> completedTask)
628
var
task = m_task;
641
/// Completes the <see cref="System.Threading.Tasks.
Task
{TResult}"/> in the
653
var
task = m_task;
713
private
Task
<TResult> GetTaskForResult(TResult result)
716
EqualityComparer<TResult>.Default.Equals(result, Contract.Result<
Task
<TResult>>().Result),
755
Task
<Boolean> task = value ? AsyncTaskCache.TrueTask : AsyncTaskCache.FalseTask;
756
return JitHelpers.UnsafeCast<
Task
<TResult>>(task); // UnsafeCast avoids type check we know will succeed
768
Task
<Int32> task = AsyncTaskCache.Int32Tasks[value - AsyncTaskCache.INCLUSIVE_INT32_MIN];
769
return JitHelpers.UnsafeCast<
Task
<TResult>>(task); // UnsafeCast avoids a type check we know will succeed
805
internal readonly static
Task
<Boolean> TrueTask = CreateCacheableTask(true);
807
internal readonly static
Task
<Boolean> FalseTask = CreateCacheableTask(false);
810
internal readonly static
Task
<Int32>[] Int32Tasks = CreateInt32Tasks();
816
private static
Task
<Int32>[] CreateInt32Tasks()
819
var tasks = new
Task
<Int32>[EXCLUSIVE_INT32_MAX - INCLUSIVE_INT32_MIN];
831
internal static
Task
<TResult> CreateCacheableTask<TResult>(TResult result)
system\runtime\compilerservices\TaskAwaiter.cs (15)
298
/// <summary>Provides an awaiter for awaiting a <see cref="System.Threading.Tasks.
Task
{TResult}"/>.</summary>
304
private readonly
Task
<TResult> m_task;
307
/// <param name="task">The <see cref="System.Threading.Tasks.
Task
{TResult}"/> to be awaited.</param>
308
internal TaskAwaiter(
Task
<TResult> task)
344
/// <summary>Ends the await on the completed <see cref="System.Threading.Tasks.
Task
{TResult}"/>.</summary>
345
/// <returns>The result of the completed <see cref="System.Threading.Tasks.
Task
{TResult}"/>.</returns>
435
/// <returns>The result of the completed <see cref="System.Threading.Tasks.
Task
{TResult}"/>.</returns>
446
/// <summary>Provides an awaitable object that allows for configured awaits on <see cref="System.Threading.Tasks.
Task
{TResult}"/>.</summary>
454
/// <param name="task">The awaitable <see cref="System.Threading.Tasks.
Task
{TResult}"/>.</param>
458
internal ConfiguredTaskAwaitable(
Task
<TResult> task, bool continueOnCapturedContext)
476
private readonly
Task
<TResult> m_task;
481
/// <param name="task">The awaitable <see cref="System.Threading.Tasks.
Task
{TResult}"/>.</param>
485
internal ConfiguredTaskAwaiter(
Task
<TResult> task, bool continueOnCapturedContext)
522
/// <summary>Ends the await on the completed <see cref="System.Threading.Tasks.
Task
{TResult}"/>.</summary>
523
/// <returns>The result of the completed <see cref="System.Threading.Tasks.
Task
{TResult}"/>.</returns>
system\security\cryptography\cryptostream.cs (2)
306
public override
Task
<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
342
private async
Task
<int> ReadAsyncInternal(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
system\threading\SemaphoreSlim.cs (8)
80
private readonly static
Task
<bool> s_trueTask =
333
Task
<bool> asyncWaitTask = null;
519
public
Task
<bool> WaitAsync(int millisecondsTimeout)
547
public
Task
<bool> WaitAsync(TimeSpan timeout)
568
public
Task
<bool> WaitAsync(TimeSpan timeout, CancellationToken cancellationToken)
600
public
Task
<bool> WaitAsync(int millisecondsTimeout, CancellationToken cancellationToken)
695
private async
Task
<bool> WaitUntilCountOrTimeoutAsync(TaskNode asyncWaiter, int millisecondsTimeout, CancellationToken cancellationToken)
708
var
waitCompleted = Task.WhenAny(asyncWaiter, Task.Delay(millisecondsTimeout, cts.Token));
system\threading\Tasks\ConcurrentExclusiveSchedulerPair.cs (1)
626
var
t = new Task<bool>(s_tryExecuteTaskShim, Tuple.Create(this, task));
system\threading\Tasks\Future.cs (137)
36
/// The type of the result produced by this <see cref="
Task
{TResult}"/>.
40
/// <see cref="
Task
{TResult}"/> instances may be created in a variety of ways. The most common approach is by
43
/// purposes. For example, to create a <see cref="
Task
{TResult}"/> that runs a function, the factory's StartNew
58
/// The <see cref="
Task
{TResult}"/> class also provides constructors that initialize the task but that do not
66
/// All members of <see cref="
Task
{TResult}"/>, except for
87
internal static readonly Func<
Task
<Task>,
Task
<TResult>> TaskWhenAnyCast = completed => (
Task
<TResult>)completed.Result;
126
/// Initializes a new <see cref="
Task
{TResult}"/> with the specified function.
146
/// Initializes a new <see cref="
Task
{TResult}"/> with the specified function.
169
/// Initializes a new <see cref="
Task
{TResult}"/> with the specified function and creation options.
195
/// Initializes a new <see cref="
Task
{TResult}"/> with the specified function and creation options.
225
/// Initializes a new <see cref="
Task
{TResult}"/> with the specified function and state.
245
/// Initializes a new <see cref="
Task
{TResult}"/> with the specified action, state, and options.
269
/// Initializes a new <see cref="
Task
{TResult}"/> with the specified action, state, and options.
298
/// Initializes a new <see cref="
Task
{TResult}"/> with the specified action, state, and options.
349
/// a SelfReplicating <see cref="
Task
{TResult}"/>, which is illegal."/>.</exception>
379
/// a SelfReplicating <see cref="
Task
{TResult}"/>, which is illegal."/>.</exception>
392
internal static
Task
<TResult> StartNew(Task parent, Func<TResult> function, CancellationToken cancellationToken,
410
Task
<TResult> f = new Task<TResult>(function, parent, cancellationToken, creationOptions, internalOptions | InternalTaskOptions.QueuedByRuntime, scheduler, ref stackMark);
417
internal static
Task
<TResult> StartNew(Task parent, Func<object, TResult> function, object state, CancellationToken cancellationToken,
434
Task
<TResult> f = new Task<TResult>(function, state, parent, cancellationToken, creationOptions, internalOptions | InternalTaskOptions.QueuedByRuntime, scheduler, ref stackMark);
522
/// Gets the result value of this <see cref="
Task
{TResult}"/>.
536
/// Gets the result value of this <see cref="
Task
{TResult}"/> once the task has completed successfully.
648
if (AtomicStateUpdate(
Task
<object>.TASK_STATE_COMPLETION_RESERVED,
649
Task
<object>.TASK_STATE_COMPLETION_RESERVED |
Task
<object>.TASK_STATE_CANCELED |
650
Task
<object>.TASK_STATE_FAULTED |
Task
<object>.TASK_STATE_RAN_TO_COMPLETION))
661
/// Provides access to factory methods for creating <see cref="
Task
{TResult}"/> instances.
694
/// <summary>Gets an awaiter used to await this <see cref="System.Threading.Tasks.
Task
{TResult}"/>.</summary>
702
/// <summary>Configures an awaiter used to await this <see cref="System.Threading.Tasks.
Task
{TResult}"/>.</summary>
719
/// Creates a continuation that executes when the target <see cref="
Task
{TResult}"/> completes.
722
/// An action to run when the <see cref="
Task
{TResult}"/> completes. When run, the delegate will be
735
public Task ContinueWith(Action<
Task
<TResult>> continuationAction)
743
/// Creates a continuation that executes when the target <see cref="
Task
{TResult}"/> completes.
746
/// An action to run when the <see cref="
Task
{TResult}"/> completes. When run, the delegate will be
763
public Task ContinueWith(Action<
Task
<TResult>> continuationAction, CancellationToken cancellationToken)
771
/// Creates a continuation that executes when the target <see cref="
Task
{TResult}"/> completes.
774
/// An action to run when the <see cref="
Task
{TResult}"/> completes. When run, the delegate will be
793
public Task ContinueWith(Action<
Task
<TResult>> continuationAction, TaskScheduler scheduler)
800
/// Creates a continuation that executes when the target <see cref="
Task
{TResult}"/> completes.
803
/// An action to run when the <see cref="
Task
{TResult}"/> completes. When run, the delegate will be
828
public Task ContinueWith(Action<
Task
<TResult>> continuationAction, TaskContinuationOptions continuationOptions)
835
/// Creates a continuation that executes when the target <see cref="
Task
{TResult}"/> completes.
838
/// An action to run when the <see cref="
Task
{TResult}"/> completes. When run, the delegate will be
873
public Task ContinueWith(Action<
Task
<TResult>> continuationAction, CancellationToken cancellationToken,
881
internal Task ContinueWith(Action<
Task
<TResult>> continuationAction, TaskScheduler scheduler, CancellationToken cancellationToken,
918
/// Creates a continuation that executes when the target <see cref="
Task
{TResult}"/> completes.
921
/// An action to run when the <see cref="
Task
{TResult}"/> completes. When run, the delegate will be
935
public Task ContinueWith(Action<
Task
<TResult>, Object> continuationAction, Object state)
943
/// Creates a continuation that executes when the target <see cref="
Task
{TResult}"/> completes.
946
/// An action to run when the <see cref="
Task
{TResult}"/> completes. When run, the delegate will be
964
public Task ContinueWith(Action<
Task
<TResult>, Object> continuationAction, Object state,CancellationToken cancellationToken)
972
/// Creates a continuation that executes when the target <see cref="
Task
{TResult}"/> completes.
975
/// An action to run when the <see cref="
Task
{TResult}"/> completes. When run, the delegate will be
995
public Task ContinueWith(Action<
Task
<TResult>, Object> continuationAction, Object state, TaskScheduler scheduler)
1002
/// Creates a continuation that executes when the target <see cref="
Task
{TResult}"/> completes.
1005
/// An action to run when the <see cref="
Task
{TResult}"/> completes. When run, the delegate will be
1031
public Task ContinueWith(Action<
Task
<TResult>, Object> continuationAction, Object state,TaskContinuationOptions continuationOptions)
1038
/// Creates a continuation that executes when the target <see cref="
Task
{TResult}"/> completes.
1041
/// An action to run when the <see cref="
Task
{TResult}"/> completes. When run, the delegate will be
1077
public Task ContinueWith(Action<
Task
<TResult>, Object> continuationAction, Object state, CancellationToken cancellationToken,
1085
internal Task ContinueWith(Action<
Task
<TResult>, Object> continuationAction, Object state, TaskScheduler scheduler, CancellationToken cancellationToken,
1123
/// Creates a continuation that executes when the target <see cref="
Task
{TResult}"/> completes.
1129
/// A function to run when the <see cref="
Task
{TResult}"/> completes. When run, the delegate will be
1132
/// <returns>A new continuation <see cref="
Task
{TNewResult}"/>.</returns>
1134
/// The returned <see cref="
Task
{TNewResult}"/> will not be scheduled for execution until the current
1142
public
Task
<TNewResult> ContinueWith<TNewResult>(Func<
Task
<TResult>, TNewResult> continuationFunction)
1150
/// Creates a continuation that executes when the target <see cref="
Task
{TResult}"/> completes.
1156
/// A function to run when the <see cref="
Task
{TResult}"/> completes. When run, the delegate will be
1160
/// <returns>A new continuation <see cref="
Task
{TNewResult}"/>.</returns>
1162
/// The returned <see cref="
Task
{TNewResult}"/> will not be scheduled for execution until the current
1173
public
Task
<TNewResult> ContinueWith<TNewResult>(Func<
Task
<TResult>, TNewResult> continuationFunction, CancellationToken cancellationToken)
1180
/// Creates a continuation that executes when the target <see cref="
Task
{TResult}"/> completes.
1186
/// A function to run when the <see cref="
Task
{TResult}"/> completes. When run, the delegate will be
1192
/// <returns>A new continuation <see cref="
Task
{TNewResult}"/>.</returns>
1194
/// The returned <see cref="
Task
{TNewResult}"/> will not be scheduled for execution until the current task has
1205
public
Task
<TNewResult> ContinueWith<TNewResult>(Func<
Task
<TResult>, TNewResult> continuationFunction, TaskScheduler scheduler)
1212
/// Creates a continuation that executes when the target <see cref="
Task
{TResult}"/> completes.
1218
/// A function to run when the <see cref="
Task
{TResult}"/> completes. When run, the delegate will be
1228
/// <returns>A new continuation <see cref="
Task
{TNewResult}"/>.</returns>
1231
/// The returned <see cref="
Task
{TNewResult}"/> will not be scheduled for execution until the current
1237
/// cref="
Task
{TNewResult}"/>. This task's completion state will be transferred to the task returned
1249
public
Task
<TNewResult> ContinueWith<TNewResult>(Func<
Task
<TResult>, TNewResult> continuationFunction, TaskContinuationOptions continuationOptions)
1256
/// Creates a continuation that executes when the target <see cref="
Task
{TResult}"/> completes.
1262
/// A function to run when the <see cref="
Task
{TResult}"/> completes. When run, the delegate will be passed as
1277
/// <returns>A new continuation <see cref="
Task
{TNewResult}"/>.</returns>
1280
/// The returned <see cref="
Task
{TNewResult}"/> will not be scheduled for execution until the current task has
1285
/// The <paramref name="continuationFunction"/>, when executed, should return a <see cref="
Task
{TNewResult}"/>.
1304
public
Task
<TNewResult> ContinueWith<TNewResult>(Func<
Task
<TResult>, TNewResult> continuationFunction, CancellationToken cancellationToken,
1312
internal
Task
<TNewResult> ContinueWith<TNewResult>(Func<
Task
<TResult>, TNewResult> continuationFunction, TaskScheduler scheduler,
1332
Task
<TNewResult> continuationFuture = new ContinuationResultTaskFromResultTask<TResult,TNewResult>(
1349
/// Creates a continuation that executes when the target <see cref="
Task
{TResult}"/> completes.
1355
/// A function to run when the <see cref="
Task
{TResult}"/> completes. When run, the delegate will be
1359
/// <returns>A new continuation <see cref="
Task
{TNewResult}"/>.</returns>
1361
/// The returned <see cref="
Task
{TNewResult}"/> will not be scheduled for execution until the current
1369
public
Task
<TNewResult> ContinueWith<TNewResult>(Func<
Task
<TResult>, Object, TNewResult> continuationFunction, Object state)
1377
/// Creates a continuation that executes when the target <see cref="
Task
{TResult}"/> completes.
1383
/// A function to run when the <see cref="
Task
{TResult}"/> completes. When run, the delegate will be
1388
/// <returns>A new continuation <see cref="
Task
{TNewResult}"/>.</returns>
1390
/// The returned <see cref="
Task
{TNewResult}"/> will not be scheduled for execution until the current
1401
public
Task
<TNewResult> ContinueWith<TNewResult>(Func<
Task
<TResult>, Object, TNewResult> continuationFunction, Object state,
1409
/// Creates a continuation that executes when the target <see cref="
Task
{TResult}"/> completes.
1415
/// A function to run when the <see cref="
Task
{TResult}"/> completes. When run, the delegate will be
1422
/// <returns>A new continuation <see cref="
Task
{TNewResult}"/>.</returns>
1424
/// The returned <see cref="
Task
{TNewResult}"/> will not be scheduled for execution until the current task has
1435
public
Task
<TNewResult> ContinueWith<TNewResult>(Func<
Task
<TResult>, Object, TNewResult> continuationFunction, Object state,
1443
/// Creates a continuation that executes when the target <see cref="
Task
{TResult}"/> completes.
1449
/// A function to run when the <see cref="
Task
{TResult}"/> completes. When run, the delegate will be
1460
/// <returns>A new continuation <see cref="
Task
{TNewResult}"/>.</returns>
1463
/// The returned <see cref="
Task
{TNewResult}"/> will not be scheduled for execution until the current
1469
/// cref="
Task
{TNewResult}"/>. This task's completion state will be transferred to the task returned
1481
public
Task
<TNewResult> ContinueWith<TNewResult>(Func<
Task
<TResult>, Object, TNewResult> continuationFunction, Object state,
1489
/// Creates a continuation that executes when the target <see cref="
Task
{TResult}"/> completes.
1495
/// A function to run when the <see cref="
Task
{TResult}"/> completes. When run, the delegate will be
1511
/// <returns>A new continuation <see cref="
Task
{TNewResult}"/>.</returns>
1514
/// The returned <see cref="
Task
{TNewResult}"/> will not be scheduled for execution until the current task has
1519
/// The <paramref name="continuationFunction"/>, when executed, should return a <see cref="
Task
{TNewResult}"/>.
1538
public
Task
<TNewResult> ContinueWith<TNewResult>(Func<
Task
<TResult>, Object, TNewResult> continuationFunction, Object state,
1546
internal
Task
<TNewResult> ContinueWith<TNewResult>(Func<
Task
<TResult>, Object, TNewResult> continuationFunction, Object state,
1566
Task
<TNewResult> continuationFuture = new ContinuationResultTaskFromResultTask<TResult,TNewResult>(
1584
/// Subscribes an <see cref="IObserver{TResult}"/> to receive notification of the final state of this <see cref="
Task
{TResult}"/>.
1654
private
Task
<TResult> m_task;
1656
public SystemThreadingTasks_FutureDebugView(
Task
<TResult> task)
system\threading\Tasks\FutureFactory.cs (116)
41
/// <see cref="System.Threading.Tasks.
Task
{TResult}.Factory">Task{TResult}.Factory</see> property.
277
/// Calling StartNew is functionally equivalent to creating a <see cref="
Task
{TResult}"/> using one
284
public
Task
<TResult> StartNew(Func<TResult> function)
288
return
Task
<TResult>.StartNew(currTask, function, m_defaultCancellationToken,
306
/// Calling StartNew is functionally equivalent to creating a <see cref="
Task
{TResult}"/> using one
313
public
Task
<TResult> StartNew(Func<TResult> function, CancellationToken cancellationToken)
317
return
Task
<TResult>.StartNew(currTask, function, cancellationToken,
337
/// Calling StartNew is functionally equivalent to creating a <see cref="
Task
{TResult}"/> using one
344
public
Task
<TResult> StartNew(Func<TResult> function, TaskCreationOptions creationOptions)
348
return
Task
<TResult>.StartNew(currTask, function, m_defaultCancellationToken,
379
/// Calling StartNew is functionally equivalent to creating a <see cref="
Task
{TResult}"/> using one
386
public
Task
<TResult> StartNew(Func<TResult> function, CancellationToken cancellationToken, TaskCreationOptions creationOptions, TaskScheduler scheduler)
389
return
Task
<TResult>.StartNew(
406
/// Calling StartNew is functionally equivalent to creating a <see cref="
Task
{TResult}"/> using one
413
public
Task
<TResult> StartNew(Func<Object, TResult> function, Object state)
417
return
Task
<TResult>.StartNew(currTask, function, state, m_defaultCancellationToken,
437
/// Calling StartNew is functionally equivalent to creating a <see cref="
Task
{TResult}"/> using one
444
public
Task
<TResult> StartNew(Func<Object, TResult> function, Object state, CancellationToken cancellationToken)
448
return
Task
<TResult>.StartNew(currTask, function, state, cancellationToken,
470
/// Calling StartNew is functionally equivalent to creating a <see cref="
Task
{TResult}"/> using one
477
public
Task
<TResult> StartNew(Func<Object, TResult> function, Object state, TaskCreationOptions creationOptions)
481
return
Task
<TResult>.StartNew(currTask, function, state, m_defaultCancellationToken,
514
/// Calling StartNew is functionally equivalent to creating a <see cref="
Task
{TResult}"/> using one
521
public
Task
<TResult> StartNew(Func<Object, TResult> function, Object state, CancellationToken cancellationToken, TaskCreationOptions creationOptions, TaskScheduler scheduler)
524
return
Task
<TResult>.StartNew(Task.InternalCurrentIfAttached(creationOptions), function, state, cancellationToken,
537
Task
<TResult> promise,
611
public
Task
<TResult> FromAsync(IAsyncResult asyncResult, Func<IAsyncResult, TResult> endMethod)
637
public
Task
<TResult> FromAsync(
672
public
Task
<TResult> FromAsync(
685
internal static
Task
<TResult> FromAsyncImpl(
707
Task
<TResult> promise = new Task<TResult>((object)null, creationOptions);
774
public
Task
<TResult> FromAsync(
803
public
Task
<TResult> FromAsync(
812
internal static
Task
<TResult> FromAsyncImpl(Func<AsyncCallback, object, IAsyncResult> beginMethod,
826
Task
<TResult> promise = new Task<TResult>(state, creationOptions);
905
public
Task
<TResult> FromAsync<TArg1>(
939
public
Task
<TResult> FromAsync<TArg1>(
949
internal static
Task
<TResult> FromAsyncImpl<TArg1>(Func<TArg1, AsyncCallback, object, IAsyncResult> beginMethod,
963
Task
<TResult> promise = new Task<TResult>(state, creationOptions);
1046
public
Task
<TResult> FromAsync<TArg1, TArg2>(
1084
public
Task
<TResult> FromAsync<TArg1, TArg2>(
1094
internal static
Task
<TResult> FromAsyncImpl<TArg1, TArg2>(Func<TArg1, TArg2, AsyncCallback, object, IAsyncResult> beginMethod,
1108
Task
<TResult> promise = new Task<TResult>(state, creationOptions);
1194
public
Task
<TResult> FromAsync<TArg1, TArg2, TArg3>(
1236
public
Task
<TResult> FromAsync<TArg1, TArg2, TArg3>(
1246
internal static
Task
<TResult> FromAsyncImpl<TArg1, TArg2, TArg3>(Func<TArg1, TArg2, TArg3, AsyncCallback, object, IAsyncResult> beginMethod,
1260
Task
<TResult> promise = new Task<TResult>(state, creationOptions);
1329
internal static
Task
<TResult> FromAsyncTrim<TInstance, TArgs>(
1466
private static
Task
<TResult> CreateCanceledTask(TaskContinuationOptions continuationOptions, CancellationToken ct)
1495
public
Task
<TResult> ContinueWhenAll(Task[] tasks, Func<Task[], TResult> continuationFunction)
1526
public
Task
<TResult> ContinueWhenAll(Task[] tasks, Func<Task[], TResult> continuationFunction, CancellationToken cancellationToken)
1563
public
Task
<TResult> ContinueWhenAll(Task[] tasks, Func<Task[], TResult> continuationFunction, TaskContinuationOptions continuationOptions)
1610
public
Task
<TResult> ContinueWhenAll(Task[] tasks, Func<Task[], TResult> continuationFunction,
1638
public
Task
<TResult> ContinueWhenAll<TAntecedentResult>(
Task
<TAntecedentResult>[] tasks, Func<
Task
<TAntecedentResult>[], TResult> continuationFunction)
1670
public
Task
<TResult> ContinueWhenAll<TAntecedentResult>(
Task
<TAntecedentResult>[] tasks, Func<
Task
<TAntecedentResult>[], TResult> continuationFunction,
1709
public
Task
<TResult> ContinueWhenAll<TAntecedentResult>(
Task
<TAntecedentResult>[] tasks, Func<
Task
<TAntecedentResult>[], TResult> continuationFunction,
1758
public
Task
<TResult> ContinueWhenAll<TAntecedentResult>(
Task
<TAntecedentResult>[] tasks, Func<
Task
<TAntecedentResult>[], TResult> continuationFunction,
1771
internal static
Task
<TResult> ContinueWhenAllImpl<TAntecedentResult>(
Task
<TAntecedentResult>[] tasks,
1772
Func<
Task
<TAntecedentResult>[], TResult> continuationFunction, Action<
Task
<TAntecedentResult>[]> continuationAction,
1784
Task
<TAntecedentResult>[] tasksCopy = TaskFactory.CheckMultiContinuationTasksAndCopy<TAntecedentResult>(tasks);
1795
var
starter = TaskFactory.CommonCWAllLogic(tasksCopy);
1818
internal static
Task
<TResult> ContinueWhenAllImpl(Task[] tasks,
1842
var
starter = TaskFactory.CommonCWAllLogic(tasksCopy);
1895
public
Task
<TResult> ContinueWhenAny(Task[] tasks, Func<Task, TResult> continuationFunction)
1926
public
Task
<TResult> ContinueWhenAny(Task[] tasks, Func<Task, TResult> continuationFunction, CancellationToken cancellationToken)
1963
public
Task
<TResult> ContinueWhenAny(Task[] tasks, Func<Task, TResult> continuationFunction, TaskContinuationOptions continuationOptions)
2010
public
Task
<TResult> ContinueWhenAny(Task[] tasks, Func<Task, TResult> continuationFunction,
2038
public
Task
<TResult> ContinueWhenAny<TAntecedentResult>(
Task
<TAntecedentResult>[] tasks, Func<
Task
<TAntecedentResult>, TResult> continuationFunction)
2070
public
Task
<TResult> ContinueWhenAny<TAntecedentResult>(
Task
<TAntecedentResult>[] tasks, Func<
Task
<TAntecedentResult>, TResult> continuationFunction,
2109
public
Task
<TResult> ContinueWhenAny<TAntecedentResult>(
Task
<TAntecedentResult>[] tasks, Func<
Task
<TAntecedentResult>, TResult> continuationFunction,
2158
public
Task
<TResult> ContinueWhenAny<TAntecedentResult>(
Task
<TAntecedentResult>[] tasks, Func<
Task
<TAntecedentResult>, TResult> continuationFunction,
2170
internal static
Task
<TResult> ContinueWhenAnyImpl(Task[] tasks,
2185
Task
<Task> starter = TaskFactory.CommonCWAnyLogic(tasks);
2218
internal static
Task
<TResult> ContinueWhenAnyImpl<TAntecedentResult>(
Task
<TAntecedentResult>[] tasks,
2219
Func<
Task
<TAntecedentResult>, TResult> continuationFunction, Action<
Task
<TAntecedentResult>> continuationAction,
2232
var
starter = TaskFactory.CommonCWAnyLogic(tasks);
2267
internal static Func<
Task
<Task>, object, TResult> CWAnyFuncDelegate =
2268
(
Task
<Task> wrappedWinner, object state) =>
2270
var func = (Func<
Task
<TAntecedentResult>, TResult>)state;
2271
var
arg = (
Task
<TAntecedentResult>)wrappedWinner.Result;
2276
internal static Func<
Task
<Task>, object, TResult> CWAnyActionDelegate =
2277
(
Task
<Task> wrappedWinner, object state) =>
2279
var action = (Action<
Task
<TAntecedentResult>>)state;
2280
var
arg = (
Task
<TAntecedentResult>)wrappedWinner.Result;
2286
internal static Func<
Task
<
Task
<TAntecedentResult>[]>, object, TResult> CWAllFuncDelegate =
2287
(
Task
<
Task
<TAntecedentResult>[]> wrappedAntecedents, object state) =>
2290
var func = (Func<
Task
<TAntecedentResult>[], TResult>)state;
2295
internal static Func<
Task
<
Task
<TAntecedentResult>[]>, object, TResult> CWAllActionDelegate =
2296
(
Task
<
Task
<TAntecedentResult>[]> wrappedAntecedents, object state) =>
2299
var action = (Action<
Task
<TAntecedentResult>[]>)state;
system\threading\Tasks\Task.cs (105)
127
/// For operations that return values, the <see cref="System.Threading.Tasks.
Task
{TResult}"/> class
1636
/// Provides access to factory methods for creating <see cref="Task"/> and <see cref="
Task
{TResult}"/> instances.
4145
/// <returns>A new continuation <see cref="
Task
{TResult}"/>.</returns>
4147
/// The returned <see cref="
Task
{TResult}"/> will not be scheduled for execution until the current task has
4155
public
Task
<TResult> ContinueWith<TResult>(Func<Task, TResult> continuationFunction)
4174
/// <returns>A new continuation <see cref="
Task
{TResult}"/>.</returns>
4176
/// The returned <see cref="
Task
{TResult}"/> will not be scheduled for execution until the current task has
4187
public
Task
<TResult> ContinueWith<TResult>(Func<Task, TResult> continuationFunction, CancellationToken cancellationToken)
4206
/// <returns>A new continuation <see cref="
Task
{TResult}"/>.</returns>
4208
/// The returned <see cref="
Task
{TResult}"/> will not be scheduled for execution until the current task has
4219
public
Task
<TResult> ContinueWith<TResult>(Func<Task, TResult> continuationFunction, TaskScheduler scheduler)
4242
/// <returns>A new continuation <see cref="
Task
{TResult}"/>.</returns>
4244
/// The returned <see cref="
Task
{TResult}"/> will not be scheduled for execution until the current task has
4257
public
Task
<TResult> ContinueWith<TResult>(Func<Task, TResult> continuationFunction, TaskContinuationOptions continuationOptions)
4285
/// <returns>A new continuation <see cref="
Task
{TResult}"/>.</returns>
4287
/// The returned <see cref="
Task
{TResult}"/> will not be scheduled for execution until the current task has
4305
public
Task
<TResult> ContinueWith<TResult>(Func<Task, TResult> continuationFunction, CancellationToken cancellationToken,
4313
private
Task
<TResult> ContinueWith<TResult>(Func<Task, TResult> continuationFunction, TaskScheduler scheduler,
4333
Task
<TResult> continuationTask = new ContinuationResultTaskFromTask<TResult>(
4360
/// <returns>A new continuation <see cref="
Task
{TResult}"/>.</returns>
4362
/// The returned <see cref="
Task
{TResult}"/> will not be scheduled for execution until the current task has
4370
public
Task
<TResult> ContinueWith<TResult>(Func<Task, Object, TResult> continuationFunction, Object state)
4390
/// <returns>A new continuation <see cref="
Task
{TResult}"/>.</returns>
4392
/// The returned <see cref="
Task
{TResult}"/> will not be scheduled for execution until the current task has
4403
public
Task
<TResult> ContinueWith<TResult>(Func<Task, Object, TResult> continuationFunction, Object state, CancellationToken cancellationToken)
4423
/// <returns>A new continuation <see cref="
Task
{TResult}"/>.</returns>
4425
/// The returned <see cref="
Task
{TResult}"/> will not be scheduled for execution until the current task has
4436
public
Task
<TResult> ContinueWith<TResult>(Func<Task, Object, TResult> continuationFunction, Object state, TaskScheduler scheduler)
4460
/// <returns>A new continuation <see cref="
Task
{TResult}"/>.</returns>
4462
/// The returned <see cref="
Task
{TResult}"/> will not be scheduled for execution until the current task has
4475
public
Task
<TResult> ContinueWith<TResult>(Func<Task, Object, TResult> continuationFunction, Object state, TaskContinuationOptions continuationOptions)
4504
/// <returns>A new continuation <see cref="
Task
{TResult}"/>.</returns>
4506
/// The returned <see cref="
Task
{TResult}"/> will not be scheduled for execution until the current task has
4524
public
Task
<TResult> ContinueWith<TResult>(Func<Task, Object, TResult> continuationFunction, Object state, CancellationToken cancellationToken,
4532
private
Task
<TResult> ContinueWith<TResult>(Func<Task, Object, TResult> continuationFunction, Object state, TaskScheduler scheduler,
4552
Task
<TResult> continuationTask = new ContinuationResultTaskFromTask<TResult>(
5492
Task
<Task> firstCompleted = TaskFactory.CommonCWAnyLogic(tasks);
5513
/// <summary>Creates a <see cref="
Task
{TResult}"/> that's completed successfully with the specified result.</summary>
5517
public static
Task
<TResult> FromResult<TResult>(TResult result)
5522
/// <summary>Creates a <see cref="
Task
{TResult}"/> that's completed exceptionally with the specified exception.</summary>
5531
/// <summary>Creates a <see cref="
Task
{TResult}"/> that's completed exceptionally with the specified exception.</summary>
5535
public static
Task
<TResult> FromException<TResult>(Exception exception)
5540
var
task = new Task<TResult>();
5565
/// <summary>Creates a <see cref="
Task
{TResult}"/> that's completed due to cancellation with the specified token.</summary>
5570
internal static
Task
<TResult> FromCancellation<TResult>(CancellationToken cancellationToken)
5577
/// <summary>Creates a <see cref="
Task
{TResult}"/> that's completed due to cancellation with the specified token.</summary>
5581
public static
Task
<TResult> FromCanceled<TResult>(CancellationToken cancellationToken)
5586
/// <summary>Creates a <see cref="
Task
{TResult}"/> that's completed due to cancellation with the specified exception.</summary>
5590
internal static
Task
<TResult> FromCancellation<TResult>(OperationCanceledException exception)
5595
var
task = new Task<TResult>();
5650
public static
Task
<TResult> Run<TResult>(Func<TResult> function)
5653
return
Task
<TResult>.StartNew(null, function, default(CancellationToken),
5670
public static
Task
<TResult> Run<TResult>(Func<TResult> function, CancellationToken cancellationToken)
5673
return
Task
<TResult>.StartNew(null, function, cancellationToken,
5721
Task
<Task> task1 =
Task
<Task>.Factory.StartNew(function, cancellationToken, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default);
5740
public static
Task
<TResult> Run<TResult>(Func<
Task
<TResult>> function)
5756
public static
Task
<TResult> Run<TResult>(Func<
Task
<TResult>> function, CancellationToken cancellationToken)
5772
Task
<
Task
<TResult>> task1 =
Task
<
Task
<TResult>>.Factory.StartNew(function, cancellationToken, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default);
6232
public static
Task
<TResult[]> WhenAll<TResult>(IEnumerable<
Task
<TResult>> tasks)
6235
Task
<TResult>[] taskArray = tasks as
Task
<TResult>[];
6242
ICollection<
Task
<TResult>> taskCollection = tasks as ICollection<
Task
<TResult>>;
6246
taskArray = new
Task
<TResult>[taskCollection.Count];
6247
foreach (
var
task in tasks)
6257
List<
Task
<TResult>> taskList = new List<
Task
<TResult>>();
6258
foreach (
Task
<TResult> task in tasks)
6298
public static
Task
<TResult[]> WhenAll<TResult>(params
Task
<TResult>[] tasks)
6307
Task
<TResult>[] tasksCopy = new
Task
<TResult>[taskCount];
6310
Task
<TResult> task = tasks[i];
6320
private static
Task
<TResult[]> InternalWhenAll<TResult>(
Task
<TResult>[] tasks)
6339
private readonly
Task
<T>[] m_tasks;
6343
internal WhenAllPromise(
Task
<T>[] tasks) :
6360
foreach (
var
task in tasks)
6386
Task
<T> task = m_tasks[i];
6469
public static
Task
<Task> WhenAny(params Task[] tasks)
6508
public static
Task
<Task> WhenAny(IEnumerable<Task> tasks)
6546
public static
Task
<
Task
<TResult>> WhenAny<TResult>(params
Task
<TResult>[] tasks)
6553
Task
<Task> intermediate = WhenAny((Task[])tasks);
6556
return intermediate.ContinueWith(
Task
<TResult>.TaskWhenAnyCast, default(CancellationToken),
6575
public static
Task
<
Task
<TResult>> WhenAny<TResult>(IEnumerable<
Task
<TResult>> tasks)
6582
Task
<Task> intermediate = WhenAny((IEnumerable<Task>)tasks);
6585
return intermediate.ContinueWith(
Task
<TResult>.TaskWhenAnyCast, default(CancellationToken),
6591
internal static
Task
<TResult> CreateUnwrapPromise<TResult>(Task outerTask, bool lookForOce)
7256
var
taskOfTaskOfTResult = task as
Task
<
Task
<TResult>>; // it's either a Task<Task> or Task<Task<TResult>>
7258
taskOfTaskOfTResult.Result : ((
Task
<Task>)task).Result);
7298
var
taskTResult = task as
Task
<TResult>;
system\threading\Tasks\TaskCompletionSource.cs (2)
56
private readonly
Task
<TResult> m_task;
127
public
Task
<TResult> Task
system\threading\Tasks\TaskContinuation.cs (14)
127
private
Task
<TAntecedentResult> m_antecedent;
130
Task
<TAntecedentResult> antecedent, Delegate action, object state, TaskCreationOptions creationOptions, InternalTaskOptions internalOptions, ref StackCrawlMark stackMark) :
133
Contract.Requires(action is Action<
Task
<TAntecedentResult>> || action is Action<
Task
<TAntecedentResult>, object>,
146
var
antecedent = m_antecedent;
156
var action = m_action as Action<
Task
<TAntecedentResult>>;
162
var actionWithState = m_action as Action<
Task
<TAntecedentResult>, object>;
175
private
Task
<TAntecedentResult> m_antecedent;
178
Task
<TAntecedentResult> antecedent, Delegate function, object state, TaskCreationOptions creationOptions, InternalTaskOptions internalOptions, ref StackCrawlMark stackMark) :
181
Contract.Requires(function is Func<
Task
<TAntecedentResult>, TResult> || function is Func<
Task
<TAntecedentResult>, object, TResult>,
194
var
antecedent = m_antecedent;
204
var func = m_action as Func<
Task
<TAntecedentResult>, TResult>;
210
var funcWithState = m_action as Func<
Task
<TAntecedentResult>, object, TResult>;
system\threading\Tasks\TaskFactory.cs (95)
562
/// Calling StartNew is functionally equivalent to creating a <see cref="
Task
{TResult}"/> using one
569
public
Task
<TResult> StartNew<TResult>(Func<TResult> function)
573
return
Task
<TResult>.StartNew(currTask, function, m_defaultCancellationToken,
595
/// Calling StartNew is functionally equivalent to creating a <see cref="
Task
{TResult}"/> using one
602
public
Task
<TResult> StartNew<TResult>(Func<TResult> function, CancellationToken cancellationToken)
606
return
Task
<TResult>.StartNew(currTask, function, cancellationToken,
629
/// Calling StartNew is functionally equivalent to creating a <see cref="
Task
{TResult}"/> using one
636
public
Task
<TResult> StartNew<TResult>(Func<TResult> function, TaskCreationOptions creationOptions)
640
return
Task
<TResult>.StartNew(currTask, function, m_defaultCancellationToken,
674
/// Calling StartNew is functionally equivalent to creating a <see cref="
Task
{TResult}"/> using one
681
public
Task
<TResult> StartNew<TResult>(Func<TResult> function, CancellationToken cancellationToken, TaskCreationOptions creationOptions, TaskScheduler scheduler)
684
return
Task
<TResult>.StartNew(
704
/// Calling StartNew is functionally equivalent to creating a <see cref="
Task
{TResult}"/> using one
711
public
Task
<TResult> StartNew<TResult>(Func<Object, TResult> function, Object state)
715
return
Task
<TResult>.StartNew(currTask, function, state, m_defaultCancellationToken,
739
/// Calling StartNew is functionally equivalent to creating a <see cref="
Task
{TResult}"/> using one
746
public
Task
<TResult> StartNew<TResult>(Func<Object, TResult> function, Object state, CancellationToken cancellationToken)
750
return
Task
<TResult>.StartNew(currTask, function, state, cancellationToken,
775
/// Calling StartNew is functionally equivalent to creating a <see cref="
Task
{TResult}"/> using one
782
public
Task
<TResult> StartNew<TResult>(Func<Object, TResult> function, Object state, TaskCreationOptions creationOptions)
786
return
Task
<TResult>.StartNew(currTask, function, state, m_defaultCancellationToken,
822
/// Calling StartNew is functionally equivalent to creating a <see cref="
Task
{TResult}"/> using one
829
public
Task
<TResult> StartNew<TResult>(Func<Object, TResult> function, Object state, CancellationToken cancellationToken,
833
return
Task
<TResult>.StartNew(
1235
public
Task
<TResult> FromAsync<TResult>(
1265
public
Task
<TResult> FromAsync<TResult>(
1299
public
Task
<TResult> FromAsync<TResult>(
1326
public
Task
<TResult> FromAsync<TResult>(
1358
public
Task
<TResult> FromAsync<TResult>(
1389
public
Task
<TResult> FromAsync<TArg1, TResult>(
1425
public
Task
<TResult> FromAsync<TArg1, TResult>(Func<TArg1, AsyncCallback, object, IAsyncResult> beginMethod,
1459
public
Task
<TResult> FromAsync<TArg1, TArg2, TResult>(Func<TArg1, TArg2, AsyncCallback, object, IAsyncResult> beginMethod,
1498
public
Task
<TResult> FromAsync<TArg1, TArg2, TResult>(
1537
public
Task
<TResult> FromAsync<TArg1, TArg2, TArg3, TResult>(
1581
public
Task
<TResult> FromAsync<TArg1, TArg2, TArg3, TResult>(
1691
internal static
Task
<Task[]> CommonCWAllLogic(Task[] tasksCopy)
1712
private sealed class CompleteOnCountdownPromise<T> : Task<
Task
<T>[]>, ITaskCompletionAction
1714
private readonly
Task
<T>[] _tasks;
1717
internal CompleteOnCountdownPromise(
Task
<T>[] tasksCopy) : base()
1769
internal static
Task
<
Task
<T>[]> CommonCWAllLogic<T>(
Task
<T>[] tasksCopy)
1945
public Task ContinueWhenAll<TAntecedentResult>(
Task
<TAntecedentResult>[] tasks, Action<
Task
<TAntecedentResult>[]> continuationAction)
1978
public Task ContinueWhenAll<TAntecedentResult>(
Task
<TAntecedentResult>[] tasks, Action<
Task
<TAntecedentResult>[]> continuationAction,
2017
public Task ContinueWhenAll<TAntecedentResult>(
Task
<TAntecedentResult>[] tasks, Action<
Task
<TAntecedentResult>[]> continuationAction,
2066
public Task ContinueWhenAll<TAntecedentResult>(
Task
<TAntecedentResult>[] tasks, Action<
Task
<TAntecedentResult>[]> continuationAction,
2097
public
Task
<TResult> ContinueWhenAll<TResult>(Task[] tasks, Func<Task[], TResult> continuationFunction)
2133
public
Task
<TResult> ContinueWhenAll<TResult>(Task[] tasks, Func<Task[], TResult> continuationFunction, CancellationToken cancellationToken)
2174
public
Task
<TResult> ContinueWhenAll<TResult>(Task[] tasks, Func<Task[], TResult> continuationFunction, TaskContinuationOptions continuationOptions)
2225
public
Task
<TResult> ContinueWhenAll<TResult>(Task[] tasks, Func<Task[], TResult> continuationFunction, CancellationToken cancellationToken,
2258
public
Task
<TResult> ContinueWhenAll<TAntecedentResult, TResult>(
Task
<TAntecedentResult>[] tasks, Func<
Task
<TAntecedentResult>[], TResult> continuationFunction)
2294
public
Task
<TResult> ContinueWhenAll<TAntecedentResult, TResult>(
Task
<TAntecedentResult>[] tasks, Func<
Task
<TAntecedentResult>[], TResult> continuationFunction,
2337
public
Task
<TResult> ContinueWhenAll<TAntecedentResult, TResult>(
Task
<TAntecedentResult>[] tasks, Func<
Task
<TAntecedentResult>[], TResult> continuationFunction,
2390
public
Task
<TResult> ContinueWhenAll<TAntecedentResult, TResult>(
Task
<TAntecedentResult>[] tasks, Func<
Task
<TAntecedentResult>[], TResult> continuationFunction,
2475
internal static
Task
<Task> CommonCWAnyLogic(IList<Task> tasks)
2692
public
Task
<TResult> ContinueWhenAny<TResult>(Task[] tasks, Func<Task, TResult> continuationFunction)
2727
public
Task
<TResult> ContinueWhenAny<TResult>(Task[] tasks, Func<Task, TResult> continuationFunction, CancellationToken cancellationToken)
2768
public
Task
<TResult> ContinueWhenAny<TResult>(Task[] tasks, Func<Task, TResult> continuationFunction, TaskContinuationOptions continuationOptions)
2819
public
Task
<TResult> ContinueWhenAny<TResult>(Task[] tasks, Func<Task, TResult> continuationFunction, CancellationToken cancellationToken,
2851
public
Task
<TResult> ContinueWhenAny<TAntecedentResult, TResult>(
Task
<TAntecedentResult>[] tasks, Func<
Task
<TAntecedentResult>, TResult> continuationFunction)
2885
public
Task
<TResult> ContinueWhenAny<TAntecedentResult, TResult>(
Task
<TAntecedentResult>[] tasks, Func<
Task
<TAntecedentResult>, TResult> continuationFunction,
2928
public
Task
<TResult> ContinueWhenAny<TAntecedentResult, TResult>(
Task
<TAntecedentResult>[] tasks, Func<
Task
<TAntecedentResult>, TResult> continuationFunction,
2981
public
Task
<TResult> ContinueWhenAny<TAntecedentResult, TResult>(
Task
<TAntecedentResult>[] tasks, Func<
Task
<TAntecedentResult>, TResult> continuationFunction,
3010
public Task ContinueWhenAny<TAntecedentResult>(
Task
<TAntecedentResult>[] tasks, Action<
Task
<TAntecedentResult>> continuationAction)
3042
public Task ContinueWhenAny<TAntecedentResult>(
Task
<TAntecedentResult>[] tasks, Action<
Task
<TAntecedentResult>> continuationAction,
3081
public Task ContinueWhenAny<TAntecedentResult>(
Task
<TAntecedentResult>[] tasks, Action<
Task
<TAntecedentResult>> continuationAction,
3130
public Task ContinueWhenAny<TAntecedentResult>(
Task
<TAntecedentResult>[] tasks, Action<
Task
<TAntecedentResult>> continuationAction,
3162
internal static
Task
<TResult>[] CheckMultiContinuationTasksAndCopy<TResult>(
Task
<TResult>[] tasks)
3170
Task
<TResult>[] tasksCopy = new
Task
<TResult>[tasks.Length];
system\threading\Tasks\TaskToApm.cs (3)
100
Task
<TResult> task;
106
task = twar.Task as
Task
<TResult>;
112
task = asyncResult as
Task
<TResult>;
System (88)
net\System\Net\DNS.cs (6)
1056
public static
Task
<IPAddress[]> GetHostAddressesAsync(string hostNameOrAddress)
1058
return
Task
<IPAddress[]>.Factory.FromAsync(BeginGetHostAddresses, EndGetHostAddresses, hostNameOrAddress, null);
1062
public static
Task
<IPHostEntry> GetHostEntryAsync(IPAddress address)
1064
return
Task
<IPHostEntry>.Factory.FromAsync(BeginGetHostEntry, EndGetHostEntry, address, null);
1068
public static
Task
<IPHostEntry> GetHostEntryAsync(string hostNameOrAddress)
1070
return
Task
<IPHostEntry>.Factory.FromAsync(BeginGetHostEntry, EndGetHostEntry, hostNameOrAddress, null);
net\System\Net\HttpListener.cs (2)
1313
public
Task
<HttpListenerContext> GetContextAsync()
1315
return
Task
<HttpListenerContext>.Factory.FromAsync(BeginGetContext, EndGetContext, null);
net\System\Net\HttpListenerContext.cs (4)
153
public
Task
<HttpListenerWebSocketContext> AcceptWebSocketAsync(string subProtocol)
160
public
Task
<HttpListenerWebSocketContext> AcceptWebSocketAsync(string subProtocol, TimeSpan keepAliveInterval)
167
public
Task
<HttpListenerWebSocketContext> AcceptWebSocketAsync(string subProtocol,
181
public
Task
<HttpListenerWebSocketContext> AcceptWebSocketAsync(string subProtocol,
net\System\Net\HttpListenerRequest.cs (2)
646
public
Task
<X509Certificate2> GetClientCertificateAsync()
648
return
Task
<X509Certificate2>.Factory.FromAsync(BeginGetClientCertificate, EndGetClientCertificate, null);
net\System\Net\mail\BufferedReadStream.cs (2)
77
public override
Task
<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
98
private async
Task
<int> ReadMoreAsync(int bytesAlreadyRead, byte[] buffer, int offset, int count, CancellationToken cancellationToken)
net\System\Net\mail\DelegatedStream.cs (1)
167
public override
Task
<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
net\System\Net\NetworkInformation\IPGlobalProperties.cs (2)
93
public virtual
Task
<UnicastIPAddressInformationCollection> GetUnicastAddressesAsync()
95
return
Task
<UnicastIPAddressInformationCollection>.Factory.FromAsync(BeginGetUnicastAddresses, EndGetUnicastAddresses, null);
net\System\Net\NetworkInformation\ping.cs (9)
495
public
Task
<PingReply> SendPingAsync(IPAddress address)
501
public
Task
<PingReply> SendPingAsync(string hostNameOrAddress)
507
public
Task
<PingReply> SendPingAsync(IPAddress address, int timeout)
513
public
Task
<PingReply> SendPingAsync(string hostNameOrAddress, int timeout)
519
public
Task
<PingReply> SendPingAsync(IPAddress address, int timeout, byte[] buffer)
525
public
Task
<PingReply> SendPingAsync(string hostNameOrAddress, int timeout, byte[] buffer)
531
public
Task
<PingReply> SendPingAsync(IPAddress address, int timeout, byte[] buffer, PingOptions options)
537
public
Task
<PingReply> SendPingAsync(string hostNameOrAddress, int timeout, byte[] buffer, PingOptions options)
542
private
Task
<PingReply> SendPingAsyncCore(Action<TaskCompletionSource<PingReply>> sendAsync)
net\System\Net\Sockets\TCPListener.cs (4)
337
public
Task
<Socket> AcceptSocketAsync()
339
return
Task
<Socket>.Factory.FromAsync(BeginAcceptSocket, EndAcceptSocket, null);
343
public
Task
<TcpClient> AcceptTcpClientAsync()
345
return
Task
<TcpClient>.Factory.FromAsync(BeginAcceptTcpClient, EndAcceptTcpClient, null);
net\System\Net\Sockets\UDPClient.cs (8)
1006
public
Task
<int> SendAsync(byte[] datagram, int bytes)
1008
return
Task
<int>.Factory.FromAsync(BeginSend, EndSend, datagram, bytes, null);
1012
public
Task
<int> SendAsync(byte[] datagram, int bytes, IPEndPoint endPoint)
1014
return
Task
<int>.Factory.FromAsync(BeginSend, EndSend, datagram, bytes, endPoint, null);
1020
public
Task
<int> SendAsync(byte[] datagram, int bytes, string hostname, int port)
1022
return
Task
<int>.Factory.FromAsync((callback, state) => BeginSend(datagram, bytes, hostname, port, callback, state), EndSend, null);
1026
public
Task
<UdpReceiveResult> ReceiveAsync()
1028
return
Task
<UdpReceiveResult>.Factory.FromAsync((callback, state) => BeginReceive(callback, state), (ar)=>
net\System\Net\webclient.cs (26)
2542
public
Task
<string> DownloadStringTaskAsync(string address)
2549
public
Task
<string> DownloadStringTaskAsync(Uri address)
2572
public
Task
<Stream> OpenReadTaskAsync(string address)
2579
public
Task
<Stream> OpenReadTaskAsync(Uri address)
2603
public
Task
<Stream> OpenWriteTaskAsync(string address)
2610
public
Task
<Stream> OpenWriteTaskAsync(Uri address)
2617
public
Task
<Stream> OpenWriteTaskAsync(string address, string method)
2624
public
Task
<Stream> OpenWriteTaskAsync(Uri address, string method)
2650
public
Task
<string> UploadStringTaskAsync(string address, string data)
2657
public
Task
<string> UploadStringTaskAsync(Uri address, string data)
2666
public
Task
<string> UploadStringTaskAsync(string address, string method, string data)
2673
public
Task
<string> UploadStringTaskAsync(Uri address, string method, string data)
2697
public
Task
<byte[]> DownloadDataTaskAsync(string address)
2704
public
Task
<byte[]> DownloadDataTaskAsync(Uri address)
2761
public
Task
<byte[]> UploadDataTaskAsync(string address, byte[] data)
2768
public
Task
<byte[]> UploadDataTaskAsync(Uri address, byte[] data)
2777
public
Task
<byte[]> UploadDataTaskAsync(string address, string method, byte[] data)
2784
public
Task
<byte[]> UploadDataTaskAsync(Uri address, string method, byte[] data)
2810
public
Task
<byte[]> UploadFileTaskAsync(string address, string fileName)
2817
public
Task
<byte[]> UploadFileTaskAsync(Uri address, string fileName)
2826
public
Task
<byte[]> UploadFileTaskAsync(string address, string method, string fileName)
2833
public
Task
<byte[]> UploadFileTaskAsync(Uri address, string method, string fileName)
2860
public
Task
<byte[]> UploadValuesTaskAsync(string address, NameValueCollection data)
2869
public
Task
<byte[]> UploadValuesTaskAsync(string address, string method, NameValueCollection data)
2877
public
Task
<byte[]> UploadValuesTaskAsync(Uri address, NameValueCollection data)
2885
public
Task
<byte[]> UploadValuesTaskAsync(Uri address, string method, NameValueCollection data)
net\System\Net\WebRequest.cs (6)
861
public virtual
Task
<Stream> GetRequestStreamAsync()
883
return
Task
<Stream>.Factory.FromAsync(this.BeginGetRequestStream,
891
return Task.Run(() =>
Task
<Stream>.Factory.FromAsync(this.BeginGetRequestStream,
898
public virtual
Task
<WebResponse> GetResponseAsync()
920
return
Task
<WebResponse>.Factory.FromAsync(this.BeginGetResponse,
928
return Task.Run(() =>
Task
<WebResponse>.Factory.FromAsync(this.BeginGetResponse,
net\System\Net\WebSockets\ClientWebSocket.cs (1)
328
public override
Task
<WebSocketReceiveResult> ReceiveAsync(ArraySegment<byte> buffer,
net\System\Net\WebSockets\WebSocket.cs (1)
135
public abstract
Task
<WebSocketReceiveResult> ReceiveAsync(ArraySegment<byte> buffer,
net\System\Net\WebSockets\WebSocketBase.cs (6)
197
public override
Task
<WebSocketReceiveResult> ReceiveAsync(ArraySegment<byte> buffer,
204
private async
Task
<WebSocketReceiveResult> ReceiveAsyncCore(ArraySegment<byte> buffer,
687
private async
Task
<bool> StartOnCloseCompleted(bool thisLockTakenSnapshot,
893
Task
<WebSocketReceiveResult> receiveAsyncTask = m_ReceiveOperation.Process(closeMessageBuffer,
1645
internal async
Task
<WebSocketReceiveResult> Process(Nullable<ArraySegment<byte>> buffer,
1751
Task
<int> readTask = m_WebSocket.m_InnerStream.ReadAsync(payload.Array,
net\System\Net\WebSockets\WebSocketConnectionStream.cs (3)
197
public async override
Task
<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
733
public override
Task
<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
745
internal
Task
<int> ReadAsyncCore(byte[] buffer, int offset, int count, CancellationToken cancellationToken,
net\System\Net\WebSockets\WebSocketHelpers.cs (3)
54
internal static
Task
<HttpListenerWebSocketContext> AcceptWebSocketAsync(HttpListenerContext context,
67
private static async
Task
<HttpListenerWebSocketContext> AcceptWebSocketAsyncCore(HttpListenerContext context,
281
internal static ConfiguredTaskAwaitable<T> SuppressContextFlow<T>(this
Task
<T> task)
net\System\Net\WebSockets\WebSocketHttpListenerDuplexStream.cs (2)
129
public override
Task
<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
136
private async
Task
<int> ReadAsyncCore(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
System.Core (7)
System\Threading\Tasks\TaskExtensions.cs (7)
38
/// It is often useful to be able to return a Task from a <see cref="System.Threading.Tasks.
Task
{TResult}">
47
public static Task Unwrap(this
Task
<Task> task)
110
/// Creates a proxy <see cref="System.Threading.Tasks.
Task
{TResult}">Task{TResult}</see> that represents the
123
public static
Task
<TResult> Unwrap<TResult>(this
Task
<
Task
<TResult>> task)
180
Task
<TResult> promise = Task.CreateUnwrapPromise<TResult>(task, lookForOce : false);
System.Data (82)
fx\src\data\System\Data\Common\AdapterUtil.cs (6)
54
static internal
Task
<T> CreatedTaskWithException<T>(Exception ex) {
60
static internal
Task
<T> CreatedTaskWithCancellation<T>() {
78
static private
Task
<bool> _trueTask = null;
79
static internal
Task
<bool> TrueTask {
88
static private
Task
<bool> _falseTask = null;
89
static internal
Task
<bool> FalseTask {
fx\src\data\System\Data\Common\DBCommand.cs (9)
204
public
Task
<int> ExecuteNonQueryAsync() {
208
public virtual
Task
<int> ExecuteNonQueryAsync(CancellationToken cancellationToken) {
228
public
Task
<DbDataReader> ExecuteReaderAsync() {
232
public
Task
<DbDataReader> ExecuteReaderAsync(CancellationToken cancellationToken) {
236
public
Task
<DbDataReader> ExecuteReaderAsync(CommandBehavior behavior) {
240
public
Task
<DbDataReader> ExecuteReaderAsync(CommandBehavior behavior, CancellationToken cancellationToken) {
244
protected virtual
Task
<DbDataReader> ExecuteDbDataReaderAsync(CommandBehavior behavior, CancellationToken cancellationToken) {
264
public
Task
<object> ExecuteScalarAsync() {
268
public virtual
Task
<object> ExecuteScalarAsync(CancellationToken cancellationToken) {
fx\src\data\System\Data\Common\DbDataReader.cs (8)
198
public
Task
<T> GetFieldValueAsync<T>(int ordinal) {
202
virtual public
Task
<T> GetFieldValueAsync<T>(int ordinal, CancellationToken cancellationToken) {
220
public
Task
<bool> IsDBNullAsync(int ordinal) {
224
virtual public
Task
<bool> IsDBNullAsync(int ordinal, CancellationToken cancellationToken) {
242
public
Task
<bool> ReadAsync() {
246
virtual public
Task
<bool> ReadAsync(CancellationToken cancellationToken) {
260
public
Task
<bool> NextResultAsync() {
264
virtual public
Task
<bool> NextResultAsync(CancellationToken cancellationToken) {
fx\src\data\System\Data\ProviderBase\DbConnectionFactory.cs (5)
35
static
Task
<DbConnectionInternal>[] s_pendingOpenNonPooled = new
Task
<DbConnectionInternal>[Environment.ProcessorCount];
36
static
Task
<DbConnectionInternal> s_completedTask;
176
static
Task
<DbConnectionInternal> GetCompletedTask()
217
Task
<DbConnectionInternal> newTask;
fx\src\data\System\Data\SqlClient\SqlBulkCopy.cs (4)
502
private
Task
<BulkCopySimpleResultSet> CreateAndExecuteInitialQueryAsync(out BulkCopySimpleResultSet result) {
2004
private void RegisterForConnectionCloseNotification<T>(ref
Task
<T> outterTask) {
2557
Task
<BulkCopySimpleResultSet> internalResultsTask = null;
2663
Task
<object> resultTask = null;
fx\src\data\System\Data\SqlClient\SqlCommand.cs (18)
2272
Task
<object> retryTask = (
Task
<object>)retryFunc(behavior, null, stateObject, TdsParserStaticMethods.GetRemainingTimeout(timeout, firstAttemptStart), true/*inRetry*/, asyncWrite);
2405
public override
Task
<int> ExecuteNonQueryAsync(CancellationToken cancellationToken) {
2421
Task
<int> returnedTask = source.Task;
2425
Task
<int>.Factory.FromAsync(BeginExecuteNonQueryAsync, EndExecuteNonQueryAsync, null).ContinueWith((t) => {
2448
protected override
Task
<DbDataReader> ExecuteDbDataReaderAsync(CommandBehavior behavior, CancellationToken cancellationToken) {
2457
new public
Task
<SqlDataReader> ExecuteReaderAsync() {
2461
new public
Task
<SqlDataReader> ExecuteReaderAsync(CommandBehavior behavior) {
2465
new public
Task
<SqlDataReader> ExecuteReaderAsync(CancellationToken cancellationToken) {
2469
new public
Task
<SqlDataReader> ExecuteReaderAsync(CommandBehavior behavior, CancellationToken cancellationToken) {
2485
Task
<SqlDataReader> returnedTask = source.Task;
2489
Task
<SqlDataReader>.Factory.FromAsync(BeginExecuteReaderAsync, EndExecuteReaderAsync, behavior, null).ContinueWith((t) => {
2512
public override
Task
<object> ExecuteScalarAsync(CancellationToken cancellationToken)
2569
public
Task
<XmlReader> ExecuteXmlReaderAsync() {
2573
public
Task
<XmlReader> ExecuteXmlReaderAsync(CancellationToken cancellationToken) {
2589
Task
<XmlReader> returnedTask = source.Task;
2593
Task
<XmlReader>.Factory.FromAsync(BeginExecuteXmlReaderAsync, EndExecuteXmlReaderAsync, null).ContinueWith((t) => {
4790
private void RegisterForConnectionCloseNotification<T>(ref
Task
<T> outterTask) {
fx\src\data\System\Data\SqlClient\SqlConnection.cs (2)
1466
internal void Retry(
Task
<DbConnectionInternal> retryTask) {
2140
internal void RegisterForConnectionCloseNotification<T>(ref
Task
<T> outterTask, object value, int tag) {
fx\src\data\System\Data\SqlClient\SqlDataReader.cs (20)
3932
public override
Task
<bool> NextResultAsync(CancellationToken cancellationToken) {
3968
Func<Task,
Task
<bool>> moreFunc = null;
3994
internal
Task
<int> GetBytesAsync(int i, byte[] buffer, int index, int length, int timeout, CancellationToken cancellationToken, out int bytesRead) {
4029
Func<Task,
Task
<int>> moreFunc = null;
4064
var
readTask = GetBytesAsyncReadDataStage(i, buffer, index, length, timeout, true, cancellationToken, timeoutToken, out totalBytesRead);
4097
private
Task
<int> GetBytesAsyncReadDataStage(int i, byte[] buffer, int index, int length, int timeout, bool isContinuation, CancellationToken cancellationToken, CancellationToken timeoutToken, out int bytesRead) {
4135
Func<Task,
Task
<int>> moreFunc = null;
4165
Task
<int> retryTask = ContinueRetryable(moreFunc);
4185
public override
Task
<bool> ReadAsync(CancellationToken cancellationToken) {
4284
Func<Task,
Task
<bool>> moreFunc = null;
4324
override public
Task
<bool> IsDBNullAsync(int i, CancellationToken cancellationToken) {
4407
Func<Task,
Task
<bool>> moreFunc = null;
4426
override public
Task
<T> GetFieldValueAsync<T>(int i, CancellationToken cancellationToken) {
4508
Func<Task,
Task
<T>> moreFunc = null;
4564
private
Task
<T> ContinueRetryable<T>(Func<Task,
Task
<T>> moreFunc) {
4620
private
Task
<T> InvokeRetryable<T>(Func<Task,
Task
<T>> moreFunc, TaskCompletionSource<T> source, IDisposable objectToDispose = null) {
4622
Task
<T> task;
4648
private void CompleteRetryable<T>(
Task
<T> task, TaskCompletionSource<T> source, IDisposable objectToDispose) {
fx\src\data\System\Data\SqlClient\SqlDataReaderSmi.cs (4)
139
public override
Task
<T> GetFieldValueAsync<T>(int ordinal, CancellationToken cancellationToken) {
199
public override
Task
<bool> IsDBNullAsync(int ordinal, CancellationToken cancellationToken) {
359
public override
Task
<bool> NextResultAsync(CancellationToken cancellationToken)
411
public override
Task
<bool> ReadAsync(CancellationToken cancellationToken)
fx\src\data\System\Data\SqlClient\SqlSequentialStream.cs (4)
140
Task
<int> readTask = (
Task
<int>)asyncResult;
153
public override
Task
<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
187
Task
<int> getBytesTask = null;
fx\src\data\System\Data\SqlClient\SqlSequentialTextReader.cs (2)
127
public override
Task
<int> ReadAsync(char[] buffer, int index, int count)
178
Task
<int> getBytesTask = reader.GetBytesAsync(_columnIndex, byteBuffer, byteBufferUsed, byteBuffer.Length - byteBufferUsed, Timeout.Infinite, _disposalTokenSource.Token, out bytesRead);
System.ServiceModel (34)
System\ServiceModel\Channels\HttpChannelHelpers.cs (1)
1576
protected override
Task
<Stream> CreateContentReadStreamAsync()
System\ServiceModel\Channels\HttpChannelListener.cs (4)
1487
/// <returns>A <see cref="
Task
<T>"/> representing the operation.</returns>
1488
public
Task
<HttpResponseMessage> ProcessPipelineAsync(HttpRequestMessage request, CancellationToken cancellationToken)
1557
/// <returns>A <see cref="
Task
<T>"/> representing the operation.</returns>
1558
protected override
Task
<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
System\ServiceModel\Channels\HttpPipeline.cs (4)
116
public abstract
Task
<HttpResponseMessage> Dispatch(HttpRequestMessage httpRequestMessage);
235
public override
Task
<HttpResponseMessage> Dispatch(HttpRequestMessage httpRequestMessage)
394
Task
<HttpResponseMessage> transportIntegrationHandlerTask;
486
public override
Task
<HttpResponseMessage> Dispatch(HttpRequestMessage httpRequestMessage)
System\ServiceModel\Channels\HttpRequestContext.cs (5)
485
Task
<WebSocketContext> acceptTask;
521
protected abstract
Task
<WebSocketContext> AcceptWebSocketCore(HttpResponseMessage response, string protocol);
795
protected override
Task
<WebSocketContext> AcceptWebSocketCore(HttpResponseMessage response, string protocol)
1123
Task
<WebSocketContext> acceptTask = result as
Task
<WebSocketContext>;
System\ServiceModel\Channels\ServiceChannelProxy.cs (2)
272
public static
Task
<T> CreateGenericTask<T>(ServiceChannel channel, ProxyOperationRuntime operation, object[] inputParameters)
288
return
Task
<T>.Factory.FromAsync<ServiceChannel, ProxyOperationRuntime, object[]>(beginCallDelegate, endCallDelegate, channel, operation, inputParameters, OperationContext.Current);
System\ServiceModel\Channels\WebSocketConnectionHandler.cs (1)
56
protected override
Task
<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
System\ServiceModel\Channels\WebSocketTransportDuplexSessionChannel.cs (7)
663
Task
<WebSocketReceiveResult> receiveTask = this.webSocket.ReceiveAsync(
876
Task
<WebSocketReceiveResult> receiveTask = this.webSocket.ReceiveAsync(
1191
Task
<int> task = this.webSocket.ReceiveAsync(new ArraySegment<byte>(buffer, offset, count), cancellationTokenSource.Token).ContinueWith(t =>
1221
Task
<int> task = (
Task
<int>)asyncResult;
1261
Task
<WebSocketReceiveResult> task = this.webSocket.ReceiveAsync(new ArraySegment<byte>(buffer, offset, count), CancellationToken.None);
1468
Task
<WebSocketReceiveResult> receiveTask = this.webSocket.ReceiveAsync(new ArraySegment<byte>(this.initialReadBuffer.Array), CancellationToken.None);
System\ServiceModel\Description\MetadataExchangeClient.cs (4)
296
public
Task
<MetadataSet> GetMetadataAsync()
306
public
Task
<MetadataSet> GetMetadataAsync(Uri address, MetadataExchangeClientMode mode)
317
public
Task
<MetadataSet> GetMetadataAsync(EndpointAddress address)
327
public
Task
<MetadataSet> GetMetadataAsync(EndpointAddress address, Uri via)
System\ServiceModel\Description\ServiceReflector.cs (1)
342
internal static readonly Type taskTResultType = typeof(
Task
<>);
System\ServiceModel\Dispatcher\TaskMethodInvoker.cs (5)
90
Task
<Tuple<object, object[]>> invokeTask = result as
Task
<Tuple<object, object[]>>;
174
private async
Task
<Tuple<object, object[]>> InvokeAsync(object instance, object[] inputs)
262
private static
Task
<TResult> ToApm<TResult>(
Task
<TResult> task, AsyncCallback callback, object state)
System.ServiceModel.Activation (1)
System\ServiceModel\Activation\HostedHttpContext.cs (1)
86
protected override
Task
<WebSocketContext> AcceptWebSocketCore(HttpResponseMessage response, string protocol)
System.ServiceModel.Discovery (6)
System\ServiceModel\Discovery\DiscoveryClient.cs (6)
425
public
Task
<FindResponse> FindTaskAsync(FindCriteria criteria)
431
public
Task
<FindResponse> FindTaskAsync(FindCriteria criteria, CancellationToken cancellationToken)
440
Task
<FindResponse> task = taskCompletionSource.Task;
446
public
Task
<ResolveResponse> ResolveTaskAsync(ResolveCriteria criteria)
452
public
Task
<ResolveResponse> ResolveTaskAsync(ResolveCriteria criteria, CancellationToken cancellationToken)
461
Task
<ResolveResponse> task = taskCompletionSource.Task;
System.ServiceModel.Internals (7)
System\Runtime\TaskExtensions.cs (7)
13
public static IAsyncResult AsAsyncResult<T>(this
Task
<T> task, AsyncCallback callback, object state)
102
public static ConfiguredTaskAwaitable<T> SuppressContextFlow<T>(this
Task
<T> task)
112
public static ConfiguredTaskAwaitable<T> ContinueOnCapturedContextFlow<T>(this
Task
<T> task)
191
public static
Task
<TBase> Upcast<TDerived, TBase>(this
Task
<TDerived> task) where TDerived : TBase
198
private static async
Task
<TBase> UpcastPrivate<TDerived, TBase>(this
Task
<TDerived> task) where TDerived : TBase
System.Web (18)
Hosting\ApplicationManager.cs (2)
627
private static
Task
<ApplicationResumeStateContainer> _dummyCompletedSuspendTask = Task.FromResult<ApplicationResumeStateContainer>(null);
628
private static
Task
<ApplicationResumeStateContainer> CreateSuspendTask(LockableAppDomainContext appDomainContext) {
Hosting\HostingEnvironment.cs (1)
143
private static readonly
Task
<object> _completedTask = Task.FromResult<object>(null);
UI\Page.cs (1)
3234
private async
Task
<bool> LoadPostDataAsync(IPostBackDataHandler consumer, string postKey, NameValueCollection postCollection) {
UI\WebControls\ModelDataSourceView.cs (3)
433
if (t.IsGenericType && t.GetGenericTypeDefinition() == typeof(
Task
<>)) {
835
var
operationTaskInt = operationTask as
Task
<int>;
WebSocketPipeline.cs (2)
42
Task
<AspNetWebSocket> webSocketTask = ProcessRequestImplAsync();
68
private async
Task
<AspNetWebSocket> ProcessRequestImplAsync() {
WebSockets\AspNetWebSocket.cs (7)
227
Func<
Task
<WebSocketReceiveResult>> receiveCloseTaskFunc = null;
270
Task
<WebSocketReceiveResult> receiveCloseTask = (receiveCloseTaskFunc != null) ? receiveCloseTaskFunc() : null;
368
public override
Task
<WebSocketReceiveResult> ReceiveAsync(ArraySegment<byte> buffer, CancellationToken cancellationToken) {
372
private Func<
Task
<WebSocketReceiveResult>> ReceiveAsyncImpl(ArraySegment<byte> buffer, CancellationToken cancellationToken, bool performValidation = true) {
562
private async
Task
<T> DoWork<T>(Func<
Task
<T>> taskDelegate, CancellationToken cancellationToken) {
575
Task
<T> task = taskDelegate();
WebSockets\IWebSocketPipe.cs (1)
23
Task
<WebSocketReceiveResult> ReadFragmentAsync(ArraySegment<byte> buffer);
WebSockets\WebSocketPipe.cs (1)
118
public
Task
<WebSocketReceiveResult> ReadFragmentAsync(ArraySegment<byte> buffer) {
System.Xml (276)
System\Xml\AsyncHelper.cs (15)
11
public static readonly
Task
<bool> DoneTaskTrue = Task.FromResult(true);
13
public static readonly
Task
<bool> DoneTaskFalse = Task.FromResult(false);
15
public static readonly
Task
<int> DoneTaskZero = Task.FromResult(0);
36
public static
Task
<bool> ReturnTaskBoolWhenFinish(this Task task, bool ret) {
48
public static async
Task
<bool> _ReturnTaskBoolWhenFinish(this Task task, bool ret) {
67
public static
Task
<bool> CallBoolTaskFuncWhenFinish(this Task task, Func<
Task
<bool>> func) {
76
private static async
Task
<bool> _CallBoolTaskFuncWhenFinish(this Task task, Func<
Task
<bool>> func) {
81
public static
Task
<bool> ContinueBoolTaskFuncWhenFalse(this
Task
<bool> task, Func<
Task
<bool>> func) {
93
private static async
Task
<bool> _ContinueBoolTaskFuncWhenFalse(
Task
<bool> task, Func<
Task
<bool>> func) {
System\Xml\BinaryXml\XmlBinaryReaderAsync.cs (14)
22
public override
Task
<string> GetValueAsync() {
26
public override
Task
<bool> ReadAsync() {
30
public override
Task
<object> ReadContentAsObjectAsync() {
34
public override
Task
<object> ReadContentAsAsync(Type returnType, IXmlNamespaceResolver namespaceResolver) {
38
public override
Task
<XmlNodeType> MoveToContentAsync() {
42
public override
Task
<string> ReadContentAsStringAsync() {
46
public override
Task
<int> ReadContentAsBase64Async(byte[] buffer, int index, int count) {
50
public override
Task
<object> ReadElementContentAsAsync(Type returnType, IXmlNamespaceResolver namespaceResolver) {
54
public override
Task
<object> ReadElementContentAsObjectAsync() {
58
public override
Task
<int> ReadElementContentAsBinHexAsync(byte[] buffer, int index, int count) {
62
public override
Task
<string> ReadInnerXmlAsync() {
66
public override
Task
<string> ReadOuterXmlAsync() {
70
public override
Task
<int> ReadValueChunkAsync(char[] buffer, int index, int count) {
78
public override
Task
<string> ReadElementContentAsStringAsync() {
System\Xml\Core\IDtdParserAdapterAsync.cs (5)
20
Task
< int > ReadDataAsync();
22
Task
< int > ParseNumericCharRefAsync( BufferBuilder internalSubsetBuilder );
23
Task
< int > ParseNamedCharRefAsync( bool expand, BufferBuilder internalSubsetBuilder );
27
Task
< Tuple<int,bool> > PushEntityAsync( IDtdEntityInfo entity);
29
Task
< bool > PushExternalSubsetAsync( string systemId, string publicId );
System\Xml\Core\IDtdParserAsync.cs (2)
18
Task
<IDtdInfo> ParseInternalDtdAsync(IDtdParserAdapter adapter, bool saveInternalSubset);
20
Task
<IDtdInfo> ParseFreeFloatingDtdAsync(string baseUri, string docTypeName, string publicId, string systemId, string internalSubset, IDtdParserAdapter adapter);
System\Xml\Core\ReadContentAsBinaryHelperAsync.cs (9)
12
internal async
Task
< int > ReadContentAsBase64Async( byte[] buffer, int index, int count ) {
59
internal async
Task
< int > ReadContentAsBinHexAsync( byte[] buffer, int index, int count ) {
106
internal async
Task
< int > ReadElementContentAsBase64Async( byte[] buffer, int index, int count ) {
153
internal async
Task
< int > ReadElementContentAsBinHexAsync( byte[] buffer, int index, int count ) {
216
private async
Task
< bool > InitAsync() {
227
private async
Task
< bool > InitOnElementAsync() {
251
private async
Task
< int > ReadContentAsBinaryAsync( byte[] buffer, int index, int count ) {
299
private async
Task
< int > ReadElementContentAsBinaryAsync( byte[] buffer, int index, int count ) {
320
async
Task
< bool > MoveToNextContentNodeAsync( bool moveIfOnContentNode ) {
System\Xml\Core\XmlAsyncCheckReader.cs (32)
660
public override
Task
<string> GetValueAsync() {
662
var
task = coreReader.GetValueAsync();
667
public override
Task
<object> ReadContentAsObjectAsync() {
669
var
task = coreReader.ReadContentAsObjectAsync();
674
public override
Task
<string> ReadContentAsStringAsync() {
676
var
task = coreReader.ReadContentAsStringAsync();
681
public override
Task
<object> ReadContentAsAsync(Type returnType, IXmlNamespaceResolver namespaceResolver) {
683
var
task = coreReader.ReadContentAsAsync(returnType, namespaceResolver);
688
public override
Task
<object> ReadElementContentAsObjectAsync() {
690
var
task = coreReader.ReadElementContentAsObjectAsync();
695
public override
Task
<string> ReadElementContentAsStringAsync() {
697
var
task = coreReader.ReadElementContentAsStringAsync();
702
public override
Task
<object> ReadElementContentAsAsync(Type returnType, IXmlNamespaceResolver namespaceResolver) {
704
var
task = coreReader.ReadElementContentAsAsync(returnType, namespaceResolver);
709
public override
Task
<bool> ReadAsync() {
711
var
task = coreReader.ReadAsync();
723
public override
Task
<int> ReadContentAsBase64Async(byte[] buffer, int index, int count) {
725
var
task = coreReader.ReadContentAsBase64Async(buffer, index, count);
730
public override
Task
<int> ReadElementContentAsBase64Async(byte[] buffer, int index, int count) {
732
var
task = coreReader.ReadElementContentAsBase64Async(buffer, index, count);
737
public override
Task
<int> ReadContentAsBinHexAsync(byte[] buffer, int index, int count) {
739
var
task = coreReader.ReadContentAsBinHexAsync(buffer, index, count);
744
public override
Task
<int> ReadElementContentAsBinHexAsync(byte[] buffer, int index, int count) {
746
var
task = coreReader.ReadElementContentAsBinHexAsync(buffer, index, count);
751
public override
Task
<int> ReadValueChunkAsync(char[] buffer, int index, int count) {
753
var
task = coreReader.ReadValueChunkAsync(buffer, index, count);
758
public override
Task
<XmlNodeType> MoveToContentAsync() {
760
var
task = coreReader.MoveToContentAsync();
765
public override
Task
<string> ReadInnerXmlAsync() {
767
var
task = coreReader.ReadInnerXmlAsync();
772
public override
Task
<string> ReadOuterXmlAsync() {
774
var
task = coreReader.ReadOuterXmlAsync();
System\Xml\Core\XmlCharCheckingReaderAsync.cs (5)
17
public override async
Task
< bool > ReadAsync() {
183
public override async
Task
< int > ReadContentAsBase64Async( byte[] buffer, int index, int count ) {
219
public override async
Task
< int > ReadContentAsBinHexAsync( byte[] buffer, int index, int count ) {
255
public override async
Task
< int > ReadElementContentAsBase64Async( byte[] buffer, int index, int count ) {
305
public override async
Task
< int > ReadElementContentAsBinHexAsync( byte[] buffer, int index, int count ) {
System\Xml\Core\XmlReaderAsync.cs (19)
28
public virtual
Task
<string> GetValueAsync() {
34
public virtual async
Task
< object > ReadContentAsObjectAsync() {
43
public virtual
Task
< string > ReadContentAsStringAsync() {
52
public virtual async
Task
< object > ReadContentAsAsync(Type returnType, IXmlNamespaceResolver namespaceResolver) {
79
public virtual async
Task
< object > ReadElementContentAsObjectAsync() {
89
public virtual async
Task
< string > ReadElementContentAsStringAsync() {
99
public virtual async
Task
< object > ReadElementContentAsAsync(Type returnType, IXmlNamespaceResolver namespaceResolver) {
115
public virtual
Task
< bool > ReadAsync() {
130
public virtual
Task
< int > ReadContentAsBase64Async(byte[] buffer, int index, int count) {
135
public virtual
Task
< int > ReadElementContentAsBase64Async(byte[] buffer, int index, int count) {
140
public virtual
Task
< int > ReadContentAsBinHexAsync(byte[] buffer, int index, int count) {
145
public virtual
Task
< int > ReadElementContentAsBinHexAsync(byte[] buffer, int index, int count) {
151
public virtual
Task
< int > ReadValueChunkAsync(char[] buffer, int index, int count) {
158
public virtual async
Task
< XmlNodeType > MoveToContentAsync() {
177
public virtual async
Task
< string > ReadInnerXmlAsync() {
258
public virtual async
Task
< string > ReadOuterXmlAsync() {
290
private async
Task
< bool > SkipSubtreeAsync() {
310
internal async
Task
< string > InternalReadContentAsStringAsync() {
354
private async
Task
< bool > SetupReadElementContentAsXxxAsync(string methodName) {
System\Xml\Core\XmlSubtreeReaderAsync.cs (13)
15
public override
Task
<string> GetValueAsync() {
24
public override async
Task
< bool > ReadAsync() {
162
public override async
Task
< object > ReadContentAsObjectAsync() {
175
public override async
Task
< string > ReadContentAsStringAsync() {
188
public override async
Task
< object > ReadContentAsAsync( Type returnType, IXmlNamespaceResolver namespaceResolver ) {
201
public override async
Task
< int > ReadContentAsBase64Async( byte[] buffer, int index, int count ) {
270
public override async
Task
< int > ReadElementContentAsBase64Async( byte[] buffer, int index, int count ) {
320
public override async
Task
< int > ReadContentAsBinHexAsync( byte[] buffer, int index, int count ) {
388
public override async
Task
< int > ReadElementContentAsBinHexAsync( byte[] buffer, int index, int count ) {
437
public override
Task
< int > ReadValueChunkAsync( char[] buffer, int index, int count ) {
483
private async
Task
< bool > InitReadElementContentAsBinaryAsync( State binaryState ) {
510
private async
Task
< bool > FinishReadElementContentAsBinaryAsync() {
539
private async
Task
< bool > FinishReadContentAsBinaryAsync() {
System\Xml\Core\XmlTextReaderImpl.cs (1)
669
System.Threading.Tasks.
Task
<object> t = laterInitParam.inputUriResolver.GetEntityAsync(laterInitParam.inputbaseUri, string.Empty, typeof(Stream));
System\Xml\Core\XmlTextReaderImplAsync.cs (80)
37
public override
Task
<string> GetValueAsync() {
45
private async
Task
<string> _GetValueAsync() {
145
public override
Task
<bool> ReadAsync() {
259
private
Task
<bool> ReadAsync_SwitchToInteractiveXmlDecl() {
262
Task
<bool> task = ParseXmlDeclarationAsync(false);
271
private async
Task
<bool> _ReadAsync_SwitchToInteractiveXmlDecl(
Task
<bool> task) {
276
private
Task
<bool> ReadAsync_SwitchToInteractiveXmlDecl_Helper(bool finish) {
346
private async
Task
<int> ReadContentAsBase64_AsyncHelper(
Task
<bool> task, byte[] buffer, int index, int count) {
361
public override
Task
< int > ReadContentAsBase64Async( byte[] buffer, int index, int count ) {
397
Task
<bool> task = InitReadContentAsBinaryAsync();
416
public override async
Task
< int > ReadContentAsBinHexAsync( byte[] buffer, int index, int count ) {
464
private async
Task
<int> ReadElementContentAsBase64Async_Helper(
Task
<bool> task, byte[] buffer, int index, int count) {
479
public override
Task
< int > ReadElementContentAsBase64Async( byte[] buffer, int index, int count ) {
515
Task
<bool> task = InitReadElementContentAsBinaryAsync();
534
public override async
Task
< int > ReadElementContentAsBinHexAsync( byte[] buffer, int index, int count ) {
583
public override async
Task
< int > ReadValueChunkAsync( char[] buffer, int index, int count ) {
690
internal
Task
< int > DtdParserProxy_ReadDataAsync() {
695
internal async
Task
< int > DtdParserProxy_ParseNumericCharRefAsync( BufferBuilder internalSubsetBuilder ) {
703
internal
Task
< int > DtdParserProxy_ParseNamedCharRefAsync( bool expand, BufferBuilder internalSubsetBuilder ) {
756
internal async
Task
< Tuple<int, bool> > DtdParserProxy_PushEntityAsync(IDtdEntityInfo entity) {
786
internal async
Task
< bool > DtdParserProxy_PushExternalSubsetAsync( string systemId, string publicId ) {
981
async
Task
< int > ReadDataAsync() {
1104
private async
Task
< bool > ParseXmlDeclarationAsync( bool isTextDecl ) {
1379
private
Task
<bool> ParseDocumentContentAsync() {
1485
private
Task
<bool> ParseDocumentContentAsync_CData() {
1492
private async
Task
<bool> ParseDocumentContentAsync_ParseEntity() {
1531
private
Task
<bool> ParseDocumentContentAsync_WhiteSpace() {
1532
Task
<bool> task = ParseTextAsync();
1549
private async
Task
<bool> _ParseDocumentContentAsync_WhiteSpace(
Task
<bool> task) {
1559
private async
Task
<bool> ParseDocumentContentAsync_ReadData(bool needMoreChars) {
1595
private
Task
<bool> ParseElementContentAsync() {
1677
private async
Task
<bool> ParseElementContent_ReadData() {
1778
Task
< Tuple<int,int> > parseQNameTask = ParseQNameAsync();
1785
private Task ParseElementAsync_ContinueWithSetElement(
Task
<Tuple<int,int>> task) {
1797
private async Task _ParseElementAsync_ContinueWithSetElement(
Task
<Tuple<int, int>> task) {
2696
private
Task
<bool> ParseTextAsync() {
2711
Task
<Tuple<int,int,int,bool>> parseTextTask = ParseTextAsync(orChars);
2747
private async
Task
< bool > _ParseTextAsync(
Task
<Tuple<int,int,int,bool>> parseTask) {
2896
private
Task
<bool> ParseTextAsync_IgnoreNode() {
2955
private
Task
<Tuple<int, int, int, bool>> parseText_dummyTask = Task.FromResult(new Tuple<int, int, int, bool>(0,0,0,false));
2958
private
Task
<Tuple<int, int, int, bool>> ParseTextAsync(int outOrChars) {
2959
Task
<Tuple<int, int, int, bool>> task = ParseTextAsync(outOrChars, ps.chars, ps.charPos, 0, -1, outOrChars, (char)0);
2996
private async
Task
<Tuple<int, int, int, bool>> ParseTextAsync_AsyncFunc(
Task
<Tuple<int, int, int, bool>> task) {
3031
private
Task
<Tuple<int, int, int, bool>> ParseTextAsync(int outOrChars, char[] chars, int pos, int rcount, int rpos, int orChars, char c) {
3129
private async
Task
<Tuple<int, int, int, bool>> ParseTextAsync_ParseEntity(int outOrChars, char[] chars, int pos, int rcount, int rpos, int orChars, char c) {
3192
private async
Task
<Tuple<int, int, int, bool>> ParseTextAsync_Surrogate(int outOrChars, char[] chars, int pos, int rcount, int rpos, int orChars, char c) {
3224
private async
Task
<Tuple<int, int, int, bool>> ParseTextAsync_ReadData(int outOrChars, char[] chars, int pos, int rcount, int rpos, int orChars, char c)
3268
private
Task
<Tuple<int, int, int, bool>> ParseTextAsync_NoValue(int outOrChars, int pos) {
3272
private
Task
<Tuple<int, int, int, bool>> ParseTextAsync_PartialValue(int pos, int rcount, int rpos, int orChars, char c) {
3423
private async
Task
< bool > ParseRootLevelWhitespaceAsync() {
3466
private async
Task
< Tuple<int, EntityType> > HandleEntityReferenceAsync(bool isInAttributeValue, EntityExpandType expandType) {
3548
private async
Task
< EntityType > HandleGeneralEntityReferenceAsync( string name, bool isInAttributeValue, bool pushFakeEntityIfNullResolver, int entityStartLinePos ) {
3628
private
Task
< bool > ParsePIAsync() {
3634
private async
Task
< bool > ParsePIAsync( BufferBuilder piInDtdStringBuilder ) {
3735
private async
Task
< Tuple<int, int, bool> > ParsePIValueAsync() {
3877
private async
Task
< bool > ParseCommentAsync() {
3944
private async
Task
< Tuple<int, int, bool> > ParseCDataOrCommentTupleAsync(XmlNodeType type) {
4094
private async
Task
< bool > ParseDoctypeDeclAsync() {
4437
private async
Task
< int > EatWhitespacesAsync( BufferBuilder sb ) {
4525
private async
Task
< Tuple<EntityType, int> > ParseNumericCharRefAsync(bool expand, BufferBuilder internalSubsetBuilder) {
4556
private async
Task
< int > ParseNamedCharRefAsync( bool expand, BufferBuilder internalSubsetBuilder ) {
4578
private async
Task
< int > ParseNameAsync() {
4585
private
Task
< Tuple<int, int> > ParseQNameAsync() {
4591
private async
Task
< Tuple<int, int> > ParseQNameAsync(bool isQName, int startOffset) {
4700
private async
Task
< Tuple<int, bool> > ReadDataInNameAsync(int pos) {
4711
private async
Task
< string > ParseEntityNameAsync() {
4797
private async
Task
< bool > OpenAndPushAsync( Uri uri ) {
4832
private async
Task
< bool > PushExternalEntityAsync( IDtdEntityInfo entity ) {
4875
private async
Task
< bool > ZeroEndingStreamAsync( int pos ) {
4902
async
Task
< bool > InitReadContentAsBinaryAsync() {
4923
async
Task
< bool > InitReadElementContentAsBinaryAsync() {
4949
async
Task
< bool > MoveToNextContentNodeAsync( bool moveIfOnContentNode ) {
4978
async
Task
< int > ReadContentAsBinaryAsync( byte[] buffer, int index, int count ) {
5062
async
Task
< int > ReadElementContentAsBinaryAsync( byte[] buffer, int index, int count ) {
System\Xml\Core\XmlTextReaderImplHelpersAsync.cs (5)
36
Task
< int > IDtdParserAdapter.ReadDataAsync() {
40
Task
< int > IDtdParserAdapter.ParseNumericCharRefAsync( BufferBuilder internalSubsetBuilder ) {
44
Task
< int > IDtdParserAdapter.ParseNamedCharRefAsync( bool expand, BufferBuilder internalSubsetBuilder ) {
56
Task
< Tuple<int,bool> > IDtdParserAdapter.PushEntityAsync( IDtdEntityInfo entity ) {
62
Task
< bool > IDtdParserAdapter.PushExternalSubsetAsync( string systemId, string publicId ) {
System\Xml\Core\XmlValidatingReaderImplAsync.cs (7)
21
public override
Task
<string> GetValueAsync() {
26
public override async
Task
< bool > ReadAsync() {
67
public override async
Task
< int > ReadContentAsBase64Async( byte[] buffer, int index, int count ) {
88
public override async
Task
< int > ReadContentAsBinHexAsync( byte[] buffer, int index, int count ) {
109
public override async
Task
< int > ReadElementContentAsBase64Async( byte[] buffer, int index, int count ) {
130
public override async
Task
< int > ReadElementContentAsBinHexAsync( byte[] buffer, int index, int count ) {
160
public async
Task
< object > ReadTypedValueAsync() {
System\Xml\Core\XmlWrappingReaderAsync.cs (2)
14
public override
Task
<string> GetValueAsync() {
18
public override
Task
< bool > ReadAsync() {
System\Xml\Core\XsdCachingReaderAsync.cs (2)
18
public override
Task
<string> GetValueAsync() {
28
public override async
Task
< bool > ReadAsync() {
System\Xml\Core\XsdValidatingReaderAsync.cs (26)
20
public override
Task
<string> GetValueAsync() {
27
public override
Task
< object > ReadContentAsObjectAsync() {
36
public override async
Task
< string > ReadContentAsStringAsync() {
61
public override async
Task
< object > ReadContentAsAsync(Type returnType, IXmlNamespaceResolver namespaceResolver) {
97
public override async
Task
< object > ReadElementContentAsObjectAsync() {
108
public override async
Task
< string > ReadElementContentAsStringAsync() {
138
public override async
Task
< object > ReadElementContentAsAsync(Type returnType, IXmlNamespaceResolver namespaceResolver) {
175
private
Task
<bool> ReadAsync_Read(
Task
<bool> task) {
193
private async
Task
<bool> _ReadAsync_Read(
Task
<bool> task) {
208
private
Task
<bool> ReadAsync_ReadAhead(Task task) {
218
private async
Task
<bool> _ReadAsync_ReadAhead(Task task) {
225
public override
Task
< bool > ReadAsync() {
228
Task
<bool> readTask = coreReader.ReadAsync();
305
public override async
Task
< int > ReadContentAsBase64Async(byte[] buffer, int index, int count) {
328
public override async
Task
< int > ReadContentAsBinHexAsync(byte[] buffer, int index, int count) {
351
public override async
Task
< int > ReadElementContentAsBase64Async(byte[] buffer, int index, int count) {
374
public override async
Task
< int > ReadElementContentAsBinHexAsync(byte[] buffer, int index, int count) {
547
private
Task
< object > InternalReadContentAsObjectAsync() {
551
private async
Task
< object > InternalReadContentAsObjectAsync(bool unwrapTypedValue) {
559
private async
Task
< Tuple<string, object> > InternalReadContentAsObjectTupleAsync(bool unwrapTypedValue) {
624
private
Task
< Tuple<XmlSchemaType, object> > InternalReadElementContentAsObjectAsync() {
630
private async
Task
< Tuple<XmlSchemaType, object> > InternalReadElementContentAsObjectAsync(bool unwrapTypedValue) {
638
private async
Task
< Tuple<XmlSchemaType, string, object> > InternalReadElementContentAsObjectTupleAsync(bool unwrapTypedValue) {
705
private async
Task
< object > ReadTillEndElementAsync() {
System\Xml\Resolvers\XmlPreloadedResolverAsync.cs (1)
21
public override
Task
<Object> GetEntityAsync(Uri absoluteUri,
System\Xml\Schema\DtdParserAsync.cs (31)
28
async
Task
< IDtdInfo > IDtdParser.ParseInternalDtdAsync(IDtdParserAdapter adapter, bool saveInternalSubset) {
34
async
Task
< IDtdInfo > IDtdParser.ParseFreeFloatingDtdAsync(string baseUri, string docTypeName, string publicId, string systemId, string internalSubset, IDtdParserAdapter adapter) {
1121
private async
Task
< Tuple<string, string> > ParseExternalIdAsync(Token idTokenType, Token declType) {
1192
private async
Task
< Token > GetTokenAsync( bool needWhiteSpace ) {
1308
private async
Task
< Token > ScanSubsetContentAsync() {
1445
private async
Task
< Token > ScanNameExpectedAsync() {
1451
private async
Task
< Token > ScanQNameExpectedAsync() {
1457
private async
Task
< Token > ScanNmtokenExpectedAsync() {
1463
private async
Task
< Token > ScanDoctype1Async() {
1493
private async
Task
< Token > ScanElement1Async() {
1532
private async
Task
< Token > ScanElement2Async() {
1555
private async
Task
< Token > ScanElement3Async() {
1571
private async
Task
< Token > ScanAttlist1Async() {
1587
private async
Task
< Token > ScanAttlist2Async() {
1700
private async
Task
< Token > ScanAttlist6Async() {
1759
private async
Task
< Token > ScanLiteralAsync( LiteralType literalType ) {
1969
private async
Task
< Token > ScanNotation1Async() {
1991
private async
Task
< Token > ScanSystemIdAsync() {
2002
private async
Task
< Token > ScanEntity1Async() {
2016
private async
Task
< Token > ScanEntity2Async() {
2044
private async
Task
< Token > ScanEntity3Async() {
2064
private async
Task
< Token > ScanPublicId1Async() {
2075
private async
Task
< Token > ScanPublicId2Async() {
2087
private async
Task
< Token > ScanCondSection1Async() {
2140
private async
Task
< Token > ScanCondSection3Async() {
2347
private async
Task
< bool > ReadDataInNameAsync() {
2407
private async
Task
< bool > EatPublicKeywordAsync() {
2423
private async
Task
< bool > EatSystemKeywordAsync() {
2442
async
Task
< int > ReadDataAsync() {
2452
private
Task
< bool > HandleEntityReferenceAsync( bool paramEntity, bool inLiteral, bool inAttribute ) {
2460
private async
Task
< bool > HandleEntityReferenceAsync( XmlQualifiedName entityName, bool paramEntity, bool inLiteral, bool inAttribute ) {
System\Xml\Schema\ParserAsync.cs (1)
15
public async
Task
< SchemaType > ParseAsync(XmlReader reader, string targetNamespace) {
System\Xml\XmlDownloadManagerAsync.cs (3)
20
internal
Task
<Stream> GetStreamAsync(Uri uri, ICredentials credentials, IWebProxy proxy,
30
private async
Task
<Stream> GetNonFileStreamAsync(Uri uri, ICredentials credentials, IWebProxy proxy,
43
WebResponse resp = await
Task
<WebResponse>.Factory.FromAsync(req.BeginGetResponse, req.EndGetResponse, null).ConfigureAwait(false);
System\Xml\XmlResolverAsync.cs (1)
8
public virtual
Task
<Object> GetEntityAsync(Uri absoluteUri,
System\Xml\XmlSecureResolverAsync.cs (1)
9
public override
Task
<object> GetEntityAsync(Uri absoluteUri, string role, Type ofObjectToReturn) {
System\Xml\XmlUrlResolverAsync.cs (1)
12
public override async
Task
<Object> GetEntityAsync(Uri absoluteUri, string role, Type ofObjectToReturn) {
WindowsBase (2)
Base\System\Windows\Threading\DispatcherOperation.cs (2)
790
public new
Task
<TResult> Task
795
return (
Task
<TResult>)((DispatcherOperation)this).Task;