示例#1
0
            public void Dispose()
            {
                _parent?.Dispose();
                _parent = default;

                _hashset?.Dispose();
                _hashset = default;

                _src      = default;
                _selector = default;
                Pool <DistinctExprEnumerator> .Return(this);
            }
示例#2
0
            public DistinctExprEnumerator Init(
                DistinctExprEnumerable <T, TItem> parent,
                IPoolingEnumerator <T> src,
                Func <T, TItem> selector,
                IEqualityComparer <TItem> comparer)
            {
                _src      = src;
                _parent   = parent;
                _selector = selector;
                _hashset  = Pool <PoolingDictionary <TItem, int> > .Get().Init(0, comparer ?? EqualityComparer <TItem> .Default);

                return(this);
            }