private async Task GetImageNow2(ImageRequest request) { var stream = await _xbmc.GetImageStream(request.ImgUri); var file = await _tmpDir.CreateFileAsync(request.FileName); var fileStream = await file.OpenStreamForWriteAsync(); await stream.CopyToAsync(fileStream); fileStream.Dispose(); _files.Add(request.FileName); var filePath = Path.Combine(_tmpDir.Path, request.FileName); request.InvokeCallback(filePath); }