<?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 How to correctly  create a task in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-correctly-create-a-task/m-p/135506#M4157</link>
    <description>&lt;P&gt;I'm trying to create folder and then to store the metadata of create folder:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; try&lt;BR /&gt; {&lt;BR /&gt; FolderMetadata folderMetadata = client.Files.CreateFolderAsync(newFolderPath).Result;&lt;BR /&gt; }&lt;BR /&gt; catch (Exception e)&lt;BR /&gt; {&lt;BR /&gt; string m = e.Message;&lt;BR /&gt; }&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And it crashes without any&amp;nbsp;exception.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This method is working for oneDrive :&amp;nbsp;LiveOperationResult meResult = liveConnectClient.GetAsync("me").Result; //this gets info about the client and is also an awaitable task&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So what's the best way to create a folder?&lt;/P&gt;
&lt;P&gt;This one?&lt;/P&gt;
&lt;TABLE border="0"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD class="code"&gt;
&lt;DIV class="container"&gt;
&lt;DIV class="line number1 index0 alt2"&gt;
&lt;CODE class="csharp keyword"&gt;async&lt;/CODE&gt; &lt;CODE class="csharp plain"&gt;Task CreateFolder(string folderName&lt;/CODE&gt;&lt;CODE class="csharp plain"&gt;)&lt;/CODE&gt;
&lt;/DIV&gt;
&lt;DIV class="line number2 index1 alt1"&gt;&lt;CODE class="csharp plain"&gt;{&lt;/CODE&gt;&lt;/DIV&gt;
&lt;DIV class="line number3 index2 alt2"&gt;
&lt;CODE class="csharp spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/CODE&gt;&lt;CODE class="csharp keyword"&gt;var&lt;/CODE&gt; &lt;CODE class="csharp plain"&gt;response = &lt;/CODE&gt;&lt;CODE class="csharp keyword"&gt;await&lt;/CODE&gt; &lt;CODE class="csharp plain"&gt;dbx.Files.CreateFolderAsync(folderName&lt;/CODE&gt;&lt;CODE class="csharp plain"&gt;);&lt;/CODE&gt;
&lt;/DIV&gt;
&lt;DIV class="line number4 index3 alt1"&gt;&lt;CODE class="csharp spaces"&gt;&amp;nbsp;&amp;nbsp;&lt;/CODE&gt;&lt;/DIV&gt;
&lt;DIV class="line number7 index6 alt2"&gt;&lt;CODE class="csharp plain"&gt;}&lt;/CODE&gt;&lt;/DIV&gt;
&lt;DIV class="line number7 index6 alt2"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="line number7 index6 alt2"&gt;&lt;CODE class="csharp plain"&gt;And then to call:&lt;/CODE&gt;&lt;/DIV&gt;
&lt;DIV class="line number7 index6 alt2"&gt;
&lt;DIV class="line number9 index8 alt2"&gt;&lt;CODE class="csharp spaces"&gt;&amp;nbsp; System.Threading.Tasks.Task taskCreateFolder = Task.Run(() =&amp;gt; CreateFolder(cloudPath));&lt;BR /&gt; taskCreateFolder.Wait();&lt;BR /&gt;&lt;/CODE&gt;&lt;/DIV&gt;
&lt;DIV class="line number9 index8 alt2"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="line number9 index8 alt2"&gt;&lt;CODE class="csharp spaces"&gt;Thanks&lt;/CODE&gt;&lt;/DIV&gt;
&lt;DIV class="line number9 index8 alt2"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;</description>
    <pubDate>Wed, 29 May 2019 09:40:00 GMT</pubDate>
    <dc:creator>Nenciu D.</dc:creator>
    <dc:date>2019-05-29T09:40:00Z</dc:date>
    <item>
      <title>How to correctly  create a task</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-correctly-create-a-task/m-p/135506#M4157</link>
      <description>&lt;P&gt;I'm trying to create folder and then to store the metadata of create folder:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; try&lt;BR /&gt; {&lt;BR /&gt; FolderMetadata folderMetadata = client.Files.CreateFolderAsync(newFolderPath).Result;&lt;BR /&gt; }&lt;BR /&gt; catch (Exception e)&lt;BR /&gt; {&lt;BR /&gt; string m = e.Message;&lt;BR /&gt; }&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And it crashes without any&amp;nbsp;exception.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This method is working for oneDrive :&amp;nbsp;LiveOperationResult meResult = liveConnectClient.GetAsync("me").Result; //this gets info about the client and is also an awaitable task&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So what's the best way to create a folder?&lt;/P&gt;
&lt;P&gt;This one?&lt;/P&gt;
&lt;TABLE border="0"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD class="code"&gt;
&lt;DIV class="container"&gt;
&lt;DIV class="line number1 index0 alt2"&gt;
&lt;CODE class="csharp keyword"&gt;async&lt;/CODE&gt; &lt;CODE class="csharp plain"&gt;Task CreateFolder(string folderName&lt;/CODE&gt;&lt;CODE class="csharp plain"&gt;)&lt;/CODE&gt;
&lt;/DIV&gt;
&lt;DIV class="line number2 index1 alt1"&gt;&lt;CODE class="csharp plain"&gt;{&lt;/CODE&gt;&lt;/DIV&gt;
&lt;DIV class="line number3 index2 alt2"&gt;
&lt;CODE class="csharp spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/CODE&gt;&lt;CODE class="csharp keyword"&gt;var&lt;/CODE&gt; &lt;CODE class="csharp plain"&gt;response = &lt;/CODE&gt;&lt;CODE class="csharp keyword"&gt;await&lt;/CODE&gt; &lt;CODE class="csharp plain"&gt;dbx.Files.CreateFolderAsync(folderName&lt;/CODE&gt;&lt;CODE class="csharp plain"&gt;);&lt;/CODE&gt;
&lt;/DIV&gt;
&lt;DIV class="line number4 index3 alt1"&gt;&lt;CODE class="csharp spaces"&gt;&amp;nbsp;&amp;nbsp;&lt;/CODE&gt;&lt;/DIV&gt;
&lt;DIV class="line number7 index6 alt2"&gt;&lt;CODE class="csharp plain"&gt;}&lt;/CODE&gt;&lt;/DIV&gt;
&lt;DIV class="line number7 index6 alt2"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="line number7 index6 alt2"&gt;&lt;CODE class="csharp plain"&gt;And then to call:&lt;/CODE&gt;&lt;/DIV&gt;
&lt;DIV class="line number7 index6 alt2"&gt;
&lt;DIV class="line number9 index8 alt2"&gt;&lt;CODE class="csharp spaces"&gt;&amp;nbsp; System.Threading.Tasks.Task taskCreateFolder = Task.Run(() =&amp;gt; CreateFolder(cloudPath));&lt;BR /&gt; taskCreateFolder.Wait();&lt;BR /&gt;&lt;/CODE&gt;&lt;/DIV&gt;
&lt;DIV class="line number9 index8 alt2"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="line number9 index8 alt2"&gt;&lt;CODE class="csharp spaces"&gt;Thanks&lt;/CODE&gt;&lt;/DIV&gt;
&lt;DIV class="line number9 index8 alt2"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;</description>
      <pubDate>Wed, 29 May 2019 09:40:00 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-correctly-create-a-task/m-p/135506#M4157</guid>
      <dc:creator>Nenciu D.</dc:creator>
      <dc:date>2019-05-29T09:40:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to correctly  create a task</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-correctly-create-a-task/m-p/135507#M4158</link>
      <description>&lt;P&gt;Your code looks fine. What do you mean by "it crashes without any&amp;nbsp;exception"? That shouldn't be possible. It looks like you're storing the exception message but not reading it (string m = e.Message).&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I&amp;nbsp;recommend adding a breakpoint there to see what the actual API exception is. For example, it's possible&amp;nbsp;newFolderPath is invalid.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Sep 2015 04:51:49 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-correctly-create-a-task/m-p/135507#M4158</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2015-09-15T04:51:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to correctly  create a task</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-correctly-create-a-task/m-p/135508#M4159</link>
      <description>&lt;P&gt;Hi Gregory,&lt;/P&gt;
&lt;P&gt;Thanks for all your answers.&lt;/P&gt;
&lt;P&gt;I'm trying to get the result of a task using the following:&lt;/P&gt;
&lt;P&gt;try&lt;/P&gt;
&lt;P&gt;{&lt;/P&gt;
&lt;P&gt;&amp;nbsp;ListFolderResult allItems = dbxClient.Files.EndListFolder(dbxClient.Files.ListFolderAsync(string.Empty, true));&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;
&lt;P&gt;catch(ApiException&amp;lt;ListFolderContinueError&amp;gt; err)&lt;/P&gt;
&lt;P&gt;{&lt;/P&gt;
&lt;P&gt;string message = err.Message;&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;
&lt;P&gt;And not getting any error message.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Sep 2015 15:32:48 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-correctly-create-a-task/m-p/135508#M4159</guid>
      <dc:creator>Nenciu D.</dc:creator>
      <dc:date>2015-09-16T15:32:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to correctly  create a task</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-correctly-create-a-task/m-p/135509#M4160</link>
      <description>&lt;P&gt;So you're saying the code execution doesn't enter the catch block, which should mean&amp;nbsp;the method succeeded? In that case, from your code, it looks like&amp;nbsp;allItems should then be defined containing the information.&amp;nbsp;What do you do with&amp;nbsp;allItems after this code runs?&lt;/P&gt;</description>
      <pubDate>Thu, 17 Sep 2015 01:53:49 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-correctly-create-a-task/m-p/135509#M4160</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2015-09-17T01:53:49Z</dc:date>
    </item>
  </channel>
</rss>

