BlogEngine.Core.Providers.XmlBlogProvider.DeletePage C# (CSharp) Method

DeletePage() public method

Deletes a Page from the data store specified by the provider.
public DeletePage ( Page page ) : void
page Page The page to delete.
return void
        public override void DeletePage(Page page)
        {
            var fileName = string.Format("{0}pages{1}{2}.xml", this.Folder, Path.DirectorySeparatorChar, page.Id);
            if (File.Exists(fileName))
            {
                File.Delete(fileName);
            }

            if (Page.Pages.Contains(page))
            {
                Page.Pages.Remove(page);
            }
        }