예제 #1
0
파일: AbstractChannel.cs 프로젝트: riax/Clr
        public EnqueueResult Enqueue(ILetter letter)
        {
            if (!CanSend && (letter.Type == LetterType.User || letter.Type == LetterType.Batch))
            {
                FailedToSend(this, letter);
                return(EnqueueResult.CantEnqueueMore);
            }

            _queue.Enqueue(letter);
            _transmitter.Enqueue(letter);

            return(EnqueueResult.CantEnqueueMore);
        }
예제 #2
0
 private void InternalEnqueue(ILetter letter)
 {
     _queue.Enqueue(letter);
     _transmitter.Enqueue(letter);
 }