Пример #1
0
        protected override void ParseResponseDelete()
        {
            dynamic JObj = JSONHelper.ParseJSON(JsonOutput);

            Response = JSONHelper.ParseJObject <ResponseUsers>(JObj);

            if (Response.Result == "success")
            {
            }
            else
            {
                throw new FailedCallException(Response);
            }
        }
Пример #2
0
        protected override void ParseResponseGet()
        {
            dynamic JObj = JSONHelper.ParseJSON(JsonOutput);

            Response = JSONHelper.ParseJObject <ResponseUsers>(JObj);

            if (Response.Result == "success")
            {
                UserCollection = new UserCollection();
                var result = JSONHelper.ParseJArray <User>(Response.Members);
                if (result != null)
                {
                    foreach (var user in result)
                    {
                        this.UserCollection.Add(user);
                    }
                }
            }
            else
            {
                throw new FailedCallException(Response);
            }
        }