Exemplo n.º 1
0
 /// <summary>Ends the await on the completed <see cref="System.Threading.Tasks.Task"/>.</summary>
 /// <returns>The result of the completed <see cref="System.Threading.Tasks.Task{TResult}"/>.</returns>
 /// <exception cref="System.NullReferenceException">The awaiter was not properly initialized.</exception>
 /// <exception cref="System.Threading.Tasks.TaskCanceledException">The task was canceled.</exception>
 /// <exception cref="System.Exception">The task completed in a Faulted state.</exception>
 public void GetResult()
 {
     TaskAwaiter.ValidateEnd(m_task);
 }
 /// <summary>
 /// Ends the await on the completed <see cref="T:System.Threading.Tasks.Task`1"/>.
 /// </summary>
 ///
 /// <returns>
 /// The result of the completed <see cref="T:System.Threading.Tasks.Task`1"/>.
 /// </returns>
 /// <exception cref="T:System.NullReferenceException">The awaiter was not properly initialized.</exception><exception cref="T:System.InvalidOperationException">The task was not yet completed.</exception><exception cref="T:System.Threading.Tasks.TaskCanceledException">The task was canceled.</exception><exception cref="T:System.Exception">The task completed in a Faulted state.</exception>
 public TResult GetResult()
 {
     TaskAwaiter.ValidateEnd(_task);
     return(_task.Result);
 }
Exemplo n.º 3
0
 public TResult GetResult()
 {
     TaskAwaiter.ValidateEnd((Task)this.m_task);
     return(this.m_task.ResultOnSuccess);
 }