Example #1
0
 internal PayResult(ResultContainer resultContainer) : base(resultContainer)
 {
     if (this.CanvasErrorCode != null && this.CanvasErrorCode.Value == PayResult.CancelPaymentFlowCode)
     {
         this.Cancelled = true;
     }
 }
Example #2
0
        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;
                }
            }
        }
Example #3
0
        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);
     }
 }
Example #5
0
        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);
        }
Example #6
0
 public GroupCreateResult(ResultContainer resultContainer) : base(resultContainer)
 {
     if (this.ResultDictionary != null)
     {
         string groupId;
         if (this.ResultDictionary.TryGetValue<string>(GroupCreateResult.IDKey, out groupId))
         {
             this.GroupId = groupId;
         }
     }
 }
Example #7
0
 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;
         }
     }
 }
Example #8
0
        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)
 {
 }
Example #13
0
 public void OnLogoutComplete(ResultContainer resultContainer)
 {
     AccessToken.CurrentAccessToken = null;
 }
 internal RewardedVideoResult(ResultContainer resultContainer) : base(resultContainer)
 {
 }
Example #15
0
 internal ResultBase(ResultContainer result, string error, bool cancelled)
 {
     this.Init(result, error, cancelled, null);
 }
 public abstract void OnAppRequestsComplete(ResultContainer resultContainer);
Example #17
0
 public abstract void OnGroupCreateComplete(ResultContainer resultContainer);
 internal SessionScoreResult(ResultContainer resultContainer) : base(resultContainer)
 {
 }
Example #19
0
 public abstract void OnAppRequestsComplete(ResultContainer resultContainer);
Example #20
0
 public abstract void OnGetAppLinkComplete(ResultContainer resultContainer);
 internal ConsumePurchaseResult(ResultContainer resultContainer) : base(resultContainer)
 {
 }
Example #22
0
 public abstract void OnGroupJoinComplete(ResultContainer resultContainer);
 internal GroupJoinResult(ResultContainer resultContainer) : base(resultContainer)
 {
 }
Example #24
0
 public abstract void OnShareLinkComplete(ResultContainer resultContainer);
 internal OpenAppStoreResult(ResultContainer resultContainer) : base(resultContainer)
 {
 }
Example #26
0
 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);
Example #31
0
 internal ResultBase(ResultContainer result, string error, bool cancelled)
 {
     this.Init(result, error, cancelled, null);
 }
 public abstract void OnGetAppLinkComplete(ResultContainer resultContainer);
 internal InterstitialAdResult(ResultContainer resultContainer) : base(resultContainer)
 {
 }
 public abstract void OnGroupJoinComplete(ResultContainer resultContainer);
Example #35
0
 public abstract void OnLoginComplete(ResultContainer resultContainer);
 public abstract void OnShareLinkComplete(ResultContainer resultContainer);
Example #37
0
 internal ScheduleAppToUserNotificationResult(ResultContainer resultContainer) : base(resultContainer)
 {
 }