void service_PollingStepResponseCompleted(object sender, PollingStepResponseCompletedEventArgs e) { LOLMessageClient myService = (LOLMessageClient)sender; myService.PollingStepResponseCompleted -= service_PollingStepResponseCompleted; if (e.Error == null) { LOLMessageDelivery.GeneralError result = e.Result; if (!string.IsNullOrEmpty(result.ErrorNumber) && result.ErrorNumber != "0") { RunOnUiThread(() => Toast.MakeText(context, Application.Context.Resources.GetString(Resource.String.errorUploadPollingMessage), ToastLength.Short).Show()); #if DEBUG System.Diagnostics.Debug.WriteLine("Error in voting - {0}", result.ErrorDescription); #endif } else { MessagePollUtil.pollStep.HasResponded = true; dbm.SetPollingStepHasResponded(MessagePollUtil.pollStep.MessageID.ToString(), MessagePollUtil.pollStep.StepNumber); //RunOnUiThread (() => restartTimerFromPoll ()); LOLMessageClient service = new LOLMessageClient(LOLConstants.DefaultHttpBinding, LOLConstants.LOLMessageEndpoint); service.PollingStepGetResultsCompleted += Service_PollingStepGetResultsCompleted; service.PollingStepGetResultsAsync(MessagePlaybackUtil.messageSteps [co].StepID, AndroidData.CurrentUser.AccountID, new Guid(AndroidData.ServiceAuthToken)); } } else { #if DEBUG System.Diagnostics.Debug.WriteLine("Exception sending vote {0}--{1}", e.Error.Message, e.Error.StackTrace); #endif } }
void service_PollingStepResponseCompleted(object sender, PollingStepResponseCompletedEventArgs e) { LOLMessageClient service = new LOLMessageClient(LOLConstants.DefaultHttpBinding, LOLConstants.LOLMessageEndpoint); service.PollingStepGetResultsCompleted += Service_PollingStepGetResultsCompleted; service.PollingStepGetResultsAsync(stepID, AndroidData.CurrentUser.AccountID, new Guid(AndroidData.ServiceAuthToken)); }