title: Async alternative
body: <p>I am trying to implement this code in my app to backup data to skydrive <a href="http://netitude.bc3tech.net/2012/07/11/skydrive-backup-of-your-mobile-applets-get-some-common-ground/" rel="nofollow">http://netitude.bc3tech.net/2012/07/11/skydrive-backup-of-your-mobile-applets-get-some-common-ground/</a></p>
  
  <p>but how I can not install Async CTP (I tested during 2 - 3 days but async ctp is not installed fine...already I have tried solutions but the problems persist). Would be possible to do the same but not using async? how to wait to complete the task to continue?</p>
  
  <p>using these tools "Windows Phone SDK 7.1 and 7.1.1 Update": <a href="https://dev.windowsphone.com/en-us/downloadsdk" rel="nofollow">https://dev.windowsphone.com/en-us/downloadsdk</a></p>
  
  <p>(...)</p>
  
  <pre><code>var rootFolders = JObject.Parse((await client.GetAsyncTask("/me/skydrive/files?filter=folders,albums")).RawResult);
  var progDataFolder = rootFolders["data"].FirstOrDefault(f =&gt; f.Value&lt;string&gt;("name").Equals("programdata", StringComparison.OrdinalIgnoreCase));
  string progDataFolderId;
  if (progDataFolder == null)
  {
      var result = await client.PostAsyncTask("me/skydrive/",
          new Dictionary&lt;string, object&gt;() { { "name", "ProgramData" } });**
  
      progDataFolderId = JObject.Parse(result.RawResult).Value&lt;string&gt;("folder_id");
  }
  else
  {
      progDataFolderId = progDataFolder.Value&lt;string&gt;("id");
  }
  
  var windowsPhoneFolder = JObject.Parse((await client.GetAsyncTask(string.Concat("/", progDataFolderId, "/files?filter=folders,albums"))).RawResult)["data"]
      .FirstOrDefault(f =&gt; f.Value&lt;string&gt;("name").Equals("windows phone", StringComparison.OrdinalIgnoreCase));
  string windowsPhoneFolderId;
  if (windowsPhoneFolder == null)
  {
      var result = await client.PostAsyncTask(string.Concat("/", progDataFolderId),
          new Dictionary&lt;string, object&gt;() { { "name", "Windows Phone" } });**
  
      windowsPhoneFolderId = JObject.Parse(result.RawResult).Value&lt;string&gt;("id");
  }
  else
  {
      windowsPhoneFolderId = windowsPhoneFolder.Value&lt;string&gt;("id");
  }
  </code></pre>
  
  <p>(...)</p>
  
  <p>Alternative to do this. example:</p>
  
  <pre><code>var result = await client.PostAsyncTask("me/skydrive/",
              new Dictionary&lt;string, object&gt;() { { "name", "ProgramData" } });
  </code></pre>