title: Get object synchronously from Parse in Xamarin
body: <p>I am trying to fetch and object from class synchronously by following code:</p>
  
  <pre><code>var userName = ParseObject.GetQuery ("Users")
                .WhereEqualTo("UserName","usernameOfUser") ;
  var responseUserName = userName.FindAsync();
  do {
  } while(!responseUserName.IsCompleted || !responseUserName.IsFaulted);
  if(responseUserName.IsFaulted){
       Console.WriteLine("Faulted");
  }
  IEnumerable&lt;ParseObject&gt; result = responseUserName.Result;
  </code></pre>
  
  <p>but 'responseUserName' status is always "waitingForActivation".</p>
  
  <p>if i am doing it wrong please tell the correct way for getting object from class synchronously.</p>
  
  <p>Update: i can not use await. because for await i will have to declare method as async. but i do not want to return control to front end developer(UI developer) until i have result of the query.</p>
  
  <p>Update 2: I can get result by using ContinueWith method. but it does not block the execution until i get results.</p>
  
  <pre><code>var userName = ParseObject.GetQuery (Constants.TABLE_USER)
          .WhereEqualTo(Constants.COL_USER_NAME,user.GetUserName());
  Users RegisteredUser = new Users ();
  var responseUserName = userName.FindAsync().ContinueWith(t=&gt;{
          IEnumerable&lt;ParseObject&gt; result = t.Result;
          if (result.Count() &gt;= 0) {
              Console.WriteLine("Got Records" + result.Count());
          }
  });
  </code></pre>
  
  <p>Thanks</p>