public override void ExecuteCmdlet() { ConfirmAction( Force.IsPresent, string.Format(Resources.RemoveWebsiteWarning, Name), Resources.RemoveWebsiteMessage, Name, () => { Site websiteObject = WebsitesClient.GetWebsite(Name); WebsitesClient.DeleteWebsite(websiteObject.WebSpace, Name); Cache.RemoveSite(CurrentSubscription.SubscriptionId, websiteObject); }); }
public override void ExecuteCmdlet() { ConfirmAction( Force.IsPresent, string.Format(Resources.RemoveWebsiteWarning, Name), Resources.RemoveWebsiteMessage, Name, () => { try { Site websiteObject = WebsitesClient.GetWebsite(Name, Slot); WebsitesClient.DeleteWebsite(websiteObject.WebSpace, Name, Slot); Cache.RemoveSite(CurrentContext.Subscription.Id.ToString(), websiteObject); } catch (CloudException) { // Ignore exception the website slot was deleted when deleting the production. } }); }