public ReferralData ParseFromAJO(AndroidJavaObject ajo) { if (ajo.IsJavaNull()) { return(null); } using (ajo) { Token = ajo.CallStr("getToken"); ReferrerUserId = ajo.CallStr("getReferrerUserId"); ReferrerChannelId = ajo.CallStr("getReferrerChannelId"); IsFirstMatch = ajo.CallBool("isFirstMatch"); IsGuaranteedMatch = ajo.CallBool("isGuaranteedMatch"); IsReinstall = ajo.CallBool("isReinstall"); IsFirstMatchLink = ajo.CallBool("isFirstMatchLink"); var linkParamsDict = ajo.CallAJO("getLinkParams").FromJavaHashMap(); LinkParams = new LinkParams(linkParamsDict); var originalLinkParamsDict = ajo.CallAJO("getOriginalLinkParams").FromJavaHashMap(); OriginalLinkParams = new LinkParams(originalLinkParamsDict); #pragma warning disable 0618 CustomReferralData = new CustomReferralData(LinkParams); OriginalCustomReferralData = new CustomReferralData(OriginalLinkParams); #pragma warning restore 0618 } return(this); }
#pragma warning disable 0618 internal ReferralData(string token, string referrerUserId, string referrerChannelId, bool isFirstMatch, bool isGuaranteedMatch, bool isReinstall, bool isFirstMatchLink, CustomReferralData customReferralData, LinkParams linkParams, CustomReferralData originalCustomReferralData, LinkParams originalLinkParams) { Token = token; ReferrerUserId = referrerUserId; ReferrerChannelId = referrerChannelId; IsFirstMatch = isFirstMatch; IsGuaranteedMatch = isGuaranteedMatch; IsReinstall = isReinstall; IsFirstMatchLink = isFirstMatchLink; CustomReferralData = customReferralData; OriginalCustomReferralData = originalCustomReferralData; LinkParams = linkParams; OriginalLinkParams = originalLinkParams; }
public ReferralData ParseFromJson(Dictionary <string, object> json) { Token = json["Token"] as string; ReferrerUserId = json["ReferrerUserId"] as string; ReferrerChannelId = json["ReferrerChannelId"] as string; IsFirstMatch = (bool)json["IsFirstMatch"]; IsGuaranteedMatch = (bool)json["IsGuaranteedMatch"]; IsReinstall = (bool)json["IsReinstall"]; IsFirstMatchLink = (bool)json["IsFirstMatchLink"]; LinkParams = new LinkParams(json["LinkParams"] as Dictionary <string, object>); OriginalLinkParams = new LinkParams(json["OriginalLinkParams"] as Dictionary <string, object>); #pragma warning disable 0618 CustomReferralData = new CustomReferralData(LinkParams); OriginalCustomReferralData = new CustomReferralData(OriginalLinkParams); #pragma warning restore 0618 return(this); }
#pragma warning restore 0618 public override int GetHashCode() { unchecked { var hashCode = (Token != null ? Token.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (ReferrerUserId != null ? ReferrerUserId.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (ReferrerChannelId != null ? ReferrerChannelId.GetHashCode() : 0); hashCode = (hashCode * 397) ^ IsFirstMatch.GetHashCode(); hashCode = (hashCode * 397) ^ IsGuaranteedMatch.GetHashCode(); hashCode = (hashCode * 397) ^ IsReinstall.GetHashCode(); hashCode = (hashCode * 397) ^ IsFirstMatchLink.GetHashCode(); #pragma warning disable 0618 hashCode = (hashCode * 397) ^ (CustomReferralData != null ? CustomReferralData.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (OriginalCustomReferralData != null ? OriginalCustomReferralData.GetHashCode() : 0); #pragma warning restore 0618 hashCode = (hashCode * 397) ^ (LinkParams != null ? LinkParams.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (OriginalLinkParams != null ? OriginalLinkParams.GetHashCode() : 0); return(hashCode); } }
private bool Equals(CustomReferralData other) { return(this.DictionaryEquals(other)); }