Exemple #1
0
 /// <summary>
 /// You can swap a web site from one slot to the production slot.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.WebSites.IWebSiteOperations.
 /// </param>
 /// <param name='webSpaceName'>
 /// The name of the web space.
 /// </param>
 /// <param name='webSiteName'>
 /// The name of the web site.
 /// </param>
 /// <param name='slotName'>
 /// The name of the web site slot to swap with the production slot.
 /// </param>
 /// <returns>
 /// The response body contains the status of the specified long-running
 /// operation, indicating whether it has succeeded, is inprogress, has
 /// time dout, or has failed. Note that this status is distinct from
 /// the HTTP status code returned for the Get Operation Status
 /// operation itself.  If the long-running operation failed, the
 /// response body includes error information regarding the failure.
 /// </returns>
 public static WebSiteOperationStatusResponse BeginSwapingSlots(this IWebSiteOperations operations, string webSpaceName, string webSiteName, string slotName)
 {
     try
     {
         return(operations.BeginSwapingSlotsAsync(webSpaceName, webSiteName, slotName).Result);
     }
     catch (AggregateException ex)
     {
         if (ex.InnerExceptions.Count > 1)
         {
             throw;
         }
         else
         {
             throw ex.InnerException;
         }
     }
 }
Exemple #2
0
 /// <summary>
 /// You can swap a web site from one slot to the production slot.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.WebSites.IWebSiteOperations.
 /// </param>
 /// <param name='webSpaceName'>
 /// The name of the web space.
 /// </param>
 /// <param name='webSiteName'>
 /// The name of the web site.
 /// </param>
 /// <param name='slotName'>
 /// The name of the web site slot to swap with the production slot.
 /// </param>
 /// <returns>
 /// The response body contains the status of the specified long-running
 /// operation, indicating whether it has succeeded, is inprogress, has
 /// time dout, or has failed. Note that this status is distinct from
 /// the HTTP status code returned for the Get Operation Status
 /// operation itself.  If the long-running operation failed, the
 /// response body includes error information regarding the failure.
 /// </returns>
 public static Task <WebSiteOperationStatusResponse> BeginSwapingSlotsAsync(this IWebSiteOperations operations, string webSpaceName, string webSiteName, string slotName)
 {
     return(operations.BeginSwapingSlotsAsync(webSpaceName, webSiteName, slotName, CancellationToken.None));
 }