namespace MemoryPools.Collections.Specialized { internal sealed class PoolingNodeCanon : PoolingNodeBase, IPoolingNode where T : class { IPoolingNode IPoolingNode.Next { get => (IPoolingNode) Next; set => Next = (IPoolingNode) value; } T IPoolingNode.this[int index] { get => (T)_buf.Memory.Span[index]; set => _buf.Memory.Span[index] = value; } IPoolingNode IPoolingNode.Init(int capacity) { this.Init(capacity); return this; } public override void Dispose() { base.Dispose(); Pool>.Return(this); } public override IPoolingNode Init(int capacity) { Next = null; _buf = Pool.GetBuffer(capacity); return this; } } }