BlogEngine.Core.API.MetaWeblog.MetaWeblogHandler.DeletePage C# (CSharp) Method

DeletePage() private method

Deletes the page.
///
private DeletePage ( string blogId, string pageId, string userName, string password ) : bool
blogId string /// The blog id. ///
pageId string /// The page id. ///
userName string /// The user name. ///
password string /// The password. ///
return bool
        internal bool DeletePage(string blogId, string pageId, string userName, string password)
        {
            try
            {
                var page = Page.GetPage(new Guid(pageId));
                if (!page.CanUserDelete)
                {
                    throw new MetaWeblogException("11", "User authentication failed");
                }
                page.Delete();
                page.Save();
            }
            catch (Exception ex)
            {
                throw new MetaWeblogException("15", string.Format("DeletePage failed.  Error: {0}", ex.Message));
            }

            return true;
        }