public async Task PublishEvents(string stateType, Guid streamId)
        {
            IQueryable <QueueTicket> query = _table.BuildQueueTicketsQuery(stateType, streamId);

            foreach (QueueTicket queueTicket in from t in await query.ExecuteAsync().ConfigureAwait(continueOnCapturedContext: false)
                     orderby t.RowKey
                     select t)
            {
                await FlushEvents(queueTicket).ConfigureAwait(continueOnCapturedContext: false);
            }
        }
 private IQueryable <QueueTicket> BuildQueueTicketsQuery()
 {
     return(_table.BuildQueueTicketsQuery());
 }