/// <summary>
 /// Get a triggered web job.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.WebSitesExtensions.IWebJobOperations.
 /// </param>
 /// <param name='jobName'>
 /// The job name.
 /// </param>
 /// <returns>
 /// The get Web Job Operation Response.
 /// </returns>
 public static WebJobGetResponse GetTriggered(this IWebJobOperations operations, string jobName)
 {
     try
     {
         return(operations.GetTriggeredAsync(jobName).Result);
     }
     catch (AggregateException ex)
     {
         if (ex.InnerExceptions.Count > 1)
         {
             throw;
         }
         else
         {
             throw ex.InnerException;
         }
     }
 }
 /// <summary>
 /// Get a triggered web job.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.WebSitesExtensions.IWebJobOperations.
 /// </param>
 /// <param name='jobName'>
 /// The job name.
 /// </param>
 /// <returns>
 /// The get Web Job Operation Response.
 /// </returns>
 public static Task <WebJobGetResponse> GetTriggeredAsync(this IWebJobOperations operations, string jobName)
 {
     return(operations.GetTriggeredAsync(jobName, CancellationToken.None));
 }