GetEvents returns but does not dequeue the oldest pending event messages for the Jetstream user. No more than 100 messages will be returned on any given GetEvents call. Request object for Jetstream version 1.3 GetEvents.
Author Mark Bailey
Inheritance: JetstreamRequest
        /// <summary>
        /// Task for Receiving messages from Jetstream Ground.
        /// </summary>
        private string ReceiveTask(CancellationToken ct)
        {
            try
            {
                JetstreamServiceClient client = new JetstreamServiceClient(JetstreamUrl, UserAccessKey);
                GetEventsRequest request = new GetEventsRequest();
                GetEventsResponse response = client.GetEvents(request);
                string currentBatchId = response.BatchId;
                List<JetstreamEvent> messages = response.Events.ToList();

                // now add the Messages to the data store for the window thread
                if (ct.IsCancellationRequested)
                {
                    return currentBatchId;
                }

                lock (_setLock)
                {
                    foreach (JetstreamEvent t in messages)
                    {
                        if (ct.IsCancellationRequested)
                        {
                            break;
                        }
                        _set.Add(t);
                    }
                }
                return currentBatchId;
            }
            catch (Exception ex)
            {
                EventLog.WriteEntry(EventLogSource, ex.Message + "\n" + ex.StackTrace, EventLogEntryType.Error);
            }
            return String.Empty;
        }
        public void GetEventsTest()
        {

            // construct a Jetstream service client
            JetstreamServiceClient client = new JetstreamServiceClient(JetstreamConfiguration.Url, JetstreamConfiguration.ApplicationAccessKey);

            try
            {
                // create and configure the request object
                GetEventsRequest request = new GetEventsRequest();
                request.Limit = 2;
                // call the Jetstream ReST endpoint 
                client.GetEvents(request);
            }
            catch (Exception ex)
            {
               Assert.Fail(ex.ToString());
            }
        }