示例#1
0
        public virtual MessageBase Dequeue(MessageDequeueSettings settings = null)
        {
            var result = this.Dequeue(1, settings);

            if (result == null)
            {
                return(null);
            }

            return(result.FirstOrDefault());
        }
示例#2
0
        public virtual async Task <MessageBase> DequeueAsync(MessageDequeueSettings settings = null)
        {
            var result = await this.DequeueAsync(1, settings);

            if (result == null)
            {
                return(null);
            }

            return(result.FirstOrDefault());
        }
示例#3
0
 public abstract Task <IEnumerable <MessageBase> > DequeueAsync(int count, MessageDequeueSettings settings = null);
示例#4
0
 public virtual IEnumerable <MessageBase> Dequeue(int count, MessageDequeueSettings settings = null)
 {
     return(TaskUtility.ExecuteTask(() => this.DequeueAsync(count)));
 }