Esempio n. 1
0
        public static Ad CreateFromDictionary(Dictionary<string, object> jsonMap) 
        {
            try 
            {
                if (jsonMap == null)
                {
                    return null;
                }

                var request = new Ad();
                
                
                if(jsonMap.ContainsKey("adType")) 
                {
                    request.AdType = (AdType) System.Enum.Parse(typeof(AdType), (string) jsonMap["adType"]);
                }
                
                if(jsonMap.ContainsKey("identifier")) 
                {
                    request.Identifier = (long) jsonMap["identifier"];
                }

                return request;
            } 
            catch (System.ApplicationException ex) 
            {
                throw new AmazonException("Error encountered while creating Object from dicionary", ex);
            }
        }
 public override void CloseFloatingBannerAd(Ad ad)
 {
     Start();
                     Jsonable.CheckForErrors(Json.Deserialize(CloseFloatingBannerAdJson(ad.ToJson())) as Dictionary<string, object>);
 }
 public override LoadingStarted LoadAndShowFloatingBannerAd(Ad ad)
 {
     Start();
     return LoadingStarted.CreateFromJson(LoadAndShowFloatingBannerAdJson(ad.ToJson()));
 }
 public abstract void CloseFloatingBannerAd(Ad ad);
 public abstract LoadingStarted LoadAndShowFloatingBannerAd(Ad ad);
 public abstract void CloseFloatingBannerAd(Ad ad);
 public void ExecuteSuccess(Dictionary <string, object> objectDictionary)
 {
     responseDelegate(Ad.CreateFromDictionary(objectDictionary));
 }
 public abstract LoadingStarted LoadAndShowFloatingBannerAd(Ad ad);
Esempio n. 9
0
 public override void CloseFloatingBannerAd(Ad ad)
 {
     Start();
     Jsonable.CheckForErrors(Json.Deserialize(CloseFloatingBannerAdJson(ad.ToJson())) as Dictionary <string, object>);
 }
Esempio n. 10
0
 public override LoadingStarted LoadAndShowFloatingBannerAd(Ad ad)
 {
     Start();
     return(LoadingStarted.CreateFromJson(LoadAndShowFloatingBannerAdJson(ad.ToJson())));
 }
Esempio n. 11
0
 public override Ad CreateInterstitialAd()
 {
     Start();
     return(Ad.CreateFromJson(CreateInterstitialAdJson("{}")));
 }
Esempio n. 12
0
 public override Ad CreateFloatingBannerAd(Placement placement)
 {
     Start();
     return(Ad.CreateFromJson(CreateFloatingBannerAdJson(placement.ToJson())));
 }