public void AddLeft(int leftSourceIndex, TLeft left) { if (_leftJoiners.Count == 0) { _rightJoiner?.Clear(); } var data = CreateJoinerData(true); data.SourceIndex = leftSourceIndex; _leftJoiners.Add(data); JoinerAdded?.Invoke(data); data.Set(left, _right); }
private void RemoveLeft(ActiveListJoinerData <TLeft, TRight, TResult, TKey> data) { try { data.Clear(); } finally { JoinerRemoved.Invoke(data); data.Dispose(); if (_leftJoiners.Count == 0) { _rightJoiner?.Set(_right); } if (_leftJoiners.Count == 0 && !HasRight) { SetEmptied?.Invoke(this); } } }