internal PayResult(ResultContainer resultContainer) : base(resultContainer) { if (this.CanvasErrorCode != null && this.CanvasErrorCode.Value == PayResult.CancelPaymentFlowCode) { this.Cancelled = true; } }
public AppLinkResult(ResultContainer resultContainer) : base(resultContainer) { if (this.ResultDictionary != null) { string url; if (this.ResultDictionary.TryGetValue<string>(Constants.UrlKey, out url)) { this.Url = url; } string targetUrl; if (this.ResultDictionary.TryGetValue<string>(Constants.TargetUrlKey, out targetUrl)) { this.TargetUrl = targetUrl; } string refStr; if (this.ResultDictionary.TryGetValue<string>(Constants.RefKey, out refStr)) { this.Ref = refStr; } IDictionary<string, object> argumentBundle; if (this.ResultDictionary.TryGetValue<IDictionary<string, object>>(Constants.ExtrasKey, out argumentBundle)) { this.Extras = argumentBundle; } } }
protected void Init(ResultContainer result, string error, bool cancelled, string callbackId) { this.RawResult = result.RawResult; this.ResultDictionary = result.ResultDictionary; this.Cancelled = cancelled; this.Error = error; this.CallbackId = callbackId; if (this.ResultDictionary != null) { long errorCode; if (this.ResultDictionary.TryGetValue(ResultBase.ErrorCodeKey, out errorCode)) { this.CanvasErrorCode = errorCode; if (errorCode == ResultBase.CancelDialogCode) { this.Cancelled = true; } } string errorMessage; if (this.ResultDictionary.TryGetValue(ResultBase.ErrorMessageKey, out errorMessage)) { this.Error = errorMessage; } } }
public AccessTokenRefreshResult(ResultContainer resultContainer) : base(resultContainer) { if (this.ResultDictionary != null && this.ResultDictionary.ContainsKey(LoginResult.AccessTokenKey)) { this.AccessToken = Utilities.ParseAccessTokenFromResult(this.ResultDictionary); } }
internal ResultBase(ResultContainer result) { string error = ResultBase.GetErrorValue(result.ResultDictionary); bool cancelled = ResultBase.GetCancelledValue(result.ResultDictionary); string callbackId = ResultBase.GetCallbackId(result.ResultDictionary); this.Init(result, error, cancelled, callbackId); }
public GroupCreateResult(ResultContainer resultContainer) : base(resultContainer) { if (this.ResultDictionary != null) { string groupId; if (this.ResultDictionary.TryGetValue<string>(GroupCreateResult.IDKey, out groupId)) { this.GroupId = groupId; } } }
internal ShareResult(ResultContainer resultContainer) : base(resultContainer) { if (this.ResultDictionary != null) { string postId; if (this.ResultDictionary.TryGetValue(ShareResult.PostIDKey, out postId)) { this.PostId = postId; } else if (this.ResultDictionary.TryGetValue("postId", out postId)) { this.PostId = postId; } } }
public AppRequestResult(ResultContainer resultContainer) : base(resultContainer) { if (this.ResultDictionary != null) { string requestID; if (this.ResultDictionary.TryGetValue(AppRequestResult.RequestIDKey, out requestID)) { this.RequestID = requestID; } string toStr; if (this.ResultDictionary.TryGetValue(AppRequestResult.ToKey, out toStr)) { this.To = toStr.Split(','); } else { // On iOS the to field is an array of IDs IEnumerable<object> toArray; if (this.ResultDictionary.TryGetValue(AppRequestResult.ToKey, out toArray)) { var toList = new List<string>(); foreach (object toEntry in toArray) { var toID = toEntry as string; if (toID != null) { toList.Add(toID); } } this.To = toList; } } } }
public abstract void OnGroupCreateComplete(ResultContainer resultContainer);
public void OnLogoutComplete(ResultContainer resultContainer) { AccessToken.CurrentAccessToken = null; }
public virtual void OnInitComplete(ResultContainer resultContainer) { this.Initialized = true; // Wait for the parsing of login to complete since we may need to pull // in more info about the access token returned FacebookDelegate<ILoginResult> loginCallback = (ILoginResult result) => { if (this.onInitCompleteDelegate != null) { this.onInitCompleteDelegate(); } }; resultContainer.ResultDictionary[Constants.CallbackIdKey] = this.CallbackManager.AddFacebookDelegate(loginCallback); this.OnLoginComplete(resultContainer); }
internal GamingServicesFriendFinderResult(ResultContainer resultContainer) : base(resultContainer) { }
internal RewardedVideoResult(ResultContainer resultContainer) : base(resultContainer) { }
internal ResultBase(ResultContainer result, string error, bool cancelled) { this.Init(result, error, cancelled, null); }
public abstract void OnAppRequestsComplete(ResultContainer resultContainer);
internal SessionScoreResult(ResultContainer resultContainer) : base(resultContainer) { }
public abstract void OnGetAppLinkComplete(ResultContainer resultContainer);
internal ConsumePurchaseResult(ResultContainer resultContainer) : base(resultContainer) { }
public abstract void OnGroupJoinComplete(ResultContainer resultContainer);
internal GroupJoinResult(ResultContainer resultContainer) : base(resultContainer) { }
public abstract void OnShareLinkComplete(ResultContainer resultContainer);
internal OpenAppStoreResult(ResultContainer resultContainer) : base(resultContainer) { }
internal TournamentScoreResult(ResultContainer resultContainer) : base(resultContainer) { }
public AppInviteResult(ResultContainer resultContainer) : base(resultContainer) { }
internal InitCloudGameResult(ResultContainer resultContainer) : base(resultContainer) { }
internal IAPReadyResult(ResultContainer resultContainer) : base(resultContainer) { }
public abstract void OnLoginComplete(ResultContainer resultContainer);
internal InterstitialAdResult(ResultContainer resultContainer) : base(resultContainer) { }
internal ScheduleAppToUserNotificationResult(ResultContainer resultContainer) : base(resultContainer) { }