コード例 #1
0
        public async Task <int> GetMessagesCountAsync(CMPQueueStorageOptions queueStorageOptions)
        {
            if (_queueStorageService == null)
            {
                return(-1);
            }

            var messagesCount = await _queueStorageService.GetMessagesCountAsync(queueStorageOptions);

            return(messagesCount);
        }
コード例 #2
0
        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);
        }
コード例 #3
0
        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);
        }
コード例 #4
0
        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);
        }
コード例 #5
0
        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);
        }
コード例 #6
0
        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);
        }
コード例 #7
0
        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);
        }