コード例 #1
0
        public virtual async Task SetCoverImageAsync(Guid id, RemoteStreamContent streamContent)
        {
            await Repository.GetAsync(id);

            using (var stream = streamContent.GetStream())
            {
                await BlobContainer.SaveAsync(id.ToString(), stream, overrideExisting : true);
            }
        }
コード例 #2
0
        public async Task RunAsync()
        {
            var output = await _profileAppService.GetAsync();

            Console.WriteLine($"UserName : {output.UserName}");
            Console.WriteLine($"Email    : {output.Email}");
            Console.WriteLine($"Name     : {output.Name}");
            Console.WriteLine($"Surname  : {output.Surname}");

            var id            = Guid.NewGuid();
            var remoteContent = new RemoteStreamContent(new MemoryStream(new byte[] { 1, 2, 3, 4, 5, 6, 7, 8, 9 }))
            {
                ContentType = "application/octet-stream"
            };
            await _testAppService.Upload(remoteContent, id);

            var dl = await _testAppService.Download(id);

            var ms = new MemoryStream();
            await dl.GetStream().CopyToAsync(ms);
        }
コード例 #3
0
 public virtual Task SetCoverImageAsync(Guid id, RemoteStreamContent streamContent)
 {
     return(BlogPostAdminAppService.SetCoverImageAsync(id, streamContent));
 }