public void QueueUser(User user)
        {
            // Ensure user is not already queue
            if (this.Queue.Any(x => x.UserId == user.Id))
            {
                throw new DomainException(ErrorCode.LadderUserAlreadyQueue, "User already queued for ladder");
            }

            var queueEntry = new LadderQueueEntry(this, user);

            this.Queue.Add(queueEntry);
        }
Example #2
0
        public void QueueUser(User user)
        {
            // Ensure user is not already queue
            if (this.Queue.Any(x => x.UserId == user.Id))
            {
                throw new DomainException(ErrorCode.LadderUserAlreadyQueue, "User already queued for ladder");
            }

            var queueEntry = new LadderQueueEntry(this, user);
            this.Queue.Add(queueEntry);
        }