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

            var post = new BlogPostData(name, content);

            return(post);
        }
Esempio n. 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);
        }
Esempio n. 3
0
 public async Task RemovePost(string title)
 {
     await BlobService.RemoveBlob(title);
 }
Esempio n. 4
0
 public async Task AddPost(IBlogPostData post)
 {
     await BlobService.AddBlob(post.Title, post.Content);
 }