public void InviteFriend() { TacoManager.OpenMessage(TacoConfig.TacoSending); Action <string> success = (string data) => { TacoManager.CloseMessage(); }; Action <string, string> fail = (string data, string error) => { TacoConfig.print("Error getting open tournaments : " + data); if (!string.IsNullOrEmpty(error)) { TacoConfig.print("Error : " + error); } }; string fromEmail = TacoManager.User.email; string baseUrl = "baysidegames.com"; GameObject invitePreFab = TacoModalPanel.Instance.GetPreFab(); TournamentInvite _TournamentInvite = invitePreFab.GetComponent <TournamentInvite>(); string emails = _TournamentInvite.GetEmail(); int tournamentId = TacoManager.Target.id; TacoConfig.print("emails : " + emails); StartCoroutine(ApiManager.Instance.InviteFriend(fromEmail, baseUrl, emails, tournamentId, success, fail)); }
private bool ValidateDuplidateEmail(string emailToCheck) { TournamentInvite current = next; while (current != null) { if (current.GetEmail() == emailToCheck) { return(false); } current = current.next; } current = prev; while (current != null) { if (current.GetEmail() == emailToCheck) { return(false); } current = current.prev; } return(true); }
private TournamentInvite NearestDuplicateError() { TournamentInvite current = prev; while (current != null) { if (current.GetEmail() == previousValidEmailValue) { return(current); } current = current.prev; } current = next; while (current != null) { if (current.GetEmail() == previousValidEmailValue) { return(current); } current = current.next; } return(null); }