public bool isDeferred() { if (deepLink != null && deepLink.ContainsKey("is_deferred")) { try { return((bool)deepLink["is_deferred"]); } catch (Exception e) { AppsFlyer.AFLog("DeepLinkEventsArgs.isDeferred", String.Format("{0} Exception caught.", e)); } } return(false); }
public DeepLinkEventsArgs(string str) { try { Dictionary <string, object> dictionary = AppsFlyer.CallbackStringToDictionary(str); string status = ""; string error = ""; if (dictionary.ContainsKey("status") && dictionary["status"] != null) { status = dictionary["status"].ToString(); } if (dictionary.ContainsKey("error") && dictionary["error"] != null) { error = dictionary["error"].ToString(); } if (dictionary.ContainsKey("deepLink") && dictionary["deepLink"] != null) { this.deepLink = AppsFlyer.CallbackStringToDictionary(dictionary["deepLink"].ToString()); } if (dictionary.ContainsKey("is_deferred")) { this.deepLink["is_deferred"] = dictionary["is_deferred"]; } switch (status) { case "FOUND": this.status = DeepLinkStatus.FOUND; break; case "NOT_FOUND": this.status = DeepLinkStatus.NOT_FOUND; break; default: this.status = DeepLinkStatus.ERROR; break; } switch (error) { case "TIMEOUT": this.error = DeepLinkError.TIMEOUT; break; case "NETWORK": this.error = DeepLinkError.NETWORK; break; case "HTTP_STATUS_CODE": this.error = DeepLinkError.HTTP_STATUS_CODE; break; default: this.error = DeepLinkError.UNEXPECTED; break; } } catch (Exception e) { AppsFlyer.AFLog("DeepLinkEventsArgs.parseDeepLink", String.Format("{0} Exception caught.", e)); } }