/// <summary>
 /// List the logs for a deployment for a website.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.WebSitesExtensions.IDeploymentOperations.
 /// </param>
 /// <param name='deploymentId'>
 /// Required. The deployment identifier.
 /// </param>
 /// <param name='parameters'>
 /// Optional. Additional parameters.
 /// </param>
 /// <returns>
 /// The list of deployments operation response.
 /// </returns>
 public static Task<DeploymentListLogsResponse> ListLogsAsync(this IDeploymentOperations operations, string deploymentId, DeploymentListParameters parameters)
 {
     return operations.ListLogsAsync(deploymentId, parameters, CancellationToken.None);
 }
 /// <summary>
 /// List the deployments for a website.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.WebSitesExtensions.IDeploymentOperations.
 /// </param>
 /// <param name='parameters'>
 /// Optional. Additional parameters.
 /// </param>
 /// <returns>
 /// The list of deployments operation response.
 /// </returns>
 public static Task<DeploymentListResponse> ListAsync(this IDeploymentOperations operations, DeploymentListParameters parameters)
 {
     return operations.ListAsync(parameters, CancellationToken.None);
 }
 /// <summary>
 /// List the logs for a deployment for a website.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.WebSitesExtensions.IDeploymentOperations.
 /// </param>
 /// <param name='deploymentId'>
 /// Required. The deployment identifier.
 /// </param>
 /// <param name='parameters'>
 /// Optional. Additional parameters.
 /// </param>
 /// <returns>
 /// The list of deployments operation response.
 /// </returns>
 public static DeploymentListLogsResponse ListLogs(this IDeploymentOperations operations, string deploymentId, DeploymentListParameters parameters)
 {
     return Task.Factory.StartNew((object s) => 
     {
         return ((IDeploymentOperations)s).ListLogsAsync(deploymentId, parameters);
     }
     , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult();
 }
コード例 #4
0
 /// <summary>
 /// List the deployments for a website.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.WebSitesExtensions.IDeploymentOperations.
 /// </param>
 /// <param name='parameters'>
 /// Additional parameters.
 /// </param>
 /// <returns>
 /// The list of deployments operation response.
 /// </returns>
 public static DeploymentListResponse List(this IDeploymentOperations operations, DeploymentListParameters parameters)
 {
     try
     {
         return operations.ListAsync(parameters).Result;
     }
     catch (AggregateException ex)
     {
         if (ex.InnerExceptions.Count > 1)
         {
             throw;
         }
         else
         {
             throw ex.InnerException;
         }
     }
 }