public static AdPair CreateFromDictionary(Dictionary<string, object> jsonMap) { try { if (jsonMap == null) { return null; } var request = new AdPair(); if(jsonMap.ContainsKey("adOne")) { request.AdOne = Ad.CreateFromDictionary(jsonMap["adOne"] as Dictionary<string, object>); } if(jsonMap.ContainsKey("adTwo")) { request.AdTwo = Ad.CreateFromDictionary(jsonMap["adTwo"] as Dictionary<string, object>); } return request; } catch (System.ApplicationException ex) { throw new AmazonException("Error encountered while creating Object from dicionary", ex); } }
public static AdPair CreateFromDictionary(Dictionary <string, object> jsonMap) { try { if (jsonMap == null) { return(null); } var request = new AdPair(); if (jsonMap.ContainsKey("adOne")) { request.AdOne = Ad.CreateFromDictionary(jsonMap["adOne"] as Dictionary <string, object>); } if (jsonMap.ContainsKey("adTwo")) { request.AdTwo = Ad.CreateFromDictionary(jsonMap["adTwo"] as Dictionary <string, object>); } return(request); } catch (System.ApplicationException ex) { throw new AmazonException("Error encountered while creating Object from dicionary", ex); } }
public static Dictionary <string, AdPair> MapFromJson(Dictionary <string, object> jsonMap) { Dictionary <string, AdPair> result = new Dictionary <string, AdPair>(); foreach (var entry in jsonMap) { AdPair value = CreateFromDictionary(entry.Value as Dictionary <string, object>); result.Add(entry.Key, value); } return(result); }
public override IsEqual AreAdsEqual(AdPair adPair) { Start(); return IsEqual.CreateFromJson(AreAdsEqualJson(adPair.ToJson())); }
public abstract IsEqual AreAdsEqual(AdPair adPair);
public abstract IsEqual AreAdsEqual(AdPair adPair);
public override IsEqual AreAdsEqual(AdPair adPair) { Start(); return(IsEqual.CreateFromJson(AreAdsEqualJson(adPair.ToJson()))); }