Exemple #1
0
        private IEnumerable Dequeue(int count, CollectionRemovedReason reason)
        {
            int actualLength;
            var result = this.GetElements(0, count, true, out actualLength);

            _head  = (_head + actualLength) % _buffer.Length;
            _size -= actualLength;

            //激发“Dequeued”出队事件
            this.OnDequeued(new DequeuedEventArgs(result, true, reason));

            return(result);
        }
		public DequeuedEventArgs(object value, bool isMultiple, CollectionRemovedReason reason)
		{
			_value = value;
			_isMultiple = isMultiple;
			_reason = reason;
		}
Exemple #3
0
 public DequeuedEventArgs(object value, bool isMultiple, CollectionRemovedReason reason)
 {
     _value      = value;
     _isMultiple = isMultiple;
     _reason     = reason;
 }
Exemple #4
0
 public CollectionRemovedEventArgs(CollectionRemovedReason reason, object item)
 {
     _reason = reason;
     _item   = item;
 }
Exemple #5
0
 public DequeuedEventArgs(object value, object settings, CollectionRemovedReason reason)
 {
     this.Value    = value;
     this.Settings = settings;
     this.Reason   = reason;
 }
		public CollectionRemovedEventArgs(CollectionRemovedReason reason, object item)
		{
			_reason = reason;
			_item = item;
		}