コード例 #1
0
        private void AeriaGetBalanceResponse(IAsyncResult asr)
        {
            XmlRpcAsyncResult result         = (XmlRpcAsyncResult)asr;
            AuthProxy         clientProtocol = (AuthProxy)result.ClientProtocol;

            clientProtocol.Url = this.EndpointUri;
            try
            {
                XmlRpcRespStruct struct2 = clientProtocol.EndAeriaGetBalance(asr);
                this.mResponse        = new XmlRpcAuthResponse(struct2.mMessage, struct2.mSuccessCode);
                this.mResponse.Points = struct2.mPoints;
            }
            catch (Exception)
            {
                this.mResponse = new XmlRpcAuthResponse("Login Server Unavailable, please try again later", 0, this.mRequest.UserGUID, this.mRequest.Username, this.mRequest.EmailAddress, this.mRequest.Password, this.mRequest.SessionID, this.mRequest.IPAddress, this.mRequest.Platform, null, 0, 0, 0, null, null, null, null);
            }
            try
            {
                if (this.FormsControl != null)
                {
                    this.FormsControl.Invoke(new AuthEndResponseDelegate(this.CallbackMethod.Invoke), new object[] { this, this.Response });
                }
            }
            catch (Exception exception)
            {
                string message = exception.Message;
            }
        }
コード例 #2
0
        private void SetEmailOptInResponse(IAsyncResult asr)
        {
            XmlRpcAsyncResult result         = (XmlRpcAsyncResult)asr;
            AuthProxy         clientProtocol = (AuthProxy)result.ClientProtocol;

            clientProtocol.Url = this.EndpointUri;
            try
            {
                XmlRpcRespStruct struct2 = clientProtocol.EndsetEmailOptIn(asr);
                this.mResponse = new XmlRpcAuthResponse(struct2.mMessage, struct2.mSuccessCode, struct2.mUserGUID, struct2.mUsername, struct2.mEmailAddress, struct2.mPassword, struct2.mSessionID, struct2.mIPAddress, struct2.mPlatform, struct2.mRawCards, struct2.mCrowns, struct2.mCardpoints, struct2.mPremiumCards, struct2.mRawOffers, struct2.mRawPacks, struct2.mRawSharers, struct2.mRawTokens);
            }
            catch (Exception)
            {
                this.mResponse = new XmlRpcAuthResponse("Login Server Unavailable, please try again later", 0, this.mRequest.UserGUID, this.mRequest.Username, this.mRequest.EmailAddress, this.mRequest.Password, this.mRequest.SessionID, this.mRequest.IPAddress, this.mRequest.Platform, null, 0, 0, 0, null, null, null, null);
            }
            try
            {
                if (this.FormsControl != null)
                {
                    this.FormsControl.Invoke(new AuthEndResponseDelegate(this.CallbackMethod.Invoke), new object[] { this, this.Response });
                }
            }
            catch (Exception exception)
            {
                string message = exception.Message;
            }
        }
コード例 #3
0
        private void GetWorldsResponse(IAsyncResult asr)
        {
            XmlRpcAsyncResult result         = (XmlRpcAsyncResult)asr;
            AuthProxy         clientProtocol = (AuthProxy)result.ClientProtocol;

            clientProtocol.Url = this.EndpointUri;
            try
            {
                XmlRpcRespStruct struct2 = clientProtocol.EndGetWorlds(asr);
                this.mResponse = new XmlRpcAuthResponse(struct2.mMessage, struct2.mSuccessCode, struct2.mUserGUID, struct2.mUsername, struct2.mEmailAddress, struct2.mPassword, struct2.mSessionID, struct2.mIPAddress, struct2.mPlatform, struct2.mRawCards, struct2.mCrowns, struct2.mCardpoints, struct2.mPremiumCards, struct2.mRawOffers, struct2.mRawPacks, struct2.mRawSharers, struct2.mRawTokens, struct2.mVeteranLv1, struct2.mVeteranLv2, struct2.mVeteranLv3, struct2.mVeteranLv4, struct2.mVeteranLv5, struct2.mVeteranLv6, struct2.mVeteranLv7, struct2.mVeteranLv8, struct2.mVeteranLv9, struct2.mVeteranLv10, struct2.mVeteranTotalSeconds, struct2.mVeteranSecondsLeft, struct2.mVeteranCurrentLevel, struct2.mPremiumBox, struct2.mRawShields, struct2.mRawWorlds, struct2.mRawProducts, struct2.mSpecialURL);
            }
            catch (Exception exception)
            {
                this.mResponse = new XmlRpcAuthResponse(exception.Message, 0, this.mRequest.UserGUID, this.mRequest.Username, this.mRequest.EmailAddress, this.mRequest.Password, this.mRequest.SessionID, this.mRequest.IPAddress, this.mRequest.Platform, null, 0, 0, 0, null, null, null, null);
            }
            try
            {
                if (this.FormsControl != null)
                {
                    this.FormsControl.Invoke(new AuthEndResponseDelegate(this.CallbackMethod.Invoke), new object[] { this, this.Response });
                }
            }
            catch (Exception exception2)
            {
                string message = exception2.Message;
            }
        }
コード例 #4
0
        private void clientLoginResponse(IAsyncResult asr)
        {
            XmlRpcAsyncResult result         = (XmlRpcAsyncResult)asr;
            AuthProxy         clientProtocol = (AuthProxy)result.ClientProtocol;

            clientProtocol.Url = this.EndpointUri;
            try
            {
                int?mIsbigpoint          = null;
                int?mUnviewedOffers      = null;
                XmlRpcRespStruct struct2 = clientProtocol.EndclientLogin(asr);
                this.mResponse = new XmlRpcAuthResponse(struct2.mMessage, struct2.mSuccessCode, struct2.mUserGUID, struct2.mUsername, struct2.mEmailAddress, struct2.mPassword, struct2.mSessionID, struct2.mIPAddress, struct2.mPlatform, struct2.mRawCards, struct2.mCrowns, struct2.mCardpoints, struct2.mPremiumCards, struct2.mRawOffers, struct2.mRawPacks, struct2.mRawSharers, struct2.mRawTokens, struct2.mVeteranLv1, struct2.mVeteranLv2, struct2.mVeteranLv3, struct2.mVeteranLv4, struct2.mVeteranLv5, struct2.mVeteranLv6, struct2.mVeteranLv7, struct2.mVeteranLv8, struct2.mVeteranLv9, struct2.mVeteranLv10, struct2.mVeteranTotalSeconds, struct2.mVeteranSecondsLeft, struct2.mVeteranCurrentLevel, struct2.mPremiumBox, struct2.mRawShields, struct2.mRawWorlds, struct2.mRawProducts, struct2.mSpecialURL);
                if (struct2.mIsbigpoint.HasValue)
                {
                    mIsbigpoint = struct2.mIsbigpoint;
                }
                this.mResponse.isBigPoint = (mIsbigpoint.GetValueOrDefault() == 1) && mIsbigpoint.HasValue;
                if (struct2.mUnviewedOffers.HasValue)
                {
                    mUnviewedOffers = struct2.mUnviewedOffers;
                }
                this.mResponse.hasUnviewedOffers       = (mUnviewedOffers.GetValueOrDefault() == 1) && mUnviewedOffers.HasValue;
                this.mResponse.OnVacation              = struct2.mOnVacation;
                this.mResponse.FacebookFreePack        = struct2.mFBFreePack;
                this.mResponse.VacationsTaken          = struct2.mVacationsTaken;
                this.mResponse.CancelVacation          = struct2.mCancelVacation;
                this.mResponse.VacationSecondsLeft     = struct2.mVacationSecondsLeft;
                this.mResponse.VacationSecondsToCancel = struct2.mVacationSecondsToCancel;
                this.mResponse.VacationPossible        = struct2.mVacationPossible;
                this.mResponse.RequiresOptInCheck      = struct2.mRequiresOptInCheck;
            }
            catch (Exception exception)
            {
                this.mResponse = new XmlRpcAuthResponse(exception.Message, 0, this.mRequest.UserGUID, this.mRequest.Username, this.mRequest.EmailAddress, this.mRequest.Password, this.mRequest.SessionID, this.mRequest.IPAddress, this.mRequest.Platform, null, 0, 0, 0, null, null, null, null);
            }
            try
            {
                if (this.FormsControl != null)
                {
                    this.FormsControl.Invoke(new AuthEndResponseDelegate(this.CallbackMethod.Invoke), new object[] { this, this.Response });
                }
            }
            catch (Exception exception2)
            {
                string message = exception2.Message;
            }
        }
コード例 #5
0
 public XmlRpcAuthResponse AeriaMakePayment(IAuthRequest req, AuthEndResponseDelegate callbackHandler, Control ctrl, int timeout)
 {
     try
     {
         this.FormsControl   = ctrl;
         this.CallbackMethod = callbackHandler;
         this.mRequest       = (XmlRpcAuthRequest)req;
         AuthProxy proxy = XmlRpcProxyGen.Create <AuthProxy>();
         proxy.Url     = this.EndpointUri;
         proxy.Timeout = timeout;
         XmlRpcRespStruct struct2 = proxy.AeriaMakePayment(this.mRequest.Request);
         this.mResponse = new XmlRpcAuthResponse(struct2.mMessage, struct2.mSuccessCode, struct2.mUserGUID, struct2.mUsername, struct2.mEmailAddress, struct2.mPassword, struct2.mSessionID, struct2.mIPAddress, struct2.mPlatform, struct2.mRawCards, struct2.mCrowns, struct2.mCardpoints, struct2.mPremiumCards, struct2.mRawOffers, struct2.mRawPacks, struct2.mRawSharers, struct2.mRawTokens, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, struct2.mRawProducts, null);
     }
     catch (Exception)
     {
         this.mResponse = new XmlRpcAuthResponse("Login Server Unavailable, please try again later", 0, this.mRequest.UserGUID, this.mRequest.Username, this.mRequest.EmailAddress, this.mRequest.Password, this.mRequest.SessionID, this.mRequest.IPAddress, this.mRequest.Platform, null, 0, 0, 0, null, null, null, null);
     }
     return(this.mResponse);
 }
コード例 #6
0
 public XmlRpcAuthResponse RenameParish(IAuthRequest req, AuthEndResponseDelegate callbackHandler, Control ctrl, int timeout)
 {
     try
     {
         this.FormsControl   = ctrl;
         this.CallbackMethod = callbackHandler;
         this.mRequest       = (XmlRpcAuthRequest)req;
         AuthProxy proxy = XmlRpcProxyGen.Create <AuthProxy>();
         proxy.Url     = this.EndpointUri;
         proxy.Timeout = timeout;
         XmlRpcRespStruct struct2 = proxy.RenameParish(this.mRequest.Request);
         this.mResponse = new XmlRpcAuthResponse(struct2.mMessage, struct2.mSuccessCode);
     }
     catch (Exception)
     {
         this.mResponse = new XmlRpcAuthResponse("Login Server Unavailable, please try again later", 0, this.mRequest.UserGUID, this.mRequest.Username, this.mRequest.EmailAddress, this.mRequest.Password, this.mRequest.SessionID, this.mRequest.IPAddress, this.mRequest.Platform, null, 0, 0, 0, null, null, null, null);
     }
     return(this.mResponse);
 }
コード例 #7
0
        private void AuthenticateUserResponse(IAsyncResult asr)
        {
            XmlRpcAsyncResult result         = (XmlRpcAsyncResult)asr;
            AuthProxy         clientProtocol = (AuthProxy)result.ClientProtocol;

            clientProtocol.Url = this.EndpointUri;
            try
            {
                int?mIsbigpoint          = null;
                int?mUnviewedOffers      = null;
                XmlRpcRespStruct struct2 = clientProtocol.Endauthenticate(asr);
                this.mResponse = new XmlRpcAuthResponse(struct2.mMessage, struct2.mSuccessCode, struct2.mUserGUID, struct2.mUsername, struct2.mEmailAddress, struct2.mPassword, struct2.mSessionID, struct2.mIPAddress, struct2.mPlatform, struct2.mRawCards, struct2.mCrowns, struct2.mCardpoints, struct2.mPremiumCards, struct2.mRawOffers, struct2.mRawPacks, struct2.mRawSharers, struct2.mRawTokens);
                if (struct2.mIsbigpoint.HasValue)
                {
                    mIsbigpoint = struct2.mIsbigpoint;
                }
                this.mResponse.isBigPoint = (mIsbigpoint.GetValueOrDefault() == 1) && mIsbigpoint.HasValue;
                if (struct2.mUnviewedOffers.HasValue)
                {
                    mUnviewedOffers = struct2.mUnviewedOffers;
                }
                this.mResponse.hasUnviewedOffers = (mUnviewedOffers.GetValueOrDefault() == 1) && mUnviewedOffers.HasValue;
            }
            catch (Exception)
            {
                this.mResponse = new XmlRpcAuthResponse("Login Server Unavailable, please try again later", 0, this.mRequest.UserGUID, this.mRequest.Username, this.mRequest.EmailAddress, this.mRequest.Password, this.mRequest.SessionID, this.mRequest.IPAddress, this.mRequest.Platform, null, 0, 0, 0, null, null, null, null);
            }
            try
            {
                if (this.FormsControl != null)
                {
                    this.FormsControl.Invoke(new AuthEndResponseDelegate(this.CallbackMethod.Invoke), new object[] { this, this.Response });
                }
            }
            catch (Exception exception)
            {
                string message = exception.Message;
            }
        }
コード例 #8
0
 public int AeriaGetBalance(IAuthRequest req, AuthEndResponseDelegate callbackHandler, Control ctrl, int timeout, ref XmlRpcAuthResponse response)
 {
     try
     {
         this.FormsControl   = ctrl;
         this.CallbackMethod = callbackHandler;
         this.mRequest       = (XmlRpcAuthRequest)req;
         AuthProxy proxy = XmlRpcProxyGen.Create <AuthProxy>();
         proxy.Url     = this.EndpointUri;
         proxy.Timeout = timeout;
         XmlRpcRespStruct struct2 = proxy.AeriaGetBalance(this.mRequest.Request);
         int num = 0;
         num                     = struct2.mPoints.Value;
         this.mResponse          = new XmlRpcAuthResponse();
         this.mResponse.Products = struct2.mRawProducts;
         response                = this.mResponse;
         return(num);
     }
     catch (Exception)
     {
         return(0);
     }
 }