Пример #1
0
 /// <summary>Initializes the <see cref="ConfiguredTaskAwaitable"/>.</summary>
 /// <param name="task">The awaitable <see cref="System.Threading.Tasks.Task"/>.</param>
 /// <param name="continueOnCapturedContext">
 /// true to attempt to marshal the continuation back to the original context captured; otherwise, false.
 /// </param>
 internal ConfiguredTaskAwaitable(Task task, bool continueOnCapturedContext)
 {
     Contract.Requires(task != null, "Constructing an awaitable requires a task to await.");
     m_configuredTaskAwaiter = new ConfiguredTaskAwaitable.ConfiguredTaskAwaiter(task, continueOnCapturedContext);
 }
Пример #2
0
 /// <summary>Initializes the <see cref="ConfiguredTaskAwaitable"/>.</summary>
 /// <param name="task">The awaitable <see cref="System.Threading.Tasks.Task"/>.</param>
 /// <param name="continueOnCapturedContext">
 /// true to attempt to marshal the continuation back to the original context captured; otherwise, false.
 /// </param>
 internal ConfiguredTaskAwaitable(Task task, bool continueOnCapturedContext)
 {
     Contract.Requires(task != null, "Constructing an awaitable requires a task to await.");
     m_configuredTaskAwaiter = new ConfiguredTaskAwaitable.ConfiguredTaskAwaiter(task, continueOnCapturedContext);
 }
 internal ConfiguredTaskAwaitable(Task task, bool continueOnCapturedContext)
 {
     this.m_configuredTaskAwaiter = new ConfiguredTaskAwaitable.ConfiguredTaskAwaiter(task, continueOnCapturedContext);
 }