コード例 #1
0
        public void CalculateExchangeAllForCoins(IBaseNetworkErrorHandler errorHandler)
        {
            APICall <CalculateExchangeForCoinsOperation> aPICall = clubPenguinClient.RewardApi.CalculateExchangeAllForCoins();

            aPICall.OnResponse += onCalculateExchangeAllForCoins;
            aPICall.OnError    += delegate(CalculateExchangeForCoinsOperation o, HttpResponse response)
            {
                NetworkErrorService.OnError(response, errorHandler);
            };
            aPICall.Execute();
        }
コード例 #2
0
        public void GetLocalPlayerData(IBaseNetworkErrorHandler errorHandler)
        {
            APICall <GetLocalPlayerDataOperation> localPlayerData = clubPenguinClient.PlayerApi.GetLocalPlayerData();

            localPlayerData.OnResponse += localPlayerDataReturned;
            localPlayerData.OnError    += delegate(GetLocalPlayerDataOperation o, HttpResponse response)
            {
                Service.Get <EventDispatcher>().DispatchEvent(default(PlayerStateServiceErrors.PlayerProfileError));
                NetworkErrorService.OnError(response, errorHandler);
            };
            localPlayerData.Execute();
        }
コード例 #3
0
 private void onRoomsFoundToJoinError(GetRoomsOperation operation, HttpResponse response)
 {
     NetworkErrorService.OnError(response, errorHandler);
 }
コード例 #4
0
 private void onFishingCastError(FishingCastOperation operation, HttpResponse response)
 {
     NetworkErrorService.OnError(response, errorHandler, onFishingCastErrorMapper);
 }
コード例 #5
0
 private void onPostRoomPlayersError(PostIglooPlayersOperation operation, HttpResponse response)
 {
     Log.LogNetworkErrorFormatted(this, "onPostRoomPlayersError, status: {0}, body: {1}", response.StatusCode, response.Text);
     NetworkErrorService.OnError(response, errorHandler, onPostRoomPlayersErrorMapper);
 }
コード例 #6
0
 protected void handleCPResponseError(HttpResponse httpResponse)
 {
     NetworkErrorService.dispatchErrorEvent(httpResponse);
 }