/// <summary>
 /// List the web job runs.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.WebSitesExtensions.IWebJobOperations.
 /// </param>
 /// <param name='jobName'>
 /// The job name.
 /// </param>
 /// <param name='parameters'>
 /// Additional parameters.
 /// </param>
 /// <returns>
 /// The Web Job run list operation response.
 /// </returns>
 public static WebJobRunListResponse ListRuns(this IWebJobOperations operations, string jobName, WebJobRunListParameters parameters)
 {
     try
     {
         return(operations.ListRunsAsync(jobName, parameters).Result);
     }
     catch (AggregateException ex)
     {
         if (ex.InnerExceptions.Count > 1)
         {
             throw;
         }
         else
         {
             throw ex.InnerException;
         }
     }
 }
 /// <summary>
 /// List the web job runs.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.WebSitesExtensions.IWebJobOperations.
 /// </param>
 /// <param name='jobName'>
 /// The job name.
 /// </param>
 /// <param name='parameters'>
 /// Additional parameters.
 /// </param>
 /// <returns>
 /// The Web Job run list operation response.
 /// </returns>
 public static Task <WebJobRunListResponse> ListRunsAsync(this IWebJobOperations operations, string jobName, WebJobRunListParameters parameters)
 {
     return(operations.ListRunsAsync(jobName, parameters, CancellationToken.None));
 }