예제 #1
0
 /// <summary>
 /// Runs the link query asynchronously.
 /// </summary>
 /// <param name="query">The <see cref="T:Microsoft.TeamFoundation.WorkItemTracking.Client.Query"/> to execute.</param>
 /// <param name="cancellationToken">The cancellation token.</param>
 /// <returns></returns>
 public static Task <WorkItemLinkInfo[]> RunLinkQueryAsync(this Query query, CancellationToken cancellationToken = new CancellationToken())
 {
     if (query == null)
     {
         throw new ArgumentNullException("query");
     }
     return(TfsTaskFactory <WorkItemLinkInfo[]> .FromAsync(query.BeginLinkQuery, query.EndLinkQuery, cancellationToken));
 }
예제 #2
0
 /// <summary>
 /// Runs the count query asynchronously.
 /// </summary>
 /// <param name="query">The <see cref="T:Microsoft.TeamFoundation.WorkItemTracking.Client.Query"/> to execute.</param>
 /// <param name="cancellationToken">The cancellation token.</param>
 /// <returns></returns>
 public static Task <int> RunQueryCountAsync(this Query query, CancellationToken cancellationToken = new CancellationToken())
 {
     if (query == null)
     {
         throw new ArgumentNullException("query");
     }
     return(TfsTaskFactory <int> .FromAsync(query.BeginCountOnlyQuery, query.EndCountOnlyQuery, cancellationToken));
 }