public void Enqueue(T change) { if (_currentGroup == null || !_currentGroup.IsOpenGroup) { _currentGroup = CreateNewItemGroup(change); _itemGroupQueue.Enqueue(_currentGroup); } else if (_currentGroup.IsBlocking != change.IsBlocking) { _currentGroup.CloseGroup(); _currentGroup = CreateNewItemGroup(change); _itemGroupQueue.Enqueue(_currentGroup); } _currentGroup.Enqueue(change); }