Example #1
0
        public async Task <IBlogPostData> GetPost(string title)
        {
            var(name, content) = await BlobService.GetBlob(title);

            var post = new BlogPostData(name, content);

            return(post);
        }
Example #2
0
        public async Task <IList <IBlogPostData> > GetPosts()
        {
            IList <IBlogPostData> posts = new List <IBlogPostData>();

            foreach (var(blobName, blobContent) in await BlobService.GetAllBlobs())
            {
                posts.Add(new BlogPostData(blobName, blobContent));
            }
            return(posts);
        }
Example #3
0
 public async Task RemovePost(string title)
 {
     await BlobService.RemoveBlob(title);
 }
Example #4
0
 public async Task AddPost(IBlogPostData post)
 {
     await BlobService.AddBlob(post.Title, post.Content);
 }