コード例 #1
0
        public static Dictionary <string, RequestOutput> MapFromJson(Dictionary <string, object> jsonMap)
        {
            Dictionary <string, RequestOutput> result = new Dictionary <string, RequestOutput>();

            foreach (var entry in jsonMap)
            {
                RequestOutput value = CreateFromDictionary(entry.Value as Dictionary <string, object>);
                result.Add(entry.Key, value);
            }
            return(result);
        }
コード例 #2
0
ファイル: RequestOutput.cs プロジェクト: EJBQ/Bae-Zeus-X
        public static RequestOutput CreateFromDictionary(Dictionary<string, object> jsonMap)
        {
            try
            {
                if (jsonMap == null)
                {
                    return null;
                }

                var request = new RequestOutput();

                if(jsonMap.ContainsKey("requestId"))
                {
                    request.RequestId = (string) jsonMap["requestId"];
                }

                return request;
            }
            catch (System.ApplicationException ex)
            {
                throw new AmazonException("Error encountered while creating Object from dicionary", ex);
            }
        }
コード例 #3
0
        public static RequestOutput CreateFromDictionary(Dictionary <string, object> jsonMap)
        {
            try
            {
                if (jsonMap == null)
                {
                    return(null);
                }

                var request = new RequestOutput();


                if (jsonMap.ContainsKey("requestId"))
                {
                    request.RequestId = (string)jsonMap["requestId"];
                }

                return(request);
            }
            catch (System.ApplicationException ex)
            {
                throw new AmazonException("Error encountered while creating Object from dicionary", ex);
            }
        }
コード例 #4
0
 public override RequestOutput Purchase(SkuInput skuInput)
 {
     Start();
     return(RequestOutput.CreateFromJson(PurchaseJson(skuInput.ToJson())));
 }
コード例 #5
0
 public override RequestOutput GetUserData()
 {
     Start();
     return(RequestOutput.CreateFromJson(GetUserDataJson("{}")));
 }
コード例 #6
0
 public override RequestOutput GetPurchaseUpdates(ResetInput resetInput)
 {
     Start();
     return(RequestOutput.CreateFromJson(GetPurchaseUpdatesJson(resetInput.ToJson())));
 }
コード例 #7
0
 public override RequestOutput GetProductData(SkusInput skusInput)
 {
     Start();
     return(RequestOutput.CreateFromJson(GetProductDataJson(skusInput.ToJson())));
 }