private void Poll() { isPolling = true; pollCountdownStopwatch.Reset(); pollCountdownStopwatch.Start(); long value = queue.LatestSequenceNumber + 1; List <long> source = queue.SequenceNumbers.ToList(); List <long?> excludeNotificationSequenceNumbers = source.Cast <long?>().ToList(); GetNotificationsSinceSequenceRequest getNotificationsSinceSequenceRequest = new GetNotificationsSinceSequenceRequest(); getNotificationsSinceSequenceRequest.SequenceNumber = value; getNotificationsSinceSequenceRequest.ExcludeNotificationSequenceNumbers = excludeNotificationSequenceNumbers; GetNotificationsSinceSequenceRequest request = getNotificationsSinceSequenceRequest; IWebCall <GetNotificationsSinceSequenceRequest, GetNotificationsResponse> webCall = webCallFactory.NotificationsSinceSequencePost(request); webCall.OnResponse += delegate(object sender, WebCallEventArgs <GetNotificationsResponse> e) { HandleGetNotificationsResponse(e.Response); }; webCall.OnError += HandleGetNotificationsError; webCall.Execute(); }
public IWebCall <GetNotificationsSinceSequenceRequest, GetNotificationsResponse> NotificationsSinceSequencePost(GetNotificationsSinceSequenceRequest request) { return(CreateWebCall <GetNotificationsSinceSequenceRequest, GetNotificationsResponse>(HttpMethod.POST, new Uri(host + "/notifications/sinceSequence"), request)); }