protected override void Dispose(bool disposing) { _firstSource.Dispose(); _secondSource.Dispose(); }
//--------------------------------------------------------------------------------------- // Dispose of resources associated with the underlying enumerator. // protected override void Dispose(bool disposing) { Debug.Assert(_source != null); _source.Dispose(); }
protected override void Dispose(bool disposing) { _source.Dispose(); }
//--------------------------------------------------------------------------------------- // Walks the two data sources, left and then right, to produce the union. // internal override bool MoveNext([MaybeNullWhen(false), AllowNull] ref TInputOutput currentElement, ref int currentKey) { if (_hashLookup == null) { _hashLookup = new Set <TInputOutput>(_comparer); _outputLoopCount = new Shared <int>(0); } Debug.Assert(_hashLookup != null); // Enumerate the left and then right data source. When each is done, we set the // field to null so we will skip it upon subsequent calls to MoveNext. if (_leftSource != null) { // Iterate over this set's elements until we find a unique element. TLeftKey keyUnused = default(TLeftKey) !; Pair <TInputOutput, NoKeyMemoizationRequired> currentLeftElement = default(Pair <TInputOutput, NoKeyMemoizationRequired>); int i = 0; while (_leftSource.MoveNext(ref currentLeftElement, ref keyUnused)) { if ((i++ & CancellationState.POLL_INTERVAL) == 0) { CancellationState.ThrowIfCanceled(_cancellationToken); } // We ensure we never return duplicates by tracking them in our set. if (_hashLookup.Add(currentLeftElement.First)) { #if DEBUG currentKey = unchecked ((int)0xdeadbeef); #endif currentElement = currentLeftElement.First; return(true); } } _leftSource.Dispose(); _leftSource = null; } if (_rightSource != null) { // Iterate over this set's elements until we find a unique element. TRightKey keyUnused = default(TRightKey) !; Pair <TInputOutput, NoKeyMemoizationRequired> currentRightElement = default(Pair <TInputOutput, NoKeyMemoizationRequired>); while (_rightSource.MoveNext(ref currentRightElement, ref keyUnused)) { Debug.Assert(_outputLoopCount != null); if ((_outputLoopCount.Value++ & CancellationState.POLL_INTERVAL) == 0) { CancellationState.ThrowIfCanceled(_cancellationToken); } // We ensure we never return duplicates by tracking them in our set. if (_hashLookup.Add(currentRightElement.First)) { #if DEBUG currentKey = unchecked ((int)0xdeadbeef); #endif currentElement = currentRightElement.First; return(true); } } _rightSource.Dispose(); _rightSource = null; } return(false); }
//--------------------------------------------------------------------------------------- // Dispose of resources associated with the underlying enumerator. // protected override void Dispose(bool disposing) { Contract.Assert(m_source != null); m_source.Dispose(); }
protected override void Dispose(bool disposing) { Debug.Assert(_leftSource != null && _rightLookupBuilder != null); _leftSource.Dispose(); _rightLookupBuilder.Dispose(); }
protected override void Dispose(bool disposing) { Contract.Assert(m_leftSource != null && m_rightSource != null); m_leftSource.Dispose(); m_rightSource.Dispose(); }
public void Dispose() { _operatorEnumerator.Dispose(); _operatorEnumerator = null !; }
public void Dispose() { m_operatorEnumerator.Dispose(); m_operatorEnumerator = null; }
protected override void Dispose(bool disposing) { _leftSource?.Dispose(); _rightSource?.Dispose(); }