public async Task OnPostAsync()
        {
            if (Id != null)
            {
                await _testAppService.Upload(new RemoteStreamContent(Upload.OpenReadStream()) { ContentType = Upload.ContentType }, Id.Value);

                var stream = await _testAppService.Download(Id.Value);

                var ms = new MemoryStream();
                await stream.GetStream().CopyToAsync(ms);
            }
        }
        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);
        }
Esempio n. 3
0
 public virtual async Task <IRemoteStreamContent> Download(Guid id)
 {
     return(await _testAppService.Download(id));
 }