/// <summary> /// Redeploys a specific website deployment. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.WebSitesExtensions.IDeploymentOperations. /// </param> /// <param name='deploymentId'> /// The deployment identifier. /// </param> /// <returns> /// The deployment information operation response. /// </returns> public static DeploymentUpdateResponse Redeploy(this IDeploymentOperations operations, string deploymentId) { try { return(operations.RedeployAsync(deploymentId).Result); } catch (AggregateException ex) { if (ex.InnerExceptions.Count > 1) { throw; } else { throw ex.InnerException; } } }
/// <summary> /// Redeploys a specific website deployment. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.WebSitesExtensions.IDeploymentOperations. /// </param> /// <param name='deploymentId'> /// Required. The deployment identifier. /// </param> /// <returns> /// A standard service response including an HTTP status code and /// request ID. /// </returns> public static Task <OperationResponse> RedeployAsync(this IDeploymentOperations operations, string deploymentId) { return(operations.RedeployAsync(deploymentId, CancellationToken.None)); }