public IEnumerator <T> GetEnumerator() { foreach (var node in FuncEnumerable <WeakNode> .Get(GetNodeEnumerator)) { T current; if (node.TryGetValue(out current)) { yield return(current); } } }
public void Add(T item) { Contract.Requires <ArgumentNullException>(item != null); var node = new WeakNode(item); var last = FuncEnumerable <WeakNode> .Get(GetNodeEnumerator).LastOrDefault(); if (last == null) { m_head = node; } else { last.Next = node; } }