public async Task <int> GetMessagesCountAsync(CMPQueueStorageOptions queueStorageOptions)
        {
            if (_queueStorageService == null)
            {
                return(-1);
            }

            var messagesCount = await _queueStorageService.GetMessagesCountAsync(queueStorageOptions);

            return(messagesCount);
        }
        public async Task <Tuple <bool, CMPStorageError> > DeleteQueueAsync(CMPQueueStorageOptions queueStorageOptions =
                                                                            null)
        {
            if (_queueStorageService == null)
            {
                return(new Tuple <bool, CMPStorageError>(false, null));
            }

            var deleteQueueInfo = await _queueStorageService.DeleteQueueAsync(queueStorageOptions);

            return(deleteQueueInfo);
        }
        public async Task <Tuple <bool, CMPStorageError> > DeQueueMessageAsync(TimeSpan visibilityTimeOut,
                                                                               CMPQueueStorageOptions queueStorageOptions)
        {
            if (_queueStorageService == null)
            {
                return(new Tuple <bool, CMPStorageError>(false, null));
            }

            var dequeueMessageInfo = await _queueStorageService.DeQueueMessageAsync(visibilityTimeOut,
                                                                                    queueStorageOptions);

            return(dequeueMessageInfo);
        }
        public async Task <Tuple <bool, CMPStorageError> > AddMessageAsync(string messageString,
                                                                           string popupTokenString,
                                                                           CMPQueueStorageOptions queueStorageOptions =
                                                                           null)
        {
            if (_queueStorageService == null)
            {
                return(new Tuple <bool, CMPStorageError>(false, null));
            }

            var addMessageInfo = await _queueStorageService.AddMessageAsync(messageString, popupTokenString,
                                                                            queueStorageOptions);

            return(addMessageInfo);
        }
        public async Task <Tuple <bool, CMPStorageError> > DeleteBatchMessagesAsync(List <CloudQueueMessage>
                                                                                    queueMessagesList,
                                                                                    CMPQueueStorageOptions
                                                                                    queueStorageOptions = null)
        {
            if (_queueStorageService == null)
            {
                return(new Tuple <bool, CMPStorageError>(false, null));
            }

            var deleteMessageInfo = await _queueStorageService.DeleteBatchMessagesAsync(queueMessagesList,
                                                                                        queueStorageOptions);

            return(deleteMessageInfo);
        }
        public async Task <Tuple <bool, CMPStorageError> > UpdateMessageAsync(string updateMessageString,
                                                                              TimeSpan visibilityTimeOut,
                                                                              CMPQueueStorageOptions
                                                                              queueStorageOptions = null)
        {
            if (_queueStorageService == null)
            {
                return(new Tuple <bool, CMPStorageError>(false, null));
            }

            var updateMessageInfo = await _queueStorageService.UpdateMessageAsync(updateMessageString,
                                                                                  visibilityTimeOut,
                                                                                  queueStorageOptions);

            return(updateMessageInfo);
        }
        public async Task <Tuple <string, string, CMPStorageError> > PeekMessageAsync(CMPQueueStorageOptions
                                                                                      queueStorageOptions = null)
        {
            if (_queueStorageService == null)
            {
                return(new Tuple <string, string, CMPStorageError>(null, null, null));
            }

            var peekMessageInfo = await _queueStorageService.PeekMessageAsync(queueStorageOptions);

            return(peekMessageInfo);
        }