Esempio n. 1
0
        public void DeletePost(string blogId, string postId, bool publish)
        {
            var post = StaticSitePost.GetPostById(Config, postId);

            if (post == null)
            {
                throw new BlogClientException(
                          Res.Get(StringId.SSGErrorPostDoesNotExistTitle),
                          Res.Get(StringId.SSGErrorPostDoesNotExistText));
            }
            DoDeleteItem(post);
        }
Esempio n. 2
0
 /// <summary>
 /// Attempt to get a post with the specified id (note: may return null
 /// if the post could not be found on the remote server)
 /// </summary>
 public BlogPost GetPost(string blogId, string postId)
 => StaticSitePost.GetPostById(Config, postId).BlogPost;