/// <summary>
 /// The Begin Update Application Gateway operation  updates Application
 /// Gateway with the specified  parameters.  (see
 /// http://msdn.microsoft.com/en-us/library/windowsazure/jj154114.aspx
 /// for more information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.Network.IApplicationGatewayOperations.
 /// </param>
 /// <param name='gatewayName'>
 /// Required. Gateway name
 /// </param>
 /// <param name='updateParameters'>
 /// Required. Parameters supplied to the Begin UpdateApplication
 /// Gateway request.
 /// </param>
 /// <returns>
 /// A standard service response including an HTTP status code and
 /// request ID.
 /// </returns>
 public static Task<GatewayOperationResponse> BeginUpdateApplicationGatewayAsync(this IApplicationGatewayOperations operations, string gatewayName, UpdateApplicationGatewayParameters updateParameters)
 {
     return operations.BeginUpdateApplicationGatewayAsync(gatewayName, updateParameters, CancellationToken.None);
 }
 /// <summary>
 /// The Begin Update Application Gateway operation  updates Application
 /// Gateway with the specified  parameters.  (see
 /// http://msdn.microsoft.com/en-us/library/windowsazure/jj154114.aspx
 /// for more information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.Network.IApplicationGatewayOperations.
 /// </param>
 /// <param name='gatewayName'>
 /// Required. Gateway name
 /// </param>
 /// <param name='updateParameters'>
 /// Required. Parameters supplied to the Begin UpdateApplication
 /// Gateway request.
 /// </param>
 /// <returns>
 /// A standard service response including an HTTP status code and
 /// request ID.
 /// </returns>
 public static GatewayOperationResponse BeginUpdateApplicationGateway(this IApplicationGatewayOperations operations, string gatewayName, UpdateApplicationGatewayParameters updateParameters)
 {
     return Task.Factory.StartNew((object s) => 
     {
         return ((IApplicationGatewayOperations)s).BeginUpdateApplicationGatewayAsync(gatewayName, updateParameters);
     }
     , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult();
 }