0

这是我的代码..

var signUpData = new
{
   first = "abcd",
   last ="efgh",
   email ="sometext",
   password = "sometext",
   phone = contactSession.ContactNumber,
   dialing_code = "some",
   country = "some"
};

JsonBody = Newtonsoft.Json.JsonConvert.SerializeObject(signUpData);

var tcs = new TaskCompletionSource<Tuple<string, bool>>();

tcs.SetResult(new Tuple<string, bool>(request.ResponseBody,false));//request.ResponseBody is jsonbody that comes from server.

var result = await tcs.Task;

if (result.Item2 == false)
        {
            var errors = JsonConvert.DeserializeAnonymousType(result.Item1, new { error    = "" });

            return false;
        }

然后我有时不是一直都在克服错误。

场景是什么?

谁能告诉我?

4

0 回答 0