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); }
public void SendInvite(string channelId, InviteContent customInviteContent, LinkParams linkParams, Action onComplete, Action onCancel, Action <GetSocialError> onFailure) { DebugUtils.LogMethodCall(MethodBase.GetCurrentMethod(), channelId, customInviteContent, linkParams, onComplete, onCancel, onFailure); }
public void SendInvite(string channelId, InviteContent customInviteContent, LinkParams linkParams, Action onComplete, Action onCancel, Action <GetSocialError> onFailure) { var inviteContentAjo = customInviteContent == null ? null : customInviteContent.ToAjo(); var linkParamsAjo = linkParams == null ? null : linkParams.ToAjo(); _getSocial.CallStatic("sendInvite", channelId, inviteContentAjo, linkParamsAjo, new InviteCallbackProxy(onComplete, onCancel, onFailure)); }
public void CreateInviteLink(LinkParams linkParams, Action <string> onSuccess, Action <GetSocialError> onFailure) { string linkParamsJson = null; if (linkParams != null) { linkParamsJson = linkParams.ToJson(); } _gs_createInviteLink(linkParamsJson, Callbacks.StringCallback, onSuccess.GetPointer(), Callbacks.FailureCallback, onFailure.GetPointer()); }
#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); }
public void CreateInviteLink(LinkParams linkParams, Action <string> onSuccess, Action <GetSocialError> onFailure) { var request = new THCreateTokenRequest { ProviderId = InvitesConsts.ManualProviderId, LinkParams = linkParams.ToDictionaryOfStrings() }; LogRequest("createInviteUrl", "providerId=" + request.ProviderId + "; linkParams=" + request.LinkParams.ToDebugString()); WithHadesClient(client => { var response = client.createInviteUrl(SessionId, request); Ui(() => { LogResponse("createInviteUrl", response); onSuccess.SafeCall(response.Url); }); }, onFailure); }
public void SendInvite(string channelId, InviteContent customInviteContent, LinkParams linkParams, Action onComplete, Action onCancel, Action <GetSocialError> onFailure) { string customInviteContentJson = null; if (customInviteContent != null) { customInviteContentJson = customInviteContent.ToJson(); } string linkParamsJson = null; if (linkParams != null) { linkParamsJson = linkParams.ToJson(); } _gs_sendInviteCustomAndLinkParams(channelId, customInviteContentJson, linkParamsJson, Callbacks.ActionCallback, onComplete.GetPointer(), onCancel.GetPointer(), Callbacks.FailureCallback, onFailure.GetPointer()); }
#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); } }
public void CreateInviteLink(LinkParams linkParams, Action <string> onSuccess, Action <GetSocialError> onFailure) { DebugUtils.LogMethodCall(MethodBase.GetCurrentMethod(), onSuccess, onFailure); }
private bool Equals(LinkParams other) { return(this.DictionaryEquals(other)); }
public void CreateInviteLink(LinkParams linkParams, Action <string> onSuccess, Action <GetSocialError> onFailure) { var linkParamsAjo = linkParams == null ? null : linkParams.ToAjo(); _getSocial.CallStatic("createInviteLink", linkParamsAjo, new StringCallbackProxy(onSuccess, onFailure)); }
public override string ToString() { return(string.Format("[ReferralData: Token: {0}, ReferrerUserId={1}, ReferrerChannelId={2}, IsFirstMatch={3}, IsGuaranteedMatch={4}, LinkParams={5}, " + ", OriginalLinkParams={6}]", Token, ReferrerUserId, ReferrerChannelId, IsFirstMatch, IsGuaranteedMatch, LinkParams.ToDebugString(), OriginalLinkParams.ToDebugString())); }
public void SendInvite(string channelId, InviteContent customInviteContent, LinkParams linkParams, Action onComplete, Action onCancel, Action <GetSocialError> onFailure) { GetSocialLogs.W("SendInvite is not supported in Editor yet"); onFailure(new GetSocialError("SendInvite doesn't work in Unity Editor yet")); }
public override string ToString() { StringBuilder __sb = new StringBuilder("THTokenInfo("); bool __first = true; if (ReferrerUserId != null && __isset.referrerUserId) { if (!__first) { __sb.Append(", "); } __first = false; __sb.Append("ReferrerUserId: "); __sb.Append(ReferrerUserId); } if (Token != null && __isset.token) { if (!__first) { __sb.Append(", "); } __first = false; __sb.Append("Token: "); __sb.Append(Token); } if (Provider != null && __isset.provider) { if (!__first) { __sb.Append(", "); } __first = false; __sb.Append("Provider: "); __sb.Append(Provider); } if (__isset.firstMatch) { if (!__first) { __sb.Append(", "); } __first = false; __sb.Append("FirstMatch: "); __sb.Append(FirstMatch); } if (LinkParams != null && __isset.linkParams) { if (!__first) { __sb.Append(", "); } __first = false; __sb.Append("LinkParams: "); __sb.Append(LinkParams.ToDebugString()); } if (InternalData != null && __isset.internalData) { if (!__first) { __sb.Append(", "); } __first = false; __sb.Append("InternalData: "); __sb.Append(InternalData.ToDebugString()); } if (__isset.guaranteedMatch) { if (!__first) { __sb.Append(", "); } __first = false; __sb.Append("GuaranteedMatch: "); __sb.Append(GuaranteedMatch); } if (OriginalData != null && __isset.originalData) { if (!__first) { __sb.Append(", "); } __first = false; __sb.Append("OriginalData: "); __sb.Append(OriginalData.ToDebugString()); } if (Debug != null && __isset.debug) { if (!__first) { __sb.Append(", "); } __first = false; __sb.Append("Debug: "); __sb.Append(Debug); } __sb.Append(")"); return(__sb.ToString()); }