User Profile & Activity

Misery Chen Member

 Hi  support:

         I    tried your instance, can run normally, but when I create a new project, and refer to the same DLL, Appear the same mistake again.  

  my codes:

public SimpleViewModel()

        {

            this.ShowToastCommand = new DelegateCommand(ShowToast);

        }

        private async void ShowToast(object parameter)

        {

            string baseUrl = "http://www.google.com";

            IRestClient client = new RestClient();

            client.BaseUrl = baseUrl;

            IRestRequest request = new RestRequest(HttpMethod.GET);

            IRestResponse response= await client.ExecuteAsync(request);

            string mydata = response.Content;

        }




Hi :

     Now ,the  keyword works well.  But when I build my project ,  new problem comes:

Also about that  :  

    IRestResponse response = await client.ExecuteAsync(request);

error 13 can't wait “System.Threading.Tasks.Task<Intersoft.Crosslight.RestClient.IRestResponse>”

Now,what can i do ?

    Hi support:

       About the question I had asked ,thanks very much,it works well now.

by the way, I mat a new problem. that's also about  Service Data Access. 

           // execute the RestRequest

            IRestResponse response = await client.ExecuteAsync(request);

        The await keyword is invalid.

I have found the same problem on internet:

    http://www.intersoftpt.com/Community/Crosslight/IRestResponse-Error-in-ProgramCore/ 

But I don't kown what the BCL Packages means ? a dll or other things? 



All times are GMT -5. The time now is 8:21 PM.
Previous Next