<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic task async convert to void in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/task-async-convert-to-void/m-p/211838#M10691</link>
    <description>&lt;P&gt;does anyone know a different method not using task async i want to use void&lt;/P&gt;
&lt;PRE&gt;public async Task Download(string remoteFilePath, string localFilePath)
        {
            DropboxClient client2 = new DropboxClient("token");

            remoteFilePath = "img2.jpg";
            localFilePath = Environment.GetFolderPath(Environment.SpecialFolder.Personal);
            using (var response = await client2.Files.DownloadAsync(remoteFilePath))
            {
                using (var fileStream = File.Create(localFilePath))
                {
                    response.GetContentAsStreamAsync().Result.CopyTo(fileStream);
                }

            }
        }&lt;/PRE&gt;</description>
    <pubDate>Wed, 29 May 2019 09:24:41 GMT</pubDate>
    <dc:creator>melium</dc:creator>
    <dc:date>2019-05-29T09:24:41Z</dc:date>
    <item>
      <title>task async convert to void</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/task-async-convert-to-void/m-p/211838#M10691</link>
      <description>&lt;P&gt;does anyone know a different method not using task async i want to use void&lt;/P&gt;
&lt;PRE&gt;public async Task Download(string remoteFilePath, string localFilePath)
        {
            DropboxClient client2 = new DropboxClient("token");

            remoteFilePath = "img2.jpg";
            localFilePath = Environment.GetFolderPath(Environment.SpecialFolder.Personal);
            using (var response = await client2.Files.DownloadAsync(remoteFilePath))
            {
                using (var fileStream = File.Create(localFilePath))
                {
                    response.GetContentAsStreamAsync().Result.CopyTo(fileStream);
                }

            }
        }&lt;/PRE&gt;</description>
      <pubDate>Wed, 29 May 2019 09:24:41 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/task-async-convert-to-void/m-p/211838#M10691</guid>
      <dc:creator>melium</dc:creator>
      <dc:date>2019-05-29T09:24:41Z</dc:date>
    </item>
    <item>
      <title>Re: task async convert to void</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/task-async-convert-to-void/m-p/211964#M10703</link>
      <description>I'm not sure if I follow your question, but if you're looking for alternate versions of the Dropbox .NET methods, they are also available. E.g., for Download:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://dropbox.github.io/dropbox-sdk-dotnet/html/M_Dropbox_Api_Files_Routes_FilesUserRoutes_BeginDownload_1.htm" target="_blank"&gt;https://dropbox.github.io/dropbox-sdk-dotnet/html/M_Dropbox_Api_Files_Routes_FilesUserRoutes_BeginDownload_1.htm&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://dropbox.github.io/dropbox-sdk-dotnet/html/M_Dropbox_Api_Files_Routes_FilesUserRoutes_EndDownload.htm" target="_blank"&gt;https://dropbox.github.io/dropbox-sdk-dotnet/html/M_Dropbox_Api_Files_Routes_FilesUserRoutes_EndDownload.htm&lt;/A&gt;</description>
      <pubDate>Thu, 16 Mar 2017 18:15:46 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/task-async-convert-to-void/m-p/211964#M10703</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2017-03-16T18:15:46Z</dc:date>
    </item>
    <item>
      <title>Re: task async convert to void</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/task-async-convert-to-void/m-p/211986#M10708</link>
      <description>&lt;P&gt;i got it working&lt;/P&gt;
&lt;PRE&gt;public async void DownloadDB()
        {
            try
            {
                DropboxClient client2 = new DropboxClient("token");
                string file = "/data1.db3";
                string folder = @"/data/data/AndroidMaster.AndroidMaster/files/data1.db3";
                using (var response = await client2.Files.DownloadAsync(file))
                {
                    using (var fileStream = File.Create(folder))
                    {
                        (await response.GetContentAsStreamAsync()).CopyTo(fileStream);
                    }
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex);
            }
        }&lt;/PRE&gt;</description>
      <pubDate>Thu, 16 Mar 2017 20:10:08 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/task-async-convert-to-void/m-p/211986#M10708</guid>
      <dc:creator>melium</dc:creator>
      <dc:date>2017-03-16T20:10:08Z</dc:date>
    </item>
  </channel>
</rss>

