private ExtNodeManager() { ExtNodes = new ExtNode[NetManager.MAX_NODE_COUNT]; for (uint i = 0; i < ExtNodes.Length; ++i) { ExtNodes[i] = new ExtNode((ushort)i); } }
/// <summary> /// Travels back to the container object throught the ring. /// </summary> /// <param name="pos">position of the node in the ring</param> /// <returns>the container of the ring</returns> public TBack GetContainer(out int pos) { ExtNode <TNode, TBack> node = this; pos = 1; while (!node.IsHead()) { node = node.Next; pos++; } return(((IExtNodeHead <TBack>)node).BackLink); }
private void Reset(ref ExtNode node) { node.Reset(); }