Exemplo n.º 1
0
 /// <summary>
 /// Retreive a job collection.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.Scheduler.IJobCollectionOperations.
 /// </param>
 /// <param name='cloudServiceName'>
 /// Name of the cloud service.
 /// </param>
 /// <param name='jobCollectionName'>
 /// Name of the job collection.
 /// </param>
 /// <returns>
 /// The Get Job Collection operation response.
 /// </returns>
 public static JobCollectionGetResponse Get(this IJobCollectionOperations operations, string cloudServiceName, string jobCollectionName)
 {
     try
     {
         return(operations.GetAsync(cloudServiceName, jobCollectionName).Result);
     }
     catch (AggregateException ex)
     {
         if (ex.InnerExceptions.Count > 1)
         {
             throw;
         }
         else
         {
             throw ex.InnerException;
         }
     }
 }
 /// <summary>
 /// Retreive a job collection.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.Scheduler.IJobCollectionOperations.
 /// </param>
 /// <param name='cloudServiceName'>
 /// Required. Name of the cloud service.
 /// </param>
 /// <param name='jobCollectionName'>
 /// Required. Name of the job collection.
 /// </param>
 /// <returns>
 /// The Get Job Collection operation response.
 /// </returns>
 public static Task <JobCollectionGetResponse> GetAsync(this IJobCollectionOperations operations, string cloudServiceName, string jobCollectionName)
 {
     return(operations.GetAsync(cloudServiceName, jobCollectionName, CancellationToken.None));
 }